summaryrefslogtreecommitdiffstats
path: root/hyperkitty/views/list.py
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2013-02-12 13:29:32 +0100
committerAurélien Bompard <aurelien@bompard.org>2013-02-12 13:29:32 +0100
commitccafc51ade9536046aeb096b04b069f17874fab4 (patch)
treee93564b45884debca14d561552a96a980819943d /hyperkitty/views/list.py
parent0b0395fe000957b336d0ece6b23af0083a0853ab (diff)
downloadhyperkitty-ccafc51ade9536046aeb096b04b069f17874fab4.tar.gz
hyperkitty-ccafc51ade9536046aeb096b04b069f17874fab4.tar.xz
hyperkitty-ccafc51ade9536046aeb096b04b069f17874fab4.zip
Add a "Create new thread" button
Diffstat (limited to 'hyperkitty/views/list.py')
-rw-r--r--hyperkitty/views/list.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/hyperkitty/views/list.py b/hyperkitty/views/list.py
index 6efd0b3..c8439ef 100644
--- a/hyperkitty/views/list.py
+++ b/hyperkitty/views/list.py
@@ -52,6 +52,10 @@ if settings.USE_MOCKUPS:
from hyperkitty.lib.mockup import generate_top_author, generate_thread_per_category
+FLASH_MESSAGES = {
+ "sent-ok": "The message has been sent successfully.",
+}
+
def archives(request, mlist_fqdn, year=None, month=None, day=None):
if year is None and month is None:
@@ -132,6 +136,10 @@ def _thread_list(request, mlist, threads, template_name='thread_list.html', extr
# If page is out of range (e.g. 9999), deliver last page of results.
threads = paginator.page(paginator.num_pages)
+ flash_msg = request.GET.get("msg")
+ if flash_msg:
+ flash_msg = FLASH_MESSAGES[flash_msg]
+
context = {
'mlist' : mlist,
'current_page': page_num,
@@ -139,6 +147,7 @@ def _thread_list(request, mlist, threads, template_name='thread_list.html', extr
'threads': threads,
'participants': len(participants),
'months_list': get_months(store, mlist.name),
+ 'flash_msg': flash_msg,
'use_mockups': settings.USE_MOCKUPS,
}
context.update(extra_context)