feat(users): add user-info link at many place

This commit is contained in:
OldHawk
2017-07-17 22:59:33 +08:00
parent e9e93da8ec
commit 017a72182d
3 changed files with 12 additions and 5 deletions

View File

@@ -256,7 +256,10 @@
{{item.torrent_finished}}
</p>
</td>
<td class="col-md-1 td-v-middle text-center" message-to="item.user" to-class="message-to-icon">{{item.user.displayName}}</td>
<td class="col-md-1 td-v-middle text-center">
<span user-info="item.user">{{item.user.displayName}}</span>
<span message-to="item.user" to-class="message-to-icon"></span>
</td>
</tr>
</tbody>
</table>

View File

@@ -209,13 +209,14 @@
<div class="timeline-comment">
<div class="timeline-comment-header">
<div class="timeline-comment-header-text">{{item.user.displayName}}
<div class="timeline-comment-header-text">
<span user-info="item.user">{{item.user.displayName}}</span>
<span message-to="item.user" to-class="message-to-icon"></span>
<span class="user-ud-text">
(<span class="glyphicon glyphicon-arrow-up torrent-up"></span>{{item.user.uploaded | bytes}}
<span class="glyphicon glyphicon-arrow-down torrent-down"></span>{{item.user.downloaded | bytes}}
)
</span>
<span message-to="item.user" to-class="message-to-icon"></span>
</div>
<span class="timeline-comment-header-time-text">{{item.createdat | date:'yyyy-MM-dd HH:mm:ss'}}</span>
</div>
@@ -326,7 +327,10 @@
<div class="padding-top-30">
<dl class="dl-horizontal" style="margin-bottom: 0;">
<dt class="h-line">{{ 'TABLE_FIELDS.PUBLISHER' | translate}}</dt>
<dd class="h-line" message-to="vm.torrentLocalInfo.user" to-class="message-to-icon">{{vm.torrentLocalInfo.user.displayName}}</dd>
<dd class="h-line">
<span user-info="vm.torrentLocalInfo.user">{{vm.torrentLocalInfo.user.displayName}}</span>
<span message-to="vm.torrentLocalInfo.user" to-class="message-to-icon"></span>
</dd>
<dt class="h-line">{{ 'ANNOUNCE_URL' | translate}}</dt>
<dd class="h-line">{{vm.torrentLocalInfo.torrent_announce}}</dd>

View File

@@ -20,7 +20,7 @@
var user = s;
var title = $translate.instant('USER_INFO_TITLE', {name: user.displayName});
var cls = attrs.infoClass;
var e = angular.element('<a href="#" class="' + (cls ? cls : "") + '" ui-sref="userinfo({userId: \'' + user._id + '\'})" title="' + title + '">' + element[0].innerHTML + '</a>');
var e = angular.element('<a href="#" class="' + (cls ? cls : "") + '" ui-sref="userinfo({userId: \'' + user._id + '\'})" title="' + title + '" ng-click="$event.stopPropagation();">' + element[0].innerHTML + '</a>');
element.html(e[0].outerHTML);
$compile(element.contents())(scope);
}