* Dodanie przycisku "commit". Zmiana nazwy z "save" na "quick save". Closes #96.
[redakcja.git] / project / templates / explorer / editor.html
1 {% extends "base.html" %}
2
3 {% block extrahead %}
4     <link rel="stylesheet" href="{{STATIC_URL}}css/toolbar.css" type="text/css" />
5     <link rel="stylesheet" href="{{STATIC_URL}}css/jquery.modal.css" type="text/css" />
6     <script src="{{STATIC_URL}}js/jquery.lazyload.js" type="text/javascript" charset="utf-8"></script>
7     <script src="{{STATIC_URL}}js/codemirror/codemirror.js" type="text/javascript" charset="utf-8"></script>
8     <!--<script src="{{STATIC_URL}}js/jquery.autoscroll.js" type="text/javascript" charset="utf-8"></script>-->
9     <script src="{{STATIC_URL}}js/jquery.wtooltip.js" type="text/javascript" charset="utf-8"></script>
10     <script src="{{STATIC_URL}}js/jquery.json.js" type="text/javascript" charset="utf-8"></script>
11     <script src="{{STATIC_URL}}js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
12     <script src="{{STATIC_URL}}js/jquery.modal.js" type="text/javascript" charset="utf-8"></script>
13
14     <script src="{{STATIC_URL}}js/editor.js" type="text/javascript" charset="utf-8"></script>
15     <script src="{{STATIC_URL}}js/editor.ui.js" type="text/javascript" charset="utf-8"></script>
16 {% endblock extrahead %}
17
18 {% block extrabody %}
19     <script type="text/javascript" charset="utf-8">
20     $(function() {
21         {% for scriptlet in scriptlets %}
22         editor.registerScriptlet("{{scriptlet.name}}",
23             function(editor, panel, params) {
24                 {{ scriptlet.code|safe }}
25             });
26         {% endfor %}
27      });  
28     </script>
29 {% endblock extrabody %}
30
31 {% load explorer_tags %}
32
33 {% block breadcrumbs %}<a href="{% url file_list %}">Platforma Redakcyjna</a> &gt; {{ fileid|bookname }}{% endblock breadcrumbs %}
34
35 {% block header-toolbar %}
36 <button type="button" class="requires-save toolbar-button" id="toolbar-button-commit">Merge</button>
37 <button type="button" class="requires-save toolbar-button" id="toolbar-button-update"
38         ui:ajax-action="{% url file_update fileid %}">Update</button>
39 <button type="button" class="provides-save toolbar-button" id="toolbar-button-save" disabled="disabled">Commit</button>
40 <button type="button" class="provides-save toolbar-button" id="toolbar-button-quick-save" disabled="disabled">Quick Save</button>
41 {% endblock %}
42
43 {% block message-box %}
44     <div class="msg-info" id="save-waiting"><p>Zapisuję dane na serwerze.</p><p class="data"></p></div>
45     <div class="msg-success" id="save-successful"><p>Zapisano :)</p><p class="data"></p></div>
46     <div class="msg-warning" id="save-warn"><p>Zapisano. Uwagi: (</p><p class="data"></p></div>
47     <div class="msg-error" id="save-error"><p>Błąd przy zapisie.</p> <p class="data"></p></div>
48
49     <div class="msg-success" id="generic-yes"><p class="data"></p></div>
50     <div class="msg-info" id="generic-info"><p class="data"></p></div>
51     <div class="msg-error" id="generic-error"><p class="data"></p></div>
52     
53     <div class="msg-warning" id="not-implemented"><p>Tej funkcji jeszcze nie ma :(</p><p class="data"></p></div>
54     
55 {% endblock %}
56
57 {% block maincontent %}
58         <div id="panels">
59             {% for n in panel_list %}
60             <div class="panel-wrap{% if forloop.last %} last-panel{% endif %}" id="panel-{{n}}">
61                 <div class="panel-toolbar">
62                     <p><label>{{n|capfirst}} panel:
63                     <select name="select-{{n}}-panel" id="panel-{{n}}-select">
64                         {% for panel_type in availble_panels %}
65                         <option value="{% url panel_view path=fileid,name=panel_type.id  %}" p:panel-name="{{ panel_type.id }}">{{panel_type.display_name}}</option>
66                         {% endfor %}
67                     </select>
68                     </label>
69                     <span class="toolbar-button-groups-container">
70                     <span class="panel-toolbar-extra" > </span>
71                     </span>
72                     <!-- rethink the refresh button - it doesn't work very well -->
73                     <!-- <button type="button" class="refresh-button">Odśwież</button> -->
74                     {# <a href="{% url print_xml fileid %}" target="_new">Wydruk</a> #}
75                     <strong class="change-notification" style="display: none">Widok nieaktualny!</strong>
76                     </p>
77                </div>
78                <div id="panel-{{n}}-content" class="panel-content"></div>
79                <button type="button" class="panel-slider"></button>
80             </div>
81             {% endfor %}
82         </div>
83
84         <div id="commit-dialog" class="jqmWindow">
85             <form action="{% url file_commit fileid %}" method="POST">
86                 <label for="message">Commit message:</label>
87                 <textarea cols="60" rows="10" name="message" id="commit-dialog-message"></textarea>
88                 <p id="commit-dialog-error-empty-message">Wiadomość nie może być pusta.</p>                
89                 <fieldset id="commit-dialog-related-issues" 
90                           ui:ajax-src="http://localhost:3000/publications/issues/{{fileid}}">
91                     <legend>Related issues</legend>
92                     <div class="loading-box" style="display: none;">
93                         <p>Loading related issues...</p>
94                     </div>
95                     <div class="container-box">No related issues.</div>
96                 </fieldset>
97                 <p>
98                    <input type="button" value="Save" id="commit-dialog-save-button" />
99                    <input type="reset" value="Cancel" id="commit-dialog-cancel-button" />
100                 </p>
101             </form>
102         </div>
103
104         <div id="split-dialog" class="jqmWindow">
105             <div class="container-box"> </div>
106             <div class="loading-box" style="display: none;">
107                 <p>Loading dialog contents...</p>
108                 <!-- <p><button type="button" class="dialog-close-button">Close</button></p> -->
109             </div>
110             <div class="fatal-error-box" style="display: none;">
111                 <p>Server error, while loading dialog :(</p>
112                 <p><button type="button" class="dialog-close-button">Close</button></p>
113             </div>
114         </div>
115 {% endblock maincontent %}