1 {% extends "base_content.html" %}
2 <!-- revisions_question.html -->
3 <!--somehow very similar to revisions_answer.html-->
6 {% load extra_filters %}
8 {% block title %}{% spaceless %}{% trans "Revision history" %}{% endspaceless %}{% endblock %}
10 <script type='text/javascript' src='{% media "/media/js/com.cnprog.editor.js" %}'></script>
11 <script type='text/javascript' src='{% media "/media/js/com.cnprog.post.js" %}'></script>
12 <script type="text/javascript">
13 //todo - take this out into .js file
15 $("#nav_questions").attr('className',"on");
16 $('div.revision div[id^=rev-header-]').bind('click', function(){
17 var revId = this.id.substr(11);
21 lanai.highlightSyntax();
24 function toggleRev(id) {
25 var arrow = $("#rev-arrow-" + id);
26 var visible = arrow.attr("src").indexOf("hide") > -1;
28 var path = $.i18n._('/') + "media/images/expander-arrow-" +
29 (visible ? "show" : "hide") + ".gif" + "?v={{settings.RESOURCE_REVISION}}";
30 arrow.attr("src", path);
31 $("#rev-body-" + id).slideToggle("fast");
37 <div id="main-bar" class="headNormal">
38 {% trans "Revision history" %}[<a href="{{ post.get_absolute_url }}">{% trans "back" %}</a>]
40 <div id="main-body" class="">
42 {% for revision in revisions %}
43 <div class="revision">
44 <div id="rev-header-{{ revision.revision }}" class="header {% ifequal post.author_id revision.author_id %}author{% endifequal %}">
45 <div class="header-controls">
48 <td width="20" style="vertical-align:middle"><img id="rev-arrow-{{ revision.revision }}"
49 src="{% media "/media/images/expander-arrow-show.gif" %}"
50 alt="{% trans "click to hide/show revision" %}"/>
52 <td width="30px" style="vertical-align:middle"><span class="revision-number" title="{% trans "revision" %} {{ revision.revision }}">{{ revision.revision }}</span></td>
53 <td width="200px" style="vertical-align:middle">
54 {% if revision.summary %}
55 <div class="summary"><span>{{ revision.summary }}</span></div>
57 {% if request.user|can_edit_post:post %}
58 <a href="{% url edit_question post.id %}?revision={{ revision.revision }}">{% trans "edit" %}</a>
63 <div class="revision-mark" >
64 {% post_contributor_info revision %}
72 <div id="rev-body-{{ revision.revision }}" class="diff body">
73 {{ revision.diff|safe }}
83 <!-- end revisions_question.html -->