]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/version.php
use small triangle for notice addressees
[quix0rs-gnu-social.git] / actions / version.php
index 92a59ed4743b7f875edbc6cbc860b1aa481d78e3..37555652c764f501ef83ca2201b405f0c745a97b 100644 (file)
@@ -41,10 +41,11 @@ if (!defined('STATUSNET')) {
  * @category Info
  * @package  StatusNet
  * @author   Evan Prodromou <evan@status.net>
+ * @author   Craig Andrews <candrews@integralblue.com>
+ * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
  * @link     http://status.net/
  */
-
 class VersionAction extends Action
 {
     var $pluginVersions = array();
@@ -56,7 +57,6 @@ class VersionAction extends Action
      *
      * @return boolean is read only action?
      */
-
     function isReadOnly($args)
     {
         return true;
@@ -67,9 +67,9 @@ class VersionAction extends Action
      *
      * @return string page title
      */
-
     function title()
     {
+        // TRANS: Title for version page. %s is the StatusNet version.
         return sprintf(_("StatusNet %s"), STATUSNET_VERSION);
     }
 
@@ -83,7 +83,6 @@ class VersionAction extends Action
      *
      * @return boolean true
      */
-
     function prepare($args)
     {
         parent::prepare($args);
@@ -103,50 +102,86 @@ class VersionAction extends Action
      *
      * @return void
      */
-
     function handle($args)
     {
         parent::handle($args);
         $this->showPage();
     }
 
+
+    /*
+    * Override to add hentry, and content-inner classes
+    *
+    * @return void
+    */
+    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');
+     }
+
+    /*
+    * Overrride to add entry-title class
+    *
+    * @return void
+    */
+    function showPageTitle() {
+        $this->element('h1', array('class' => 'entry-title'), $this->title());
+    }
+
+
     /**
      * Show version information
      *
      * @return void
      */
-
     function showContent()
     {
         $this->elementStart('p');
 
-        $this->raw(sprintf(_('This site is powered by %s version %s, '.
+        // TRANS: Content part of StatusNet version page.
+        // TRANS: %1$s is the engine name (StatusNet) and %2$s is the StatusNet version.
+        $this->raw(sprintf(_('This site is powered by %1$s version %2$s, '.
                              'Copyright 2008-2010 StatusNet, Inc. '.
                              'and contributors.'),
                            XMLStringer::estring('a', array('href' => 'http://status.net/'),
+                                                // TRANS: Engine name.
                                                 _('StatusNet')),
                            STATUSNET_VERSION));
         $this->elementEnd('p');
 
+        // TRANS: Header for StatusNet contributors section on the version page.
         $this->element('h2', null, _('Contributors'));
 
         $this->element('p', null, implode(', ', $this->contributors));
 
+        // TRANS: Header for StatusNet license section on the version page.
         $this->element('h2', null, _('License'));
 
         $this->element('p', null,
+                       // TRANS: Content part of StatusNet version page.
                        _('StatusNet is free software: you can redistribute it and/or modify '.
                          'it under the terms of the GNU Affero General Public License as published by '.
                          'the Free Software Foundation, either version 3 of the License, or '.
                          '(at your option) any later version. '));
 
         $this->element('p', null,
+                       // TRANS: Content part of StatusNet version page.
                        _('This program is distributed in the hope that it will be useful, '.
                          'but WITHOUT ANY WARRANTY; without even the implied warranty of '.
                          'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the '.
                          'GNU Affero General Public License for more details. '));
 
         $this->elementStart('p');
+        // TRANS: Content part of StatusNet version page.
+        // TRANS: %s is a link to the AGPL license with link description "http://www.gnu.org/licenses/agpl.html".
         $this->raw(sprintf(_('You should have received a copy of the GNU Affero General Public License '.
                              'along with this program.  If not, see %s.'),
                            XMLStringer::estring('a', array('href' => 'http://www.gnu.org/licenses/agpl.html'),
@@ -156,36 +191,53 @@ class VersionAction extends Action
         // XXX: Theme information?
 
         if (count($this->pluginVersions)) {
+            // TRANS: Header for StatusNet plugins section on the version page.
             $this->element('h2', null, _('Plugins'));
 
+            $this->elementStart('table', array('id' => 'plugins_enabled'));
+
+            $this->elementStart('thead');
+            $this->elementStart('tr');
+            // TRANS: Column header for plugins table on version page.
+            $this->element('th', array('id' => 'plugin_name'), _m('HEADER','Name'));
+            // TRANS: Column header for plugins table on version page.
+            $this->element('th', array('id' => 'plugin_version'), _m('HEADER','Version'));
+            // TRANS: Column header for plugins table on version page.
+            $this->element('th', array('id' => 'plugin_authors'), _m('HEADER','Author(s)'));
+            // TRANS: Column header for plugins table on version page.
+            $this->element('th', array('id' => 'plugin_description'), _m('HEADER','Description'));
+            $this->elementEnd('tr');
+            $this->elementEnd('thead');
+
+            $this->elementStart('tbody');
             foreach ($this->pluginVersions as $plugin) {
-                $this->elementStart('dl');
-                $this->element('dt', null, _('Name'));
+                $this->elementStart('tr');
                 if (array_key_exists('homepage', $plugin)) {
-                    $this->elementStart('dd');
+                    $this->elementStart('th');
                     $this->element('a', array('href' => $plugin['homepage']),
                                    $plugin['name']);
-                    $this->elementEnd('dd');
+                    $this->elementEnd('th');
                 } else {
-                    $this->element('dd', null, $plugin['name']);
+                    $this->element('th', null, $plugin['name']);
                 }
-                $this->element('dt', null, _('Version'));
-                $this->element('dd', null, $plugin['version']);
+
+                $this->element('td', null, $plugin['version']);
+
                 if (array_key_exists('author', $plugin)) {
-                    $this->element('dt', null, _('Author(s)'));
-                    $this->element('dd', null, $plugin['author']);
+                    $this->element('td', null, $plugin['author']);
                 }
+
                 if (array_key_exists('rawdescription', $plugin)) {
-                    $this->element('dt', null, _('Description'));
-                    $this->elementStart('dd');
+                    $this->elementStart('td');
                     $this->raw($plugin['rawdescription']);
-                    $this->elementEnd('dd');
+                    $this->elementEnd('td');
                 } else if (array_key_exists('description', $plugin)) {
-                    $this->element('dt', null, _('Description'));
-                    $this->element('dd', null, $plugin['description']);
+                    $this->element('td', null, $plugin['description']);
                 }
-                $this->elementEnd('dl');
+                $this->elementEnd('tr');
             }
+            $this->elementEnd('tbody');
+            $this->elementEnd('table');
         }
 
     }
@@ -223,5 +275,8 @@ class VersionAction extends Action
                               'Federico Marani',
                               'Craig Andrews',
                               'mEDI',
-                              'Brett Taylor');
+                              'Brett Taylor',
+                              'Brigitte Schuster',
+                              'Brion Vibber',
+                              'Siebrand Mazeland');
 }