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