Pierwsza implementacja DocumentModel.{merge|update}. Zmiana sposobu generowania URLi...
[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/panel_container.js" type="text/javascript" charset="utf-8"></script>
26         
27         <script src="{{STATIC_URL}}js/models.js" type="text/javascript" charset="utf-8"></script>
28         
29         {# JavaScript templates #}
30         <script type="text/html" charset="utf-8" id="panel-container-view-template">
31                 <select>
32                         <% for (panel in panels) { %>
33                         <option value="<%= panel %>"><%= panel %></option>
34                         <% }; %>
35                 </select>
36                 <div class="content-view"></div>
37         </script>
38         
39         <script type="text/html" charset="utf-8" id="xml-view-template">
40                 <div class="xmlview-toolbar"></div>
41                 <div class="xmlview">
42                         
43                 </div>
44         </script>
45         
46         <script type="text/html" charset="utf-8" id="html-view-template">
47                 <div class="htmlview">
48                 </div>
49         </script>
50         
51         <script type="text/html" charset="utf-8" id="button-toolbar-view-template">
52                 <div class="buttontoolbarview">
53                         <div class="buttontoolbarview-tabs">
54                         <% for (var i=0; i < buttons.length; i++) { %>
55                                 <a href="#" class="buttontoolbarview-tab" ui:groupindex="<%= i %>"><%= buttons[i].name %></a>
56                         <% }; %>
57                         </div>
58                         <div class="buttontoolbarview-groups">
59                         <% for (var i=0; i < buttons.length; i++) { %>
60                                 <div class="buttontoolbarview-group" ui:groupIndex="<%= i %>" style="display: none">
61                                         <% for (var j=0; j < buttons[i].buttons.length; j++) { %>
62                                                 <% if (buttons[i].buttons[j].scriptlet_id) { %>
63                                                 <a href="#" class="buttontoolbarview-button" ui:groupindex="<%= i %>" ui:buttonindex="<%= j %>">
64                                                         <%= buttons[i].buttons[j].label %>
65                                                 </a>
66                                                 <% } %>
67                                         <% } %>
68                                 </div>
69                         <% }; %>
70                         </div>
71                 </div>
72         </script>
73 {% endblock extrahead %}
74
75 {% block breadcrumbs %}<a href="{% url file_list %}">Platforma Redakcyjna</a> &gt; {{ fileid }}{% endblock breadcrumbs %}
76
77 {% block message-box %}
78     <div class="msg-info" id="save-waiting"><p>Zapisuję dane na serwerze.</p><p class="data"></p></div>
79     <div class="msg-success" id="save-successful"><p>Zapisano :)</p><p class="data"></p></div>
80     <div class="msg-warning" id="save-warn"><p>Zapisano. Uwagi: (</p><p class="data"></p></div>
81     <div class="msg-error" id="save-error"><p>Błąd przy zapisie.</p> <p class="data"></p></div>
82
83     <div class="msg-success" id="generic-yes"><p class="data"></p></div>
84     <div class="msg-info" id="generic-info"><p class="data"></p></div>
85     <div class="msg-error" id="generic-error"><p class="data"></p></div>
86     
87     <div class="msg-warning" id="not-implemented"><p>Tej funkcji jeszcze nie ma :(</p><p class="data"></p></div>
88     
89 {% endblock %}
90
91 {% block header-toolbar %}
92         <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>
93 {% endblock %}
94
95 {% block maincontent %}
96         <div id="splitview">
97                 <div id="left-panel-container" class='panel-container'></div>
98             <div id="right-panel-container" class='panel-container'></div>
99     </div>
100
101
102     <div id="commit-dialog" class="jqmWindow" style="display:none">
103         <form action="{% url file_commit fileid %}" method="POST">
104             <label for="message">Commit message:</label>
105             <textarea cols="60" rows="10" name="message" id="commit-dialog-message"></textarea>
106             <p id="commit-dialog-error-empty-message">Wiadomość nie może być pusta.</p>                
107             <fieldset id="commit-dialog-related-issues" 
108                       ui:ajax-src="http://localhost:3000/publications/issues/{{fileid}}">
109                 <legend>Related issues</legend>
110                 <div class="loading-box" style="display: none;">
111                     <p>Loading related issues...</p>
112                 </div>
113                 <div class="container-box">No related issues.</div>
114             </fieldset>
115             <p>
116                <input type="button" value="Save" id="commit-dialog-save-button" />
117                <input type="reset" value="Cancel" id="commit-dialog-cancel-button" />
118             </p>
119         </form>
120     </div>
121     
122     <div id="split-dialog" class="jqmWindow" style="display:none">
123         <div class="container-box"> </div>
124         <div class="loading-box" style="display: none;">
125             <p>Loading dialog contents...</p>
126             <!-- <p><button type="button" class="dialog-close-button">Close</button></p> -->
127         </div>
128         <div class="fatal-error-box" style="display: none;">
129             <p>Server error, while loading dialog :(</p>
130             <p><button type="button" class="dialog-close-button">Close</button></p>
131         </div>
132     </div>
133 {% endblock maincontent %}