diff options
-rw-r--r-- | hyperkitty/templates/search.html | 4 | ||||
-rw-r--r-- | hyperkitty/templates/threads/right_col.html | 2 | ||||
-rw-r--r-- | hyperkitty/urls.py | 2 | ||||
-rw-r--r-- | hyperkitty/views/list.py | 7 |
4 files changed, 8 insertions, 7 deletions
diff --git a/hyperkitty/templates/search.html b/hyperkitty/templates/search.html index e0e4f8c..559eba4 100644 --- a/hyperkitty/templates/search.html +++ b/hyperkitty/templates/search.html @@ -14,7 +14,7 @@ <!-- New thread --> <div class="thread"> <div class="notsaved"> - <a href="/thread/{{list_address}}/{{email.thread_id}}"> <span class="thread_title">{{email.subject}}</span> </a> + <a href="{% url thread threadid=email.thread_id, mlist_fqdn=list_address %}"> <span class="thread_title">{{email.subject}}</span> </a> <span class="thread_date">{{email.date}}</span> </div> <div class="thread_content"> @@ -24,7 +24,7 @@ </div> {% else %} <div class="inline-block type type_{{email.category|lower}}"> - <a href="/tag/{{list_address}}/{{email.category|lower}}"> {{email.category}} </a> + <a href="{% url search_tag mlist_fqdn=list_address, tag=email.category|lower %}"> {{email.category}} </a> </div> {% endif %} <div class="inline-block gravatar"> diff --git a/hyperkitty/templates/threads/right_col.html b/hyperkitty/templates/threads/right_col.html index 71ec1b6..78f0621 100644 --- a/hyperkitty/templates/threads/right_col.html +++ b/hyperkitty/templates/threads/right_col.html @@ -31,7 +31,7 @@ <ul class="inline"> {% for tag in tags %} <li> - {{ tag }} | + <a href="{% url search_tag mlist_fqdn=list_address, tag=tag.tag %}" > {{ tag.tag }} </a>| </li> {% endfor %} </ul> diff --git a/hyperkitty/urls.py b/hyperkitty/urls.py index a1a711a..13a6f3f 100644 --- a/hyperkitty/urls.py +++ b/hyperkitty/urls.py @@ -43,7 +43,7 @@ urlpatterns = patterns('hyperkitty.views', url(r'^tag/(?P<mlist_fqdn>.*@.*)\/(?P<tag>.*)\/(?P<page>\d+)/$', 'list.search_tag'), url(r'^tag/(?P<mlist_fqdn>.*@.*)\/(?P<tag>.*)/$', - 'list.search_tag'), + 'list.search_tag', name='search_tag'), # Search # If page number is present in URL diff --git a/hyperkitty/views/list.py b/hyperkitty/views/list.py index 843cd97..33ea992 100644 --- a/hyperkitty/views/list.py +++ b/hyperkitty/views/list.py @@ -290,11 +290,12 @@ def search_tag(request, mlist_fqdn, tag=None, page=1): thread_ids = Tag.objects.filter(tag=tag) except Tag.DoesNotExist: thread_ids = {} - + + threads = [] for thread in thread_ids: threads = STORE.get_thread(list_name, thread.threadid) - - + threads = threads[0:1] + return _search_results_page(request, mlist_fqdn, threads, 'Tag search', page, limit=50) |