1 {% extends "base.html" %}
\r
2 <!-- question.html -->
\r
4 {% load extra_tags %}
\r
5 {% load extra_filters %}
\r
6 {% load general_sidebar_tags %}
\r
11 {% block metadescription %}{{question.summary}}{% endblock %}
\r
12 {% block metakeywords %}{{question.tagname_meta_generator}}{% endblock %}
\r
13 {% block title %}{% spaceless %}{{ question.headline }}{% endspaceless %}{% endblock %}
\r
15 <link rel="canonical" href="{{settings.APP_URL}}{{question.get_absolute_url}}" />
\r
16 {% if not question.nis.closed %}
\r
17 <script type='text/javascript' src='{% media "/media/js/wmd/showdown.js" %}'></script>
\r
18 <script type='text/javascript' src='{% media "/media/js/wmd/wmd.js" %}'></script>
\r
19 <link rel="stylesheet" type="text/css" href="{% media "/media/js/wmd/wmd.css" %}" />
\r
22 <script type="text/javascript">
\r
23 $().ready(function(){
\r
24 $("#nav_questions").attr('className',"on");
\r
25 var answer_sort_tab = "{{ tab_id }}";
\r
27 if (answer_sort_tab) {
\r
28 $("#" + answer_sort_tab).attr('className',"on");
\r
31 $('#editor').TextAreaResizer();
\r
33 //toggle preview of editor
\r
35 var txt = "[{% trans "hide preview" %}]";
\r
36 $('#pre-collapse').text(txt);
\r
37 $('#pre-collapse').bind('click', function(){
\r
38 txt = display ? "[{% trans "show preview" %}]" : "[{% trans "hide preview" %}]";
\r
40 $('#previewer').toggle();
\r
41 $('#pre-collapse').text(txt);
\r
47 .comment.not_top_scorer {
\r
50 .comment-form-container {
\r
53 .div.comment-tools {
\r
61 <div class="headNormal">
\r
62 <h1><a href="{{ question.get_absolute_url }}">{{ question.headline }}</a></h1>
\r
64 <div id="main-body" class="">
\r
66 <table style="width:100%;" id="question-table" {% if question.nis.deleted %}class="deleted"{%endif%}>
\r
68 <td style="width:30px;vertical-align:top">
\r
69 <div class="vote-buttons">
\r
70 {% vote_buttons question request.user %}
\r
71 {% favorite_mark question request.user %}
\r
75 <div id="item-right">
\r
76 <div class="question-body">
\r
77 {{ question.html|safe }}
\r
79 <div id="question-tags" class="tags-container tags">
\r
80 {% for tag in question.tagname_list %}
\r
81 <a href="{% url tag_questions tag|urlencode %}" class="post-tag"
\r
82 title="{% blocktrans with tag as tagname %}see questions tagged '{{ tagname }}'{% endblocktrans %}" rel="tag">{{ tag }}</a>
\r
85 <div id="question-controls" class="post-controls">
\r
86 {% post_controls question request.user %}
\r
87 {% wiki_symbol request.user question %}
\r
89 <div class="post-update-info-container">
\r
90 {% contributors_info question %}
\r
92 {% comments question request.user %}
\r
98 {% if question.nis.closed %}
\r
99 <div class="question-status" style="margin-bottom:15px">
\r
101 {% blocktrans with question.nstate.closed.extra as close_reason %}
\r
102 The question has been closed for the following reason "{{ close_reason }}" by
\r
103 {% endblocktrans %}
\r
104 <a href="{{ question.nstate.closed.by.get_profile_url }}">{{ question.nstate.closed.by.username }}</a>
\r
105 {% diff_date question.nstate.closed.at %}
\r
111 <div class="tabBar">
\r
112 <a name="sort-top"></a>
\r
113 <div class="headQuestions">
\r
114 {% blocktrans count answers|length as counter %}
\r
117 {{counter}} Answers:
\r
118 {% endblocktrans %}
\r
120 <div class="tabsA">
\r
121 <a id="oldest" href="{{ question.get_absolute_url }}?sort=oldest#sort-top"
\r
122 title="{% trans "oldest answers will be shown first" %}">{% trans "oldest answers" %}</a>
\r
123 <a id="latest" href="{{ question.get_absolute_url }}?sort=latest#sort-top"
\r
124 title="{% trans "newest answers will be shown first" %}">{% trans "newest answers" %}</a>
\r
125 <a id="votes" href="{{ question.get_absolute_url }}?sort=votes#sort-top"
\r
126 title="{% trans "most voted answers will be shown first" %}">{% trans "popular answers" %}</a>
\r
129 {% cnprog_paginator context %}
\r
131 {% for answer in answers %}
\r
132 <a name="{{ answer.id }}"></a>
\r
133 <div id="answer-container-{{ answer.id }}" class="answer {% if answer.nis.accepted %}accepted-answer{% endif %} {% ifequal answer.author_id question.author_id %} answered-by-owner{% endifequal %} {% if answer.nis.deleted %}deleted{% endif %}">
\r
134 <table style="width:100%;">
\r
136 <td style="width:30px;vertical-align:top">
\r
137 <div class="vote-buttons">
\r
138 {% vote_buttons answer request.user %}
\r
139 {% accept_button answer request.user %}
\r
143 <div class="item-right">
\r
144 <div class="answer-body">
\r
145 {{ answer.html|safe }}
\r
147 <div class="answer-controls post-controls">
\r
148 {% post_controls answer request.user %}
\r
149 {% wiki_symbol request.user answer %}
\r
151 <div class="post-update-info-container">
\r
152 {% contributors_info answer %}
\r
154 {% comments answer request.user %}
\r
161 <div class="paginator-container-left">
\r
162 {% cnprog_paginator context %}
\r
165 <form id="fmanswer" action="{% url answer question.id %}" method="post">
\r
166 <div style="clear:both">
\r
169 {% if not question.closed %}
\r
170 <div style="padding:10px 0 0 0;">
\r
172 <div class="headNormal">
\r
174 {% trans "Your answer" %}
\r
176 {% trans "Be the first one to answer this question!" %}
\r
182 {% if not request.user.is_authenticated %}
\r
183 <div class="message">{% trans "You can answer anonymously and then login." %}</div>
\r
185 <p class="message">
\r
186 {% ifequal request.user question.author %}
\r
187 {% trans "Answer your own question only to give an answer." %}
\r
189 {% trans "Please only give an answer, no discussions." %}
\r
191 {% if not request.user.email_valid_and_can_answer %}
\r
192 {% blocktrans %}Remember, your answer will not be published until you validate your email.{% endblocktrans %}
\r
193 <a href="{% url send_validation_email %}">{% trans "Send me a validation link." %}</a>
\r
199 <div id="description" class="" >
\r
200 <div id="wmd-button-bar" class="wmd-panel"></div>
\r
202 <div class="preview-toggle">
\r
203 <table width="100%">
\r
206 <span id="pre-collapse"
\r
207 title="{% trans "Toggle the real time Markdown editor preview" %}">
\r
208 {% trans "toggle preview" %}
\r
211 {% if settings.WIKI_ON %}
\r
212 <td style="text-align:right;">
\r
214 <span style="font-weight:normal;cursor:help"
\r
215 title="{{answer.wiki.help_text}}">
\r
216 {{ answer.wiki.label_tag }}
\r
224 {{ answer.text.errors }}
\r
225 <div id="previewer" class="wmd-preview"></div>
\r
227 <p><span class="form-error"></span></p>
\r
228 <input type="submit"
\r
229 {% if user.is_anonymous %}
\r
230 value="{% trans "Login/Signup to Post Your Answer" %}"
\r
232 {% if user == question.author %}
\r
233 value="{% trans "Answer Your Own Question" %}"
\r
235 value="{% trans "Answer the question" %}"
\r
238 class="submit" style="float:left"/>
\r
245 {% block sidebar %}
\r
246 <div class="boxC" id="subscription_box">
\r
247 {% include "subscription_status.html" %}
\r
249 {% sidebar_upper %}
\r
250 {% cache 60 questions_tags settings.APP_URL question.id %}
\r
253 {% trans "Question tags" %}:
\r
256 {% for tag in question.tags.all %}
\r
257 <a href="{% url tag_questions tag.name|urlencode %}"
\r
258 title="{% trans "see questions tagged"%}'{{tag.name}}'{% trans "using tags" %}"
\r
259 rel="tag">{{ tag.name }}</a> <span class="tag-number">×{{ tag.used_count|intcomma }}</span><br/>
\r
263 {% trans "question asked" %}: <strong title="{{ question.added_at }}">{% diff_date question.added_at %}</strong>
\r
266 {% trans "question was seen" %}: <strong>{{ question.view_count|intcomma }} {% trans "times" %}</strong>
\r
269 {% trans "last updated" %}: <strong title="{{ question.last_activity_at }}">{% diff_date question.last_activity_at %}</strong>
\r
273 {% sidebar_lower %}
\r
275 <h3 class="subtitle">{% trans "Related questions" %}</h3>
\r
276 <div class="questions-related">
\r
278 {% for question in similar_questions %}
\r
280 <a href="{{ question.get_absolute_url }}">{{ question.headline }}</a>
\r
291 <!-- end question.html -->
\r