1 {% extends "base.html" %}
\r
2 <!-- question.html -->
\r
4 {% load extra_tags %}
\r
5 {% load extra_filters %}
\r
10 {% block title %}{% spaceless %}{{ question.headline }}{% endspaceless %}{% endblock %}
\r
12 <meta name="description" content="{{question.summary}}" />
\r
13 <meta name="keywords" content="{{question.tagname_meta_generator}}" />
\r
14 <link rel="canonical" href="{{settings.APP_URL}}{{question.get_absolute_url}}" />
\r
15 {% if not question.closed %}
\r
16 <script type='text/javascript' src='{% media "/media/js/wmd/showdown.js" %}'></script>
\r
17 <script type='text/javascript' src='{% media "/media/js/wmd/wmd.js" %}'></script>
\r
18 <link rel="stylesheet" type="text/css" href="{% media "/media/js/wmd/wmd.css" %}" />
\r
21 <script type="text/javascript">
\r
22 $().ready(function(){
\r
23 $("#nav_questions").attr('className',"on");
\r
24 var answer_sort_tab = "{{ tab_id }}";
\r
25 $("#" + answer_sort_tab).attr('className',"on");
\r
27 $('#editor').TextAreaResizer();
\r
29 //toggle preview of editor
\r
31 var txt = "[{% trans "hide preview" %}]";
\r
32 $('#pre-collapse').text(txt);
\r
33 $('#pre-collapse').bind('click', function(){
\r
34 txt = display ? "[{% trans "show preview" %}]" : "[{% trans "hide preview" %}]";
\r
36 $('#previewer').toggle();
\r
37 $('#pre-collapse').text(txt);
\r
43 .comment.not_top_scorer {
\r
46 .comment-form-container {
\r
49 .div.comment-tools {
\r
57 <div class="headNormal">
\r
58 <a href="{{ question.get_absolute_url }}">{{ question.headline }}</a>
\r
60 <div id="main-body" class="">
\r
62 <table style="width:100%;" id="question-table" {% if question.deleted %}class="deleted"{%endif%}>
\r
64 <td style="width:30px;vertical-align:top">
\r
65 <div class="vote-buttons">
\r
66 {% vote_buttons question request.user %}
\r
67 {% favorite_mark question request.user %}
\r
71 <div id="item-right">
\r
72 <div class="question-body">
\r
73 {{ question.html|safe }}
\r
75 <div id="question-controls" class="post-controls">
\r
76 <div id="question-tags" class="tags">
\r
77 {% for tag in question.tagname_list %}
\r
78 <a href="{% url tag_questions tag|urlencode %}" class="post-tag"
\r
79 title="{% blocktrans with tag as tagname %}see questions tagged '{{ tagname }}'{% endblocktrans %}" rel="tag">{{ tag }}</a>
\r
82 {% post_controls question request.user %}
\r
84 <div class="post-update-info-container">
\r
85 {% contributors_info question %}
\r
87 {% comments question request.user %}
\r
93 {% if question.marked %}
\r
94 <div class="question-status" style="margin-bottom:15px">
\r
96 {% blocktrans with question.closed.extra as close_reason %}
\r
97 The question has been closed for the following reason "{{ close_reason }}" by
\r
99 <a href="{{ question.closed.by.get_profile_url }}">{{ question.closed.by.username }}</a>
\r
100 {% diff_date question.closed.at %}
\r
106 <div class="tabBar">
\r
107 <a name="sort-top"></a>
\r
108 <div class="headQuestions">
\r
109 {% blocktrans count answers|length as counter %}
\r
112 {{counter}} Answers:
\r
113 {% endblocktrans %}
\r
115 <div class="tabsA">
\r
116 <a id="oldest" href="{{ question.get_absolute_url }}?sort=oldest#sort-top"
\r
117 title="{% trans "oldest answers will be shown first" %}">{% trans "oldest answers" %}</a>
\r
118 <a id="latest" href="{{ question.get_absolute_url }}?sort=latest#sort-top"
\r
119 title="{% trans "newest answers will be shown first" %}">{% trans "newest answers" %}</a>
\r
120 <a id="votes" href="{{ question.get_absolute_url }}?sort=votes#sort-top"
\r
121 title="{% trans "most voted answers will be shown first" %}">{% trans "popular answers" %}</a>
\r
124 {% cnprog_paginator context %}
\r
126 {% for answer in answers %}
\r
127 <a name="{{ answer.id }}"></a>
\r
128 <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
129 <table style="width:100%;">
\r
131 <td style="width:30px;vertical-align:top">
\r
132 <div class="vote-buttons">
\r
133 {% vote_buttons answer request.user %}
\r
134 {% accept_button answer request.user %}
\r
138 <div class="item-right">
\r
139 <div class="answer-body">
\r
140 {{ answer.html|safe }}
\r
142 <div class="answer-controls post-controls">
\r
143 {% post_controls answer request.user %}
\r
145 <div class="post-update-info-container">
\r
146 {% contributors_info answer %}
\r
148 {% comments answer request.user %}
\r
155 <div class="paginator-container-left">
\r
156 {% cnprog_paginator context %}
\r
159 <form id="fmanswer" action="{% url answer question.id %}" method="post">
\r
160 <div style="clear:both">
\r
163 {% if not question.closed %}
\r
164 <div style="padding:10px 0 0 0;">
\r
166 <div class="headNormal">
\r
168 {% trans "Your answer" %}
\r
170 {% trans "Be the first one to answer this question!" %}
\r
175 {% if not request.user.is_authenticated %}
\r
176 <div class="message">{% trans "you can answer anonymously and then login" %}</div>
\r
178 <p class="message">
\r
179 {% ifequal request.user question.author %}
\r
180 {% trans "answer your own question only to give an answer" %}
\r
182 {% trans "please only give an answer, no discussions" %}
\r
187 <div id="description" class="" >
\r
188 <div id="wmd-button-bar" class="wmd-panel"></div>
\r
190 <div class="preview-toggle">
\r
191 <table width="100%">
\r
194 <span id="pre-collapse"
\r
195 title="{% trans "Toggle the real time Markdown editor preview" %}">
\r
196 {% trans "toggle preview" %}
\r
199 {% if settings.WIKI_ON %}
\r
200 <td style="text-align:right;">
\r
202 <span style="font-weight:normal;cursor:help"
\r
203 title="{{answer.wiki.help_text}}">
\r
204 {{ answer.wiki.label_tag }}
\r
212 <div id="previewer" class="wmd-preview"></div>
\r
213 {{ answer.text.errors }}
\r
215 <p><span class="form-error"></span></p>
\r
216 <input type="submit"
\r
217 {% if user.is_anonymous %}
\r
218 value="{% trans "Login/Signup to Post Your Answer" %}"
\r
220 {% if user == question.author %}
\r
221 value="{% trans "Answer Your Own Question" %}"
\r
223 value="{% trans "Answer the question" %}"
\r
226 class="submit" style="float:left"/>
\r
233 {% block sidebar %}
\r
234 <div class="boxC" id="subscription_box">
\r
235 {% include "subscription_status.html" %}
\r
237 {% cache 60 questions_tags settings.APP_URL question.id %}
\r
240 {% trans "Question tags" %}:
\r
243 {% for tag in tags %}
\r
244 <a href="{% url tag_questions tag.name|urlencode %}"
\r
245 title="{% trans "see questions tagged"%}'{{tag.name}}'{% trans "using tags" %}"
\r
246 rel="tag">{{ tag.name }}</a> <span class="tag-number">×{{ tag.used_count|intcomma }}</span><br/>
\r
250 {% trans "question asked" %}: <strong title="{{ question.added_at }}">{% diff_date question.added_at %}</strong>
\r
253 {% trans "question was seen" %}: <strong>{{ question.view_count|intcomma }} {% trans "times" %}</strong>
\r
256 {% trans "last updated" %}: <strong title="{{ question.last_activity_at }}">{% diff_date question.last_activity_at %}</strong>
\r
261 <h3 class="subtitle">{% trans "Related questions" %}</h3>
\r
262 <div class="questions-related">
\r
264 {% for question in similar_questions %}
\r
266 <a href="{{ question.get_absolute_url }}">{{ question.headline }}</a>
\r
277 <!-- end question.html -->
\r