]> git.openstreetmap.org Git - osqa.git/blob - forum/skins/default/templates/index.html
deleting the test file
[osqa.git] / forum / skins / default / templates / index.html
1 {% extends "base.html" %}\r
2 <!-- index.html -->\r
3 {% load i18n %}\r
4 {% load extra_tags %}\r
5 {% load humanize %}\r
6 {% load extra_filters %}\r
7 {% load smart_if %}\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
11 {% block forejs %}\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
18            });\r
19        </script>\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
22 {% endblock %}\r
23 {% block content %}\r
24 <div class="tabBar">\r
25     <div class="headQuestions">{% trans "Questions" %}</div>\r
26     <div class="tabsA">\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
31     </div>\r
32 </div>\r
33 <!-- ???? -->\r
34 <div id="listA">\r
35         {% for question in questions.object_list %}\r
36         <div class="short-summary">\r
37                 <div class="counts">\r
38                         <div class="votes">\r
39                                 <div class="item-count">{{question.score|intcomma}}</div>\r
40                                 <div>{% trans "votes" %}</div>\r
41                         </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
45                         </div>\r
46                         <div class="views">\r
47                                  <div class="item-count">{{question.view_count|cnprog_intword|safe}}</div>\r
48                                  <div>{% trans "views" %}</div>\r
49                         </div>\r
50                 </div>\r
51 \r
52                 <h2><a title="{{question.summary}}" href="{% url question id=question.id %}{{question.title|slugify}}">{{question.title}}</a></h2>\r
53 \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
58                         {% endif %}\r
59                 </div>\r
60 \r
61                 <div class="tags">\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
64                         {% endfor %}\r
65                 </div>\r
66         </div>\r
67         {% endfor %}\r
68 </div>\r
69 {% endblock %}\r
70 \r
71 {% block sidebar %}\r
72 {% if not request.user.is_authenticated %}\r
73 <div class="boxA">\r
74         <h3>{% trans "welcome to website" %}</h3>\r
75         <div class="body">\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
79         </div>\r
80 </div>\r
81 {% else %}\r
82 {% include "tag_selector.html" %}\r
83 {% endif %}\r
84 <div class="boxC">\r
85         <h3>{% trans "Recent tags" %}</h3>\r
86         <div class="body">\r
87          <div class="tags">\r
88         {% for tag in tags %}\r
89             <a rel="tag"\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
91         {% endfor %}\r
92         </div>\r
93         <div class="more"><a href="{% url tags %}">{% trans "popular tags" %} </a> </div>\r
94     </div>\r
95 </div>\r
96 {% if awards %}\r
97 <div class="boxC">\r
98     <h3>{% trans "Recent awards" %}</h3>\r
99         <div class="body">\r
100              <ul class="badge-list">\r
101              {% for award in awards %}\r
102                 <li>\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 }}">&#9679;</span>&nbsp;{{ award.badge_name }}</a> {% trans "given to" %}\r
105                 <a href="{% url users %}{{award.user_id}}/{{award.user_name}}">{{ award.user_name }}</a>\r
106                 </li>\r
107             {% endfor %}\r
108             </ul>\r
109                 <div class="more"><a href="{% url badges %}">{% trans "all awards" %} </a> </div>\r
110          </div>\r
111 </div>\r
112 {% endif %}\r
113 <div id="feeds">\r
114 <a href="{% media  "/feeds/rss" %}" title="{% trans "subscribe to last 30 questions by RSS" %}">{% trans "subscribe to the questions feed" %}</a>\r
115 </div>\r
116 {% endblock %}\r
117 {% block tail %}\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
122 </div> -->\r
123 {% endblock %}\r
124 <!-- index.html -->