]> source.dussan.org Git - nextcloud-server.git/commitdiff
Make user names clickable
authorLukas Reschke <lukas@owncloud.com>
Fri, 3 Apr 2015 11:33:27 +0000 (13:33 +0200)
committerLukas Reschke <lukas@owncloud.com>
Fri, 3 Apr 2015 11:36:03 +0000 (13:36 +0200)
lib/private/ocsclient.php
settings/templates/apps.php
tests/lib/OCSClientTest.php

index 30747c0d5fb237fa2e231ec51d87c9be9e7b353e..df988d7d3a95d77b124517c8e1b555c0ffac7761 100644 (file)
@@ -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;
index f930ce6d444f046035243baee3a3f6df23f8e706..b9459e0bd54617223ef482f16c96ea6855692073 100644 (file)
@@ -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}}
index 6c83103b574a109f27208cd3f3f0422743ab1f60..fa3f1fe7848e52d8fcdab94ee55b05a0c626e458 100644 (file)
@@ -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' => '',