summaryrefslogtreecommitdiffstats
path: root/hyperkitty/templates
diff options
context:
space:
mode:
Diffstat (limited to 'hyperkitty/templates')
-rw-r--r--hyperkitty/templates/base.html2
-rw-r--r--hyperkitty/templates/index.html110
-rw-r--r--hyperkitty/templates/overview.html27
-rw-r--r--hyperkitty/templates/threads/summary_thread.html10
-rw-r--r--hyperkitty/templates/threads/summary_thread_large.html2
5 files changed, 96 insertions, 55 deletions
diff --git a/hyperkitty/templates/base.html b/hyperkitty/templates/base.html
index e7d5303..a6feb9a 100644
--- a/hyperkitty/templates/base.html
+++ b/hyperkitty/templates/base.html
@@ -130,7 +130,7 @@
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="{{ STATIC_URL }}hyperkitty/libs/jquery/jquery-1.10.1.min.js"><\/script>')</script>
<script src="{{ STATIC_URL }}hyperkitty/libs/jquery/jquery-ui-1.10.3.custom.min.js"></script>
- {% assets filters="rjsmin", output="gen/hyperkitty.js", "hyperkitty/libs/bootstrap/js/bootstrap.min.js", "hyperkitty/libs/jquery.expander.js", "hyperkitty/libs/d3.v2.min.js", "hyperkitty/libs/jquery.hotkeys.js", "hyperkitty/js/hyperkitty-common.js", "hyperkitty/js/hyperkitty-frontpage.js", "hyperkitty/js/hyperkitty-overview.js", "hyperkitty/js/hyperkitty-thread.js", "hyperkitty/js/hyperkitty-userprofile.js" %}
+ {% assets filters="rjsmin", output="gen/hyperkitty.js", "hyperkitty/libs/bootstrap/js/bootstrap.min.js", "hyperkitty/libs/jquery.expander.js", "hyperkitty/libs/d3.v2.min.js", "hyperkitty/libs/jquery.hotkeys.js", "hyperkitty/js/hyperkitty-common.js", "hyperkitty/js/hyperkitty-thread.js", "hyperkitty/js/hyperkitty-userprofile.js" %}
<script src="{{ ASSET_URL }}"></script>
{% endassets %}
{% block additionaljs %} {% endblock %}
diff --git a/hyperkitty/templates/index.html b/hyperkitty/templates/index.html
index fc711b2..78804e1 100644
--- a/hyperkitty/templates/index.html
+++ b/hyperkitty/templates/index.html
@@ -1,6 +1,7 @@
{% extends "base.html" %}
{% load url from future %}
{% load i18n %}
+{% load hk_generic %}
{% block title %}
@@ -9,34 +10,84 @@
{% block content %}
-<div class="all-lists">
+<div class="row-fluid all-lists">
-<h1 class="lists">{% trans 'Available lists' %}</h1>
+<div class="span2 lists-menu">
+ <h2>{% trans 'Lists' %}</h2>
+ <ul>
+ <li><a href="{% url 'root' %}">All</a></li>
+ <li><a href="{% url 'root' %}?sort=active">Most active</a></li>
+ <li><a href="{% url 'root' %}?sort=popular">Most popular</a></li>
+ </ul>
+</div>
+
+<div class="span10">
+
+<h1>{% trans 'Available lists' %}</h1>
-<div class="row-fluid">
+{% if all_lists %}
+<table class="lists table">
+ <thead>
+ <tr><th>List</th><th>Description</th><th>Activity in the past 30 days</th></tr>
+ </thead>
+ <tbody>
{% for mlist in all_lists %}
-<div class="span3">
- <a href="{% url 'list_overview' mlist_fqdn=mlist.name %}" class="mailinglist">
- <p class="list-name">
- {% if mlist.display_name %}
- {{ mlist.display_name }}
- {% else %}
- {{ mlist.name }}
- {% endif %}
- </p>
- <p class="list-address">{{ mlist.name }}</p>
- <p class="list-description"></p>
- <img alt="Loading..." class="ajaxloader" src="{{ STATIC_URL }}hyperkitty/img/ajax-loader.gif" />
- </a>
-</div>
-{% if forloop.counter|divisibleby:"4" %}
-</div>
-<div class="row-fluid">
-{% endif %}
-{% empty %}
-<p>No archived list yet.</p>
+ <tr
+ {% if mlist.is_private %}
+ class="private"
+ {% elif mlist.recent_threads_count == 0 %}
+ class="inactive"
+ {% endif %}
+ >
+ <td>
+ <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 />
+ <a href="{% url 'list_overview' mlist_fqdn=mlist.name %}"
+ class="list-address">
+ {{ mlist.name }}
+ </a>
+ </td>
+ <td class="list-description"></td>
+ <td class="activity">
+ <div class="chart" data-chart-values="{{ mlist.evolution|to_json }}"></div>
+ <ul class="list-stats">
+ <li><span class="participant">
+ {% if mlist.can_view %}
+ {{ mlist.recent_participants_count }}
+ {% else %}
+ ...
+ {% endif %}
+ participants</span></li>
+ <li><span class="discussion">
+ {% if mlist.can_view %}
+ {{ mlist.recent_threads_count }}
+ {% else %}
+ ...
+ {% endif %}
+ discussions</span></li>
+ </ul>
+ </td>
+ </tr>
{% endfor %}
-</div>
+ </tbody>
+</table>
+{% else %}
+<p>No archived list yet.</p>
+{% endif %}
+
+</div> <!-- right column -->
</div>
@@ -46,10 +97,13 @@
{% block additionaljs %}
-<script type="text/javascript">
- $(document).ready(function() {
- // Load the properties
- update_list_properties("{% url 'list_properties' %}");
+<script>
+ $(function() {
+ $("div.chart").each(function() {
+ chart($(this).get(0),
+ $.parseJSON($(this).attr("data-chart-values")),
+ {height: 30});
+ });
});
</script>
diff --git a/hyperkitty/templates/overview.html b/hyperkitty/templates/overview.html
index 098e609..a5dc32f 100644
--- a/hyperkitty/templates/overview.html
+++ b/hyperkitty/templates/overview.html
@@ -25,7 +25,7 @@
<section id="statistics">
- <div id="chart"></div>
+ <div id="chart" data-chart-values="{{ evolution|to_json }}"></div>
<p class="caption">Post volume over the past <strong>30</strong> days.</p>
<p class="thread-new">
@@ -37,8 +37,8 @@
<h3>Activity Summary</h3>
<p>The following statistics are from the past <strong>30</strong> days:</p>
<ul class="list-stats">
- <li><span class="participant">{{ num_participants }} participants</span></li>
- <li><span class="discussion">{{ num_threads }} discussions</span></li>
+ <li><span class="participant">{{ mlist.recent_participants_count }} participants</span></li>
+ <li><span class="discussion">{{ mlist.recent_threads_count }} discussions</span></li>
</ul>
<section id="discussion-maker" class="widget">
@@ -145,24 +145,11 @@
{% block additionaljs %}
<script type="text/javascript" >
-/*
$(function() {
- activity_graph(
- "#fig",
- ["{{days|join:'","'}}"],
- {{evolution}},
- "{{ archives_baseurl }}"
- )
- });
-*/
-
- $(function() {
- chart(
- "#chart",
- ["{{days|join:'","'}}"],
- {{evolution}},
- "{{ archives_baseurl }}"
- )
+ $("#chart").each(function() {
+ chart($(this).get(0),
+ $.parseJSON($(this).attr("data-chart-values")));
+ });
});
</script>
diff --git a/hyperkitty/templates/threads/summary_thread.html b/hyperkitty/templates/threads/summary_thread.html
index e9b2b1f..5d0972c 100644
--- a/hyperkitty/templates/threads/summary_thread.html
+++ b/hyperkitty/templates/threads/summary_thread.html
@@ -8,9 +8,9 @@
<a name="{{thread.thread_id}}"
href="{% url 'thread' threadid=thread.thread_id mlist_fqdn=mlist.name %}"
>
- {% if thread.category %}
- <span class="label category" style="background-color:{{thread.category.color}}">
- {{ thread.category.name|upper }}
+ {% if thread.category_widget %}
+ <span class="label category" style="background-color:{{thread.category_widget.color}}">
+ {{ thread.category_widget.name|upper }}
</span>
{% endif %}
{% if thread.unread %}
@@ -21,10 +21,10 @@
<div class="thread-stats">
<ul class="inline-block">
<li class="participant">
- {{ thread.participants|length }}
+ {{ thread.participants_count }}
</li>
<li class="discussion">
- {{ thread.length }}
+ {{ thread|length }}
</li>
<span class="likestatus {{ thread.likestatus }}">+{{ thread.likes }}/-{{ thread.dislikes }}</span>
</ul>
diff --git a/hyperkitty/templates/threads/summary_thread_large.html b/hyperkitty/templates/threads/summary_thread_large.html
index 450278b..51e98a8 100644
--- a/hyperkitty/templates/threads/summary_thread_large.html
+++ b/hyperkitty/templates/threads/summary_thread_large.html
@@ -44,7 +44,7 @@
</ul>
{% endif %}
</div>
- <span class="participant">{{ thread.participants|length }} participants</span>
+ <span class="participant">{{ thread.participants_count }} participants</span>
<span class="discussion">{{ thread|length }} comments</span>
{% include "messages/like_form.html" with message_id_hash=thread.starting_email.message_id_hash object=thread %}
<a href="{% url 'thread' threadid=thread.thread_id mlist_fqdn=mlist.name %}"