summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2012-11-17 11:47:56 +0100
committerAurélien Bompard <aurelien@bompard.org>2012-11-17 11:47:56 +0100
commit179dd8ac917b04e9dcc6d978fe0464f66adafb72 (patch)
tree1bc087bf935526bfe8e85edca1a21eb0fe88dde7
parentad82abeb1c1a60bb05019ddc7cac978e582adac4 (diff)
downloadhyperkitty-179dd8ac917b04e9dcc6d978fe0464f66adafb72.tar.gz
hyperkitty-179dd8ac917b04e9dcc6d978fe0464f66adafb72.tar.xz
hyperkitty-179dd8ac917b04e9dcc6d978fe0464f66adafb72.zip
Fix threads count on summary page
-rw-r--r--hyperkitty/templates/base.html3
-rw-r--r--hyperkitty/templates/recent_activities.html2
-rw-r--r--hyperkitty/views/list.py16
3 files changed, 11 insertions, 10 deletions
diff --git a/hyperkitty/templates/base.html b/hyperkitty/templates/base.html
index 53d0ada..1900dbb 100644
--- a/hyperkitty/templates/base.html
+++ b/hyperkitty/templates/base.html
@@ -53,8 +53,9 @@
{% block content %} {% endblock %}
</div>
{% block footer %} {% endblock %}
- </body>
<script src="{{ STATIC_URL }}js/libs/jquery-1.7.1.min.js"></script>
{% block additionaljs %} {% endblock %}
+
+ </body>
</html>
diff --git a/hyperkitty/templates/recent_activities.html b/hyperkitty/templates/recent_activities.html
index 411fb5b..84a8d5d 100644
--- a/hyperkitty/templates/recent_activities.html
+++ b/hyperkitty/templates/recent_activities.html
@@ -219,6 +219,6 @@
<script>
$(document).ready(function() {
$("#archives").accordion({navigation: true});
- }
+ });
</script>
{% endblock %}
diff --git a/hyperkitty/views/list.py b/hyperkitty/views/list.py
index b1d4b29..3b51152 100644
--- a/hyperkitty/views/list.py
+++ b/hyperkitty/views/list.py
@@ -87,12 +87,12 @@ def archives(request, mlist_fqdn, year=None, month=None, day=None):
t = loader.get_template('month_view.html')
store = get_store(request)
mlist = store.get_list(mlist_fqdn)
- threads = store.get_threads(mlist_fqdn, start=begin_date,
- end=end_date)
+ all_threads = store.get_threads(mlist_fqdn, start=begin_date,
+ end=end_date)
participants = set()
- cnt = 0
- for thread in threads:
+ #cnt = 0
+ for thread in all_threads:
participants.update(thread.participants)
highestlike = 0
@@ -142,10 +142,10 @@ def archives(request, mlist_fqdn, year=None, month=None, day=None):
#elif thread.avglike - thread.avgdislike < 0:
# thread.likestatus = "dislike"
- threads[cnt] = thread
- cnt = cnt + 1
+ #threads[cnt] = thread
+ #cnt = cnt + 1
- paginator = Paginator(threads, 10)
+ paginator = Paginator(all_threads, 10)
pageNo = request.GET.get('page')
try:
@@ -175,7 +175,7 @@ def archives(request, mlist_fqdn, year=None, month=None, day=None):
'month': begin_date,
'month_num': begin_date.month,
'month_participants': len(participants),
- 'month_discussions': len(threads),
+ 'month_discussions': len(all_threads),
'threads': threads,
'pages' : paginator.object_list,
'archives_length': archives_length,