ac952458647d17ddde8a03112c85a5c17a30ac59
[redakcja.git] / apps / wiki / templates / wiki / document_details.html
1 {% extends "base.html" %}
2 {% load toolbar_tags %}
3
4 {% block extrahead %}
5         {% load compressed %}
6         {% compressed_css 'detail' %}
7 {% endblock %}
8         
9 {% block extrabody %}
10     <script type="text/javascript" charset="utf-8">
11         var STATIC_URL = '{{STATIC_URL}}';
12     </script>    
13     <script src="{{STATIC_URL}}js/lib/codemirror/codemirror.js" type="text/javascript" charset="utf-8"></script>
14         {% compressed_js 'detail' %}
15 {% endblock %}
16
17 {% block maincontent %}
18         <div id="loading-overlay">
19             <div id="loading-message"><img src="{{STATIC_URL}}img/spinner.gif" /><p>Ładowanie</p></div>
20         </div>
21         <div id="document-meta" style="display:none">
22         {% for k, v in document.meta.items %}
23             <div class="{{ k }}">{{ v}}</div>
24         {% endfor %}
25         </div>
26         <div id="header">            
27             <h1><a href="{% url wiki.views.document_list %}">Platforma</a></h1>
28                         <div id="tools">
29                                 <a href="{{ REDMINE_URL }}projects/wl-publikacje/wiki/Pomoc" target="_blank">Pomoc</a>                          
30                 | {% include "registration/head_login.html" %} 
31                                 | Wersja: <span id="document-revision">{{ document.revision }}</span> 
32                                 | <button style="margin-left: 6px" id="save-button">Zapisz</button>
33                         </div>          
34             <ol id="tabs">
35                 <li id="simple-view-tab" ui:related="simple-editor"><span id="document-name">{{ document.name }}</span></li>
36                 <li id="source-view-tab" ui:related="source-editor">Kod źródłowy</li>
37                                 <li id="history-view-tab" ui:related="history-viewer">Historia</li>
38             </ol>
39                           
40         </div>
41         <div id="splitter">
42             <div id="editor">
43                 <div id="source-editor" class="editor">
44                     {% toolbar %}
45                     <textarea name="text" id="id_text">{{ document.plain_text }}</textarea>
46                     <input type="hidden" name="name" value="{{ document.name }}" />
47                     <input type="hidden" name="author" value="annonymous" />
48                     <input type="hidden" name="comment" value="no comment" />
49                     <input type="hidden" name="revision" value="{{ document.revision }}" />
50                 </div>
51                 <div id="simple-editor" class="editor" style="display: none">                    
52                     <div id="html-view" class="htmlview">
53                     </div>
54                                         
55                                         <div class="toolbar">
56                         <button id="insert-theme-button">Wstaw motyw</button> <button id="insert-annotation-button">Wstaw przypis</button>
57                         <div class="toolbar-end"> </div>
58                     </div>
59                 </div>
60                                 
61                                 <div id="history-viewer" class="editor" style="display: none">
62                                         <div class="toolbar"> </div>
63                                         <div id="history-view">
64                                                 <p class="message-box" style="display:none;"></p>
65                                                 <table>
66                                                         <thead>                 
67                                                                 <th>&nbsp;</th>                                 
68                                                                 <th>Numer</th>
69                                                                 <th>Opis</th>
70                                                                 <th>Użytkownik</th>
71                                                                 <th>Data</th>
72                                                         </thead>
73                                                         <tbody id="changes-list">                                                                                                                               
74                                                         </tbody>
75                                                 </table>
76                                                 
77                                                 <p><button type="button" id="make-diff-button">Porównaj</button></p>
78                                                 <!-- <p><button type="button" id="more-history-button">Więcej</button></p> -->
79                                                 <div id="diff-view">                                                                                                                                            
80                                         </div>                                                                  
81                                 </div>                                                  
82                                                         
83                                 </div>
84             </div>
85             <div class="vsplitbar" title="Klinknij aby (ro)zwinąć galerię."> </div>
86             <div id="sidebar">
87                 <div class="toolbar">
88                     <button class="previous-page">
89                         <img src="{{STATIC_URL}}icons/go-previous.png" alt="Poprzednia" title="Poprzednia"/>
90                     </button>
91                     <input type="text" size="3" maxlength="3" value="1" class="page-number" />
92                     <button class="next-page">
93                         <img src="{{STATIC_URL}}icons/go-next.png" alt="Następna" title="Następna"/>
94                     </button>
95                     <button class="zoom-in">Powiększ</button>
96                     <button class="zoom-out">Pomniejsz</button>
97                                         {% if request.user.is_staff %}
98                     <button class="change-gallery">Opcje</button>
99                                         {% endif %}
100                     <div class="toolbar-end"> </div>
101                 </div>
102                                 {% if request.user.is_staff %}
103                 <div class="toolbar" id="change-gallery-toolbar">
104                     <input type="text" value="" class="chosen-gallery" />
105                     <button class="change-gallery-ok">Zmień galerię</button>
106                     <button class="change-gallery-cancel">Anuluj</button>
107                     <div class="toolbar-end"> </div>    
108                 </div>
109                                 {% endif %}
110                 <div class="gallery-image">
111                     <img src="" />
112                 </div>
113             </div>
114         </div>
115         <div id="save-dialog" style="display: none; text-align: left">
116             <label for="komentarz" style="display: block">Opis zmian:</label>
117             <textarea name="komentarz" id="komentarz" style="display: block; width: 100%"></textarea>
118             <button id="save-ok">Zapisz</button> <button id="save-cancel">Anuluj</button>
119         </div>
120 {% endblock %}