]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/doc.php
isReadOnly() now takes arguments
[quix0rs-gnu-social.git] / actions / doc.php
index aaf006f07159abbbd8ca91f52a72a28cea91ebef..e6508030b658770e3009df0d47959886d4b89d52 100644 (file)
@@ -50,7 +50,7 @@ class DocAction extends Action
 
     /**
      * Class handler.
-     * 
+     *
      * @param array $args array of arguments
      *
      * @return nothing
@@ -59,7 +59,7 @@ class DocAction extends Action
     {
         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;
@@ -67,9 +67,28 @@ 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()
@@ -81,12 +100,16 @@ class DocAction extends Action
 
     /**
      * Page title.
-     * 
+     *
      * @return page title
      */
     function title()
     {
         return ucfirst($this->title);
     }
-}
 
+    function isReadOnly($args)
+    {
+        return true;
+    }
+}