diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2009-11-17 22:14:15 -0500 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2009-11-17 22:14:15 -0500 |
commit | 46e48e400f30bde76a9b21db78f9b727149a3e24 (patch) | |
tree | b1782037766b019b6682c5265f93fe0745c36110 /templates/questions.html | |
parent | 56bc6d41fa35c8fb06eff8270a986ff5d3f3dc7c (diff) | |
download | askbot-46e48e400f30bde76a9b21db78f9b727149a3e24.tar.gz askbot-46e48e400f30bde76a9b21db78f9b727149a3e24.tar.bz2 askbot-46e48e400f30bde76a9b21db78f9b727149a3e24.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 |