X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/b8f3a2323d03384198863e35d6467a8624a2e31a..b97ddb66b6ffc6b7897ae6eb8b82409d66c89827:/forum/skins/default/templates/question.html diff --git a/forum/skins/default/templates/question.html b/forum/skins/default/templates/question.html index 0a75aba..81711e0 100644 --- a/forum/skins/default/templates/question.html +++ b/forum/skins/default/templates/question.html @@ -3,16 +3,17 @@ {% load node_tags %} {% load extra_tags %} {% load extra_filters %} +{% load general_sidebar_tags %} {% load smart_if %} {% load humanize %} {% load i18n %} {% load cache %} +{% block metadescription %}{{question.summary}}{% endblock %} +{% block metakeywords %}{{question.tagname_meta_generator}}{% endblock %} {% block title %}{% spaceless %}{{ question.headline }}{% endspaceless %}{% endblock %} {% block forejs %} - - - {% if not question.closed %} + {% if not question.nis.closed %} @@ -22,9 +23,23 @@ $().ready(function(){ $("#nav_questions").attr('className',"on"); var answer_sort_tab = "{{ tab_id }}"; - $("#" + answer_sort_tab).attr('className',"on"); + + if (answer_sort_tab) { + $("#" + answer_sort_tab).attr('className',"on"); + } $('#editor').TextAreaResizer(); + + //toggle preview of editor + var display = true; + var txt = "[{% trans "hide preview" %}]"; + $('#pre-collapse').text(txt); + $('#pre-collapse').bind('click', function(){ + txt = display ? "[{% trans "show preview" %}]" : "[{% trans "hide preview" %}]"; + display = !display; + $('#previewer').toggle(); + $('#pre-collapse').text(txt); + }); }); @@ -44,11 +59,11 @@ {% block content %} - {{ question.headline }} + {{ question.headline }} - + @@ -61,14 +76,15 @@ {{ question.html|safe }} - - - {% for tag in question.tagname_list %} - {{ tag }} - {% endfor %} - + + {% for tag in question.tagname_list %} + {{ tag }} + {% endfor %} + + {% post_controls question request.user %} + {% wiki_symbol request.user question %} {% contributors_info question %} @@ -79,14 +95,14 @@ - {% if question.marked %} + {% if question.nis.closed %} - {% blocktrans with question.closed.extra as close_reason %} + {% blocktrans with question.nstate.closed.extra as close_reason %} The question has been closed for the following reason "{{ close_reason }}" by {% endblocktrans %} - {{ question.closed.by.username }} - {% diff_date question.closed.at %} + {{ question.nstate.closed.by.username }} + {% diff_date question.nstate.closed.at %} {% endif %} @@ -114,7 +130,7 @@ {% for answer in answers %} - + @@ -130,6 +146,7 @@ {% post_controls answer request.user %} + {% wiki_symbol request.user answer %} {% contributors_info answer %} @@ -198,8 +215,8 @@ - {{ answer.text.errors }} + {% include "subscription_status.html" %} +{% sidebar_upper %} {% cache 60 questions_tags settings.APP_URL question.id %} {% trans "Question tags" %}: - {% for tag in tags %} + {% for tag in question.tags.all %} {{ tag.name }} ×{{ tag.used_count|intcomma }} @@ -246,6 +264,7 @@ {% endcache %} +{% sidebar_lower %} {% trans "Related questions" %}
{% trans "Question tags" %}:
- {% for tag in tags %} + {% for tag in question.tags.all %} {{ tag.name }} ×{{ tag.used_count|intcomma }} @@ -246,6 +264,7 @@