summaryrefslogtreecommitdiffstats
path: root/hyperkitty/templates/index.html
blob: 921b31e82d474890524474650d999b2d4ef44dc5 (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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
{% extends "base.html" %}
{% load url from future %}
{% load i18n %}
{% load hk_generic %}


{% block title %}
{% trans 'Available lists' %} - {{ app_name|title }}
{% endblock %}

{% block content %}

<div class="row-fluid all-lists">

<div class="span2 side-menu lists-menu">
    <h2>{% trans 'Lists' %}</h2>
    <ul>
        <li>
            {% if not sort_mode %}
            <span class="active">{% trans 'All' %}</span>
            {% else %}
            <a href="{% url 'root' %}">{% trans 'All' %}</a>
            {% endif %}
        </li>
        <li>
           {% if sort_mode == "active" %}
           <span class="active">{% trans 'Most active' %}</span>
           {% else %}
           <a href="{% url 'root' %}?sort=active">{% trans 'Most active' %}</a>
           {% endif %}
        </li>
        <li>
           {% if sort_mode == "popular" %}
           <span class="active">{% trans 'Most popular' %}</span>
           {% else %}
            <a href="{% url 'root' %}?sort=popular">{% trans 'Most popular' %}</a>
           {% endif %}
        </li>
        <li>
           {% if sort_mode == "creation" %}
           <span class="active">{% trans 'Newest' %}</span>
           {% else %}
            <a href="{% url 'root' %}?sort=creation">{% trans 'Newest' %}</a>
           {% endif %}
        </li>
    </ul>
</div>

<div class="span10 lists">

<h1>
    {% trans 'Available lists' %}
    {% if sort_mode == 'active' %}
        <small>({% trans 'most active first' %})</small>
    {% elif sort_mode == 'popular' %}
        <small>({% trans 'most popular first' %})</small>
    {% elif sort_mode == 'creation' %}
        <small>({% trans 'newest first' %})</small>
    {% endif %}
</h1>

{% if all_lists %}
<p class="hide-switches">
    <label><input type="checkbox" value="inactive" /> Hide inactive</label>
    <label><input type="checkbox" value="private" /> Hide private</label>
</p>

<table class="lists table">
    <thead>
        <tr>
            <th>{% trans 'List' %}</th>
            <th>{% trans 'Description' %}</th>
            <th>{% trans 'Activity in the past 30 days' %}</th>
        </tr>
    </thead>
    <tbody>
{% for mlist in all_lists %}
        <tr class="list
           {% if mlist.is_private %}
           private
           {% elif mlist.recent_threads_count == 0 %}
           inactive
           {% endif %}
           ">
            <td>
                {% ifchanged mlist.name|first %}<a name="{{ mlist.name|first }}" />{% endifchanged %}
                {% if mlist.is_new %}
                 <span class="new label">{% trans 'new' %}</span>
                {% endif %}
                 <a href="{% url 'list_overview' mlist_fqdn=mlist.name %}"
                    class="list-name">
                     {% if mlist.display_name %}
                         {{ mlist.display_name }}
                     {% else %}
                         {{ mlist.name|until:"@" }}
                     {% endif %}
                 </a>
                {% if mlist.is_private %}
                <span class="list-tags">private</span>
                {% elif mlist.recent_threads_count == 0 %}
                <span class="list-tags">inactive</span>
                {% endif %}
                <br />
                <span class="list-address">
                    {{ mlist.name }}
                </span>
            </td>
            <td class="list-description">
                {{ mlist.description|default_if_none:"" }}
            </td>
            <td class="activity">
                <div class="chart">
                    <img alt="Loading..." class="ajaxloader" src="{{ STATIC_URL }}hyperkitty/img/ajax-loader.gif" />
                </div>
                <ul class="list-stats">
                    <li><span class="participant">
                        {% if mlist.can_view %}
                        {{ mlist.recent_participants_count|default_if_none:"..." }}
                        {% else %}
                        ...
                        {% endif %}
                        participants</span></li>
                    <li><span class="discussion">
                        {% if mlist.can_view %}
                        {{ mlist.recent_threads_count|default_if_none:"..." }}
                        {% else %}
                        ...
                        {% endif %}
                        discussions</span></li>
                </ul>
            </td>
        </tr>
        <tr class="spacer"><td colspan="3"></td></tr>
{% endfor %}
    </tbody>
</table>
{% else %}
<p>No archived list yet.</p>
{% endif %}

</div> <!-- middle column -->

{% if all_lists|length > 10 %}
<div class="side-menu initials">
    <h2>&#8628;</h2>
    <ul>
        {% for letter in initials %}
        <li><a href="#{{ letter }}">{{ letter|upper }}</a></li>
        {% endfor %}
    </ul>
</div>
{% endif %}

</div>

<img id="logo" alt="HyperKitty" src="{{STATIC_URL}}hyperkitty/img/logo.png" />

{% endblock %}

{% block additionaljs %}

<script>
    $(function() {
        setup_index("{% url 'list_recent_activity' 'PLACEHOLDER@PLACEHOLDER' %}");
    });
</script>

{% endblock %}