X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fdoc.php;h=ebffb7c1542fc64843d635b7a19c310c689f20f5;hb=9a0e71f9bf3329004949a0cef61abb5a354c7688;hp=fd48ac110fc38377238ac063cfea5b892acb3d83;hpb=f93575bd46db8eb559b6eef6abcab4e13b349748;p=quix0rs-gnu-social.git diff --git a/actions/doc.php b/actions/doc.php index fd48ac110f..ebffb7c154 100644 --- a/actions/doc.php +++ b/actions/doc.php @@ -42,9 +42,7 @@ if (!defined('LACONICA')) { * @author Robin Millette * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://laconi.ca/ - - -*/ + */ class DocAction extends Action { var $filename; @@ -52,16 +50,16 @@ class DocAction extends Action /** * Class handler. - * + * * @param array $args array of arguments * * @return nothing - */ + */ function handle($args) { parent::handle($args); $this->title = $this->trimmed('title'); - $this->filename = INSTALLDIR.'/doc/'.$this->title; + $this->filename = INSTALLDIR.'/doc-src/'.$this->title; if (!file_exists($this->filename)) { $this->clientError(_('No such document.')); return; @@ -69,11 +67,30 @@ class DocAction extends Action $this->showPage(); } + // overrrided to add entry-title class + function showPageTitle() { + $this->element('h1', array('class' => 'entry-title'), $this->title()); + } + + // overrided to add hentry, and content-inner classes + function showContentBlock() + { + $this->elementStart('div', array('id' => 'content', 'class' => 'hentry')); + $this->showPageTitle(); + $this->showPageNoticeBlock(); + $this->elementStart('div', array('id' => 'content_inner', + 'class' => 'entry-content')); + // show the actual content (forms, lists, whatever) + $this->showContent(); + $this->elementEnd('div'); + $this->elementEnd('div'); + } + /** * Display content. - * + * * @return nothing - */ + */ function showContent() { $c = file_get_contents($this->filename); @@ -83,12 +100,16 @@ class DocAction extends Action /** * Page title. - * + * * @return page title - */ + */ function title() { return ucfirst($this->title); } -} + function isReadOnly() + { + return true; + } +}