From 198be737937aec7259e81ba791bf7f4e401795eb Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=81ukasz=20Rekucki?= <lrekucki@gmail.com> Date: Sun, 7 Mar 2010 16:02:38 +0100 Subject: [PATCH] Moved wiki templates to subdir. Altered button template to show tooltips --- .../wiki/templates/wiki/document_details.html | 86 +++++++++++++++++++ apps/wiki/templates/wiki/document_list.html | 43 ++++++++++ 2 files changed, 129 insertions(+) create mode 100644 apps/wiki/templates/wiki/document_details.html create mode 100644 apps/wiki/templates/wiki/document_list.html diff --git a/apps/wiki/templates/wiki/document_details.html b/apps/wiki/templates/wiki/document_details.html new file mode 100644 index 00000000..1362a806 --- /dev/null +++ b/apps/wiki/templates/wiki/document_details.html @@ -0,0 +1,86 @@ +{% extends "base.html" %} +{% load toolbar_tags %} + +{% 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"> + <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> +{% 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"><span id="document-name">{{ document.name }}</span></li> + <li id="source-view-tab" class="active">Kod źródÅowy</li> + </ol> + <div style="clear: both"></div> + </div> + <div id="splitter"> + <div id="editor"> + <div id="source-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" 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> + <div class="vsplitbar"> </div> + <div id="sidebar"> + <div class="toolbar"> + <button class="previous-page">Poprzednia</button> + <input type="text" size="3" maxlength="3" value="1" class="page-number" /> + <button class="next-page">NastÄpna</button> + <button class="zoom-in">PowiÄksz</button> + <button class="zoom-out">Pomniejsz</button> + <button class="change-gallery">Galeria</button> + <div class="toolbar-end"> </div> + </div> + <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> + <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 diff --git a/apps/wiki/templates/wiki/document_list.html b/apps/wiki/templates/wiki/document_list.html new file mode 100644 index 00000000..5bc53e87 --- /dev/null +++ b/apps/wiki/templates/wiki/document_list.html @@ -0,0 +1,43 @@ +{% extends "base.html" %} + +{% block extrahead %} +<link rel="stylesheet" href="{{ STATIC_URL }}css/filelist.css" type="text/css" /> +<script src="{{ STATIC_URL }}js/slugify.js" type="text/javascript" charset="utf-8"></script> +<script type="text/javascript" charset="utf-8"> +$(function() { + function search(event) { + event.preventDefault(); + + var expr = new RegExp(slugify($('#file-list-filter').val()), 'i'); + + $('#file-list p').hide().filter(function(index) { + console.log(expr.test($(this).attr('title'))) + return expr.test(slugify($('a', this).html())); + }).show(); + } + + $('#file-list-find-button').click(search).hide(); + $('#file-list-filter').bind('keyup change DOMAttrModified', search); +}); +</script> +{% endblock extrahead %} + +{% block maincontent %} +<div id="main-page-widgets"> + +<div class="file-list-widget"> + <form action="#" method="GET"> + <p><input autocomplete="off" name="filter" id="file-list-filter" type="text" size="60" /> + <input type="submit" value="Znajdź" id="file-list-find-button"/> + <input type="reset" value="WyczyÅÄ" id="file-list-reset-button"/> + </p> + </form> + <div id="file-list"> + {% for file in document_list %} + <p><a href="{% url wiki.views.document_detail file|urlencode %}">{{ file }}</a></p> + {% endfor %} + </div> +</div> + +</div> +{% endblock maincontent %} -- 2.20.1