summaryrefslogtreecommitdiffstats
path: root/templates/user_info.html
blob: 1700fda8037db45e67a3eb90eacd108b97f3dffa (plain)
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
{% load extra_tags %}
{% load extra_filters %}
{% load humanize %}
<div id="subheader" class="headUser">
    {{view_user.username}}
    
</div>

<table class="user-info-table">
    <tr>
        <td width="180" style="vertical-align:middle;text-align:center;">
            <table width="100%">
                <tr>
                    <td>
                        {% gravatar view_user 128 %}
                    </td>
                </tr>
                <tr>
                    <td align="center">
                        <div class="scoreNumber">{{view_user.reputation|intcomma}}</div>
                        <p><b style="color:#777;">积分</b></p>
                    </td>
                </tr>
            </table>
        </td>
        <td width="360" style="vertical-align: top;">
            <table class="user-details">
                <tr height="30px">
                    <th width="130" align="left"><strong>注册用户</strong></th>
                    <th width="230"  align="right">
                        {% if request.user|can_view_user_edit:view_user %}
                        <span class="user-edit-link"><a href="/users/{{ view_user.id }}/edit/">更新我的资料</a></span>
                        {% endif %}
                    </th>
                </tr>
                {% if view_user.real_name %}
                <tr>
                    <td >姓名</td>
                    <td ><b>{{view_user.real_name}}</b></td>
                </tr>
                {% endif %}
                <tr>
                    <td>已加入</td>
                    <td>{{ view_user.date_joined|timesince }}</td>
                </tr>
                {% if view_user.last_seen %}
                <tr>
                    <td>上次活动时间</td>
                    <td><strong title="{{ view_user.last_seen }}">{{ view_user.last_seen|timesince }}</strong></td>
                </tr>
                {% endif %}
                {% if view_user.website %}
                <tr>
                    <td>个人网站</td>
                    <td><a rel="nofollow" target="_blank" href="{{view_user.website}}">{{view_user.website}}</a></td>
                </tr>
                {% endif  %}
                {% if view_user.location %}
                <tr>
                    <td>城市</td>
                    <td>{{view_user.location}}</td>
                </tr>
                {% endif %}
                {% if view_user.date_of_birth%}
                <tr>
                    <td>年龄</td>
                    <td>{% get_age view_user.date_of_birth %}</td>
                </tr>
                {% endif %}
                {% if votes_today_left %}
                <tr>
                    <td>今日剩余投票数</td>
                    <td><strong class="darkred">{{ votes_today_left }}</strong></td>
                </tr>
                {% endif %}
            </table>
        </td>
        <td width="380">
            <div class="user-about">
            {% if view_user.about %}
                {{view_user.about|safe|linebreaks}}
            {% endif %}
            </div>
        </td>
    </tr>
</table>