1 {% extends "base_content.html" %}
2 <!-- revisions_answer.html -->
5 {% load extra_filters %}
7 {% block title %}{% spaceless %}{% trans "Revision history" %}{% endspaceless %}{% endblock %}
9 <script type="text/javascript">
10 //todo - take this out into .js file
12 $("#nav_questions").attr('className',"on");
13 $('div.revision div[id^=rev-header-]').bind('click', function(){
14 var revId = this.id.substr(11);
18 lanai.highlightSyntax();
21 function toggleRev(id) {
22 var arrow = $("#rev-arrow-" + id);
23 var visible = arrow.attr("src").indexOf("hide") > -1;
25 var path = $.i18n._('/') + "media/images/expander-arrow-" +
26 (visible ? "show" : "hide") + ".gif" + "?v={{settings.RESOURCE_REVISION}}";
27 arrow.attr("src", path);
28 $("#rev-body-" + id).slideToggle("fast");
35 <div id="main-bar" class="headNormal">
36 {% trans "Revision history" %} [<a href="{{ post.get_absolute_url }}">{% trans "back" %}</a>]
38 <div id="main-body" class="">
40 {% for revision in revisions %}
41 <div class="revision">
42 <div id="rev-header-{{ revision.revision }}" class="header {% ifequal post.author_id revision.author_id %}author{% endifequal %}">
43 <div class="header-controls">
46 <td width="20" style="vertical-align:middle"><img id="rev-arrow-{{ revision.revision }}"
47 src="{% media "/media/images/expander-arrow-show.gif" %}"
48 alt="{% trans "click to hide/show revision" %}"/>
50 <td width="30px" style="vertical-align:middle"><span class="revision-number" title="{% trans "revision" %} {{ revision.revision }}">{{ revision.revision }}</span></td>
51 <td width="200px" style="vertical-align:middle">
52 {% if revision.summary %}
53 <div class="summary"><span>{{ revision.summary }}</span></div>
55 {% if request.user|can_edit_post:post %}
56 <a href="{% url edit_answer post.id %}?revision={{ revision.revision }}">{% trans "edit" %}</a>
61 <div class="revision-mark" >
62 {% post_contributor_info revision %}
70 <div id="rev-body-{{ revision.revision }}" class="answerbody">
71 {{ revision.diff|safe }}
81 <!-- end revisions_answer.html -->