From e70caf9b1dd07202af3e52bb4a39c1330aee61ed Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Wed, 11 May 2011 00:13:09 -0400 Subject: removed html elements with id askform --- askbot/__init__.py | 2 +- askbot/skins/default/templates/answer_edit.html | 32 +- .../skins/default/templates/blocks/ask_form.html | 70 ++- askbot/skins/default/templates/question.html | 536 ++++++++++----------- askbot/skins/default/templates/question_retag.html | 36 +- .../default/templates/user_profile/user_edit.html | 2 +- askbot/views/writers.py | 2 +- 7 files changed, 336 insertions(+), 344 deletions(-) diff --git a/askbot/__init__.py b/askbot/__init__.py index 2b789de5..7b1765e5 100644 --- a/askbot/__init__.py +++ b/askbot/__init__.py @@ -9,7 +9,7 @@ import smtplib import sys import logging -VERSION = (0, 6, 82) +VERSION = (0, 6, 83) #necessary for interoperability of django and coffin try: diff --git a/askbot/skins/default/templates/answer_edit.html b/askbot/skins/default/templates/answer_edit.html index 0d8b40da..e8cbc7ae 100644 --- a/askbot/skins/default/templates/answer_edit.html +++ b/askbot/skins/default/templates/answer_edit.html @@ -10,23 +10,21 @@ {% trans %}Edit answer{% endtrans %} [{% trans %}back{% endtrans %}]
-
-
{% csrf_token %} -
- {% if revision_form.revision.errors %}{{ revision_form.revision.errors.as_ul() }}{% endif %} -
- {{ revision_form.revision }} -
- {{ macros.edit_post(form) }} -
-   - -
- {% if settings.WIKI_ON and answer.wiki == False %} - {{ macros.checkbox_in_div(form.wiki) }} - {% endif %} -
-
+
{% csrf_token %} +
+ {% if revision_form.revision.errors %}{{ revision_form.revision.errors.as_ul() }}{% endif %} +
+ {{ revision_form.revision }} +
+ {{ macros.edit_post(form) }} +
+   + +
+ {% if settings.WIKI_ON and answer.wiki == False %} + {{ macros.checkbox_in_div(form.wiki) }} + {% endif %} +
{% endblock %} diff --git a/askbot/skins/default/templates/blocks/ask_form.html b/askbot/skins/default/templates/blocks/ask_form.html index 9b61c7ce..24196bb6 100644 --- a/askbot/skins/default/templates/blocks/ask_form.html +++ b/askbot/skins/default/templates/blocks/ask_form.html @@ -1,41 +1,39 @@ {% import "macros.html" as macros %} -
-
{% csrf_token %} -
-
- {% if not request.user.is_authenticated() %} -

{% trans %}login to post question info{% endtrans %}

- {% else %} - {% if settings.EMAIL_VALIDATION %} - {% if not request.user.email_isvalid %} - {% trans email=request.user.email %}must have valid {{email}} to post, - see {{email_validation_faq_url}} - {% endtrans %} - {% endif %} +{% csrf_token %} +
+
+ {% if not request.user.is_authenticated() %} +

{% trans %}login to post question info{% endtrans %}

+ {% else %} + {% if settings.EMAIL_VALIDATION %} + {% if not request.user.email_isvalid %} + {% trans email=request.user.email %}must have valid {{email}} to post, + see {{email_validation_faq_url}} + {% endtrans %} {% endif %} {% endif %} - - {{ form.title.errors }} -
-
- {{ form.title.help_text }} -
-
-
- {{macros.edit_post(form, post_type='question', edit_title=False)}} - {% if not request.user.is_authenticated() %} - - {% else %} - - {% endif %} -
- {% if settings.WIKI_ON %} - {{ macros.checkbox_in_div(form.wiki) }} - {% endif %} - {% if settings.ALLOW_ASK_ANONYMOUSLY %} - {{ macros.checkbox_in_div(form.ask_anonymously) }} {% endif %} + + {{ form.title.errors }}
- -
+
+ {{ form.title.help_text }} +
+
+
+ {{macros.edit_post(form, post_type='question', edit_title=False)}} + {% if not request.user.is_authenticated() %} + + {% else %} + + {% endif %} +
+ {% if settings.WIKI_ON %} + {{ macros.checkbox_in_div(form.wiki) }} + {% endif %} + {% if settings.ALLOW_ASK_ANONYMOUSLY %} + {{ macros.checkbox_in_div(form.ask_anonymously) }} + {% endif %} +
+ diff --git a/askbot/skins/default/templates/question.html b/askbot/skins/default/templates/question.html index ffab9bd1..250a6962 100644 --- a/askbot/skins/default/templates/question.html +++ b/askbot/skins/default/templates/question.html @@ -12,298 +12,297 @@ {% endblock %} {% block content %}

{{ question.get_question_title() }}

-
- - - + +
-
- {% if question_vote %} - {% trans %}i like this post (click again to cancel){% endtrans %} -
- {{ question.score }} -
- {% trans %}i dont like this post (click again to cancel){% endtrans %} + + + - + - -
+
+ {% if question_vote %} + {% trans %}i like this post (click again to cancel){% endtrans %} -
- {{ question.score }} -
- {% trans %}i dont like this post (click again to cancel){% endtrans %} {% endif %} - {% if favorited %} - {% trans %}mark this question as favorite (click again to cancel){% endtrans %} -
- {{ question.favourite_count }} -
+ alt="{% trans %}i like this post (click again to cancel){% endtrans %}" + title="{% trans %}i like this post (click again to cancel){% endtrans %}" /> +
+ {{ question.score }} +
+ {% trans %}remove favorite mark from this question (click again to restore mark){% endtrans %} -
- {% if question.favourite_count != 0 %}{{ question.favourite_count }}{% endif %} -
- {% endif %} - {% if settings.ENABLE_SOCIAL_SHARING %} - - + src="{{"/images/vote-arrow-down.png"|media}}" {% endif %} + alt="{% trans %}i dont like this post (click again to cancel){% endtrans %}" + title="{% trans %}i dont like this post (click again to cancel){% endtrans %}" /> + {% else %} + {% trans %}i like this post (click again to cancel){% endtrans %} +
+ {{ question.score }}
-
-
- {{question.html}} + {% trans %}i dont like this post (click again to cancel){% endtrans %} + {% endif %} + {% if favorited %} + {% trans %}mark this question as favorite (click again to cancel){% endtrans %} +
+ {{ question.favourite_count }}
- -
- {% set pipe=joiner('|') %} - {% if request.user|can_edit_post(question) %}{{ pipe() }} - {% trans %}edit{% endtrans %} - {% endif %} - {% if request.user|can_retag_question(question) %}{{ pipe() }} - {% trans %}retag{% endtrans %} - - {% endif %} - {% if question.closed %} - {% if request.user|can_reopen_question(question) %}{{ pipe() }} - {% trans %}reopen{% endtrans %} - {% endif %} - {% else %} - {% if request.user|can_close_question(question) %}{{ pipe() }} - {% trans %}close{% endtrans %} - {% endif %} + {% else %} + {% trans %}remove favorite mark from this question (click again to restore mark){% endtrans %} +
+ {% if question.favourite_count != 0 %}{{ question.favourite_count }}{% endif %} +
+ {% endif %} + {% if settings.ENABLE_SOCIAL_SHARING %} + + + {% endif %} +
+
+
+ {{question.html}} +
+ +
+ {% set pipe=joiner('|') %} + {% if request.user|can_edit_post(question) %}{{ pipe() }} + {% trans %}edit{% endtrans %} + {% endif %} + {% if request.user|can_retag_question(question) %}{{ pipe() }} + {% trans %}retag{% endtrans %} + + {% endif %} + {% if question.closed %} + {% if request.user|can_reopen_question(question) %}{{ pipe() }} + {% trans %}reopen{% endtrans %} {% endif %} - {% if request.user|can_flag_offensive(question) %}{{ pipe() }} - - {% trans %}flag offensive{% endtrans %} - {% if request.user|can_see_offensive_flags(question) %} - {% if question.offensive_flag_count > 0 %}({{ question.offensive_flag_count }}){% endif %} - {% endif %} - + {% else %} + {% if request.user|can_close_question(question) %}{{ pipe() }} + {% trans %}close{% endtrans %} {% endif %} - {% if request.user|can_delete_post(question) %}{{ pipe() }} - {% if question.deleted %}{% trans %}undelete{% endtrans %}{% else %}{% trans %}delete{% endtrans %}{% endif %} + {% endif %} + {% if request.user|can_flag_offensive(question) %}{{ pipe() }} + + {% trans %}flag offensive{% endtrans %} + {% if request.user|can_see_offensive_flags(question) %} + {% if question.offensive_flag_count > 0 %}({{ question.offensive_flag_count }}){% endif %} {% endif %} -
-
- {{ - macros.post_contributor_info( - question, - "original_author", - question.wiki, - settings.MIN_REP_TO_EDIT_WIKI - ) - }} - {{ - macros.post_contributor_info( - question, - "last_updater", - question.wiki, - settings.MIN_REP_TO_EDIT_WIKI, - ) - }} -
- {{ - macros.post_comments_widget( - post = question, - show_post = show_post, - show_comment = show_comment, - comment_order_number = comment_order_number, - user = request.user, - max_comments = settings.MAX_COMMENTS_TO_SHOW - ) - }} - -
- {% if question.closed %} -
-

{% trans close_reason=question.get_close_reason_display() %}The question has been closed for the following reason "{{ close_reason }}" by{% endtrans %} - {{ question.closed_by.username }} - {% trans closed_at=question.closed_at %}close date {{closed_at}}{% endtrans %}

-
- {% endif %} - {% if answers %} -
-

- {% trans counter=answers|length %} - {{counter}} Answer: - {% pluralize %} - {{counter}} Answers: - {% endtrans %} -

- +
+ {{ + macros.post_contributor_info( + question, + "original_author", + question.wiki, + settings.MIN_REP_TO_EDIT_WIKI + ) + }} + {{ + macros.post_contributor_info( + question, + "last_updater", + question.wiki, + settings.MIN_REP_TO_EDIT_WIKI, + ) + }} +
+ {{ + macros.post_comments_widget( + post = question, + show_post = show_post, + show_comment = show_comment, + comment_order_number = comment_order_number, + user = request.user, + max_comments = settings.MAX_COMMENTS_TO_SHOW + ) + }} + +
+{% if question.closed %} +
+

{% trans close_reason=question.get_close_reason_display() %}The question has been closed for the following reason "{{ close_reason }}" by{% endtrans %} +{{ question.closed_by.username }} +{% trans closed_at=question.closed_at %}close date {{closed_at}}{% endtrans %}

+
+{% endif %} +{% if answers %} +
+

+ {% trans counter=answers|length %} + {{counter}} Answer: + {% pluralize %} + {{counter}} Answers: + {% endtrans %} +

+ - {{ macros.paginator(paginator_context) }} +
+ {{ macros.paginator(paginator_context) }} - {% for answer in answers %} - -
- - - + +
-
- {% trans %}i like this answer (click again to cancel){% endtrans %} -
- {{ answer.score }} -
- {% trans %}i dont like this answer (click again to cancel){% endtrans %} - {% if request.user == question.author %} + {% for answer in answers %} + +
+ + + + - - -
+
+ {% trans %}i like this answer (click again to cancel){% endtrans %} +
+ {{ answer.score }} +
+ {% trans %}i dont like this answer (click again to cancel){% endtrans %} + {% if request.user == question.author %} + {% trans %}mark this answer as favorite (click again to undo){% endtrans %} + {% else %} + {% if answer.accepted %} {% trans %}mark this answer as favorite (click again to undo){% endtrans %} - {% else %} - {% if answer.accepted %} - {% trans question_author=question.author.username %}{{question_author}} has selected this answer as correct{% endtrans %} +
+
+
+ {{ answer.html }}
-
-
-
- {{ answer.html }} -
-
- {% set pipe=joiner('|') %} - {{ pipe() }} - - {% trans %}permanent link{% endtrans %} - - - {% if request.user|can_edit_post(answer) %}{{ pipe() }} - {% trans %}edit{% endtrans %} +
+ {% set pipe=joiner('|') %} + {{ pipe() }} + + {% trans %}permanent link{% endtrans %} + + + {% if request.user|can_edit_post(answer) %}{{ pipe() }} + {% trans %}edit{% endtrans %} + {% endif %} + {% if request.user|can_flag_offensive(answer) %}{{ pipe() }} + + {% trans %}flag offensive{% endtrans %} + {% if request.user|can_see_offensive_flags(answer) %} + {% if answer.offensive_flag_count > 0 %}({{ answer.offensive_flag_count }}){% endif %} {% endif %} - {% if request.user|can_flag_offensive(answer) %}{{ pipe() }} - - {% trans %}flag offensive{% endtrans %} - {% if request.user|can_see_offensive_flags(answer) %} - {% if answer.offensive_flag_count > 0 %}({{ answer.offensive_flag_count }}){% endif %} - {% endif %} + + {% endif %} + {% if request.user|can_delete_post(answer) %}{{ pipe() }} + {% spaceless %} + + + {% if answer.deleted %}{% trans %}undelete{% endtrans %}{% else %}{% trans %}delete{% endtrans %}{% endif %} - {% endif %} - {% if request.user|can_delete_post(answer) %}{{ pipe() }} - {% spaceless %} - - - {% if answer.deleted %}{% trans %}undelete{% endtrans %}{% else %}{% trans %}delete{% endtrans %}{% endif %} - - {% endspaceless %} - {% endif %} -
-
- {{ - macros.post_contributor_info( - answer, - "original_author", - answer.wiki, - settings.MIN_REP_TO_EDIT_WIKI - ) - }} - {{ - macros.post_contributor_info( - answer, - "last_updater", - answer.wiki, - settings.MIN_REP_TO_EDIT_WIKI - ) - }} -
- {{ - macros.post_comments_widget( - post = answer, - show_post = show_post, - show_comment = show_comment, - comment_order_number = comment_order_number, - user = request.user, - max_comments = settings.MAX_COMMENTS_TO_SHOW + {% endspaceless %} + {% endif %} +
+
+ {{ + macros.post_contributor_info( + answer, + "original_author", + answer.wiki, + settings.MIN_REP_TO_EDIT_WIKI ) - }} + }} + {{ + macros.post_contributor_info( + answer, + "last_updater", + answer.wiki, + settings.MIN_REP_TO_EDIT_WIKI + ) + }}
-
-
- {% endfor %} -
- {{ macros.paginator(paginator_context) }} -

- {% endif %} + {{ + macros.post_comments_widget( + post = answer, + show_post = show_post, + show_comment = show_comment, + comment_order_number = comment_order_number, + user = request.user, + max_comments = settings.MAX_COMMENTS_TO_SHOW + ) + }} +
+
+
+ {% endfor %} +
+ {{ macros.paginator(paginator_context) }} +

+{% endif %}
{% csrf_token %} {% if request.user.is_authenticated() %}

@@ -370,7 +369,6 @@ {% endif %} {% endif %}

-
{% endblock %} {% block sidebar %} diff --git a/askbot/skins/default/templates/question_retag.html b/askbot/skins/default/templates/question_retag.html index 79cbbbff..883dc3aa 100644 --- a/askbot/skins/default/templates/question_retag.html +++ b/askbot/skins/default/templates/question_retag.html @@ -3,26 +3,24 @@ {% block title %}{% spaceless %}{% trans %}Change tags{% endtrans %}{% endspaceless %}{% endblock %} {% block content %}

{% trans %}Change tags{% endtrans %} [{% trans %}back{% endtrans %}]

-
-
{% csrf_token %} -

- {{ question.get_question_title() }} -

-
- {{ question.html }} +{% csrf_token %} +

+ {{ question.get_question_title() }} +

+
+ {{ question.html }} +
+
+ {{ form.tags.label_tag() }}:
+ {{ form.tags }} {{ form.tags.errors }} +
+ {{ form.tags.help_text }}
-
- {{ form.tags.label_tag() }}:
- {{ form.tags }} {{ form.tags.errors }} -
- {{ form.tags.help_text }} -
-
-
-   - - -
+
+
+   + + {% endblock %} {% block sidebar %} diff --git a/askbot/skins/default/templates/user_profile/user_edit.html b/askbot/skins/default/templates/user_profile/user_edit.html index fe4ea35f..1e2fa2d6 100644 --- a/askbot/skins/default/templates/user_profile/user_edit.html +++ b/askbot/skins/default/templates/user_profile/user_edit.html @@ -16,7 +16,7 @@ {% endif %}

{% trans %}change picture{% endtrans %}

-
+

{% trans %}Registered user{% endtrans %}

diff --git a/askbot/views/writers.py b/askbot/views/writers.py index d103c776..d1f115dc 100644 --- a/askbot/views/writers.py +++ b/askbot/views/writers.py @@ -262,7 +262,7 @@ def ask(request):#view used to ask a new question return render_into_skin('ask.html', data, request) @login_required -@csrf.csrf_protect +#@csrf.csrf_protect remove for ajax def retag_question(request, id): """retag question view """ -- cgit v1.2.3-1-g7c22