-{% extends "base.html" %}\r
+{% extends "questions.html" %}\r
<!-- index.html -->\r
+{% load general_sidebar_tags %}\r
+{% load question_list_tags %}\r
{% load i18n %}\r
-{% load extra_tags %}\r
-{% load humanize %}\r
-{% load extra_filters %}\r
-{% load smart_if %}\r
-{% block title %}{% spaceless %}{% trans "Home" %}{% endspaceless %}{% endblock %}\r
-{% block meta %}<meta name="keywords" content="{{ settings.APP_KEYWORDS }}" />\r
- <meta name="description" content="{{ settings.APP_DESCRIPTION }}" />{% endblock %}\r
-{% block forejs %}\r
- <script type="text/javascript">\r
- var tags = {{ tags_autocomplete|safe }};\r
- $().ready(function(){\r
- var tab_id = "{{ tab_id }}";\r
- $("#"+tab_id).attr('className',"on");\r
- $("#nav_questions").attr('className',"on");\r
- });\r
- </script>\r
- <script type='text/javascript' src='{% media "/media/js/com.cnprog.editor.js" %}'></script>\r
- <script type='text/javascript' src='{% media "/media/js/com.cnprog.tag_selector.js" %}'></script>\r
-{% endblock %}\r
-{% block content %}\r
-<div class="tabBar">\r
- <div class="headQuestions">{% trans "Questions" %}</div>\r
- <div class="tabsA">\r
- <a id="latest" href="{% url questions %}?sort=latest" title="{% trans "last updated questions" %}" >{% trans "newest" %}</a>\r
- <a id="hottest" href="{% url questions %}?sort=hottest" title="{% trans "hottest questions" %}" >{% trans "hottest" %}</a>\r
- <a id="mostvoted" href="{% url questions %}?sort=mostvoted" title="{% trans "most voted questions" %}" >{% trans "most voted" %}</a>\r
- <a id="all" href="{% url questions %}" title="{% trans "all questions" %}" >{% trans "all questions" %}</a>\r
- </div>\r
-</div>\r
-<!-- ???? -->\r
-<div id="listA">\r
- {% for question in questions.object_list %}\r
- <div class="short-summary">\r
- <div class="counts">\r
- <div class="votes">\r
- <div class="item-count">{{question.score|intcomma}}</div>\r
- <div>{% trans "votes" %}</div>\r
- </div >\r
- <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
- <div class="item-count">{{question.answer_count|intcomma}}</div>\r
- <div>{% trans "answers" %}</div>\r
- </div>\r
- <div class="views">\r
- <div class="item-count">{{question.view_count|cnprog_intword|safe}}</div>\r
- <div>{% trans "views" %}</div>\r
- </div>\r
- </div>\r
-\r
- <h2><a title="{{question.summary}}" href="{% url question id=question.id %}{{question.title|slugify}}">{{question.title}}</a></h2>\r
-\r
- <div class="userinfo">\r
- <span class="relativetime" title="{{question.last_activity_at}}">{% diff_date question.last_activity_at %}</span>\r
- {% if question.last_activity_by %}\r
- <a href="{{ question.last_activity_by.get_profile_url }}">{{ question.last_activity_by }}</a> {% get_score_badge question.last_activity_by %}\r
- {% endif %}\r
- </div>\r
-\r
- <div class="tags">\r
- {% for tag in question.tagname_list %}\r
- <a href="{% url tag_questions tag|urlencode %}" title="{% trans "see questions tagged" %} '{{ tag }}' {% trans "using tags" %}" rel="tag">{{ tag }}</a>\r
- {% endfor %}\r
- </div>\r
- </div>\r
- {% endfor %}\r
-</div>\r
-{% endblock %}\r
-\r
{% block sidebar %}\r
-{% if not request.user.is_authenticated %}\r
-<div class="boxA">\r
- <h3>{% trans "welcome to website" %}</h3>\r
- <div class="body">\r
- {{ settings.APP_INTRO|safe }}\r
- <div class="more"><a href="{% url about %}">{% trans "about" %} </a></div>\r
- <div class="more"><a href="{% url faq %}">{% trans "faq" %} </a></div>\r
- </div>\r
-</div>\r
-{% else %}\r
-{% include "tag_selector.html" %}\r
-{% endif %}\r
-<div class="boxC">\r
- <h3>{% trans "Recent tags" %}</h3>\r
- <div class="body">\r
- <div class="tags">\r
- {% for tag in tags %}\r
- <a rel="tag"\r
- title="{% blocktrans with tag.name as tagname %}see questions tagged '{{tagname}}'{% endblocktrans %}" href="{% url tag_questions tag.name|urlencode %}">{{ tag.name }}</a>\r
- {% endfor %}\r
+ {% if not request.user.is_authenticated %}\r
+ <div class="boxA">\r
+ <h3>{% trans "welcome to " %}{{ settings.APP_SHORT_NAME }}</h3>\r
+ <div class="body">\r
+ {{ settings.APP_INTRO|safe }}\r
+ <div class="more"><a href="{% url about %}">{% trans "about" %} </a></div>\r
+ <div class="more"><a href="{% url faq %}">{% trans "faq" %} </a></div>\r
</div>\r
- <div class="more"><a href="{% url tags %}">{% trans "popular tags" %} </a> </div>\r
</div>\r
-</div>\r
-{% if awards %}\r
-<div class="boxC">\r
- <h3>{% trans "Recent awards" %}</h3>\r
- <div class="body">\r
- <ul class="badge-list">\r
- {% for award in awards %}\r
- <li>\r
- <a href="{% url badges %}{{award.badge_id}}/{{award.badge_name}}" title="{{ award.badge_description }}" class="medal">\r
- <span class="badge{{ award.badge_type }}">●</span> {{ award.badge_name }}</a> {% trans "given to" %}\r
- <a href="{% url users %}{{award.user_id}}/{{award.user_name}}">{{ award.user_name }}</a>\r
- </li>\r
- {% endfor %}\r
- </ul>\r
- <div class="more"><a href="{% url badges %}">{% trans "all awards" %} </a> </div>\r
- </div>\r
-</div>\r
-{% endif %}\r
-<div id="feeds">\r
-<a href="{% media "/feeds/rss" %}" title="{% trans "subscribe to last 30 questions by RSS" %}">{% trans "subscribe to the questions feed" %}</a>\r
-</div>\r
+ {% endif %}\r
+ {% question_list_count %}\r
+ {% if request.user.is_authenticated %}\r
+ {% tag_selector %}\r
+ {% endif %}\r
+ {% recent_tags %}\r
+ {% recent_awards %}\r
{% endblock %}\r
-{% block tail %}\r
-<div class="pager">{% cnprog_paginator context %}</div>\r
- <div class="pagesize">{% cnprog_pagesize context %}</div>\r
-<!-- <div style="padding:5px 0 5px 5px;">\r
-<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
-</div> -->\r
-{% endblock %}\r
-<!-- index.html -->
\ No newline at end of file
+<!-- index.html -->\r
+\r