23641f9f99ba25a1f1b48c7bcde9aba13dcdcb24
[redakcja.git] / project / 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" title="no title" charset="utf-8">
5         <link rel="stylesheet" href="{{STATIC_URL}}css/html.css" type="text/css" media="screen" title="no title" charset="utf-8">
6         
7         <script type="text/javascript" charset="utf-8">
8                 var fileId = '{{ fileid }}';
9         </script>
10         
11         {# Libraries #}
12     <script src="{{STATIC_URL}}js/lib/codemirror/codemirror.js" type="text/javascript" charset="utf-8"></script>
13         <script src="{{STATIC_URL}}js/lib/jquery.modal.js" type="text/javascript" charset="utf-8"></script>
14         {# Scriptlets #}
15         <script src="http://localhost:8000/api/toolbar/scriptlets" type="text/javascript" charset="utf-8"></script>
16         
17         {# App and views #}
18         <script src="{{STATIC_URL}}js/app.js" type="text/javascript" charset="utf-8"></script>
19         <script src="{{STATIC_URL}}js/messages.js" type="text/javascript" charset="utf-8"></script>
20         <script src="{{STATIC_URL}}js/views/view.js" type="text/javascript" charset="utf-8"></script>
21         <script src="{{STATIC_URL}}js/views/flash.js" type="text/javascript" charset="utf-8"></script>
22         <script src="{{STATIC_URL}}js/views/editor.js" type="text/javascript" charset="utf-8"></script>
23         <script src="{{STATIC_URL}}js/views/button_toolbar.js" type="text/javascript" charset="utf-8"></script>
24         <script src="{{STATIC_URL}}js/views/split.js" type="text/javascript" charset="utf-8"></script>
25         <script src="{{STATIC_URL}}js/views/xml.js" type="text/javascript" charset="utf-8"></script>
26         <script src="{{STATIC_URL}}js/views/html.js" type="text/javascript" charset="utf-8"></script>
27         <script src="{{STATIC_URL}}js/views/gallery.js" type="text/javascript" charset="utf-8"></script>
28         <script src="{{STATIC_URL}}js/views/panel_container.js" type="text/javascript" charset="utf-8"></script>
29         
30         <script src="{{STATIC_URL}}js/models.js" type="text/javascript" charset="utf-8"></script>
31         
32         {# JavaScript templates #}
33         <script type="text/html" charset="utf-8" id="panel-container-view-template">
34                 <select>
35                         <% for (panel in panels) { %>
36                         <option value="<%= panel %>"><%= panel %></option>
37                         <% }; %>
38                 </select>
39                 <div class="content-view"></div>
40         </script>
41         
42         <script type="text/html" charset="utf-8" id="xml-view-template">
43                 <div class="xmlview-toolbar"></div>
44                 <div class="xmlview">
45                         
46                 </div>
47         </script>
48         
49         <script type="text/html" charset="utf-8" id="html-view-template">
50                 <div class="htmlview">
51                 </div>
52         </script>
53
54         <script type="text/html" charset="utf-8" id="flash-view-template">
55                 <div class="flashview" style="position: relative; margin-left: auto; margin-right: auto; width: 400px; background-color: yellow">
56                 <% if (shownMessage) { %>
57                         <p style="margin: 0; padding: 0.2em 0.5em; line-height: 1.8em" class="<%= shownMessage.type %>"><%= shownMessage.text %></p>
58                 <% } %>
59                 </div>
60         </script>
61         
62     <script type="text/html" charset="utf-8" id="image-gallery-view-template">
63         <div class="image-gallery-view-template">
64
65         <div class="image-gallery-header">
66         <p>
67         <button type="button" class="image-gallery-prev-button">Previous</button>
68         <input type="input" class="image-gallery-current-page"
69             size="6"
70             value="<%= (currentPage + 1) %>" />
71         <button type="button" class="image-gallery-jump-button">Go</button>
72         <button type="button" class="image-gallery-next-button">Next</button>
73
74         <button type="button" class="image-gallery-zoom-in">+</button>
75         <select class="image-gallery-current-zoom">
76             <option>50%</option>
77             <option selected="selected">100%</option>
78             <option>150%</option>
79             <option>200%</option>
80         </select>
81         <button type="button" class="image-gallery-zoom-out">-</button>
82         </p>
83         </div>
84
85         <div class="image-gallery-page-list">
86             <% for(var i=0; i < model.data.length; i++) { %>
87                 <div class="image-gallery-page-container" ui:model="<%= model.data[i] %>">
88                 </div>
89             <% }; %>
90         </div>
91         
92         </div>
93         </script>
94         
95         <script type="text/html" charset="utf-8" id="button-toolbar-view-template">
96                 <div class="buttontoolbarview">
97                         <div class="buttontoolbarview-tabs">
98                         <% for (var i=0; i < buttons.length; i++) { %>
99                                 <a href="#" class="buttontoolbarview-tab" ui:groupindex="<%= i %>"><%= buttons[i].name %></a>
100                         <% }; %>
101                         </div>
102                         <div class="buttontoolbarview-groups">
103                         <% for (var i=0; i < buttons.length; i++) { %>
104                                 <div class="buttontoolbarview-group" ui:groupIndex="<%= i %>" style="display: none">
105                                         <% for (var j=0; j < buttons[i].buttons.length; j++) { %>
106                                                 <% if (buttons[i].buttons[j].scriptlet_id) { %>
107                                                 <a href="#" class="buttontoolbarview-button" ui:groupindex="<%= i %>" ui:buttonindex="<%= j %>">
108                                                         <%= buttons[i].buttons[j].label %>
109                                                 </a>
110                                                 <% } %>
111                                         <% } %>
112                                 </div>
113                         <% }; %>
114                         </div>
115                 </div>
116         </script>
117 {% endblock extrahead %}
118
119 {% block breadcrumbs %}<a href="{% url file_list %}">Platforma Redakcyjna</a> &gt; {{ fileid }}{% endblock breadcrumbs %}
120
121 {% block message-box %}
122     <div class="msg-info" id="save-waiting"><p>Zapisuję dane na serwerze.</p><p class="data"></p></div>
123     <div class="msg-success" id="save-successful"><p>Zapisano :)</p><p class="data"></p></div>
124     <div class="msg-warning" id="save-warn"><p>Zapisano. Uwagi: (</p><p class="data"></p></div>
125     <div class="msg-error" id="save-error"><p>Błąd przy zapisie.</p> <p class="data"></p></div>
126
127     <div class="msg-success" id="generic-yes"><p class="data"></p></div>
128     <div class="msg-info" id="generic-info"><p class="data"></p></div>
129     <div class="msg-error" id="generic-error"><p class="data"></p></div>
130     
131     <div class="msg-warning" id="not-implemented"><p>Tej funkcji jeszcze nie ma :(</p><p class="data"></p></div>
132     
133 {% endblock %}
134
135 {% block header-toolbar %}
136         <button id="action-merge">Merge</button> <button id="action-update">Update</button> <button id="action-commit">Commit</button> <button id="action-quick-save">Quick Save</button>
137 {% endblock %}
138
139 {% block maincontent %}
140         <div id="splitview">
141                 <div id="left-panel-container" class='panel-container'></div>
142             <div id="right-panel-container" class='panel-container'></div>
143     </div>
144
145
146     <div id="commit-dialog" class="jqmWindow" style="display:none">
147         <form action="{% url file_commit fileid %}" method="POST">
148             <label for="message">Commit message:</label>
149             <textarea cols="60" rows="10" name="message" id="commit-dialog-message"></textarea>
150             <p id="commit-dialog-error-empty-message">Wiadomość nie może być pusta.</p>                
151             <fieldset id="commit-dialog-related-issues" 
152                       ui:ajax-src="http://localhost:3000/publications/issues/{{fileid}}">
153                 <legend>Related issues</legend>
154                 <div class="loading-box" style="display: none;">
155                     <p>Loading related issues...</p>
156                 </div>
157                 <div class="container-box">No related issues.</div>
158             </fieldset>
159             <p>
160                <input type="button" value="Save" id="commit-dialog-save-button" />
161                <input type="reset" value="Cancel" id="commit-dialog-cancel-button" />
162             </p>
163         </form>
164     </div>
165     
166     <div id="split-dialog" class="jqmWindow" style="display:none">
167         <div class="container-box"> </div>
168         <div class="loading-box" style="display: none;">
169             <p>Loading dialog contents...</p>
170             <!-- <p><button type="button" class="dialog-close-button">Close</button></p> -->
171         </div>
172         <div class="fatal-error-box" style="display: none;">
173             <p>Server error, while loading dialog :(</p>
174             <p><button type="button" class="dialog-close-button">Close</button></p>
175         </div>
176     </div>
177 {% endblock maincontent %}
178
179 {% block extrabody %}
180         <div style="position: absolute; left: 0; right: 0; top: 0; height: 20px; z-index: 1000" id="flashview"></div>
181 {% endblock %}