]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/applicationlist.php
Misses this file to merge. I like the comments.
[quix0rs-gnu-social.git] / lib / applicationlist.php
index ff9ac5a20a75e30a19c01296e379830c3e1c9431..d0c9256df714ed39763075d061b38542b4f79677 100644 (file)
@@ -87,50 +87,26 @@ class ApplicationList extends Widget
     {
         $user = common_current_user();
 
-        $this->out->elementStart(
-            'li',
-            array(
-                'class' => 'application',
-                'id'    => 'oauthclient-' . $this->application->id
-            )
-        );
+        $this->out->elementStart('li', array('class' => 'application h-entry',
+                                             'id'    => 'oauthclient-' . $this->application->id));
 
-        $this->out->elementStart('span', 'vcard author');
-
-        $this->out->elementStart(
-            'a',
-            array(
-                'href' => common_local_url(
-                    'showapplication',
-                    array('id' => $this->application->id)),
-                    'class' => 'url'
-            )
-        );
+        $this->out->elementStart('a', array('href' => common_local_url('showapplication',
+                                                                       array('id' => $this->application->id)),
+                                            'class' => 'h-card'));
 
         if (!empty($this->application->icon)) {
-            $this->out->element(
-                'img',
-                array(
-                    'src' => $this->application->icon,
-                    'class' => 'photo avatar'
-                )
-            );
+            $this->out->element('img', array('src' => $this->application->icon,
+                                             'class' => 'avatar u-photo'));
         }
 
-        $this->out->element('span', 'fn', $this->application->name);
+        $this->out->text($this->application->name);
         $this->out->elementEnd('a');
-        $this->out->elementEnd('span');
 
         $this->out->raw(' by ');
 
-        $this->out->element(
-            'a',
-            array(
-                'href' => $this->application->homepage,
-                'class' => 'url'
-            ),
-            $this->application->organization
-        );
+        $this->out->element('a', array('href' => $this->application->homepage,
+                                       'class' => 'u-url'),
+                            $this->application->organization);
 
         $this->out->element('p', 'note', $this->application->description);
         $this->out->elementEnd('li');
@@ -202,58 +178,35 @@ class ConnectedAppsList extends Widget
 
     function showConnection()
     {
-        $app = Oauth_application::staticGet('id', $this->connection->application_id);
+        $app = Oauth_application::getKV('id', $this->connection->application_id);
 
-        $this->out->elementStart(
-            'li',
-            array(
-                'class' => 'application',
-                'id'    => 'oauthclient-' . $app->id
-            )
-        );
+        $this->out->elementStart('li', array('class' => 'application h-entry',
+                                             'id'    => 'oauthclient-' . $app->id));
 
-        $this->out->elementStart('span', 'vcard author');
-
-        $this->out->elementStart(
-            'a',
-            array(
-                'href' => $app->source_url,
-                'class' => 'url'
-            )
-        );
+        $this->out->elementStart('a', array('href' => $app->source_url,
+                                            'class' => 'h-card p-name'));
 
         if (!empty($app->icon)) {
-            $this->out->element(
-                'img',
-                array(
-                    'src' => $app->icon,
-                    'class' => 'photo avatar'
-                )
-            );
+            $this->out->element('img', array('src' => $app->icon,
+                                             'class' => 'avatar u-photo'));
         }
         if ($app->name != 'anonymous') {
-            $this->out->element('span', 'fn', $app->name);
+            $this->out->text($app->name);
+        } else {
+            // TRANS: Name for an anonymous application in application list.
+            $this->out->element('span', 'p-name', _('Unknown application'));
         }
         $this->out->elementEnd('a');
 
-        if ($app->name == 'anonymous') {
-            $this->out->element('span', 'fn', "Unknown application");
-        }
-
-        $this->out->elementEnd('span');
-
         if ($app->name != 'anonymous') {
-
+            // @todo FIXME: i18n trouble.
+            // TRANS: Message has a leading space and a trailing space. Used in application list.
+            // TRANS: Before this message the application name is put, behind it the organisation that manages it.
             $this->out->raw(_(' by '));
 
-            $this->out->element(
-                'a',
-                array(
-                    'href' => $app->homepage,
-                    'class' => 'url'
-                ),
-                $app->organization
-            );
+            $this->out->element('a', array('href' => $app->homepage,
+                                           'class' => 'h-card'),
+                                $app->organization);
         }
 
         // TRANS: Application access type
@@ -267,6 +220,7 @@ class ConnectedAppsList extends Widget
         // TRANS: Used in application list. %1$s is a modified date, %2$s is access type ("read-write" or "read-only")
         $txt = sprintf(_('Approved %1$s - "%2$s" access.'), $modifiedDate, $access);
 
+        // @todo FIXME: i18n trouble.
         $this->out->raw(" - $txt");
         if (!empty($app->description)) {
             $this->out->element(
@@ -294,7 +248,7 @@ class ConnectedAppsList extends Widget
         $this->out->elementStart('fieldset');
         $this->out->hidden('oauth_token', $this->connection->token);
         $this->out->hidden('token', common_session_token());
-        // TRANS: Button label
+        // TRANS: Button label in application list to revoke access to user data.
         $this->out->submit('revoke', _m('BUTTON','Revoke'));
         $this->out->elementEnd('fieldset');
         $this->out->elementEnd('form');