1 {% extends "base.html" %}
\r
4 {% load extra_tags %}
\r
6 {% load extra_filters %}
\r
8 {% block title %}{% spaceless %}{% trans "Home" %}{% endspaceless %}{% endblock %}
\r
9 {% block meta %}<meta name="keywords" content="{{ settings.APP_KEYWORDS }}" />
\r
10 <meta name="description" content="{{ settings.APP_DESCRIPTION }}" />{% endblock %}
\r
12 <script type="text/javascript">
\r
13 var tags = {{ tags_autocomplete|safe }};
\r
14 $().ready(function(){
\r
15 var tab_id = "{{ tab_id }}";
\r
16 $("#"+tab_id).attr('className',"on");
\r
17 $("#nav_questions").attr('className',"on");
\r
20 <script type='text/javascript' src='{% media "/media/js/com.cnprog.editor.js" %}'></script>
\r
21 <script type='text/javascript' src='{% media "/media/js/com.cnprog.tag_selector.js" %}'></script>
\r
24 <div class="tabBar">
\r
25 <div class="headQuestions">{% trans "Questions" %}</div>
\r
27 <a id="latest" href="{% url questions %}?sort=latest" title="{% trans "last updated questions" %}" >{% trans "newest" %}</a>
\r
28 <a id="hottest" href="{% url questions %}?sort=hottest" title="{% trans "hottest questions" %}" >{% trans "hottest" %}</a>
\r
29 <a id="mostvoted" href="{% url questions %}?sort=mostvoted" title="{% trans "most voted questions" %}" >{% trans "most voted" %}</a>
\r
30 <a id="all" href="{% url questions %}" title="{% trans "all questions" %}" >{% trans "all questions" %}</a>
\r
35 {% for question in questions.object_list %}
\r
36 <div class="short-summary">
\r
37 <div class="counts">
\r
39 <div class="item-count">{{question.score|intcomma}}</div>
\r
40 <div>{% trans "votes" %}</div>
\r
42 <div {% if question.answer_accepted %}title="{% trans "this answer has been accepted to be correct" %}"{% endif %} class="status {% if question.answer_accepted %}answered-accepted{% endif %} {% ifequal question.answer_count 0 %}unanswered{% endifequal %}{% ifnotequal question.answer_count 0 %}answered{% endifnotequal %}">
\r
43 <div class="item-count">{{question.answer_count|intcomma}}</div>
\r
44 <div>{% trans "answers" %}</div>
\r
47 <div class="item-count">{{question.view_count|cnprog_intword|safe}}</div>
\r
48 <div>{% trans "views" %}</div>
\r
52 <h2><a title="{{question.summary}}" href="{% url question id=question.id %}{{question.title|slugify}}">{{question.title}}</a></h2>
\r
54 <div class="userinfo">
\r
55 <span class="relativetime" title="{{question.last_activity_at}}">{% diff_date question.last_activity_at %}</span>
\r
56 {% if question.last_activity_by %}
\r
57 <a href="{{ question.last_activity_by.get_profile_url }}">{{ question.last_activity_by }}</a> {% get_score_badge question.last_activity_by %}
\r
62 {% for tag in question.tagname_list %}
\r
63 <a href="{% url tag_questions tag|urlencode %}" title="{% trans "see questions tagged" %} '{{ tag }}' {% trans "using tags" %}" rel="tag">{{ tag }}</a>
\r
72 {% if not request.user.is_authenticated %}
\r
74 <h3>{% trans "welcome to website" %}</h3>
\r
76 {{ settings.APP_INTRO|safe }}
\r
77 <div class="more"><a href="{% url about %}">{% trans "about" %} </a></div>
\r
78 <div class="more"><a href="{% url faq %}">{% trans "faq" %} </a></div>
\r
82 {% include "tag_selector.html" %}
\r
85 <h3>{% trans "Recent tags" %}</h3>
\r
88 {% for tag in tags %}
\r
90 title="{% blocktrans with tag.name as tagname %}see questions tagged '{{tagname}}'{% endblocktrans %}" href="{% url tag_questions tag.name|urlencode %}">{{ tag.name }}</a>
\r
93 <div class="more"><a href="{% url tags %}">{% trans "popular tags" %} </a> </div>
\r
98 <h3>{% trans "Recent awards" %}</h3>
\r
100 <ul class="badge-list">
\r
101 {% for award in awards %}
\r
103 <a href="{% url badges %}{{award.badge_id}}/{{award.badge_name}}" title="{{ award.badge_description }}" class="medal">
\r
104 <span class="badge{{ award.badge_type }}">●</span> {{ award.badge_name }}</a> {% trans "given to" %}
\r
105 <a href="{% url users %}{{award.user_id}}/{{award.user_name}}">{{ award.user_name }}</a>
\r
109 <div class="more"><a href="{% url badges %}">{% trans "all awards" %} </a> </div>
\r
114 <a href="{% media "/feeds/rss" %}" title="{% trans "subscribe to last 30 questions by RSS" %}">{% trans "subscribe to the questions feed" %}</a>
\r
118 <div class="pager">{% cnprog_paginator context %}</div>
\r
119 <div class="pagesize">{% cnprog_pagesize context %}</div>
\r
120 <!-- <div style="padding:5px 0 5px 5px;">
\r
121 <span class="evenMore">{% trans "Still looking for more? See" %} <a href="{% url questions %}">{% trans "complete list of questions" %}</a> {% trans "or" %} <a href="{% url tags %}">{% trans "popular tags" %}</a>{% trans "." %} {% trans "Please help us answer" %} <a href="{% url questions %}unanswered">{% trans "list of unanswered questions" %}</a>{% trans "." %}</span>
\r