From 1896ffefd4c448d4445bb510e9ac5992a8f20361 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 30 Jul 2010 15:45:42 +0200 Subject: [PATCH 1/1] preliminary search support --- .../wiki/templates/wiki/document_details.html | 12 +- .../templates/wiki/document_details_base.html | 5 +- .../templates/wiki/tabs/gallery_view.html | 2 - .../wiki/tabs/gallery_view_item.html | 4 + .../wiki/templates/wiki/tabs/search_view.html | 19 +++ .../templates/wiki/tabs/search_view_item.html | 4 + .../wiki/tabs/summary_view_item.html | 2 +- redakcja/settings/compress.py | 1 + redakcja/static/css/gallery.css | 23 ++-- redakcja/static/css/master.css | 12 +- .../static/js/lib/codemirror/codemirror.js | 4 +- redakcja/static/js/lib/codemirror/editor.js | 37 ++++-- redakcja/static/js/wiki/base.js | 2 +- redakcja/static/js/wiki/loader.js | 14 +-- redakcja/static/js/wiki/view_editor_source.js | 4 + redakcja/static/js/wiki/view_gallery.js | 2 + redakcja/static/js/wiki/view_search.js | 113 ++++++++++++++++++ 17 files changed, 228 insertions(+), 32 deletions(-) create mode 100644 apps/wiki/templates/wiki/tabs/gallery_view_item.html create mode 100644 apps/wiki/templates/wiki/tabs/search_view.html create mode 100644 apps/wiki/templates/wiki/tabs/search_view_item.html create mode 100644 redakcja/static/js/wiki/view_search.js diff --git a/apps/wiki/templates/wiki/document_details.html b/apps/wiki/templates/wiki/document_details.html index 67b3c478..9657e0f6 100644 --- a/apps/wiki/templates/wiki/document_details.html +++ b/apps/wiki/templates/wiki/document_details.html @@ -22,8 +22,18 @@ {% 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 %} - {% include "wiki/tabs/gallery_view.html" %} +
+
+ {% endblock %} {% block dialogs %} diff --git a/apps/wiki/templates/wiki/document_details_base.html b/apps/wiki/templates/wiki/document_details_base.html index f86f936c..3c6843d7 100644 --- a/apps/wiki/templates/wiki/document_details_base.html +++ b/apps/wiki/templates/wiki/document_details_base.html @@ -41,9 +41,12 @@ {% trans "Save attempt in progress" %} {% endif %} -
    +
      {% block tabs-menu %} {% endblock %}
    +
      + {% block tabs-right %} {% endblock %} +
    diff --git a/apps/wiki/templates/wiki/tabs/gallery_view.html b/apps/wiki/templates/wiki/tabs/gallery_view.html index 47f6af26..7bf6584a 100644 --- a/apps/wiki/templates/wiki/tabs/gallery_view.html +++ b/apps/wiki/templates/wiki/tabs/gallery_view.html @@ -1,6 +1,4 @@ {% load i18n %} -
    -