diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2009-11-17 22:13:51 -0500 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2009-11-17 22:13:51 -0500 |
commit | cd5d1978ba9f2a0dfdd9a59bfef51669863de6f1 (patch) | |
tree | b1782037766b019b6682c5265f93fe0745c36110 /templates/questions.html | |
parent | df8dfe0bb525594397a810bff1e397f2fb44cf1d (diff) | |
download | askbot-cd5d1978ba9f2a0dfdd9a59bfef51669863de6f1.tar.gz askbot-cd5d1978ba9f2a0dfdd9a59bfef51669863de6f1.tar.bz2 askbot-cd5d1978ba9f2a0dfdd9a59bfef51669863de6f1.zip |
full text search with Sphinx, added session-based greeting message for the first time visitor
Diffstat (limited to 'templates/questions.html')
-rw-r--r-- | templates/questions.html | 45 |
1 files changed, 39 insertions, 6 deletions
diff --git a/templates/questions.html b/templates/questions.html index f298381e..47bda129 100644 --- a/templates/questions.html +++ b/templates/questions.html @@ -21,7 +21,21 @@ {% endblock %} {% block content %} <div class="tabBar"> - <div class="headQuestions">{% if searchtag %}{% trans "Found by tags" %}{% else %}{% if searchtitle %}{% trans "Found by title" %}{% else %}{% trans "All questions" %}{% endif %}{% endif %}</div> + <div class="headQuestions"> + {% if searchtag %} + {% trans "Found by tags" %} + {% else %} + {% if searchtitle %} + {% if settings.USE_SPHINX_SEARCH %} + {% trans "Search results" %} + {% else %} + {% trans "Found by title" %} + {% endif %} + {% else %} + {% trans "All questions" %} + {% endif %} + {% endif %} + </div> <div class="tabsA"> <a id="latest" href="?sort=latest" class="off" title="{% trans "most recently asked questions" %}">{% trans "newest" %}</a> <a id="active" href="?sort=active" class="off" title="{% trans "most recently updated questions" %}">{% trans "active" %}</a> @@ -105,6 +119,17 @@ </div> </div> {% endfor %} + {% if searchtitle %} + {% if questions_count == 0 %} + <p class="evenMore" style="padding-top:30px;text-align:center;"> + {% trans "Did not find anything?" %} + {% else %} + <p class="evenMore" style="padding-left:9px"> + {% trans "Did not find what you were looking for?" %} + {% endif %} + <a href="{% url ask %}">{% trans "Please, post your question!" %}</a> + </p> + {% endif %} </div> {% endblock %} @@ -130,11 +155,19 @@ {% endblocktrans %} {% else %} {% if searchtitle %} - {% 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 %} + {% 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 %} {% blocktrans count questions as cnt with questions_count|intcomma as q_num %} have total {{q_num}} questions |