summaryrefslogtreecommitdiffstats
path: root/hyperkitty/templates/user_public_profile.html
blob: 41729692e980e14b10af82ae093bf3e455602f55 (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
{% extends "base.html" %}
{% load url from future %}
{% load i18n %}
{% load hk_generic %}
{% load gravatar %}


{% block title %}
{% trans 'User Profile' %} for {{ fullname }} - {{ app_name|title }}
{% endblock %}

{% block content %}

<div class="user-profile user-public-profile">

    <h1>User profile <small>for {{ fullname }}</small></h1>

    <table class="table table-bordered table-striped user-data">
        <tbody>
            <tr>
                <th>{% trans 'Name:' %}</th>
                <td>{{ fullname }}</td>
            </tr>
            {% if creation %}
            <tr>
                <th>{% trans 'Creation:' %}</th>
                <td>{{ creation|date:"l, j F Y H:i:s" }} ({{ creation|timesince }})</td>
            </tr>
            {% endif %}
            <tr>
                <th>{% trans 'Votes for this user:' %}</th>
                <td><span class="likestatus {{ likestatus }}">+{{ likes }}/-{{ dislikes }}</span></td>
            </tr>
        </tbody>
    </table>

    <div class="gravatar">
        {% gravatar email 100 %}
    </div>

    <div class="clearfix"></div>

    <h3>Subscriptions</h3>
    {% if subscriptions %}
    <table class="table table-striped table-bordered table-condensed subscriptions">
        <thead>
            <tr>
                <th>List</th>
                <th>Time of first activity</th>
                <th>First post</th>
                <th>Posts to this list</th>
                <th>Votes</th>
            </tr>
        </thead>
        <tbody>
        {% for sub in subscriptions %}
            <tr>
                <td>
                    <a href="{% url 'list_overview' sub.list_name %}">{{ sub.list_name }}</a>
                </td>
                {% if sub.first_post %}
                <td>
                    {{ sub.first_post|get_date|date:"l, j F Y H:i:s" }}
                    {{ sub.first_post|get_date|timesince }}
                </td>
                <td>{{ sub.first_post.subject }}</td>
                <td><a href="{{ sub.all_posts_url }}">{{ sub.posts_count }} post{{ sub.posts_count|pluralize }}</a></td>
                <td><span class="likestatus {{ sub.likestatus }}">+{{ sub.likes }}/-{{ sub.dislikes }}</span></td>
                {% else %}
                <td colspan="4" style="text-align:center"><em>no post yet</em></td>
                {% endif %}
            </tr>
        {% endfor %}
        </tbody>
    </table>
    {% else %}
    <p><em>no subscriptions</em></p>
    {% endif %}

</div>

{% endblock %}