Merge branch 'production'
[redakcja.git] / apps / wiki / templates / wiki / document_details.html
index d077e7d..9657e0f 100644 (file)
-{% extends "base.html" %}
-{% load toolbar_tags %}
-{% block title %}{{ document.name }} - {{ block.super }}{% endblock %}
-{% block extrahead %}
-{% load compressed %}
-{% compressed_css 'detail' %}
-{% endblock %}
+{% extends "wiki/document_details_base.html" %}
+{% load i18n %}
+
 {% block extrabody %}
-<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">
+{{ block.super }}
+<script src="{{ STATIC_URL }}js/lib/codemirror/codemirror.js" type="text/javascript" charset="utf-8">
 </script>
-{% compressed_js 'detail' %}
+<script src="{{ STATIC_URL }}js/wiki/loader.js" type="text/javascript" charset="utf-8"> </script>
 {% 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" 
-       data-document-name="{{ document.name }}" style="display:none">
-       
-       {% for k, v in document_meta.items %}
-               <span data-key="{{ k }}">{{ v }}</span>
-       {% endfor %}
-</div>
+{% block tabs-menu %}
+    {% include "wiki/tabs/summary_view_item.html" %}
+    {% include "wiki/tabs/wysiwyg_editor_item.html" %}
+       {% include "wiki/tabs/history_view_item.html" %}
+       {% include "wiki/tabs/source_editor_item.html" %}
+{% endblock %}
 
-<div id="header">
-    <h1><a href="{% url wiki.views.document_list %}">Platforma</a></h1>
-    <div id="tools">
-        <a href="{{ REDMINE_URL }}projects/wl-publikacje/wiki/Pomoc" target="_blank">Pomoc</a>
-        | {% include "registration/head_login.html" %} 
-        | Wersja: <span id="document-revision">{{ document_info.revision }}</span>
-        | 
-        <button style="margin-left: 6px" id="save-button">
-            Zapisz
-        </button>
-    </div>
-    <ol id="tabs">
-       
-               <li id="SummaryPerspective-tab" 
-                       data-ui-related="summary-view-editor" data-ui-jsclass="SummaryPerspective">
-            <span>{{ document_meta.title }}</span>
-        </li>          
-               
-        <li id="VisualPerspective-tab" 
-                       data-ui-related="simple-editor" data-ui-jsclass="VisualPerspective">
-            <span>Edytor</span>
-        </li>
-               
-               <li id="HistoryPerspective-tab" 
-                       data-ui-related="history-view-editor" 
-                       data-ui-jsclass="HistoryPerspective">           
-            Historia
-        </li>
-                       
-               <li id="CodeMirrorPerspective-tab" 
-                       data-ui-related="source-editor" data-ui-jsclass="CodeMirrorPerspective">
-            Kod źródłowy
-        </li>
-    </ol>
-</div>
-<div id="splitter">
-    <div id="editor">
-        <div id="source-editor" class="editor">
-            {% toolbar %}
-            <textarea id="codemirror_placeholder">&lt;br/&gt;</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_info.revision }}" />
-        </div>
-        <div id="simple-editor" class="editor" style="display: none">
-            <div id="html-view" class="htmlview">
-            </div>
-            <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>
-               {% include "wiki/history_view.html" %}
-               {% include "wiki/summary_view.html" %}
+{% block tabs-content %}
+    {% include "wiki/tabs/summary_view.html" %}
+    {% include "wiki/tabs/wysiwyg_editor.html" %}
+       {% include "wiki/tabs/history_view.html" %}
+       {% include "wiki/tabs/source_editor.html" %}
+{% endblock %}
+
+{% block tabs-right %}
+    {% include "wiki/tabs/gallery_view_item.html" %}
+    {% include "wiki/tabs/search_view_item.html" %}
+{% endblock %}
+
+{% block splitter-extra %}
+<div class="vsplitbar" title="{% trans "Click to open/close gallery" %}">
     </div>
-    <div class="vsplitbar" title="Klinknij aby (ro)zwinąć galerię."> </div>
-    
-       <div id="side-gallery">
-               <!-- gallery toolbar -->                                
-        <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>
-            <div class="toolbar-end">
-            </div>
-        </div>        
-               <div class="error_message"> </div>
-               <div class="gallery-image">
-                       <img src="{{MEDIA_URL}}/images/empty.png" />
-               </div>
+    <div id="sidebar">
+        {% include "wiki/tabs/gallery_view.html" %}
+        {% include "wiki/tabs/search_view.html" %}
     </div>
-</div>
-{% include "wiki/save_dialog.html" %}
+{% endblock %}
+
+{% block dialogs %}
+       {% include "wiki/save_dialog.html" %}
+       {% include "wiki/tag_dialog.html" %}
 {% endblock %}
\ No newline at end of file