]> git.openstreetmap.org Git - osqa.git/blob - forum/skins/default/templates/question.html
Initial commit
[osqa.git] / forum / skins / default / templates / question.html
1 {% extends "base.html" %}\r
2 <!-- question.html -->\r
3 {% load extra_tags %}\r
4 {% load extra_filters %}\r
5 {% load smart_if %}\r
6 {% load humanize %}\r
7 {% load i18n %}\r
8 {% block title %}{% spaceless %}{{ question.get_question_title }}{% endspaceless %}{% endblock %}\r
9 {% block forejs %}\r
10         <meta name="description" content="{{question.summary}}" />\r
11         <meta name="keywords" content="{{question.tagname_meta_generator}}" />\r
12         <link rel="canonical" href="{{settings.APP_URL}}{{question.get_absolute_url}}" />\r
13         {% if not question.closed %}\r
14         <script type='text/javascript' src='{% media  "/media/js/com.cnprog.editor.js" %}'></script>\r
15         <script type='text/javascript' src='{% media  "/media/js/wmd/showdown.js" %}'></script>\r
16         <script type='text/javascript' src='{% media  "/media/js/wmd/wmd.js" %}'></script>\r
17         <link rel="stylesheet" type="text/css" href="{% media  "/media/js/wmd/wmd.css" %}" />\r
18         {% endif %}\r
19         <script type='text/javascript' src='{% media  "/media/js/com.cnprog.post.js" %}'></script>\r
20         <script type='text/javascript' src='{% media  "/media/js/jquery.validate.pack.js" %}'></script>\r
21 \r
22         <script type="text/javascript">\r
23         // define reputation needs for comments\r
24         var repNeededForComments = 50;\r
25         $().ready(function(){\r
26             $("#nav_questions").attr('className',"on");\r
27             var answer_sort_tab = "{{ tab_id }}";\r
28             $("#" + answer_sort_tab).attr('className',"on");\r
29             \r
30             Vote.init({{ question.id }}, '{{ question.title|slugify }}', '{{ question.author.id }}','{{ request.user.id }}');\r
31             \r
32             {% if not question.closed and request.user.is_authenticated %}initEditor();{% endif %}\r
33             \r
34             lanai.highlightSyntax();\r
35             $('#btLogin').bind('click', function(){window.location.href='{% url auth_signin %}'; } )\r
36         });\r
37         \r
38         function initEditor(){\r
39             $('#editor').TextAreaResizer();\r
40             //highlight code synctax when editor has new text\r
41             $("#editor").typeWatch({highlight: false, wait: 3000,\r
42                              captureLength: 5, callback: lanai.highlightSyntax});\r
43                              \r
44             var display = true;\r
45             var txt = "[{% trans "hide preview" %}]";\r
46             $('#pre-collapse').text(txt);\r
47             $('#pre-collapse').bind('click', function(){\r
48                 txt = display ? "[{% trans "show preview" %}]" : "[{% trans "hide preview" %}]";\r
49                 display = !display;\r
50                 $('#previewer').toggle();\r
51                 $('#pre-collapse').text(txt);\r
52             });\r
53             \r
54             setupFormValidation("#fmanswer", CPValidator.getQuestionFormRules(), CPValidator.getQuestionFormMessages());\r
55         }\r
56          \r
57         </script>\r
58 {% endblock %}\r
59         \r
60 {% block content %}\r
61 <div class="headNormal">\r
62     <a href="{{ question.get_absolute_url }}">{{ question.get_question_title }}</a>\r
63 </div>\r
64 <div id="main-body" class="">\r
65     <div id="askform">\r
66             <table style="width:100%;" id="question-table" {% if question.deleted %}class="deleted"{%endif%}>\r
67                 <tr>\r
68                     <td style="width:30px;vertical-align:top">\r
69                         <div class="vote-buttons">\r
70                             {% if question_vote %}\r
71                             <img id="question-img-upvote-{{ question.id }}" class="question-img-upvote" \r
72                                 {% if question_vote.is_upvote %}\r
73                                     src="{% media  "/media/images/vote-arrow-up-on.png" %}" \r
74                                 {% else %}\r
75                                     src="{% media  "/media/images/vote-arrow-up.png" %}" \r
76                                 {% endif %}\r
77                                 alt="{% trans "i like this post (click again to cancel)" %}"\r
78                                 title="{% trans "i like this post (click again to cancel)" %}" />\r
79                             <div id="question-vote-number-{{ question.id }}" class="vote-number" \r
80                                 title="{% trans "current number of votes" %}">\r
81                                 {{ question.score }}\r
82                             </div>\r
83                             <img id="question-img-downvote-{{ question.id }}" class="question-img-downvote" \r
84                                 {% if question_vote.is_downvote %}\r
85                                     src="{% media  "/media/images/vote-arrow-down-on.png" %}" \r
86                                 {% else %}\r
87                                     src="{% media  "/media/images/vote-arrow-down.png" %}" \r
88                                 {% endif %}\r
89                                 alt="{% trans "i dont like this post (click again to cancel)" %}"\r
90                                 title="{% trans "i dont like this post (click again to cancel)" %}" />\r
91                            \r
92                             {% else %}\r
93                             <img id="question-img-upvote-{{ question.id }}" class="question-img-upvote" \r
94                                 alt="{% trans "i like this post (click again to cancel)" %}"\r
95                                 src="{% media  "/media/images/vote-arrow-up.png" %}" \r
96                                 title="{% trans "i like this post (click again to cancel)" %}" />\r
97                             <div id="question-vote-number-{{ question.id }}" class="vote-number" \r
98                                 title="{% trans "current number of votes" %}">\r
99                                 {{ question.score }}\r
100                             </div>\r
101                             <img id="question-img-downvote-{{ question.id }}" class="question-img-downvote" \r
102                                 src="{% media  "/media/images/vote-arrow-down.png" %}"\r
103                                 alt="{% trans "i dont like this post (click again to cancel)" %}"\r
104                                 title="{% trans "i dont like this post (click again to cancel)" %}" />\r
105                             {% endif %}\r
106                             {% if favorited %}\r
107                             <img class="question-img-favorite" src="{% media  "/media/images/vote-favorite-on.png" %}"\r
108                                 alt="{% trans "mark this question as favorite (click again to cancel)" %}"\r
109                                 title="{% trans "mark this question as favorite (click again to cancel)" %}" />\r
110                             <div id="favorite-number" class="favorite-number my-favorite-number">\r
111                                 {{ question.favourite_count }}\r
112                             </div>\r
113                             {% else %}\r
114                             <img class="question-img-favorite" src="{% media  "/media/images/vote-favorite-off.png" %}"\r
115                                 alt="{% trans "remove favorite mark from this question (click again to restore mark)" %}"\r
116                                 title="{% trans "remove favorite mark from this question (click again to restore mark)" %}" />\r
117                             <div id="favorite-number" class="favorite-number">\r
118                                {% ifnotequal question.favourite_count 0 %}{{ question.favourite_count }}{% endifnotequal %}\r
119                             </div>\r
120                             {% endif %}\r
121                             \r
122                         </div>\r
123                     </td>\r
124                     <td>\r
125                         <div id="item-right">\r
126                             <div class="question-body">\r
127                                 {{ question.html|safe }}\r
128                             </div>\r
129                             <div id="question-controls" class="post-controls">\r
130                                 <div id="question-tags" class="tags">\r
131                                     {% for tag in question.tagname_list %}\r
132                                         <a href="{% url tag_questions tag|urlencode %}" class="post-tag"\r
133                                             title="{% blocktrans with tag as tagname %}see questions tagged '{{ tagname }}'{% endblocktrans %}" rel="tag">{{ tag }}</a>\r
134                                     {% endfor %}\r
135                                 </div>\r
136                                 {% joinitems using '<span class="action-link-separator">|</span>' %}    \r
137                                     {% if request.user|can_edit_post:question %}\r
138                                     <span class="action-link"><a href="{% url edit_question question.id %}">{% trans 'edit' %}</a></span>\r
139                                     {% endif %}\r
140                                 {% separator %}\r
141                                     {% if question.closed %}\r
142                                     {% if request.user|can_reopen_question:question %}\r
143                                     <span class="action-link"><a href="{% url reopen question.id %}">{% trans "reopen" %}</a></span>\r
144                                     {% endif %}\r
145                                     {% else %}\r
146                                     {% if request.user|can_close_question:question %}\r
147                                     <span class="action-link"><a href="{% url close question.id %}">{% trans "close" %}</a></span>\r
148                                     {% endif %}\r
149                                     {% endif %}\r
150                                 {% separator %}\r
151                                     {% if request.user|can_flag_offensive %}\r
152                                     <span id="question-offensive-flag-{{ question.id }}" class="offensive-flag" \r
153                                         title="{% trans "report as offensive (i.e containing spam, advertising, malicious text, etc.)" %}">\r
154                                         <a>{% trans "flag offensive" %}</a>\r
155                                         {% if request.user|can_view_offensive_flags and question.offensive_flag_count %}\r
156                                         <span class="darkred">({{ question.offensive_flag_count }})</span>\r
157                                         {% endif %}\r
158                                     </span>\r
159                                     {% endif %}\r
160                                 {% separator %}\r
161                                     {% if request.user|can_delete_post:question %}\r
162                                     <span class="action-link"><a id="question-delete-link-{{question.id}}">{% trans "delete" %}</a></span>\r
163                                     {% endif %}\r
164                                 {% endjoinitems %}\r
165                             </div>\r
166                             <div class="post-update-info-container">\r
167                                 {% post_contributor_info question "original_author" %}\r
168                                 {% post_contributor_info question "last_updater" %}\r
169                             </div>\r
170                             <div class="comments-container" id="comments-container-question-{{question.id}}">\r
171                             {% for comment in question.get_comments|slice:":5" %}\r
172                                 <p class="comment" id="comment-{{comment.id}}">\r
173                                     {{comment.comment}} \r
174                                     - <a class="comment-user" href="{{comment.user.get_profile_url}}">{{comment.user}}</a>\r
175                                     {% spaceless %}\r
176                                     <span class="comment-age">({% diff_date comment.added_at %})</span>\r
177                                     {% if request.user|can_delete_comment:comment %}\r
178                                         <img class="delete-icon" \r
179                                             src="{% media  "/media/images/close-small.png" %}"\r
180                                             title="{% trans "delete this comment" %}"/>\r
181                                     {% endif %}\r
182                                     {% endspaceless %}\r
183                                 </p>\r
184                             {% endfor %}\r
185                             </div>\r
186                             <div class="post-comments" style="margin-bottom:20px">\r
187                                 <input id="can-post-comments-question-{{question.id}}" type="hidden" value="{{ request.user|can_add_comments:question }}"/>\r
188                                 {% if request.user|can_add_comments:question or question.comment_count > 5 %}\r
189                                     <a id="comments-link-question-{{question.id}}" class="comments-link">\r
190                                     {% if request.user|can_add_comments:question %}\r
191                                         {% trans "add comment" %}\r
192                                     {% endif %}\r
193                                     {% if question.comment_count > 5 %}\r
194                                         {% if request.user|can_add_comments:question %}/\r
195                                             {% blocktrans count question.get_comments|slice:"5:"|length as counter %}\r
196                                             see <strong>one</strong> more \r
197                                             {% plural %}\r
198                                             see <strong>{{counter}}</strong> more\r
199                                             {% endblocktrans %}\r
200                                         {% else %}\r
201                                             {% blocktrans count question.get_comments|slice:"5:"|length as counter %}\r
202                                             see <strong>one</strong> more comment\r
203                                             {% plural %}\r
204                                             see <strong>{{counter}}</strong> more comments\r
205                                             {% endblocktrans %}\r
206                                         {% endif %}\r
207                                     {% endif %}</a>\r
208                                 {% endif %}\r
209                             </div>\r
210                         </div>\r
211                         \r
212                     </td>\r
213                 </tr>\r
214             </table>\r
215             {% if question.closed %}\r
216             <div class="question-status" style="margin-bottom:15px">\r
217             <h3>{% blocktrans with question.get_close_reason_display as close_reason %}The question has been closed for the following reason "{{ close_reason }}" by{% endblocktrans %} \r
218             <a href="{{ question.closed_by.get_profile_url }}">{{ question.closed_by.username }}</a> \r
219             {% blocktrans with question.closed_at as closed_at %}close date {{closed_at}}{% endblocktrans %}</h3>\r
220             </div>\r
221             {% endif %}\r
222             {% if answers %}\r
223                 <hr/>\r
224                 <div class="tabBar">\r
225                     <a name="sort-top"></a>\r
226                     <div class="headQuestions">\r
227                     {% blocktrans count answers|length as counter %}\r
228                     One Answer:\r
229                     {% plural %}\r
230                     {{counter}} Answers:\r
231                     {% endblocktrans %}\r
232                     </div>\r
233                     <div class="tabsA">\r
234                          <a id="oldest" href="{% url question question.id %}?sort=oldest#sort-top" \r
235                             title="{% trans "oldest answers will be shown first" %}">{% trans "oldest answers" %}</a>\r
236                         <a id="latest" href="{% url question question.id %}?sort=latest#sort-top" \r
237                             title="{% trans "newest answers will be shown first" %}">{% trans "newest answers" %}</a>\r
238                         <a id="votes" href="{% url question question.id %}?sort=votes#sort-top" \r
239                             title="{% trans "most voted answers will be shown first" %}">{% trans "popular answers" %}</a>   \r
240                     </div>\r
241                 </div>\r
242                 {% cnprog_paginator context %}\r
243   \r
244                 {% for answer in answers %}\r
245                     <a name="{{ answer.id }}"></a>\r
246                     <div id="answer-container-{{ answer.id }}" class="answer {% if answer.accepted %}accepted-answer{% endif %} {% ifequal answer.author_id question.author_id %} answered-by-owner{% endifequal %} {% if answer.deleted %}deleted{% endif %}">\r
247                         <table style="width:100%;">\r
248                             <tr>\r
249                                 <td style="width:30px;vertical-align:top">\r
250                                     <div class="vote-buttons">\r
251                                         <img id="answer-img-upvote-{{ answer.id }}" class="answer-img-upvote" \r
252                                                 src="{% blockmedia %}/media/images/vote-arrow-up{% get_user_vote_image user_answer_votes answer.id 1 %}.png{% endblockmedia %}" \r
253                                                 alt="{% trans "i like this answer (click again to cancel)" %}"\r
254                                                 title="{% trans "i like this answer (click again to cancel)" %}"/>\r
255                                         <div id="answer-vote-number-{{ answer.id }}" class="vote-number" title="{% trans "current number of votes" %}">\r
256                                             {{ answer.score }}\r
257                                         </div>\r
258                                         <img id="answer-img-downvote-{{ answer.id }}" class="answer-img-downvote" \r
259                                             src="{% blockmedia %}/media/images/vote-arrow-down{% get_user_vote_image user_answer_votes answer.id -1 %}.png{% endblockmedia %}" \r
260                                             alt="{% trans "i dont like this answer (click again to cancel)" %}"\r
261                                             title="{% trans "i dont like this answer (click again to cancel)" %}" />\r
262                                      \r
263                                         {% ifequal request.user question.author  %}\r
264                                         <img id="answer-img-accept-{{ answer.id }}" class="answer-img-accept" \r
265                                             src="{% blockmedia %}/media/images/vote-accepted{% if answer.accepted %}-on{% endif %}.png{% endblockmedia %}" \r
266                                             alt="{% trans "mark this answer as favorite (click again to undo)" %}"\r
267                                             title="{% trans "mark this answer as favorite (click again to undo)" %}" />\r
268                                         {% else %}\r
269                                             {% if answer.accepted %}\r
270                                             <img id="answer-img-accept-{{ answer.id }}" class="answer-img-accept" \r
271                                                 src="{% blockmedia %}/media/images/vote-accepted{% if answer.accepted %}-on{% endif %}.png{% endblockmedia %}" \r
272                                                 alt="{% trans "the author of the question has selected this answer as correct" %}"\r
273                                                 title="{% trans "the author of the question has selected this answer as correct" %}" />\r
274                                             {% endif %}\r
275                                         {% endifequal %}\r
276                                     </div>\r
277                                 </td>\r
278                                 <td>\r
279                                     <div class="item-right">\r
280                                         <div class="answer-body">\r
281                                             {{ answer.html|safe }}\r
282                                         </div>\r
283                                         <div class="answer-controls post-controls">\r
284                                             {% joinitems using '<span class="action-link-separator">|</span>' %}    \r
285                                                 <span class="linksopt">\r
286                                                     <a href="#{{ answer.id }}" title="{% trans "answer permanent link" %}">\r
287                                                         {% trans "permanent link" %}\r
288                                                     </a>\r
289                                                 </span>\r
290                                             {% separator %}\r
291                                                 {% if request.user|can_edit_post:answer %}\r
292                                                 <span class="action-link"><a href="{% url edit_answer answer.id %}">{% trans 'edit' %}</a></span>\r
293                                                 {% endif %}\r
294                                             {% separator %}\r
295                                                 {% if request.user|can_flag_offensive %}\r
296                                                 <span id="answer-offensive-flag-{{ answer.id }}" class="offensive-flag" \r
297                                                     title="{% trans "report as offensive (i.e containing spam, advertising, malicious text, etc.)" %}">\r
298                                                     <a>{% trans "flag offensive" %}</a>\r
299                                                     {% if request.user|can_view_offensive_flags and answer.offensive_flag_count %}\r
300                                                     <span class="darkred">({{ answer.offensive_flag_count }})</span>\r
301                                                     {% endif %}\r
302                                                 </span>\r
303                                                 {% endif %}\r
304                                             {% separator %}\r
305                                                 {% if request.user|can_delete_post:answer %}\r
306                                                     {% spaceless %}\r
307                                                     <span class="action-link">\r
308                                                         <a id="answer-delete-link-{{answer.id}}">\r
309                                                         {% if answer.deleted %}{% trans "undelete" %}{% else %}{% trans "delete" %}{% endif %}</a>\r
310                                                     </span>\r
311                                                     {% endspaceless %}\r
312                                                 {% endif %}\r
313                                             {% endjoinitems %}\r
314                                         </div>\r
315                                         <div class="post-update-info-container">\r
316                                             {% post_contributor_info answer "original_author" %}\r
317                                             {% post_contributor_info answer "last_updater" %}\r
318                                         </div>\r
319                                         <div class="comments-container" id="comments-container-answer-{{answer.id}}">\r
320                                         {% for comment in answer.get_comments|slice:":5" %}\r
321                                             <p id="comment-{{comment.id}}" class="comment">\r
322                                                 {{comment.comment}} \r
323                                                 - <a class="comment-user" href="{{comment.user.get_profile_url}}">{{comment.user}}</a>\r
324                                                 {% spaceless %}\r
325                                                 <span class="comment-age">({% diff_date comment.added_at %})</span>\r
326                                                 {% if request.user|can_delete_comment:comment %}\r
327                                                     <img class="delete-icon" \r
328                                                         src="{% media  "/media/images/close-small.png" %}"\r
329                                                         title="{% trans "delete this comment" %}"/>\r
330                                                 {% endif %}\r
331                                                 {% endspaceless %}\r
332                                             </p>\r
333                                         {% endfor %}\r
334                                         </div>\r
335                                         <div class="post-comments" style="margin-bottom:20px">\r
336                                             <input id="can-post-comments-answer-{{answer.id}}" type="hidden" value="{{ request.user|can_add_comments:answer}}"/>\r
337                                             {% if request.user|can_add_comments:answer or answer.comment_count > 5 %}\r
338                                                 <a id="comments-link-answer-{{answer.id}}" class="comments-link">\r
339                                                 {% if request.user|can_add_comments:answer %}\r
340                                                     {% trans "add comment" %}\r
341                                                 {% endif %}\r
342                                                 {% if answer.comment_count > 5 %}\r
343                                                     {% if request.user|can_add_comments:answer %}/\r
344                                                         {% blocktrans count answer.get_comments|slice:"5:"|length as counter %}\r
345                                                         see <strong>one</strong> more \r
346                                                         {% plural %}\r
347                                                         see <strong>{{counter}}</strong> more\r
348                                                         {% endblocktrans %}\r
349                                                     {% else %}\r
350                                                         {% blocktrans count answer.get_comments|slice:"5:"|length as counter %}\r
351                                                         see <strong>one</strong> more comment\r
352                                                         {% plural %}\r
353                                                         see <strong>{{counter}}</strong> more comments\r
354                                                         {% endblocktrans %}\r
355                                                     {% endif %}\r
356                                                 {% endif %}</a>\r
357                                             {% endif %}\r
358                                         </div>\r
359                                     </div>\r
360                                     \r
361                                 </td>\r
362                             </tr>\r
363                         </table>\r
364                     </div>\r
365                 {% endfor %}\r
366                 <div class="paginator-container-left">\r
367                     {% cnprog_paginator context %}\r
368                 </div>\r
369             {% endif %}\r
370         <form id="fmanswer" action="{% url answer question.id %}" method="post">\r
371             {% if request.user.is_authenticated %}\r
372                 <p style="padding-left:3px">\r
373                 {{ answer.email_notify }} \r
374                 <label for="question-subscribe-updates">\r
375                 {% ifequal request.user.get_q_sel_email_feed_frequency 'n' %}\r
376                     {% trans "Notify me once a day when there are any new answers" %}\r
377                 {% else %}\r
378                     {% ifequal request.user.get_q_sel_email_feed_frequency 'd' %}\r
379                         {% trans "Notify me once a day when there are any new answers" %}\r
380                     {% else %}\r
381                         {% ifequal request.user.get_q_sel_email_feed_frequency 'w' %}\r
382                             {% trans "Notify me weekly when there are any new answers" %}\r
383                         {% endifequal %}\r
384                     {% endifequal %}\r
385                 {% endifequal %}\r
386                 </label>\r
387                 {% blocktrans with request.user.get_profile_url as profile_url %}\r
388                 You can always adjust frequency of email updates from your {{profile_url}}\r
389                 {% endblocktrans %}\r
390                 </p>\r
391             {% else %}\r
392                 <p style="padding-left:3px">\r
393                     <input class="nomargin" type="checkbox" disabled="disabled" />\r
394                     <label>{% trans "once you sign in you will be able to subscribe for any updates here" %}</label>\r
395                 </p>\r
396             {% endif %}\r
397             <div style="clear:both">\r
398             </div>\r
399             \r
400             {% if not question.closed %}\r
401                 <div style="padding:10px 0 0 0;">\r
402                     {% spaceless %}\r
403                     <div class="headNormal">\r
404                         {% if answers %}\r
405                             {% trans "Your answer" %}\r
406                         {% else %}\r
407                             {% trans "Be the first one to answer this question!" %}\r
408                         {% endif %}\r
409                     </div>\r
410                     {% endspaceless %}\r
411                 </div>\r
412                 {% if not request.user.is_authenticated %}\r
413                     <div class="message">{% trans "you can answer anonymously and then login" %}</div>\r
414                 {% else %}\r
415                     <p class="message">\r
416                         {% ifequal request.user question.author  %}\r
417                             {% trans "answer your own question only to give an answer" %}\r
418                         {% else %}\r
419                             {% trans "please only give an answer, no discussions" %}\r
420                         {% endifequal %}\r
421                     </p>\r
422                 {% endif %}\r
423 \r
424                 <div id="description" class="" >\r
425                     <div id="wmd-button-bar" class="wmd-panel"></div>\r
426                     {{ answer.text }}\r
427                     <div class="preview-toggle">\r
428                         <table width="100%">\r
429                             <tr>\r
430                                 <td>\r
431                                     <span id="pre-collapse" \r
432                                         title="{% trans "Toggle the real time Markdown editor preview" %}">\r
433                                             {% trans "toggle preview" %}\r
434                                     </span>\r
435                                 </td>\r
436                                 {% if settings.WIKI_ON %}\r
437                                 <td style="text-align:right;">\r
438                                     {{ answer.wiki }} \r
439                                     <span style="font-weight:normal;cursor:help" \r
440                                         title="{{answer.wiki.help_text}}">\r
441                                             {{ answer.wiki.label_tag }} \r
442                                     </span>\r
443                                 </td>\r
444                                 {% endif %}\r
445                             </tr>\r
446                         \r
447                         </table>  \r
448                     </div>\r
449                     <div id="previewer" class="wmd-preview"></div>\r
450                     {{ answer.text.errors }}\r
451                 </div>\r
452                 <p><span class="form-error"></span></p>\r
453                 <input type="submit" \r
454                     {% if user.is_anonymous %}\r
455                         value="{% trans "Login/Signup to Post Your Answer" %}" \r
456                     {% else %}\r
457                         {% if user == question.author %}\r
458                         value="{% trans "Answer Your Own Question" %}" \r
459                         {% else %}\r
460                         value="{% trans "Answer the question" %}" \r
461                         {% endif %}\r
462                     {% endif %}\r
463                     class="submit" style="float:left"/>\r
464             {% endif %}\r
465         </form>\r
466     </div>\r
467 </div>\r
468 {% endblock %}\r
469 \r
470 {% block sidebar %}\r
471 <div class="boxC">\r
472     <p>\r
473                 {% trans "Question tags" %}:\r
474     </p>\r
475     <p class="tags" >\r
476         {% for tag in tags %}\r
477                 <a href="{% url tag_questions tag.name|urlencode %}" \r
478                         title="{% trans "see questions tagged"%}'{{tag.name}}'{% trans "using tags" %}" \r
479                         rel="tag">{{ tag.name }}</a> <span class="tag-number">&#215;{{ tag.used_count|intcomma }}</span><br/>\r
480         {% endfor %}\r
481     </p>\r
482     <p>\r
483         {% trans "question asked" %}: <strong title="{{ question.added_at }}">{% diff_date question.added_at %}</strong>\r
484     </p>\r
485     <p> \r
486         {% trans "question was seen" %}: <strong>{{ question.view_count|intcomma }} {% trans "times" %}</strong>\r
487     </p>\r
488     <p> \r
489         {% trans "last updated" %}: <strong title="{{ question.last_activity_at }}">{% diff_date question.last_activity_at %}</strong>\r
490     </p>\r
491 </div>\r
492 \r
493 <div class="boxC">\r
494     <h3 class="subtitle">{% trans "Related questions" %}</h3>\r
495     <div class="questions-related">\r
496         {% for question in similar_questions %}\r
497         <p>\r
498             <a href="{{ question.get_absolute_url }}">{{ question.get_question_title }}</a>\r
499         </p>\r
500         {% endfor %}\r
501     </div>\r
502 </div>\r
503 \r
504 {% endblock %}\r
505 \r
506 {% block endjs %}\r
507 {% endblock %}\r
508 <!-- end question.html -->\r