Merge branch 'master' into view-refactor
[redakcja.git] / project / templates / explorer / editor.html
1 {% extends "base.html" %}
2
3 {% block extrahead %}
4         <script type="text/javascript" charset="utf-8">
5                 var fileId = '{{ fileid }}';
6         </script>
7     <link rel="stylesheet" href="{{STATIC_URL}}css/toolbar.css" type="text/css" />
8     <link rel="stylesheet" href="{{STATIC_URL}}css/jquery.modal.css" type="text/css" />
9     <script src="{{STATIC_URL}}js/lib/jquery.lazyload.js" type="text/javascript" charset="utf-8"></script>
10     <script src="{{STATIC_URL}}js/lib/codemirror/codemirror.js" type="text/javascript" charset="utf-8"></script>
11     <script src="{{STATIC_URL}}js/lib/jquery.wtooltip.js" type="text/javascript" charset="utf-8"></script>
12     <script src="{{STATIC_URL}}js/lib/jquery.json.js" type="text/javascript" charset="utf-8"></script>
13     <script src="{{STATIC_URL}}js/lib/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
14     <script src="{{STATIC_URL}}js/lib/jquery.modal.js" type="text/javascript" charset="utf-8"></script>
15         
16         {# App and views #}
17         <script src="{{STATIC_URL}}js/app.js" type="text/javascript" charset="utf-8"></script>
18         <script src="{{STATIC_URL}}js/views/view.js" type="text/javascript" charset="utf-8"></script>
19         <script src="{{STATIC_URL}}js/views/split.js" type="text/javascript" charset="utf-8"></script>
20         <script src="{{STATIC_URL}}js/views/xml.js" type="text/javascript" charset="utf-8"></script>
21         <script src="{{STATIC_URL}}js/views/html.js" type="text/javascript" charset="utf-8"></script>
22         <script src="{{STATIC_URL}}js/views/panel_container.js" type="text/javascript" charset="utf-8"></script>
23         
24     <script src="{{STATIC_URL}}js/editor.js" type="text/javascript" charset="utf-8"></script>
25     <script src="{{STATIC_URL}}js/editor.ui.js" type="text/javascript" charset="utf-8"></script>
26
27         {# JavaScript templates #}
28         <script type="text/html" charset="utf-8" id="panel-container-view-template">
29                 <select>
30                         <% for (panel in panels) { %>
31                         <option value="<%= panel %>"><%= panel %></option>
32                         <% }; %>
33                 </select>
34                 <div class="content-view"></div>
35         </script>
36         
37         <script type="text/html" charset="utf-8" id="xml-view-template">
38                 <div class="xmlview">
39                 </div>
40         </script>
41         
42         <script type="text/html" charset="utf-8" id="html-view-template">
43                 <p>Hej! Jestem widokiem HTML!</p>
44         </script>
45 {% endblock extrahead %}
46
47 {% block breadcrumbs %}<a href="{% url file_list %}">Platforma Redakcyjna</a> &gt; {{ fileid }}{% endblock breadcrumbs %}
48
49 {% block message-box %}
50     <div class="msg-info" id="save-waiting"><p>Zapisuję dane na serwerze.</p><p class="data"></p></div>
51     <div class="msg-success" id="save-successful"><p>Zapisano :)</p><p class="data"></p></div>
52     <div class="msg-warning" id="save-warn"><p>Zapisano. Uwagi: (</p><p class="data"></p></div>
53     <div class="msg-error" id="save-error"><p>Błąd przy zapisie.</p> <p class="data"></p></div>
54
55     <div class="msg-success" id="generic-yes"><p class="data"></p></div>
56     <div class="msg-info" id="generic-info"><p class="data"></p></div>
57     <div class="msg-error" id="generic-error"><p class="data"></p></div>
58     
59     <div class="msg-warning" id="not-implemented"><p>Tej funkcji jeszcze nie ma :(</p><p class="data"></p></div>
60     
61 {% endblock %}
62
63 {% block maincontent %}
64         <div id="splitview">
65                 <div id="left-panel-container" class='panel-container'></div>
66             <div id="right-panel-container" class='panel-container'></div>
67     </div>
68
69
70     <div id="commit-dialog" class="jqmWindow">
71         <form action="{% url file_commit fileid %}" method="POST">
72             <label for="message">Commit message:</label>
73             <textarea cols="60" rows="10" name="message" id="commit-dialog-message"></textarea>
74             <p id="commit-dialog-error-empty-message">Wiadomość nie może być pusta.</p>                
75             <fieldset id="commit-dialog-related-issues" 
76                       ui:ajax-src="http://localhost:3000/publications/issues/{{fileid}}">
77                 <legend>Related issues</legend>
78                 <div class="loading-box" style="display: none;">
79                     <p>Loading related issues...</p>
80                 </div>
81                 <div class="container-box">No related issues.</div>
82             </fieldset>
83             <p>
84                <input type="button" value="Save" id="commit-dialog-save-button" />
85                <input type="reset" value="Cancel" id="commit-dialog-cancel-button" />
86             </p>
87         </form>
88     </div>
89
90     <div id="split-dialog" class="jqmWindow">
91         <div class="container-box"> </div>
92         <div class="loading-box" style="display: none;">
93             <p>Loading dialog contents...</p>
94             <!-- <p><button type="button" class="dialog-close-button">Close</button></p> -->
95         </div>
96         <div class="fatal-error-box" style="display: none;">
97             <p>Server error, while loading dialog :(</p>
98             <p><button type="button" class="dialog-close-button">Close</button></p>
99         </div>
100     </div>
101 {% endblock maincontent %}