Interfejs do dołączania galerii do dokumentu, jeżeli żadna nie jest dołączona.
[redakcja.git] / platforma / templates / explorer / editor.html
1 {% extends "base.html" %}
2 {% load i18n %}
3
4 {% block extrahead %}
5         <link rel="stylesheet" href="{{STATIC_URL}}css/jquery.modal.css" type="text/css" media="screen" charset="utf-8">
6         <link rel="stylesheet" href="{{STATIC_URL}}css/html.css" type="text/css" charset="utf-8">
7         <link rel="stylesheet" href="{{STATIC_URL}}css/toolbar.css" type="text/css" charset="utf-8">
8         <link rel="stylesheet" href="{{STATIC_URL}}css/autumn.css" type="text/css" media="screen" title="Autumn colors" charset="utf-8">
9         
10         <script type="text/javascript" charset="utf-8">
11             var documentInfo = {
12                 docID: '{{ fileid }}',
13                 userID: '{{ euser }}',
14                 docURL: '{% url document_view fileid %}{% if euser %}?user={{ euser|urlencode }}{% endif %}',
15                 toolbarURL: '{% url toolbar_buttons %}',
16                 renderURL: '{% url api.views.render %}',
17                                 staticURL: '{{ STATIC_URL }}'
18             }           
19                 
20         </script>
21         
22         {# Libraries #}
23         <script src="{{STATIC_URL}}js/lib/codemirror/codemirror.js" type="text/javascript" charset="utf-8"></script>
24         <script src="{{STATIC_URL}}js/lib/jquery.modal.js" type="text/javascript" charset="utf-8"></script>
25         <script src="{{STATIC_URL}}js/lib/jquery.json.js" type="text/javascript" charset="utf-8"></script>
26         
27         {# Scriptlets #}
28         <script src="{{STATIC_URL}}js/button_scripts.js" type="text/javascript" charset="utf-8"></script>
29         
30         {# App and views #}
31         <script src="{{STATIC_URL}}js/app.js" type="text/javascript" charset="utf-8"></script>
32         <script src="{{STATIC_URL}}js/messages.js" type="text/javascript" charset="utf-8"></script>
33         <script src="{{STATIC_URL}}js/views/view.js" type="text/javascript" charset="utf-8"></script>
34         <script src="{{STATIC_URL}}js/views/flash.js" type="text/javascript" charset="utf-8"></script>
35         <script src="{{STATIC_URL}}js/views/editor.js" type="text/javascript" charset="utf-8"></script>
36         <script src="{{STATIC_URL}}js/views/button_toolbar.js" type="text/javascript" charset="utf-8"></script>
37         <script src="{{STATIC_URL}}js/views/split.js" type="text/javascript" charset="utf-8"></script>
38         <script src="{{STATIC_URL}}js/views/xml.js" type="text/javascript" charset="utf-8"></script>
39         <script src="{{STATIC_URL}}js/views/html.js" type="text/javascript" charset="utf-8"></script>
40         <script src="{{STATIC_URL}}js/views/gallery.js" type="text/javascript" charset="utf-8"></script>
41         <script src="{{STATIC_URL}}js/views/panel_container.js" type="text/javascript" charset="utf-8"></script>
42         
43         <script src="{{STATIC_URL}}js/models.js" type="text/javascript" charset="utf-8"></script>
44         
45         {# JavaScript templates #}
46         <script type="text/html" charset="utf-8" id="panel-container-view-template">
47                 <div class="panel-main-toolbar">
48                 <p><select>
49                         <option value="empty" selected="selected"> ---- </option>
50                         <% for (panel in panels) { %>
51                         <option value="<%= panel %>"><%= panel %></option>
52                         <% }; %>
53                 </select> <button class="refresh">{% trans "Refresh panel"  %}</button></p>
54                 </div>
55                 <div class="content-view"></div>
56         </script>
57         
58         <script type="text/html" charset="utf-8" id="xml-view-template">
59                 <div class="xmlview-toolbar"></div>
60                 <div class="xmlview">
61                         
62                 </div>
63         </script>
64         
65         <script type="text/html" charset="utf-8" id="html-view-template">
66                 <div class="htmlview-toolbar">
67                     <a class="html-print-link" href="print" ui:baseref="{% url file_print fileid %}" target="_new">{% trans "Print version"  %}</a>
68                 </div>
69                 
70                 <div class="htmlview">
71                 </div>
72         </script>       
73         
74         <script type="text/html" charset="utf-8" id="html-view-frag-menu-template">
75             <span class="default-menu context-menu">
76                 <span class="edit-button">Edytuj</span>                
77             </span>
78             <span class="edit-menu context-menu">
79                 <span class="accept-button">OK</span>
80                 <span class="reject-button">Anuluj</span>
81             </span>
82         </script>
83
84
85
86         <script type="text/html" charset="utf-8" id="flash-view-template">
87                 <div class="flashview">
88                 <% if (shownMessage) { %>
89                         <p style="margin: 0; padding: 0.2em 0.5em; line-height: 1.8em" class="<%= shownMessage.type %>"><%= shownMessage.text %></p>
90                 <% } %>
91                 </div>
92         </script>
93         
94     <script type="text/html" charset="utf-8" id="image-gallery-view-template">
95         <div class="image-gallery-view-template">
96
97         <div class="image-gallery-header">
98         <p>
99         <button type="button" class="image-gallery-prev-button">
100         <img alt="PPrevious" src="{{STATIC_URL}}/icons/go-previous.png" width="16" height="16" />
101         </button>
102
103         <input type="input" class="image-gallery-current-page"
104             size="5" value="<%= (currentPage + 1) %>" />
105
106
107         <button type="button" class="image-gallery-next-button">
108         <img alt="{% trans 'Next page'  %}" src="{{STATIC_URL}}/icons/go-next.png" width="16" height="16" />
109         </button>
110
111         <button type="button" class="image-gallery-zoom-in">
112             <img alt="{% trans 'Zoom in'  %}" src="{{STATIC_URL}}/icons/zoom_in.png" width="16" height="16" />
113         </button>
114         <button type="button" class="image-gallery-zoom-out">
115             <img alt="{% trans 'Zoom out'  %}" src="{{STATIC_URL}}/icons/zoom_out.png" width="16" height="16" />
116         </button>
117         <button type="button" class="image-gallery-zoom-reset">
118             <img alt="{% trans 'Reset zoom'  %}" src="{{STATIC_URL}}/icons/zoom.png" width="16" height="16" />
119         </button>
120         </p>
121         </div>
122
123         <div class="image-gallery-page-list">
124             <% for(var i=0; i < model.data.length; i++) { %>
125                 <div class="image-gallery-page-container"
126                     ui:model="<%= model.data[i] %>"
127                     ui:width="480"
128                     ui:height="752"
129                 ></div>
130             <% }; %>
131         </div>
132         
133         </div>
134         </script>
135         
136         <script type="text/html" charset="utf-8" id="image-gallery-empty-template">
137             <div class="image-gallery-empty-template">
138             <div class="empty-gallery-info">Galeria dla tego dokumentu nie istnieje i/lub jest pusta.</div>
139             
140             {% if user.is_superuser %}
141             <div class="choose-gallery">
142                 <p>Dołącz galerię do dokumentu:</p>
143                 <p>{{ gallery_form.subpath }} <input id="choose-gallery" type="submit" value="Dołącz"></p>
144             </div>
145             {% endif %}
146         </div>
147         </script>
148         
149         <script type="text/html" charset="utf-8" id="button-toolbar-view-template">
150                 <div class="buttontoolbarview panel-toolbar">
151                         <div class="buttontoolbarview-tabs toolbar-tabs-container toolbar-buttons-container">
152                         <% for (var i=0; i < buttons.length; i++) { %>
153                                 <button type="button" class="buttontoolbarview-tab" ui:groupindex="<%= i %>"><%= buttons[i].name %></button>
154                         <% }; %>
155                         </div>
156                         <div class="buttontoolbarview-groups ">
157                         <% for (var i=0; i < buttons.length; i++) { %>
158                                 <div class="buttontoolbarview-group toolbar-buttons-container" ui:groupIndex="<%= i %>" style="display: none">
159                                         <% for (var j=0; j < buttons[i].buttons.length; j++) { %>
160                                                 <% if (buttons[i].buttons[j].scriptlet_id) { %>
161                                                 <button type="button" class="buttontoolbarview-button"
162                                                     title="<%= buttons[i].buttons[j].tooltip %>"
163                                                     hotkey="<%= buttons[i].buttons[j].key %>"
164                                                     ui:hotkey_mod="<%= buttons[i].buttons[j].key_mod %>"
165                                                     ui:groupindex="<%= i %>" ui:buttonindex="<%= j %>">
166                                                         <%= buttons[i].buttons[j].label %>
167                                                 </button>
168                                                 <% } %>
169                                         <% } %>
170                                 </div>
171                         <% }; %>
172                         </div>
173                 </div>
174         </script>
175 {% endblock extrahead %}
176
177 {% block breadcrumbs %}<a href="{% url file_list %}">Platforma</a> &gt; {{euser}} &gt; {{ fileid }}{% endblock breadcrumbs %}
178
179 {% block header-toolbar %}
180     <a href="http://stigma.nowoczesnapolska.org.pl/platforma-hg/ksiazki/log/tip/{{ fileid }}.xml" target="_new" >{% trans 'History'  %}</a>
181         <button id="action-merge">{% trans 'Push' %}</button>
182         <button id="action-update">{% trans 'Pull' %}</button>
183         <button id="action-commit">{% trans 'Save' %}</button>
184         <button id="action-quick-save">{% trans 'Quick save' %}</button>
185 {% endblock %}
186
187 {% block maincontent %}    
188     
189
190     <div id="splitview">
191         <div id="left-panel-container" class='panel-container'></div>
192         <div id="right-panel-container" class='panel-container'></div>
193     </div>
194
195     <div id="commit-dialog" class="jqmWindow" style="display:none">
196         <form action="" method="POST">
197             <label for="message">Commit message:</label>
198             <textarea cols="60" rows="10" name="message" id="commit-dialog-message"></textarea>
199             <p id="commit-dialog-error-empty-message">Wiadomość nie może być pusta.</p>                
200             <fieldset id="commit-dialog-related-issues" ui:ajax-src="{{REDMINE_URL}}/publications/issues/{{fileid}}">
201                 <legend>Related issues</legend>
202                 <div class="loading-box" style="display: none;">
203                     <p>Loading related issues...</p>
204                 </div>
205                 <div class="container-box">No related issues.</div>
206             </fieldset>
207             <p>
208                <input type="button" value="Save" id="commit-dialog-save-button" />
209                <input type="reset" value="Cancel" id="commit-dialog-cancel-button" />
210             </p>
211         </form>
212     </div>
213     
214     <div id="split-dialog" class="jqmWindow" style="display:none">
215         <div class="container-box"> </div>
216         <div class="loading-box" style="display: none;">
217             <p>Loading dialog contents...</p>
218             <!-- <p><button type="button" class="dialog-close-button">Close</button></p> -->
219         </div>
220         <div class="fatal-error-box" style="display: none;">
221             <p>Server error, while loading dialog :(</p>
222             <p><button type="button" class="dialog-close-button">Close</button></p>
223         </div>
224     </div>
225 {% endblock maincontent %}
226
227 {% block extrabody %}
228         <div style="position: absolute; left: 35%; right: 35%; top: 0; height: 20px; z-index: 0" id="flashview"></div>
229 {% endblock %}