]> git.openstreetmap.org Git - osqa.git/blob - forum/skins/default/templates/revisions.html
changed these files to use blocktrans instead.
[osqa.git] / forum / skins / default / templates / revisions.html
1 {% extends "base_content.html" %}
2 {% load node_tags %}
3 {% load extra_tags %}
4 {% load i18n %}
5 {% load extra_filters %}
6 {% load humanize %}
7 {% block title %}{% spaceless %}{% trans "Revision history" %}{% endspaceless %}{% endblock %}
8 {% block forejs %}
9         <script type="text/javascript">
10         //todo - take this out into .js file 
11         $().ready(function(){
12             $("#nav_questions").attr('className',"on");
13             $('div.revision div[id^=rev-header-]').bind('click', function(){
14                 var revId = this.id.substr(11);
15                 toggleRev(revId); 
16             
17             });
18             lanai.highlightSyntax();
19         });
20         
21         function toggleRev(id) {
22             var arrow = $("#rev-arrow-" + id);
23             var visible = arrow.attr("src").indexOf("hide") > -1;
24
25             var path = $.i18n._('/') + "media/images/expander-arrow-" + 
26                         (visible ? "show" : "hide") + ".gif";
27             arrow.attr("src", path);
28             $("#rev-body-" + id).slideToggle("fast");
29         }
30         </script>
31 {% endblock %}
32         
33 {% block content %}
34 <div id="main-bar" class="headNormal">
35     {% trans "Revision history" %}[<a href="{{ post.get_absolute_url }}">{% trans "back" %}</a>]
36 </div>
37 <div id="main-body" class="">
38     <div id="revisions">
39     {% for revision in revisions %}
40       <div class="revision">
41         <div id="rev-header-{{ revision.inst.revision }}" class="header {% ifequal post.author revision.inst.author %}author{% endifequal %}">
42           <div class="header-controls">
43             <table width="100%">
44                 <tr>
45                     <td width="20" style="vertical-align:middle"><img id="rev-arrow-{{ revision.revision }}" 
46                                                                 src="{% media  "/media/images/expander-arrow-show.gif" %}"
47                                                                 alt="{% trans "click to hide/show revision" %}"/>
48                     </td>
49                     <td width="30px" style="vertical-align:middle"><span class="revision-number" title="{% trans "revision" %} {{ revision.inst.revision }}">{{ revision.inst.revision }}</span></td>
50                     <td width="200px" style="vertical-align:middle">
51                         <div class="summary"><span>{{ revision.summary }}</span></div>
52                     </td>
53                     <td align="right">
54                         <div class="revision-mark" >
55                             {% reviser_info revision.inst %}
56                         </div>
57                     </td>
58                 </tr>
59                     
60             </table>
61           </div>
62         </div>
63         <div id="rev-body-{{ revision.inst.revision }}" class="diff body">
64             {{ revision.diff|safe }}
65         </div>
66       </div>
67     {% endfor %}
68     </div>
69 </div>
70 {% endblock %}
71
72 {% block endjs %}
73 {% endblock %}