move moderation form into own div

This commit is contained in:
James Turk 2010-03-31 18:06:06 -04:00
parent bf3a7ec41c
commit aea197d8c3
2 changed files with 16 additions and 14 deletions

View File

@ -20,22 +20,24 @@
{% if article %}
<a href="{% url article_history article.title %}">view history</a>
{% endif %}
{% if article and form %}
<form method="POST" action="{% url update_article_status article.title %}">
<ul>
<li>{{form.status.label_tag}} {{ form.status }}</li>
<li>
<button class="updateBtn" type="submit">
<span>Update</span>
</button>
</li>
</ul>
</form>
{% endif %}
{% endblock %}
</div>
{% if article and mod_form %}
<div class="article_moderation">
<form method="POST" action="{% url update_article_status article.title %}">
<ul>
<li>{{mod_form.status.label_tag}} {{ mod_form.status }}</li>
<li>
<button class="updateBtn" type="submit">
<span>Update</span>
</button>
</li>
</ul>
</form>
</div>
{% endif %}
<div class="article_body">
{% block article_body %}
{% if article.is_deleted %}

View File

@ -52,7 +52,7 @@ def view_article(request, title, n=None):
context = {'article':article, 'version': version}
if request.user.is_staff:
context['form'] = StaffModerationForm(instance=article)
context['mod_form'] = StaffModerationForm(instance=article)
return render_to_response('markupwiki/article.html', context,
context_instance=RequestContext(request))