requirements fixes
[redakcja.git] / apps / wiki / templates / wiki / document_details.html
index 95a7c95..934a8ac 100644 (file)
-{% extends "base.html" %}
-{% load toolbar_tags %}
+{% extends "wiki/document_details_base.html" %}
+{% load i18n %}
 
-{% block extrahead %}
-    <link rel="stylesheet" href="{{STATIC_URL}}css/master.css" type="text/css" media="screen" charset="utf-8" />
-    <link rel="stylesheet" href="{{STATIC_URL}}css/html.css" type="text/css" media="screen" charset="utf-8" />
-    <link rel="stylesheet" href="{{STATIC_URL}}css/jquery.autocomplete.css" type="text/css" media="screen" title="no title" charset="utf-8">
+{% block extrabody %}
+{{ block.super }}
+<script src="{{ STATIC_URL }}js/lib/codemirror-0.8/codemirror.js" type="text/javascript" charset="utf-8">
+</script>
+<script src="{{ STATIC_URL }}js/wiki/loader.js" type="text/javascript" charset="utf-8"> </script>
+{% endblock %}
+
+{% block tabs-menu %}
+    {% include "wiki/tabs/summary_view_item.html" %}
+    {% include "wiki/tabs/wysiwyg_editor_item.html" %}
+    {% include "wiki/tabs/source_editor_item.html" %}
+    {% include "wiki/tabs/history_view_item.html" %}
+{% endblock %}
+
+{% block tabs-content %}
+    {% include "wiki/tabs/summary_view.html" %}
+    {% include "wiki/tabs/wysiwyg_editor.html" %}
+    {% include "wiki/tabs/source_editor.html" %}
+    {% include "wiki/tabs/history_view.html" %}
+{% endblock %}
+
+{% block tabs-right %}
+    {% include "wiki/tabs/gallery_view_item.html" %}
+    {% include "wiki/tabs/annotations_view_item.html" %}
+    {% include "wiki/tabs/search_view_item.html" %}
+{% endblock %}
 
-    <script type="text/javascript" charset="utf-8">
-        var STATIC_URL = '{{STATIC_URL}}';
-    </script>
-    
-    <script src="{{STATIC_URL}}js/lib/codemirror/codemirror.js" type="text/javascript" charset="utf-8"></script>
-    <script src="{{STATIC_URL}}js/jquery.blockui.js" type="text/javascript" charset="utf-8"></script>
-    <script src="{{STATIC_URL}}js/jquery.autocomplete.js" type="text/javascript" charset="utf-8"></script>
-    <script src="{{STATIC_URL}}js/jquery.elastic.js" type="text/javascript" charset="utf-8"></script>
-    <script src="{{STATIC_URL}}js/button_scripts.js" type="text/javascript" charset="utf-8"></script>
-    <script src="{{STATIC_URL}}js/xslt.js" type="text/javascript" charset="utf-8"></script>
-    <script src="{{STATIC_URL}}js/main.js" type="text/javascript" charset="utf-8"></script>
+{% block splitter-extra %}
+<div class="vsplitbar" title="{% trans "Click to open/close gallery" %}">
+    <p class="vsplitbar-title"></p>
+    </div>
+    <div id="sidebar">
+        {% include "wiki/tabs/gallery_view.html" %}
+        {% include "wiki/tabs/annotations_view.html" %}
+        {% include "wiki/tabs/search_view.html" %}
+    </div>
 {% endblock %}
 
-{% block maincontent %}
-        <div id="loading-overlay">
-            <div id="loading-message"><img src="{{STATIC_URL}}img/spinner.gif" /><p>Ładowanie</p></div>
-        </div>
-        <div id="document-meta" style="display:none">
-        {% for k, v in document.meta.items %}
-            <div class="{{ k }}">{{ v}}</div>
-        {% endfor %}
-        </div>
-        <div id="header">
-            <div id="tools" style="float: right;">
-                {% include "registration/head_login.html" %}
-                Wersja: <span id="document-revision">{{ document.revision }}</span> <button style="margin-left: 6px" id="save-button">Zapisz</button></div>
-            <h1><a href="{% url wiki.views.document_list %}">Platforma</a></h1>
-            <ol id="tabs">
-                <li id="simple-view-tab" ui:related="simple-editor"><span id="document-name">{{ document.name }}</span></li>
-                <li id="source-view-tab" ui:related="source-editor">Kod źródłowy</li>
-                               <li id="history-view-tab" ui:related="history-viewer">Historia</li>
-            </ol>
-            <div style="clear: both"></div>
-        </div>
-        <div id="splitter">
-            <div id="editor">
-                <div id="source-editor" class="editor">
-                    {% toolbar %}
-                    <textarea name="text" id="id_text">{{ document.plain_text }}</textarea>
-                    <input type="hidden" name="name" value="{{ document.name }}" />
-                    <input type="hidden" name="author" value="annonymous" />
-                    <input type="hidden" name="comment" value="no comment" />
-                    <input type="hidden" name="revision" value="{{ document.revision }}" />
-                </div>
-                <div id="simple-editor" class="editor" style="display: none">
-                    <div class="toolbar">
-                        <button id="insert-theme-button">Wstaw motyw</button> <button id="insert-annotation-button">Wstaw przypis</button>
-                        <div class="toolbar-end"> </div>
-                    </div>
-                    <div id="html-view" class="htmlview">
-                    </div>
-                </div>
-                               
-                               <div id="history-viewer" class="editor" style="display: none">
-                                       <div class="toolbar"> </div>
-                                       <div id="history-view">
-                                               <p class="message-box" style="display:none;"></p>
-                                               <table>
-                                                       <thead>                 
-                                                               <th>&nbsp;</th>                                 
-                                                               <th>Numer</th>
-                                                               <th>Opis</th>
-                                                               <th>Użytkownik</th>
-                                                               <th>Data</th>
-                                                       </thead>
-                                                       <tbody id="changes-list">                                                                                                                               
-                                                       </tbody>
-                                               </table>
-                                               
-                                               <p><button type="button" id="make-diff-button">Porównaj</button></p>
-                                               <!-- <p><button type="button" id="more-history-button">Więcej</button></p> -->
-                                               <div id="diff-view">                                                                                                                                            
-                                       </div>                                                                  
-                               </div>                                                  
-                                                       
-                               </div>
-            </div>
-            <div class="vsplitbar"> </div>
-            <div id="sidebar">
-                <div class="toolbar">
-                    <button class="previous-page">
-                       <img src="{{STATIC_URL}}icons/go-previous.png" alt="Poprzednia" title="Poprzednia"/>
-                    </button>
-                    <input type="text" size="3" maxlength="3" value="1" class="page-number" />
-                    <button class="next-page">
-                       <img src="{{STATIC_URL}}icons/go-next.png" alt="Następna" title="Następna"/>
-                    </button>
-                    <button class="zoom-in">Powiększ</button>
-                    <button class="zoom-out">Pomniejsz</button>
-                                       {% if request.user.is_staff %}
-                    <button class="change-gallery">Opcje</button>
-                                       {% endif %}
-                    <div class="toolbar-end"> </div>
-                </div>
-                               {% if request.user.is_staff %}
-                <div class="toolbar" id="change-gallery-toolbar">
-                    <input type="text" value="" class="chosen-gallery" />
-                    <button class="change-gallery-ok">Zmień galerię</button>
-                    <button class="change-gallery-cancel">Anuluj</button>
-                    <div class="toolbar-end"> </div>    
-                </div>
-                               {% endif %}
-                <div class="gallery-image">
-                    <img src="" />
-                </div>
-            </div>
-        </div>
-        <div id="save-dialog" style="display: none; text-align: left">
-            <label for="komentarz" style="display: block">Opis zmian:</label>
-            <textarea name="komentarz" id="komentarz" style="display: block; width: 100%"></textarea>
-            <button id="save-ok">Zapisz</button> <button id="save-cancel">Anuluj</button>
-        </div>
-{% endblock %}
\ No newline at end of file
+{% block dialogs %}
+    {% include "wiki/save_dialog.html" %}
+    {% include "wiki/revert_dialog.html" %}
+    {% include "wiki/tag_dialog.html" %}
+{% endblock %}