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