# HG changeset patch # User Brian Neal # Date 1286138649 0 # Node ID 21d2ca3b4bf7db548a20719a38c40962657454ad # Parent 879d396470645c1437555b20b7dfcbe78c9a9daa Fixing #121. The forum query pulldown should appear on all forum query pages for consistency. diff -r 879d39647064 -r 21d2ca3b4bf7 gpp/forums/views/main.py --- a/gpp/forums/views/main.py Sun Oct 03 00:28:23 2010 +0000 +++ b/gpp/forums/views/main.py Sun Oct 03 20:44:09 2010 +0000 @@ -14,7 +14,6 @@ from django.core.paginator import InvalidPage from django.shortcuts import get_object_or_404 from django.shortcuts import render_to_response -from django.shortcuts import redirect from django.template.loader import render_to_string from django.template import RequestContext from django.views.decorators.http import require_POST @@ -76,23 +75,10 @@ ####################################################################### -SPECIAL_QUERIES = { - 'unread': 'forums-unread_topics', - 'unanswered': 'forums-unanswered_topics', - 'mine': 'forums-my_posts', - 'favorites': 'forums-manage_favorites', - 'subscriptions': 'forums-manage_subscriptions', -} - def index(request): """ This view displays all the forums available, ordered in each category. """ - # check for special forum queries - query = request.GET.get("query") - if query in SPECIAL_QUERIES: - return redirect(SPECIAL_QUERIES[query]) - public_forums = Forum.objects.public_forums() feeds = [{'name': 'All Forums', 'feed': FEED_BASE}] diff -r 879d39647064 -r 21d2ca3b4bf7 gpp/templates/forums/forum_query.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gpp/templates/forums/forum_query.html Sun Oct 03 20:44:09 2010 +0000 @@ -0,0 +1,12 @@ +
+ + +
diff -r 879d39647064 -r 21d2ca3b4bf7 gpp/templates/forums/forum_query.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gpp/templates/forums/forum_query.js Sun Oct 03 20:44:09 2010 +0000 @@ -0,0 +1,11 @@ + diff -r 879d39647064 -r 21d2ca3b4bf7 gpp/templates/forums/index.html --- a/gpp/templates/forums/index.html Sun Oct 03 00:28:23 2010 +0000 +++ b/gpp/templates/forums/index.html Sun Oct 03 20:44:09 2010 +0000 @@ -6,20 +6,13 @@ {% for feed in feeds %} {% endfor %} +{% include "forums/forum_query.js" %} {% endblock %} {% block title %}Forums{% endblock %} {% block content %}

Forums Forums Feed

-
- -
+{% include "forums/forum_query.html" %}
{% for iter in cats %} diff -r 879d39647064 -r 21d2ca3b4bf7 gpp/templates/forums/manage_topics.html --- a/gpp/templates/forums/manage_topics.html Sun Oct 03 00:28:23 2010 +0000 +++ b/gpp/templates/forums/manage_topics.html Sun Oct 03 20:44:09 2010 +0000 @@ -24,6 +24,7 @@ }); //]]> +{% include "forums/forum_query.js" %} {% endblock %} {% block content %}

Forums: {{ page_title }}

@@ -31,6 +32,7 @@

SurfGuitar101 Forum Index » {{ page_title }}

+{% include "forums/forum_query.html" %}

{{ description }}

{% include 'forums/pagination.html' %}
{% csrf_token %} diff -r 879d39647064 -r 21d2ca3b4bf7 gpp/templates/forums/post_list.html --- a/gpp/templates/forums/post_list.html Sun Oct 03 00:28:23 2010 +0000 +++ b/gpp/templates/forums/post_list.html Sun Oct 03 20:44:09 2010 +0000 @@ -1,11 +1,15 @@ {% extends 'base.html' %} {% load forum_tags %} {% block title %}Forums: {{ title }}{% endblock %} +{% block custom_js %} +{% include "forums/forum_query.js" %} +{% endblock %} {% block content %}

Forums: {{ title }}

SurfGuitar101 Forum Index » {{ title }}

+{% include "forums/forum_query.html" %}
{{ page_nav }} {% if page.object_list %} diff -r 879d39647064 -r 21d2ca3b4bf7 gpp/templates/forums/topic_list.html --- a/gpp/templates/forums/topic_list.html Sun Oct 03 00:28:23 2010 +0000 +++ b/gpp/templates/forums/topic_list.html Sun Oct 03 20:44:09 2010 +0000 @@ -1,11 +1,15 @@ {% extends 'base.html' %} {% load forum_tags %} {% block title %}Forums: {{ title }}{% endblock %} +{% block custom_js %} +{% include "forums/forum_query.js" %} +{% endblock %} {% block content %}

Forums: {{ title }}

SurfGuitar101 Forum Index » {{ title }}

+{% include "forums/forum_query.html" %}
{{ page_nav }}