forked from phachon/mm-wiki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfollow_user.html
86 lines (86 loc) · 4.47 KB
/
follow_user.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<div class="container-fluid">{{$user := .user}}{{$loginUserId := .login_user_id}}
<div class="panel panel-default">
<div class="panel-body">
<div class="page-header">
<h3><i class="fa fa-address-card-o"></i> {{$user.username}}({{$user.given_name}})</h3>
</div>
<ul class="nav nav-tabs">
<li><a href="/user/info?user_id={{$user.user_id}}">用户信息</a></li>
<li class="active"><a href="/user/followUser?user_id={{$user.user_id}}">关注用户</a></li>
</ul>
<br>
<div class="row">
<div class="col-md-6">
<div style="margin: 10px 0 15px 0">
<span class="label label-default">他的关注</span>
</div>
{{if eq .followCount 0}}
<div class="alert alert-info alert-dismissible fade in" role="alert" style="margin-bottom: 0">
<p><i class="glyphicon glyphicon-volume-up"></i> 还没有关注任何用户!</p>
</div>
{{else}}
<table class="table">
<thead>
<tr>
<td class="w25p text-left"><strong>用户名</strong></td>
<td class="text-left"><strong>姓名</strong></td>
<td class="text-left"><strong>邮箱</strong></td>
<td class="w12p center"><strong>取消</strong></td>
</tr>
</thead>
<tbody>
{{range $user := .users}}
<tr>
<td>
<strong><a href="/user/info?user_id={{$user.user_id}}">{{$user.username}} </strong><span class="text text-primary"><i class="glyphicon glyphicon-new-window"></i></span> </a>
</td>
<td>{{$user.given_name}}</td>
<td>{{$user.email}}</td>
<td class="center">
<a onclick="Common.ajaxSubmit('/follow/cancel?follow_id={{$user.follow_id}}')"><i class="glyphicon glyphicon-heart"></i></a>
</td>
</tr>
{{end}}
</tbody>
</table>
{{end}}
</div>
<div class="col-md-6">
<div style="margin: 10px 0 15px 0">
<span class="label label-default">他的粉丝</span>
</div>
{{if eq .fansCount 0}}
<div class="alert alert-info alert-dismissible fade in" role="alert" style="margin-bottom: 0">
<p><i class="glyphicon glyphicon-volume-up"></i> 暂时还没有粉丝!</p>
</div>
{{else}}
<table class="table">
<thead>
<tr>
<td class="w25p text-left"><strong>用户名</strong></td>
<td class="text-left"><strong>姓名</strong></td>
<td class="text-left"><strong>邮箱</strong></td>
</tr>
</thead>
<tbody>
{{range $fansUser := .fansUsers}}
<tr>
<td>
{{if eq $fansUser.user_id $loginUserId}}
<strong><a href="/system/main/index" target="_parent">{{$fansUser.username}} <span class="text text-primary"><i class="glyphicon glyphicon-new-window"></i></span> </a></strong>
{{else}}
<a href="/user/info?user_id={{$fansUser.user_id}}">{{$fansUser.username}} <span class="text text-primary"><i class="glyphicon glyphicon-new-window"></i></span> </a></strong>
{{end}}
</td>
<td>{{$fansUser.given_name}}</td>
<td>{{$fansUser.email}}</td>
</tr>
{{end}}
</tbody>
</table>
{{end}}
</div>
</div>
</div>
</div>
</div>