1 {% extends "base.html" %}
\r 
   2 <!-- questions.html -->
\r 
   3 {% load extra_tags %}
\r 
   6 {% load extra_filters %}
\r 
   8 {% block title %}{% spaceless %}{% trans "Questions" %}{% endspaceless %}{% endblock %}
\r 
  10        <script type="text/javascript">
\r 
  11            var tags = {{ tags_autocomplete|safe }};
\r 
  12            $().ready(function(){
\r 
  13                var tab_id = "{{ tab_id }}";
\r 
  14                $("#"+tab_id).attr('className',"on");
\r 
  15                var on_tab = {% if is_unanswered %}'#nav_unanswered'{% else %}'#nav_questions'{% endif %};
\r 
  16                $(on_tab).attr('className','on');
\r 
  17                Hilite.exact = false;
\r 
  18                Hilite.elementid = "listA";
\r 
  19                Hilite.debug_referrer = location.href;
\r 
  22        <script type='text/javascript' src='{% media  "/media/js/com.cnprog.editor.js" %}'></script>
\r 
  23        <script type='text/javascript' src='{% media  "/media/js/com.cnprog.tag_selector.js" %}'></script>
\r 
  26 <div class="tabBar">
\r 
  27     <div class="headQuestions">
\r 
  29             {% trans "Found by tags" %}
\r 
  31             {% if searchtitle %}
\r 
  32                 {% if settings.USE_SPHINX_SEARCH %}
\r 
  33                     {% trans "Search results" %}
\r 
  35                     {% trans "Found by title" %}
\r 
  38                 {% if is_unanswered %}
\r 
  39                     {% trans "Unanswered questions" %}
\r 
  41                     {% trans "All questions" %}
\r 
  47         <a id="latest" href="{% if is_search %}{{ search_uri }}&{% else %}?{% endif %}sort=latest" class="off" title="{% trans "most recently asked questions" %}">{% trans "newest" %}</a>
\r 
  48         <a id="active" href="{% if is_search %}{{ search_uri }}&{% else %}?{% endif %}sort=active" class="off" title="{% trans "most recently updated questions" %}">{% trans "active" %}</a>
\r 
  49         <a id="hottest" href="{% if is_search %}{{ search_uri }}&{% else %}?{% endif %}sort=hottest" class="off" title="{% trans "hottest questions" %}">{% trans "hottest" %}</a>
\r 
  50         <a id="mostvoted" href="{% if is_search %}{{ search_uri }}&{% else %}?{% endif %}sort=mostvoted" class="off" title="{% trans "most voted questions" %}">{% trans "most voted" %}</a>    
\r 
  54     {% for question in questions.object_list %}
\r 
  56         {% if request.user.is_authenticated %}
\r 
  57             {% if question.interesting_score > 0 %}
\r 
  58                     style="background:#ffff99;"
\r 
  60                 {% if not request.user.hide_ignored_questions %}
\r 
  61                     {% if question.ignored_score > 0 %}
\r 
  62                     style="background:#f3f3f3;"
\r 
  69             <a href="{{ question.get_absolute_url }}">{{ question.get_question_title }}</a>
\r 
  74                     <td><span class="num">{{ question.answer_count|intcomma }}</span> </td>
\r 
  75                     <td><span class="num">{{ question.score|intcomma }}</span> </td>
\r 
  76                     <td><span class="num">{{ question.view_count|cnprog_intword|safe }}</span> </td>
\r 
  79                     <td><span class="unit">{% trans "answers" %}</span></td>
\r 
  80                     <td><span class="unit">{% trans "votes" %}</span></td>
\r 
  81                     <td><span class="unit">{% trans "views" %}</span></td>
\r 
  86         <div class="summary">
\r 
  87             {{ question.summary }}...                
\r 
  90         {% ifequal tab_id 'active'%}
\r 
  91         {% if question.wiki and settings.WIKI_ON %}
\r 
  92         <span class="from wiki">{% trans "community wiki" %}</span>
\r 
  93         <span class="date" title="{{ question.added_at }}">{% diff_date question.added_at %}</span>
\r 
  96             {% comment %}{% gravatar question.last_activity_by 24 %}{% endcomment %}
\r 
  97             <span class="author"><a href="{{ question.last_activity_by.get_profile_url }}">{{ question.last_activity_by }}</a></span>
\r 
  98             <span class="score">{% get_score_badge question.last_activity_by %} </span>
\r 
  99             <span class="date" title="{{ question.last_activity_at }}">{% diff_date question.last_activity_at %}</span>
\r 
 103         {% if question.wiki and settings.WIKI_ON %}
\r 
 104         <span class="from wiki">{% trans "community wiki" %}</span>
\r 
 105         <span class="date" title="{{ question.added_at }}">{% diff_date question.added_at %}</span>
\r 
 108             {% comment %}{% gravatar question.author 24 %}{% endcomment %}
\r 
 109             {% if question.last_activity_at != question.added_at %}
\r 
 110                 {% if question.author.id != question.last_activity_by.id %}
\r 
 111                     {% trans "Posted:" %}
\r 
 112                     <span class="author"><a href="{{ question.author.get_profile_url }}">{{ question.author }}</a></span>
\r 
 113                     <span class="score">{% get_score_badge question.author %} </span>
\r 
 114                     / {% trans "Updated:" %}
\r 
 115                     <span class="author"><a href="{{ question.last_activity_by.get_profile_url }}">{{ question.last_activity_by }}</a></span>
\r 
 116                     <span class="score">{% get_score_badge question.last_activity_by %} </span>
\r 
 117                     <span class="date" title="{{ question.last_activity_at }}">{% diff_date question.last_activity_at %}</span>
\r 
 119                     {% trans "Updated:" %}
\r 
 120                     <span class="author"><a href="{{ question.last_activity_by.get_profile_url }}">{{ question.last_activity_by }}</a></span>
\r 
 121                     <span class="score">{% get_score_badge question.last_activity_by %} </span>
\r 
 122                     <span class="date" title="{{ question.last_activity_at }}">{% diff_date question.last_activity_at %}</span>
\r 
 125                 {% trans "Posted:" %}
\r 
 126                 <span class="author"><a href="{{ question.author.get_profile_url }}">{{ question.author }}</a></span>
\r 
 127                 <span class="score">{% get_score_badge question.author %} </span>
\r 
 128                 <span class="date" title="{{ question.added_at }}">{% diff_date question.added_at %}</span>
\r 
 135         {% for tag in question.tagname_list %}
\r 
 136         <a href="{% url tag_questions tag|urlencode %}" title="{% trans "see questions tagged" %}'{{ tag }}'{% trans "using tags" %}" rel="tag">{{ tag }}</a>
\r 
 141     {% if searchtitle %}
\r 
 142         {% if questions_count == 0 %}
\r 
 143         <p class="evenMore" style="padding-top:30px;text-align:center;">
\r 
 144             {% trans "Did not find anything?" %}
\r 
 146         <p class="evenMore" style="padding-left:9px">
\r 
 147             {% trans "Did not find what you were looking for?" %} 
\r 
 149         <a href="{% url ask %}">{% trans "Please, post your question!" %}</a>
\r 
 156     <div class="pager">{% cnprog_paginator context %}</div>
\r 
 157     <div class="pagesize">{% cnprog_pagesize context %}</div>
\r 
 160 {% block sidebar %}
\r 
 163             {% blocktrans count questions_count as cnt with questions_count|intcomma as q_num and searchtag as tagname %}
\r 
 164             have total {{q_num}} questions tagged {{tagname}}
\r 
 166             have total {{q_num}} questions tagged {{tagname}}
\r 
 167             {% endblocktrans %}
\r 
 169                         {% if searchtitle %}
\r 
 170                 {% if settings.USE_SPHINX_SEARCH %}
\r 
 171                     {% blocktrans count questions_count as cnt with questions_count|intcomma as q_num %}
\r 
 172                     have total {{q_num}} questions containing {{searchtitle}} in full text
\r 
 174                     have total {{q_num}} questions containing {{searchtitle}} in full text
\r 
 175                     {% endblocktrans %}
\r 
 177                     {% blocktrans count questions_count as cnt with questions_count|intcomma as q_num %}
\r 
 178                     have total {{q_num}} questions containing {{searchtitle}}
\r 
 180                     have total {{q_num}} questions containing {{searchtitle}}
\r 
 181                     {% endblocktrans %}
\r 
 184                 {% if is_unanswered %}
\r 
 185                     {% blocktrans count questions as cnt with questions_count|intcomma as q_num %}
\r 
 186                     have total {{q_num}} unanswered questions
\r 
 188                     have total {{q_num}} unanswered questions
\r 
 189                     {% endblocktrans %}
\r 
 191                     {% blocktrans count questions as cnt with questions_count|intcomma as q_num %}
\r 
 192                     have total {{q_num}} questions
\r 
 194                     have total {{q_num}} questions
\r 
 195                     {% endblocktrans %}
\r 
 199         <p class="nomargin">
\r 
 200         {% ifequal tab_id "latest" %}
\r 
 201                         {% trans "latest questions info" %}
\r 
 204         {% ifequal tab_id "active" %}
\r 
 205             {% trans "Questions are sorted by the <strong>time of last update</strong>." %} 
\r 
 206                         {% trans "Most recently answered ones are shown first." %}
\r 
 209         {% ifequal tab_id "hottest" %}
\r 
 210                         {% trans "Questions sorted by <strong>number of responses</strong>." %}
\r 
 211             {% trans "Most answered questions are shown first." %}
\r 
 214         {% ifequal tab_id "mostvoted" %}
\r 
 215                         {% trans "Questions are sorted by the <strong>number of votes</strong>." %}
\r 
 216             {% trans "Most voted questions are shown first." %}
\r 
 220 {% if request.user.is_authenticated %} 
\r 
 221 {% include "tag_selector.html" %}
\r 
 224         <h3 class="subtitle">{% trans "Related tags" %}</h3>
\r 
 226         {% for tag in tags %}
\r 
 227             <a rel="tag" title="{% blocktrans with tag.name as tag_name %}see questions tagged '{{ tag_name }}'{% endblocktrans %}"  href="{% url tag_questions tag.name|urlencode %}">{{ tag.name }}</a>
\r 
 228             <span class="tag-number">× {{ tag.used_count|intcomma }}</span>
\r 
 235 <!-- end questions.html -->
\r