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