From ea34e0d9d621b00591bef42f067568221fa5721b Mon Sep 17 00:00:00 2001 From: hrcerqueira Date: Wed, 20 Jan 2010 18:09:41 +0000 Subject: Made sorting tabs work in question search --- templates/questions.html | 470 +++++++++++++++++++++++------------------------ 1 file changed, 235 insertions(+), 235 deletions(-) (limited to 'templates') diff --git a/templates/questions.html b/templates/questions.html index 9387b345..67751996 100644 --- a/templates/questions.html +++ b/templates/questions.html @@ -1,235 +1,235 @@ -{% extends "base.html" %} - -{% load extra_tags %} -{% load i18n %} -{% load humanize %} -{% load extra_filters %} -{% load smart_if %} -{% block title %}{% spaceless %}{% trans "Questions" %}{% endspaceless %}{% endblock %} -{% block forejs %} - - - -{% endblock %} -{% block content %} -
-
- {% if searchtag %} - {% trans "Found by tags" %} - {% else %} - {% if searchtitle %} - {% if settings.USE_SPHINX_SEARCH %} - {% trans "Search results" %} - {% else %} - {% trans "Found by title" %} - {% endif %} - {% else %} - {% if is_unanswered %} - {% trans "Unanswered questions" %} - {% else %} - {% trans "All questions" %} - {% endif %} - {% endif %} - {% endif %} -
- -
-
- {% for question in questions.object_list %} -
0 %} - style="background:#ffff99;" - {% else %} - {% if not request.user.hide_ignored_questions %} - {% if question.ignored_score > 0 %} - style="background:#f3f3f3;" - {% endif %} - {% endif %} - {% endif %} - {% endif %} - > -

- {{ question.get_question_title }} -

-
- - - - - - - - - - - -
{{ question.answer_count|intcomma }} {{ question.score|intcomma }} {{ question.view_count|cnprog_intword|safe }}
{% trans "answers" %}{% trans "votes" %}{% trans "views" %}
-
- -
- {{ question.summary }}... -
- - {% ifequal tab_id 'active'%} - {% if question.wiki and settings.WIKI_ON %} - {% trans "community wiki" %} - {% diff_date question.added_at %} - {% else %} -
- {% comment %}{% gravatar question.last_activity_by 24 %}{% endcomment %} - {{ question.last_activity_by }} - {% get_score_badge question.last_activity_by %} - {% diff_date question.last_activity_at %} -
- {% endif %} - {% else %} - {% if question.wiki and settings.WIKI_ON %} - {% trans "community wiki" %} - {% diff_date question.added_at %} - {% else %} -
- {% comment %}{% gravatar question.author 24 %}{% endcomment %} - {% if question.last_activity_at != question.added_at %} - {% if question.author.id != question.last_activity_by.id %} - {% trans "Posted:" %} - {{ question.author }} - {% get_score_badge question.author %} - / {% trans "Updated:" %} - {{ question.last_activity_by }} - {% get_score_badge question.last_activity_by %} - {% diff_date question.last_activity_at %} - {% else %} - {% trans "Updated:" %} - {{ question.last_activity_by }} - {% get_score_badge question.last_activity_by %} - {% diff_date question.last_activity_at %} - {% endif %} - {% else %} - {% trans "Posted:" %} - {{ question.author }} - {% get_score_badge question.author %} - {% diff_date question.added_at %} - {% endif %} -
- {% endif %} - {% endifequal %} - -
- {% for tag in question.tagname_list %} - - {% endfor %} -
-
- {% endfor %} - {% if searchtitle %} - {% if questions_count == 0 %} -

- {% trans "Did not find anything?" %} - {% else %} -

- {% trans "Did not find what you were looking for?" %} - {% endif %} - {% trans "Please, post your question!" %} -

- {% endif %} -
-{% endblock %} - -{% block tail %} -
{% cnprog_paginator context %}
-
{% cnprog_pagesize context %}
-{% endblock %} - -{% block sidebar %} -
- {% if searchtag %} - {% blocktrans count questions_count as cnt with questions_count|intcomma as q_num and searchtag as tagname %} - have total {{q_num}} questions tagged {{tagname}} - {% plural %} - have total {{q_num}} questions tagged {{tagname}} - {% endblocktrans %} - {% else %} - {% if searchtitle %} - {% if settings.USE_SPHINX_SEARCH %} - {% blocktrans count questions_count as cnt with questions_count|intcomma as q_num %} - have total {{q_num}} questions containing {{searchtitle}} in full text - {% plural %} - have total {{q_num}} questions containing {{searchtitle}} in full text - {% endblocktrans %} - {% else %} - {% blocktrans count questions_count as cnt with questions_count|intcomma as q_num %} - have total {{q_num}} questions containing {{searchtitle}} - {% plural %} - have total {{q_num}} questions containing {{searchtitle}} - {% endblocktrans %} - {% endif %} - {% else %} - {% if is_unanswered %} - {% blocktrans count questions as cnt with questions_count|intcomma as q_num %} - have total {{q_num}} unanswered questions - {% plural %} - have total {{q_num}} unanswered questions - {% endblocktrans %} - {% else %} - {% blocktrans count questions as cnt with questions_count|intcomma as q_num %} - have total {{q_num}} questions - {% plural %} - have total {{q_num}} questions - {% endblocktrans %} - {% endif %} - {% endif %} - {% endif %} -

- {% ifequal tab_id "latest" %} - {% trans "latest questions info" %} - {% endifequal %} - - {% ifequal tab_id "active" %} - {% trans "Questions are sorted by the time of last update." %} - {% trans "Most recently answered ones are shown first." %} - {% endifequal %} - - {% ifequal tab_id "hottest" %} - {% trans "Questions sorted by number of responses." %} - {% trans "Most answered questions are shown first." %} - {% endifequal %} - - {% ifequal tab_id "mostvoted" %} - {% trans "Questions are sorted by the number of votes." %} - {% trans "Most voted questions are shown first." %} - {% endifequal %} -

-
-{% if request.user.is_authenticated %} -{% include "tag_selector.html" %} -{% endif %} -
-

{% trans "Related tags" %}

-
- {% for tag in tags %} - - × {{ tag.used_count|intcomma }} -
- {% endfor %} -
-
- -{% endblock %} - +{% extends "base.html" %} + +{% load extra_tags %} +{% load i18n %} +{% load humanize %} +{% load extra_filters %} +{% load smart_if %} +{% block title %}{% spaceless %}{% trans "Questions" %}{% endspaceless %}{% endblock %} +{% block forejs %} + + + +{% endblock %} +{% block content %} +
+
+ {% if searchtag %} + {% trans "Found by tags" %} + {% else %} + {% if searchtitle %} + {% if settings.USE_SPHINX_SEARCH %} + {% trans "Search results" %} + {% else %} + {% trans "Found by title" %} + {% endif %} + {% else %} + {% if is_unanswered %} + {% trans "Unanswered questions" %} + {% else %} + {% trans "All questions" %} + {% endif %} + {% endif %} + {% endif %} +
+ +
+
+ {% for question in questions.object_list %} +
0 %} + style="background:#ffff99;" + {% else %} + {% if not request.user.hide_ignored_questions %} + {% if question.ignored_score > 0 %} + style="background:#f3f3f3;" + {% endif %} + {% endif %} + {% endif %} + {% endif %} + > +

+ {{ question.get_question_title }} +

+
+ + + + + + + + + + + +
{{ question.answer_count|intcomma }} {{ question.score|intcomma }} {{ question.view_count|cnprog_intword|safe }}
{% trans "answers" %}{% trans "votes" %}{% trans "views" %}
+
+ +
+ {{ question.summary }}... +
+ + {% ifequal tab_id 'active'%} + {% if question.wiki and settings.WIKI_ON %} + {% trans "community wiki" %} + {% diff_date question.added_at %} + {% else %} +
+ {% comment %}{% gravatar question.last_activity_by 24 %}{% endcomment %} + {{ question.last_activity_by }} + {% get_score_badge question.last_activity_by %} + {% diff_date question.last_activity_at %} +
+ {% endif %} + {% else %} + {% if question.wiki and settings.WIKI_ON %} + {% trans "community wiki" %} + {% diff_date question.added_at %} + {% else %} +
+ {% comment %}{% gravatar question.author 24 %}{% endcomment %} + {% if question.last_activity_at != question.added_at %} + {% if question.author.id != question.last_activity_by.id %} + {% trans "Posted:" %} + {{ question.author }} + {% get_score_badge question.author %} + / {% trans "Updated:" %} + {{ question.last_activity_by }} + {% get_score_badge question.last_activity_by %} + {% diff_date question.last_activity_at %} + {% else %} + {% trans "Updated:" %} + {{ question.last_activity_by }} + {% get_score_badge question.last_activity_by %} + {% diff_date question.last_activity_at %} + {% endif %} + {% else %} + {% trans "Posted:" %} + {{ question.author }} + {% get_score_badge question.author %} + {% diff_date question.added_at %} + {% endif %} +
+ {% endif %} + {% endifequal %} + +
+ {% for tag in question.tagname_list %} + + {% endfor %} +
+
+ {% endfor %} + {% if searchtitle %} + {% if questions_count == 0 %} +

+ {% trans "Did not find anything?" %} + {% else %} +

+ {% trans "Did not find what you were looking for?" %} + {% endif %} + {% trans "Please, post your question!" %} +

+ {% endif %} +
+{% endblock %} + +{% block tail %} +
{% cnprog_paginator context %}
+
{% cnprog_pagesize context %}
+{% endblock %} + +{% block sidebar %} +
+ {% if searchtag %} + {% blocktrans count questions_count as cnt with questions_count|intcomma as q_num and searchtag as tagname %} + have total {{q_num}} questions tagged {{tagname}} + {% plural %} + have total {{q_num}} questions tagged {{tagname}} + {% endblocktrans %} + {% else %} + {% if searchtitle %} + {% if settings.USE_SPHINX_SEARCH %} + {% blocktrans count questions_count as cnt with questions_count|intcomma as q_num %} + have total {{q_num}} questions containing {{searchtitle}} in full text + {% plural %} + have total {{q_num}} questions containing {{searchtitle}} in full text + {% endblocktrans %} + {% else %} + {% blocktrans count questions_count as cnt with questions_count|intcomma as q_num %} + have total {{q_num}} questions containing {{searchtitle}} + {% plural %} + have total {{q_num}} questions containing {{searchtitle}} + {% endblocktrans %} + {% endif %} + {% else %} + {% if is_unanswered %} + {% blocktrans count questions as cnt with questions_count|intcomma as q_num %} + have total {{q_num}} unanswered questions + {% plural %} + have total {{q_num}} unanswered questions + {% endblocktrans %} + {% else %} + {% blocktrans count questions as cnt with questions_count|intcomma as q_num %} + have total {{q_num}} questions + {% plural %} + have total {{q_num}} questions + {% endblocktrans %} + {% endif %} + {% endif %} + {% endif %} +

+ {% ifequal tab_id "latest" %} + {% trans "latest questions info" %} + {% endifequal %} + + {% ifequal tab_id "active" %} + {% trans "Questions are sorted by the time of last update." %} + {% trans "Most recently answered ones are shown first." %} + {% endifequal %} + + {% ifequal tab_id "hottest" %} + {% trans "Questions sorted by number of responses." %} + {% trans "Most answered questions are shown first." %} + {% endifequal %} + + {% ifequal tab_id "mostvoted" %} + {% trans "Questions are sorted by the number of votes." %} + {% trans "Most voted questions are shown first." %} + {% endifequal %} +

+
+{% if request.user.is_authenticated %} +{% include "tag_selector.html" %} +{% endif %} +
+

{% trans "Related tags" %}

+
+ {% for tag in tags %} + + × {{ tag.used_count|intcomma }} +
+ {% endfor %} +
+
+ +{% endblock %} + -- cgit v1.2.3-1-g7c22