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 <link rel="alternate" type="application/rss+xml" title="RSS" href="{{ question.get_absolute_url }}?type=rss">
\r
17 {% if not question.nis.closed %}
\r
18 <script type='text/javascript' src='{% media "/media/js/wmd/showdown.js" %}'></script>
\r
19 <script type='text/javascript' src='{% media "/media/js/wmd/wmd.js" %}'></script>
\r
20 <link rel="stylesheet" type="text/css" href="{% media "/media/js/wmd/wmd.css" %}" />
\r
23 <script type="text/javascript">
\r
24 $().ready(function(){
\r
25 $("#nav_questions").attr('className',"on");
\r
26 var answer_sort_tab = "{{ tab_id }}";
\r
28 if (answer_sort_tab) {
\r
29 $("#" + answer_sort_tab).attr('className',"on");
\r
32 $('#editor').TextAreaResizer();
\r
34 //toggle preview of editor
\r
36 var txt = "[{% trans "hide preview" %}]";
\r
37 $('#pre-collapse').text(txt);
\r
38 $('#pre-collapse').bind('click', function(){
\r
39 txt = display ? "[{% trans "show preview" %}]" : "[{% trans "hide preview" %}]";
\r
41 $('#previewer').toggle();
\r
42 $('#pre-collapse').text(txt);
\r
48 .comment.not_top_scorer {
\r
51 .comment-form-container {
\r
54 .div.comment-tools {
\r
62 <div class="headNormal">
\r
63 <h1><a href="{{ question.get_absolute_url }}">{{ question.headline }}</a></h1>
\r
65 <div id="main-body" class="">
\r
67 <table style="width:100%;" id="question-table" {% post_classes question %}>
\r
69 <td style="width:30px;vertical-align:top">
\r
70 <div class="vote-buttons">
\r
71 {% vote_buttons question request.user %}
\r
72 {% favorite_mark question request.user %}
\r
76 <div id="item-right">
\r
77 <div class="question-body">
\r
78 {{ question.html|safe }}
\r
80 <div id="question-tags" class="tags-container tags">
\r
81 {% for tag in question.tagname_list %}
\r
82 <a href="{% url tag_questions tag|urlencode %}" class="post-tag"
\r
83 title="{% blocktrans with tag as tagname %}see questions tagged '{{ tagname }}'{% endblocktrans %}" rel="tag">{{ tag }}</a>
\r
86 <div id="question-controls" class="post-controls">
\r
87 {% post_controls question request.user %}
\r
88 {% wiki_symbol request.user question %}
\r
90 <div class="post-update-info-container">
\r
91 {% contributors_info question %}
\r
93 {% comments question request.user %}
\r
99 {% if question.nis.closed %}
\r
100 <div class="question-status" style="margin-bottom:15px">
\r
102 {% blocktrans with question.nstate.closed.extra as close_reason %}The question has been closed for the following reason "{{ close_reason }}" by{% endblocktrans %}
\r
103 <a href="{{ question.nstate.closed.by.get_profile_url }}">{{ question.nstate.closed.by.username }}</a>
\r
104 {% diff_date question.nstate.closed.at %}
\r
110 <div class="tabBar">
\r
111 <a name="sort-top"></a>
\r
112 <div class="headQuestions">
\r
113 {% blocktrans count answers.paginator.count as counter %}One Answer:{% plural %}{{counter}} Answers:{% endblocktrans %}
\r
115 {{ answers.paginator.sort_tabs }}
\r
117 {{ answers.paginator.page_numbers }}
\r
119 {% for answer in answers.paginator.page %}
\r
120 <a name="{{ answer.id }}"></a>
\r
121 <div id="answer-container-{{ answer.id }}" class="answer {% post_classes answer %}">
\r
122 <table style="width:100%;">
\r
124 <td style="width:30px;vertical-align:top">
\r
125 <div class="vote-buttons">
\r
126 {% vote_buttons answer request.user %}
\r
127 {% accept_button answer request.user %}
\r
131 <div class="item-right">
\r
132 <div class="answer-body">
\r
133 {{ answer.html|safe }}
\r
135 <div class="answer-controls post-controls">
\r
136 {% post_controls answer request.user %}
\r
137 {% wiki_symbol request.user answer %}
\r
139 <div class="post-update-info-container">
\r
140 {% contributors_info answer %}
\r
142 {% comments answer request.user %}
\r
149 <div class="paginator-container-left">
\r
150 {{ answers.paginator.page_numbers }}
\r
153 <form id="fmanswer" action="{% url answer question.id %}" method="post">
\r
154 <div style="clear:both">
\r
157 {% if not question.closed %}
\r
158 <div style="padding:10px 0 0 0;">
\r
160 <div class="headNormal">
\r
162 {% trans "Your answer" %}
\r
164 {% trans "Be the first one to answer this question!" %}
\r
170 {% if not request.user.is_authenticated %}
\r
171 <div class="message">{% trans "You can answer anonymously and then login." %}</div>
\r
173 <p class="message">
\r
174 {% ifequal request.user question.author %}
\r
175 {% trans "Answer your own question only to give an answer." %}
\r
177 {% trans "Please only give an answer, no discussions." %}
\r
179 {% if not request.user.email_valid_and_can_answer %}
\r
180 {% blocktrans %}Remember, your answer will not be published until you validate your email.{% endblocktrans %}
\r
181 <a href="{% url send_validation_email %}">{% trans "Send me a validation link." %}</a>
\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 {{ answer.text.errors }}
\r
213 <div id="previewer" class="wmd-preview"></div>
\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 {% sidebar_upper %}
\r
238 {% cache 60 questions_tags settings.APP_URL question.id %}
\r
241 {% trans "Question tags" %}:
\r
244 {% for tag in question.tags.all %}
\r
245 <a href="{% url tag_questions tag.name|urlencode %}"
\r
246 title="{% trans "see questions tagged"%}'{{tag.name}}'{% trans "using tags" %}"
\r
247 rel="tag">{{ tag.name }}</a> <span class="tag-number">×{{ tag.used_count|intcomma }}</span><br/>
\r
251 {% trans "question asked" %}: <strong title="{{ question.added_at }}">{% diff_date question.added_at %}</strong>
\r
254 {% trans "question was seen" %}: <strong>{{ question.view_count|intcomma }} {% trans "times" %}</strong>
\r
257 {% trans "last updated" %}: <strong title="{{ question.last_activity_at }}">{% diff_date question.last_activity_at %}</strong>
\r
261 {% sidebar_lower %}
\r
263 <h3 class="subtitle">{% trans "Related questions" %}</h3>
\r
264 <div class="questions-related">
\r
266 {% for question in similar_questions %}
\r
268 <a href="{{ question.get_absolute_url }}">{{ question.headline }}</a>
\r
279 <!-- end question.html -->
\r