Javascript refactoring. History view now displays tags
[redakcja.git] / apps / wiki / templates / wiki / document_details.html
1 {% extends "base.html" %}
2 {% load toolbar_tags %}
3 {% block title %}{{ document.name }} - {{ block.super }}{% endblock %}
4 {% block extrahead %}
5 {% load compressed %}
6 {% compressed_css 'detail' %}
7 {% endblock %}
8 {% block extrabody %}
9 <script type="text/javascript" charset="utf-8">
10     var STATIC_URL = '{{STATIC_URL}}';
11 </script>
12 <script src="{{STATIC_URL}}js/lib/codemirror/codemirror.js" type="text/javascript" charset="utf-8">
13 </script>
14 {% compressed_js 'detail' %}
15 {% endblock %}
16 {% block maincontent %}
17 <div id="loading-overlay">
18     <div id="loading-message">
19         <img src="{{STATIC_URL}}img/spinner.gif" />
20         <p>
21             Ładowanie
22         </p>
23     </div>
24 </div>
25
26 <div id="document-meta" 
27         data-document-name="{{ document.name }}" style="display:none">
28         
29         {% for k, v in document_meta.items %}
30                 <span data-key="{{ k }}">{{ v }}</span>
31         {% endfor %}
32 </div>
33
34 <div id="header">
35     <h1><a href="{% url wiki.views.document_list %}">Platforma</a></h1>
36     <div id="tools">
37         <a href="{{ REDMINE_URL }}projects/wl-publikacje/wiki/Pomoc" target="_blank">Pomoc</a>
38         | {% include "registration/head_login.html" %} 
39         | Wersja: <span id="document-revision">{{ document_info.revision }}</span>
40         | 
41         <button style="margin-left: 6px" id="save-button">
42             Zapisz
43         </button>
44     </div>
45     <ol id="tabs">
46         
47                 <li id="SummaryPerspective-tab" 
48                         data-ui-related="summary-view-editor" data-ui-jsclass="SummaryPerspective">
49             <span>{{ document_meta.title }}</span>
50         </li>           
51                 
52         <li id="VisualPerspective-tab" 
53                         data-ui-related="simple-editor" data-ui-jsclass="VisualPerspective">
54             <span>Edytor</span>
55         </li>
56                 
57                 <li id="HistoryPerspective-tab" 
58                         data-ui-related="history-view-editor" 
59                         data-ui-jsclass="HistoryPerspective">           
60             Historia
61         </li>
62                         
63                 <li id="CodeMirrorPerspective-tab" 
64                         data-ui-related="source-editor" data-ui-jsclass="CodeMirrorPerspective">
65             Kod źródłowy
66         </li>
67     </ol>
68 </div>
69 <div id="splitter">
70     <div id="editor">
71         <div id="source-editor" class="editor">
72             {% toolbar %}
73             <textarea id="codemirror_placeholder">&lt;br/&gt;</textarea>
74             <input type="hidden" name="name" value="{{ document.name }}" /><input type="hidden" name="author" value="annonymous" /><input type="hidden" name="comment" value="no comment" /><input type="hidden" name="revision" value="{{ document_info.revision }}" />
75         </div>
76         <div id="simple-editor" class="editor" style="display: none">
77             <div id="html-view" class="htmlview">
78             </div>
79             <div class="toolbar">
80                 <button id="insert-theme-button">
81                     Wstaw motyw
82                 </button>
83                 <button id="insert-annotation-button">
84                     Wstaw przypis
85                 </button>
86                 <div class="toolbar-end">
87                 </div>
88             </div>
89         </div>
90                 {% include "wiki/history_view.html" %}
91                 {% include "wiki/summary_view.html" %}
92     </div>
93     <div class="vsplitbar" title="Klinknij aby (ro)zwinąć galerię."> </div>
94     
95         <div id="side-gallery">
96                 <!-- gallery toolbar -->                                
97         <div class="toolbar">
98             <button class="previous-page">
99                 <img src="{{STATIC_URL}}icons/go-previous.png" alt="Poprzednia" title="Poprzednia"/>
100             </button><input type="text" size="3" maxlength="3" value="1" class="page-number" />
101             <button class="next-page">
102                 <img src="{{STATIC_URL}}icons/go-next.png" alt="Następna" title="Następna"/>
103             </button>
104             <button class="zoom-in">
105                 Powiększ
106             </button>
107             <button class="zoom-out">
108                 Pomniejsz
109             </button>
110             <div class="toolbar-end">
111             </div>
112         </div>        
113                 <div class="error_message"> </div>
114                 <div class="gallery-image">
115                         <img src="{{MEDIA_URL}}/images/empty.png" />
116                 </div>
117     </div>
118 </div>
119 {% include "wiki/save_dialog.html" %}
120 {% endblock %}