diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-04-03 13:33:27 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-04-03 13:36:03 +0200 |
commit | 25531bad88617608247d53c4acba231a2322b105 (patch) | |
tree | 8234a5b477c5618a19c77bc39b9a77895481ac8b | |
parent | 0816cf91422346313d44cba5f017125899afbf2d (diff) | |
download | nextcloud-server-25531bad88617608247d53c4acba231a2322b105.tar.gz nextcloud-server-25531bad88617608247d53c4acba231a2322b105.zip |
Make user names clickable
-rw-r--r-- | lib/private/ocsclient.php | 2 | ||||
-rw-r--r-- | settings/templates/apps.php | 2 | ||||
-rw-r--r-- | tests/lib/OCSClientTest.php | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/lib/private/ocsclient.php b/lib/private/ocsclient.php index 30747c0d5fb..df988d7d3a9 100644 --- a/lib/private/ocsclient.php +++ b/lib/private/ocsclient.php @@ -202,6 +202,7 @@ class OCSClient { $app['type'] = (string)$tmp[$i]->typeid; $app['typename'] = (string)$tmp[$i]->typename; $app['personid'] = (string)$tmp[$i]->personid; + $app['profilepage'] = (string)$tmp[$i]->profilepage; $app['license'] = (string)$tmp[$i]->license; $app['detailpage'] = (string)$tmp[$i]->detailpage; $app['preview'] = (string)$tmp[$i]->smallpreviewpic1; @@ -274,6 +275,7 @@ class OCSClient { $app['label'] = (string)$tmp->label; $app['typename'] = (string)$tmp->typename; $app['personid'] = (string)$tmp->personid; + $app['profilepage'] = (string)$tmp->profilepage; $app['detailpage'] = (string)$tmp->detailpage; $app['preview1'] = (string)$tmp->smallpreviewpic1; $app['preview2'] = (string)$tmp->smallpreviewpic2; diff --git a/settings/templates/apps.php b/settings/templates/apps.php index f930ce6d444..b9459e0bd54 100644 --- a/settings/templates/apps.php +++ b/settings/templates/apps.php @@ -62,11 +62,13 @@ script( <div class="app-level"> {{{level}}} </div> + {{#if profilepage}}<a href="{{profilepage}}" target="_blank" rel="noreferrer">{{/if}} <div class="app-author"><?php p($l->t('by')); ?> {{author}} {{#if licence}} ({{licence}}-<?php p($l->t('licensed')); ?>) {{/if}} </div> + {{#if profilepage}}</a>{{/if}} {{#if score}} <div class="app-score">{{{score}}}</div> {{/if}} diff --git a/tests/lib/OCSClientTest.php b/tests/lib/OCSClientTest.php index 6c83103b574..fa3f1fe7848 100644 --- a/tests/lib/OCSClientTest.php +++ b/tests/lib/OCSClientTest.php @@ -517,6 +517,7 @@ class OCSClientTest extends \Test\TestCase { 'score' => '60', 'downloads' => 5393, 'level' => 0, + 'profilepage' => 'http://opendesktop.org/usermanager/search.php?username=owncloud', ], [ 'id' => '168708', @@ -535,6 +536,7 @@ class OCSClientTest extends \Test\TestCase { 'score' => '58', 'downloads' => 4237, 'level' => 200, + 'profilepage' => 'http://opendesktop.org/usermanager/search.php?username=owncloud', ], ]; $this->assertEquals($expected, $this->ocsClient->getApplications([815, 1337], 1, 'approved')); @@ -760,6 +762,7 @@ class OCSClientTest extends \Test\TestCase { 'label' => 'recommended', 'typename' => 'ownCloud other', 'personid' => 'owncloud', + 'profilepage' => 'http://opendesktop.org/usermanager/search.php?username=owncloud', 'detailpage' => 'https://apps.owncloud.com/content/show.php?content=166053', 'preview1' => '', 'preview2' => '', |