]> git.parisson.com Git - telemeta.git/commitdiff
Fix advanced search page using jquery-ui 1.11, mv search template directory
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 4 Aug 2017 14:00:52 +0000 (16:00 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 4 Aug 2017 14:00:52 +0000 (16:00 +0200)
41 files changed:
app/settings.py
docker-compose.yml
telemeta/templates/search/addplaylist.html [deleted file]
telemeta/templates/search/advanceSearch.html [deleted file]
telemeta/templates/search/confirmation_add_playslist.html [deleted file]
telemeta/templates/search/filters.html [deleted file]
telemeta/templates/search/indexes/telemeta/instrument_text.txt [deleted file]
telemeta/templates/search/indexes/telemeta/instrumentalias_text.txt [deleted file]
telemeta/templates/search/indexes/telemeta/location_text.txt [deleted file]
telemeta/templates/search/indexes/telemeta/locationalias_text.txt [deleted file]
telemeta/templates/search/indexes/telemeta/mediacollection_text.txt [deleted file]
telemeta/templates/search/indexes/telemeta/mediacorpus_text.txt [deleted file]
telemeta/templates/search/indexes/telemeta/mediafonds_text.txt [deleted file]
telemeta/templates/search/indexes/telemeta/mediaitem_text.txt [deleted file]
telemeta/templates/search/mediacollection_listhaystack.html [deleted file]
telemeta/templates/search/mediaitem_listhaystack.html [deleted file]
telemeta/templates/search/mediaresource_listhaystack.html [deleted file]
telemeta/templates/search/search.html [deleted file]
telemeta/templates/telemeta/inc/tabs.html [new file with mode: 0644]
telemeta/templates/telemeta/search/addplaylist.html [new file with mode: 0644]
telemeta/templates/telemeta/search/confirmation_add_playslist.html [new file with mode: 0644]
telemeta/templates/telemeta/search/filters.html [new file with mode: 0644]
telemeta/templates/telemeta/search/indexes/telemeta/instrument_text.txt [new file with mode: 0644]
telemeta/templates/telemeta/search/indexes/telemeta/instrumentalias_text.txt [new file with mode: 0644]
telemeta/templates/telemeta/search/indexes/telemeta/location_text.txt [new file with mode: 0644]
telemeta/templates/telemeta/search/indexes/telemeta/locationalias_text.txt [new file with mode: 0644]
telemeta/templates/telemeta/search/indexes/telemeta/mediacollection_text.txt [new file with mode: 0644]
telemeta/templates/telemeta/search/indexes/telemeta/mediacorpus_text.txt [new file with mode: 0644]
telemeta/templates/telemeta/search/indexes/telemeta/mediafonds_text.txt [new file with mode: 0644]
telemeta/templates/telemeta/search/indexes/telemeta/mediaitem_text.txt [new file with mode: 0644]
telemeta/templates/telemeta/search/mediacollection_listhaystack.html [new file with mode: 0644]
telemeta/templates/telemeta/search/mediaitem_listhaystack.html [new file with mode: 0644]
telemeta/templates/telemeta/search/mediaresource_listhaystack.html [new file with mode: 0644]
telemeta/templates/telemeta/search/search.html [new file with mode: 0644]
telemeta/templates/telemeta/search/search_advanced.html [new file with mode: 0644]
telemeta/templates/telemeta/search/search_criteria.html [new file with mode: 0644]
telemeta/templates/telemeta/search/search_results.html [new file with mode: 0644]
telemeta/templates/telemeta/search_criteria.html [deleted file]
telemeta/templates/telemeta/search_results.html [deleted file]
telemeta/urls.py
telemeta/views/new_playlist.py

index d7f3035566ed8102bd711fd871f406f2a8a0b57d..22875ab94a1265e25b56a3da9d0527fb478c5b2b 100644 (file)
@@ -351,9 +351,8 @@ BOWER_INSTALLED_APPS = (
     'soundmanager#V2.97a.20150601',
     'https://github.com/Parisson/loaders.git',
     'https://github.com/Parisson/ui.git',
-    'jquery-ui#1.12.1',
+    'jquery-ui#1.11.4',
     'tablesorter',
     'video.js',
     'sass-bootstrap-glyphicons',
-    
 )
index b064e29694ad29aa8b6bd9a4d2408dda2025098b..8fbb25ccfe389b76ff7546ff18601309950d7650 100644 (file)
@@ -52,9 +52,10 @@ search:
 app:
   build: .
   volumes:
-    - ./app/:/srv/app
-    - ./telemeta/:/srv/src/telemeta/telemeta
-    - ./lib/TimeSide/:/srv/src/timeside
+    - ./app:/srv/app
+    - ./telemeta:/srv/src/telemeta/telemeta
+    # - ./lib/TimeSide:/srv/src/timeside
+    # - ./lib/plugins:/srv/src/plugins
   volumes_from:
     - data
   env_file:
diff --git a/telemeta/templates/search/addplaylist.html b/telemeta/templates/search/addplaylist.html
deleted file mode 100644 (file)
index f185a9d..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-{% extends 'telemeta/base.html' %}
-{% load telemeta_tags %}
-{% load i18n %}
-
-{% block title %}
-{% trans "Add to playlist" %}
-{% endblock %}
-{% block extra_stylesheets %}
-    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/jquery-ui.css" />
-    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/search.css" />
-{% endblock %}
-{% block content %}
-
-    <form method="POST" action="{%url "add_confirmation" type %}">{% csrf_token %}
-    <div class="row">
-        <div class="col-md-4">
-            <table class="listing" style="width:100%">
-           <thead>
-            <tr><th>{% trans "Selected items : "%}</th>
-
-            </tr>
-           </thead><tbody>
-           {% ifequal type "item" %}
-                {% for item in selected_items_list %}
-                    <tr>
-
-                     <td><a href="#">
-                        {{item}}</a></td>
-                    </tr>
-                {% endfor %}
-            {% else %}
-                {% for item in selected_items_list %}
-                    <tr>
-
-                     <td><a href="#">
-                        {{item.title}}</a></td>
-                    </tr>
-                {% endfor %}
-            {% endifequal %}
-            </tbody>
-            </table>
-        </div>
-        <div class="col-md-4 col-md-offset-3">
-              <label for="selection">select your playlist : </label>
-              <select name="playlist_id" style="width:100%;" id="selection">
-                    {% for playlist in existing_playlists %}
-                        <option value="{{playlist.id}}">{{playlist.title}}</option>
-                    {% endfor %}
-              </select>
-        </div>
-      </div>
-      {% for item in selected_items_list %}
-          <input type="hidden" name="item_id" value="{{item.id}}"/>
-      {% endfor %}
-    {% if lastquerypath %}
-      <input type="hidden" name="lastquerypath" value="{{lastquerypath}}"/>
-      {% endif %}
-        <div class="row">
-          {% if lastquerypath %}
-          <div class="col-md-4"><a style="margin-top:10px;width:100%" href="{{lastquerypath}}" id="btn" class="btn btn-default">return to search results</a></div>
-              <div class="col-md-4 col-md-offset-3"><button style="margin-top:10px;width:100%" type="submit" id="btn" class="btn btn-default">{% trans "Add to Playlist" %}</button></div>
-          {% else %}
-              <div class="col-md-4 col-md-offset-7"><button style="margin-top:10px;width:100%" type="submit" id="btn" class="btn btn-default">{% trans "Add to Playlist" %}</button></div>
-
-          {% endif %}
-      </div>
-  </form>
-{% endblock %}
-{% block extra_javascript %}
-    <script src="{{ STATIC_URL }}jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
-    <script>
-        $(document).ready(function() {
-            $("#selection").selectmenu({
-                icons : {button: "ui-icon-carat-2-n-s"}
-            }).selectmenu("menuWidget").addClass("overflow");
-        });
-    </script>
-{% endblock %}
diff --git a/telemeta/templates/search/advanceSearch.html b/telemeta/templates/search/advanceSearch.html
deleted file mode 100644 (file)
index 7e3d639..0000000
+++ /dev/null
@@ -1,291 +0,0 @@
-{% extends 'telemeta/base.html' %}
-{% load telemeta_tags %}
-{% load i18n %}
-{% load bootstrap_pagination %}
-
-
-{% block title %}
-{% trans "Search" %}
-{% endblock %}
-{% block extra_stylesheets %}
-    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/jquery-ui.css" />
-    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/search.css" />
-    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/lists_sorttable.css" media="print, projection, screen"/>
-{% endblock %}
-{% block content %}
-    <form method="get" action=".">
-        <div class="row">
-            <div class="col-md-5" id="left-form">
-                <div class="fieldWrapper">
-                    {{form.q.errors}}
-                    {{ form.q.label_tag }}</br>
-                    {{form.q}}
-                </div>
-                <div class="fieldWrapper">
-                    {{form.collectors.errors}}
-                    {% trans form.collectors.label_tag %}</br>
-                    {{form.collectors}}
-                </div>
-                <div class="fieldWrapper">
-                    {{form.location.errors}}
-                    {% trans form.location.label_tag %}</br>
-                    {{form.location}}
-                </div>
-                <div class="fieldWrapper">
-                    {{form.ethnic_group.errors}}
-                    {% trans form.ethnic_group.label_tag %}</br>
-                    {{form.ethnic_group}}
-                </div>
-                <div class="fieldWrapper">
-                    {{form.instruments.errors}}
-                    {% trans form.instruments.label_tag %}
-                    {{form.instruments}}
-                    {% comment %}<a href="#" id="btn" class="col-md-5 btn btn-default" style="width: 100%; margin-top: 1%">{% trans "Instruments : Boolean Search" %}</a>{% endcomment %}
-                </div>
-
-                <div class="fieldWrapper">
-                    {{form.media_type.errors}}
-                    <label>{% trans "media type" %} :</label></br>
-                    <ul id="id_media_type" style="margin-left:-40px">
-                        {%ifequal query.media_type 'audio'%}
-                            <li><label for="id_media_type_0">{% trans "no preference" %}</label><input id="id_media_type_0" type="radio" value="1" name="media_type"></input></li>
-                            <li><label for="id_media_type_1">{% trans "audio" %}</label><input id="id_media_type_1" type="radio" value="audio" name="media_type" checked="checked"></input></li>
-                            <li><label for="id_media_type_2">{% trans "video" %}</label><input id="id_media_type_2" type="radio" value="video" name="media_type"></input></li>
-                        {%else%}
-                            {%ifequal query.media_type 'video'%}
-                                <li><label for="id_media_type_0">{% trans "no preference" %}</label><input id="id_media_type_0" type="radio" value="1" name="media_type"></input></li>
-                                <li><label for="id_media_type_1">{% trans "audio" %}</label><input id="id_media_type_1" type="radio" value="audio" name="media_type"></input></li>
-                                <li><label for="id_media_type_2">{% trans "video" %}</label><input id="id_media_type_2" type="radio" value="video" name="media_type" checked="checked"></input></li>
-                            {%else%}
-                                <li><label for="id_media_type_0">{% trans "no preference" %}</label><input id="id_media_type_0" type="radio" value="1" name="media_type" checked="checked"></input></li>
-                                <li><label for="id_media_type_1">{% trans "audio" %}</label><input id="id_media_type_1" type="radio" value="audio" name="media_type"></input></li>
-                                <li><label for="id_media_type_2">{% trans "video" %}</label><input id="id_media_type_2" type="radio" value="video" name="media_type"></input></li>
-                            {%endifequal%}
-                        {%endifequal%}
-                    </ul>
-
-                </div>
-                <div class="fieldWrapper">
-                    {{form.viewable_errors}}
-                    <label>{% trans "Available for consultation media" %} : </label></br>
-                    <ul id="id_viewable" style="margin-left:-40px">
-                        {%ifequal query.viewable '2'%}
-                            <li><label for="id_viewable_0">{% trans "no preference" %}</label><input id="id_viewable_0" type="radio" value="1" name="viewable"></input></li>
-                            <li><label for="id_viewable_1">{% trans "online and public" %}</label><input id="id_viewable_1" type="radio" value="2" name="viewable" checked="checked"></input></li>
-                            <li><label for="id_viewable_2">{% trans "online (account required)" %}</label><input id="id_viewable_2" type="radio" value="3" name="viewable"></input></li>
-                        {%else%}
-                            {%ifequal query.viewable '3'%}
-                                <li><label for="id_viewable_0">{% trans "no preference" %}</label><input id="id_viewable_0" type="radio" value="1" name="viewable"></input></li>
-                                <li><label for="id_viewable_1">{% trans "online and public" %}</label><input id="id_viewable_1" type="radio" value="2" name="viewable"></input></li>
-                                <li><label for="id_viewable_2">{% trans "online (account required)" %}</label><input id="id_viewable_2" type="radio" value="3" name="viewable" checked="checked"></input></li>
-                            {%else%}
-                                <li><label for="id_viewable_0">{% trans "no preference" %}</label><input id="id_viewable_0" type="radio" value="1" name="viewable" checked="checked"></input></li>
-                                <li><label for="id_viewable_1">{% trans "online and public" %}</label><input id="id_viewable_1" type="radio" value="2" name="viewable"></input></li>
-                                <li><label for="id_viewable_2">{% trans "online (account required)" %} </label><input id="id_viewable_2" type="radio" value="3" name="viewable"></input></li>
-                            {%endifequal%}
-                        {%endifequal%}
-                    </ul>
-                </div>
-            </div>
-            <div class="col-md-5" id="right-form" style="margin-left:13%">
-                <div class="fieldWrapper">
-                    {{form.recorded_from_date.errors}} {{form.recorded_to_date.errors}}
-                    <label>{% trans "Recording date" %}:</label></br>
-                    {{form.recorded_from_date}} <span style="font-size:3em" aria-hidden="true">-</span> {{form.recorded_to_date}}
-                </div>
-                <div class="fieldWrapper">
-                    {{form.item_status_errors}}
-                    <label>{% trans "Document status" %} : </label></br>
-                    <ul id="id_item_status" style="margin-left:-40px">
-                        {%ifequal query.item_status 'pub'%}
-                            <li><label for="id_item_status_0">{% trans "no preference" %}</label><input id="id_item_status_0" type="radio" value="1" name="item_status"></input></li>
-                            <li><label for="id_item_status_1">{% trans "Published" %}</label><input id="id_item_status_1" type="radio" value="pub" name="item_status" checked="checked"></input></li>
-                            <li><label for="id_item_status_2">{% trans "Unpublished" %}</label><input id="id_item_status_2" type="radio" value="unpub" name="item_status"></input></li>
-                        {%else%}
-                            {%ifequal query.item_status 'unpub'%}
-                                <li><label for="id_item_status_0">{% trans "no preference" %}</label><input id="id_item_status_0" type="radio" value="1" name="item_status"></input></li>
-                                <li><label for="id_item_status_1">{% trans "Published" %}</label><input id="id_item_status_1" type="radio" value="pub" name="item_status"></input></li>
-                                <li><label for="id_item_status_2">{% trans "Unpublished" %}</label><input id="id_item_status_2" type="radio" value="unpub" name="item_status" checked="checked"></input></li>
-                            {%else%}
-                                <li><label for="id_item_status_0">{% trans "no preference" %}</label><input id="id_item_status_0" type="radio" value="1" name="item_status" checked="checked"></input></li>
-                                <li><label for="id_item_status_1">{% trans "Published" %}</label><input id="id_item_status_1" type="radio" value="pub" name="item_status"></input></li>
-                                <li><label for="id_item_status_2">{% trans "Unpublished" %}</label><input id="id_item_status_2" type="radio" value="unpub" name="item_status"></input></li>
-                            {%endifequal%}
-                        {%endifequal%}
-                    </ul>
-                </div>
-                <div class="fieldWrapper">
-                    {{form.year_published_from.errors}} {{form.year_published_to.errors}}
-                    <label> {% trans "year published" %} :</label></br>
-                    {{form.year_published_from}} <span style="font-size:3em" aria-hidden="true">-</span> {{form.year_published_to}}
-                </div>
-                <div class="fieldWrapper">
-                    {{form.recording_context.errors}}
-                    {{ form.recording_context.label_tag }}</br>
-                    {{form.recording_context}}
-                </div>
-                <div class="fieldWrapper">
-                    {{form.physical_format.errors}}
-                    {% trans form.physical_format.label_tag %}</br>
-                    {{form.physical_format}}
-                </div>
-                <div class="fieldWrapper">
-                    {{form.code.errors}}
-                    {% trans form.code.label_tag %}</br>
-                    {{form.code}}
-                </div>
-            </div>
-        </div></br>
-        <button id="btn" class="btn btn-default col-md-3 col-md-offset-4" type="submit" style="height:45px;font-size:1.2em;align:center"><span class="glyphicon glyphicon-search" aria-hidden="true"></span> {% trans "Search" %}</button></br></br>
-    </form>
-        <div id="anchor"></br></div>
-        {% if query %}
-
-            <div class="row" >
-                <div class="col-md-3" >
-                    <img src="{{ STATIC_URL }}telemeta/images/search_red.png" alt="search-results" style="vertical-align:middle" /> <h1>{% trans "Search Results" %}</h1>
-                </div>
-                <div class="col-md-6" >
-                    <center>{% bootstrap_paginate page range=10 show_first_last="True" %}</center>
-                </div>
-                <div class="col-md-0">&nbsp;</div>
-            </div>
-            <div class="row" style="margin-left:-15px">
-                <div class="col-md-4">
-                    {% ifequal type 'item' %}
-                         <p><b>Items ({{item_count}}) | <a href="{% url "haystack_advance_search_type" "collection" %}?{{request_url}}">Collections ({{collection_count}})</a> | <a href="{% url "haystack_advance_search_type" "corpus" %}?{{request_url}}">Corpus ({{corpus_count}})</a> | <a href="{% url "haystack_advance_search_type" "fonds" %}?{{request_url}}">Fonds ({{fonds_count}})</a></b></p>
-                    {% else %}
-                        {% ifequal type 'corpus' %}
-                            <p><b><a href="{% url "haystack_advance_search_type" "item" %}?{{request_url}}">Items ({{item_count}}) </a>| <a href="{% url "haystack_advance_search_type" "collection" %}?{{request_url}}">Collections ({{collection_count}})</a> | Corpus ({{corpus_count}})</a> | <a href="{% url "haystack_advance_search_type" "fonds" %}?{{request_url}}">Fonds ({{fonds_count}})</a></b></p>
-                        {% else %}
-                            {% ifequal type 'fonds' %}
-                                <p><b><a href="{% url "haystack_advance_search_type" "item" %}?{{request_url}}">Items ({{item_count}}) </a>| <a href="{% url "haystack_advance_search_type" "collection" %}?{{request_url}}">Collections ({{collection_count}})</a> | <a href="{% url "haystack_advance_search_type" "corpus" %}?{{request_url}}">Corpus ({{corpus_count}})</a> | Fonds ({{fonds_count}})</b></p>
-                            {% else %}
-                                {% ifequal type 'collection'%}
-                                    <p><b><a href="{% url "haystack_advance_search_type" "item" %}?{{request_url}}">Items ({{item_count}}) </a>| Collections ({{collection_count}}) | <a href="{% url "haystack_advance_search_type" "corpus" %}?{{request_url}}">Corpus ({{corpus_count}})</a> | <a href="{% url "haystack_advance_search_type" "fonds" %}?{{request_url}}">Fonds ({{fonds_count}})</a></b></p>
-                                {% endifequal %}
-                            {% endifequal %}
-                        {% endifequal %}
-                    {% endifequal %}
-                 </div>
-                 <div class="col-md-4 col-md-offset-4" >
-                    <div class="pull-right"">
-                        <label style="display:inline-block;vertical-align:middle">{% trans "results per page"%}:</label>
-                        <div style="display:inline-block;vertical-align:middle">
-                            <select id="results-per-page" name="results_page">
-                                <option {% ifequal results_page 20 %}selected{% endifequal %} value="20">20</option>
-                                <option {% ifequal results_page 50 %}selected{% endifequal %} value="50">50</option>
-                                <option {% ifequal results_page 100 %}selected{% endifequal %} value="100">100</option>
-                                <option {% ifequal results_page 250 %}selected{% endifequal %} value="250">250</option>
-                                <option {% ifequal results_page 500 %}selected{% endifequal %} value="500">500</option>
-                                <option {% ifequal results_page 1000 %}selected{% endifequal %} value="1000">1000</option>
-                                <option {% ifequal results_page 10000 %}selected{% endifequal %} value="10000">10000</option>
-                            </select>
-                        </div>
-                    </div>
-                 </div>
-            </div>
-             <form method="POST" action="{% url "haystack_playlist" type%} ">{% csrf_token %}
-             {% with object_list as items %}
-                <div class="fullpage" style="display:none">
-                    {% ifequal type 'item' %}
-                        {% include "search/mediaitem_listhaystack.html" %}
-                    {% else %}
-                        {% ifequal type 'corpus' %}
-                            {% include "search/mediaresource_listhaystack.html" %}
-                        {% else %}
-                            {% ifequal type 'fonds' %}
-                                {% include "search/mediaresource_listhaystack.html" %}
-                            {% else %}
-                                {% ifequal type 'collection' %}
-                                    {% include "search/mediacollection_listhaystack.html" %}
-                                {%endifequal%}
-                            {%endifequal%}
-                        {%endifequal%}
-                    {%endifequal%}
-                </div>
-                <noscript>
-                    <div class="fullpage">
-                        {% ifequal type 'item' %}
-                            {% include "search/mediaitem_listhaystack.html" %}
-                        {% else %}
-                            {% ifequal type 'corpus' %}
-                                {% include "search/mediaresource_listhaystack.html" %}
-                            {% else %}
-                                {% ifequal type 'fonds' %}
-                                    {% include "search/mediaresource_listhaystack.html" %}
-                                {% else %}
-                                    {% ifequal type 'collection' %}
-                                        {% include "search/mediacollection_listhaystack.html" %}
-                                    {%endifequal%}
-                                {%endifequal%}
-                            {%endifequal%}
-                        {%endifequal%}
-                    </div>
-                </noscript>
-
-
-            {% endwith %}
-            {% if user.is_authenticated %}
-                <input type="hidden" name="lastquerypath" value="{{request.get_full_path}}"/>
-                <button style="margin-top:10px" type="submit" id="btn" class="btn btn-default">{% trans "Add to playlist" %}</button>
-            {% endif %}
-            </form>
-        {% else %}
-            <div id="results"></div>{# Show some example queries to run, maybe query syntax, something else? #}
-        {% endif %}
-
-    {% comment %}
-
-        <div id="dialog" title="{% trans "Instruments : Boolean Search" %}">
-
-            <form>
-
-                {{ booleanForm.management_form}}
-                {% for form in booleanForm %}
-                    {% if forloop.counter0 == 0 %}
-                        <span style="margin-left: 13.5%">{{ form.start_bracket }}</span>
-                        {{ form.text_field }}
-                        {{ form.end_bracket }}
-                    {% else %}
-                        {% if forloop.counter0 == 1 %}
-                        <div id="copy">
-                        {% endif %}
-                            {{ form.as_p }}
-                        {% if forloop.counter0 == 1 %}
-                        </div>
-                        {% endif %}
-                    {% endif %}
-
-                {% endfor %}
-                <a class="btn btn-default" id="add" href="#">{% trans "Add field" %}</a>
-                <br/><input type="submit" value="{% trans "Validate the query" %}">
-
-
-            </form>
-
-        <p id="res"></p>
-
-        </div>
-
-        {% endcomment %}
-
-{% endblock %}
-{% block extra_javascript %}
-    <script src="{{ STATIC_URL }}jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
-    <script src="{{ STATIC_URL }}tablesorter/jquery.tablesorter.min.js" type="text/javascript"></script>
-    <script src="{{ STATIC_URL }}telemeta/js/advanceSearch.js" type="text/javascript"></script>
-
-    <script>
-        $(function(){
-            $("#results-per-page").selectmenu({
-                icons : {button: "ui-icon-carat-2-n-s"},
-                change : function(){
-                    window.location = '?q={{request.GET.q}}&location={{request.GET.location}}&ethnic_group={{request.GET.ethnic_group}}&instruments={{request.GET.instruments}}&year_published_from={{request.GET.year_published_from}}&year_published_to={{request.GET.year_published_to}}&media_type={{request.GET.media_type}}&viewable={{request.GET.viewable}}&collectors={{request.GET.collectors}}&recorded_from_date={{request.GET.recorded_from_date}}&recorded_to_date={{request.GET.recorded_to_date}}&item_status={{request.GET.item_status}}&recording_context={{request.GET.recording_context}}&physical_format={{request.GET.physical_format}}&code={{ request.GET.code }}&page=1&results_page='+$(this).val();
-                }
-            }).selectmenu("menuWidget").addClass("overflow");
-
-        });
-
-</script>
-{% endblock %}
diff --git a/telemeta/templates/search/confirmation_add_playslist.html b/telemeta/templates/search/confirmation_add_playslist.html
deleted file mode 100644 (file)
index ebadf7e..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-{% extends 'telemeta/base.html' %}
-{% load telemeta_tags %}
-{% load i18n %}
-
-{% block title %}
-{% trans "Playlist Confirmation" %}
-{% endblock %}
-{% block content %}
-    <table class="listing" style="width:100%">
-       <thead>
-        <tr><th>{% trans "Added to playlist : "%}</th>
-
-        </tr>
-       </thead><tbody>
-       {% ifequal type "item" %}
-            {% for item in selected_items_list %}
-                <tr>
-
-                 <td><a href="#">
-                    {{item}}</a></td>
-                </tr>
-            {% endfor %}
-        {% else %}
-            {% for item in selected_items_list %}
-                <tr>
-
-                 <td><a href="#">
-                    {{item.title}}</a></td>
-                </tr>
-            {% endfor %}
-        {% endifequal %}
-        </tbody>
-    </table></br>
-    {% if lastquerypath %}
-    <a style="margin-top:10px" href="{{lastquerypath}}" id="btn" class="btn btn-default">return to search results</a>
-    {% endif %}
-{% endblock %}
\ No newline at end of file
diff --git a/telemeta/templates/search/filters.html b/telemeta/templates/search/filters.html
deleted file mode 100644 (file)
index 1cdd3de..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-{% load telemeta_tags %}
-{% load i18n %}
-
-<div id="accordeon" style="margin-bottom:20px">
-    <div><a href="#">{% trans "Filters" %}</a></div>
-    <div>
-        <table class="table" style="font-size:0.9em">
-                <tr>
-                    {% if facets.fields.item_status %}
-                        <td>{% trans "Item Status" %}</td>
-                        {% for item_status in facets.fields.item_status %}
-                            <td><a href="{{ request.get_full_path }}&amp;selected_facets=item_status_exact:{{ item_status.0|urlencode }}">{% trans item_status.0 %}</a> <span style="background-color:#6a0307" class="badge">{{ item_status.1 }}</span></td>
-                        {% endfor %}
-                        {% if Published_count == 0 %}
-                            <td> {% trans "Published" %} <span class="badge">0</span></td><td></td>
-                        {% endif %}
-                        {% if Unpublished_count == 0 %}
-                            <td> {% trans "Unpublished" %} <span class="badge">0</span></td><td></td>
-                        {% endif %}
-                    {% else %}
-                        <td>{% trans "Item Status" %}</td>
-                        <td>{% trans "None" %}</td>
-                    {% endif %}
-                </tr>
-                <tr>
-                {% if facets.fields.digitized %}
-                    <td>{% trans "Player Status" %}</td>
-                    {% for digitized in facets.fields.digitized %}
-                        {% ifequal digitized.0 'T' %}
-                            <td><a href="{{ request.get_full_path }}&amp;selected_facets=digitized_exact:{{ digitized.0|urlencode }}">Sound</a> <span style="background-color:#6a0307" class="badge">{{ digitized.1 }}</span></td><td></td>
-                        {% endifequal %}
-                    {% endfor %}
-                    {% if digitized_count == 0 %}
-                        <td> {% trans "Sound" %} <span class="badge">0</span></td><td></td>
-                    {% endif %}
-                {% else %}
-                    <td>{% trans "Player Status" %}</td>
-                    <td>{% trans "None" %}</td>
-                {% endif %}
-            </tr>
-            <tr>
-                {% if facets.fields.item_acces %}
-                    <td>{% trans "Access Right" %}</td>
-                    {% if viewable_count != 0 %}
-                        <td><a href="{{ request.get_full_path }}&amp;selected_facets=item_acces_exact:{{ 'viewable'|urlencode }}">viewable</a> <span style="background-color:#6a0307" class="badge">{{viewable_count}}</span></td><td></td>
-                    {% endif %}
-                    {% if viewable_count == 0 %}
-                        <td>{% trans "viewable" %} <span class="badge">{{viewable_count}}</span></td><td></td>
-                    {% endif %}
-                    {% comment %}
-                        {% for item_acces in facets.fields.item_acces %}
-                        {# Faire un booleen dans la vue, le passer en contexte puis verifier si il est a true ou a false pour l'affichage' #}
-                            {% ifequal item_acces.0 'none' %}
-                                <td><a href="{{ request.get_full_path }}&amp;selected_facets=item_acces_exact:{{ item_acces.0|urlencode }}">{{ item_acces.0 }}</a> <span class="badge">{{ item_acces.1 }}</span></td>
-                            {% endifequal %}
-                        {% endfor %}
-                    {%endcomment%}
-                {% else %}
-                    <td>{% trans "Access Right" %}</td>
-                    <td>{% trans "None" %}</td>
-                {% endif %}
-            </tr>
-        </table>
-    </div>
-
-    <div><a href="#">{% trans "Other Filters" %}</a></div>
-    <div>
-        <table class="table" style="font-size:0.9em">
-                    <tr>
-                        {% if facets.fields.media_type %}
-                            <td>{% trans "Media Type" %}</td>
-                            {% for media_type in facets.fields.media_type %}
-                                {% ifequal media_type.0 'Audio'%}
-                                    <td><a href="{{ request.get_full_path }}&amp;selected_facets=media_type_exact:{{ media_type.0|urlencode }}">{{ media_type.0 }}</a> <span style="background-color:#6a0307" class="badge">{{ media_type.1 }}</span></td>
-                                {% endifequal %}
-                                {% ifequal media_type.0 'Video'%}
-                                    <td><a href="{{ request.get_full_path }}&amp;selected_facets=media_type_exact:{{ media_type.0|urlencode }}">{{ media_type.0 }}</a> <span style="background-color:#6a0307" class="badge">{{ media_type.1 }}</span></td>
-                                {% endifequal %}
-                            {% endfor %}
-                            {% if Video_count == 0 %}
-                                <td> {% trans "Video" %} <span class="badge">0</span></td><td></td>
-                            {% endif %}
-                            {% if Audio_count == 0 %}
-                                <td> {% trans "Audio" %} <span class="badge">0</span></td><td></td>
-                            {% endif %}
-                        {% endif %}
-                    </tr>
-                    <tr>
-                    <tr>
-                        {% if facets.fields.recording_context %}
-                            <td>{% trans "Recording Context" %}</td>
-                            {% for recording_context in facets.fields.recording_context %}
-                                {% ifequal recording_context.0 'Studio'%}
-                                    <td><a href="{{ request.get_full_path }}&amp;selected_facets=recording_context_exact:{{ recording_context.0|urlencode }}">{{ recording_context.0 }}</a> <span style="background-color:#6a0307" class="badge">{{ recording_context.1 }}</span></td>
-                                {% endifequal %}
-                                {% ifequal recording_context.0 'Radio'%}
-                                    <td><a href="{{ request.get_full_path }}&amp;selected_facets=recording_context_exact:{{ recording_context.0|urlencode }}">{{ recording_context.0 }}</a> <span style="background-color:#6a0307" class="badge">{{ recording_context.1 }}</span></td>
-                                {% endifequal %}
-                                {% ifequal recording_context.0 'Terrain'%}
-                                    <td><a href="{{ request.get_full_path }}&amp;selected_facets=recording_context_exact:{{ recording_context.0|urlencode }}">{{ recording_context.0 }}</a> <span style="background-color:#6a0307" class="badge">{{ recording_context.1 }}</span></td>
-                                {% endifequal %}
-                            {% endfor %}
-                            {% if Terrain_count == 0 %}
-                                <td> {% trans "Terrain" %} <span class="badge">0</span></td><td></td>
-                            {% endif %}
-                            {% if Radio_count == 0 %}
-                                <td> {% trans "Radio" %} <span class="badge">0</span></td><td></td>
-                            {% endif %}
-                            {% if Studio_count == 0 %}
-                                <td> {% trans "Studio" %} <span class="badge">0</span></td><td></td>
-                            {% endif %}
-                        {% endif %}
-                    </tr>
-                    <tr>
-                        {% if facets.fields.physical_format %}
-                            <td>{% trans "Physical Format" %}</td>
-                            {% for physical_format in facets.fields.physical_format %}
-                                {% ifequal physical_format.0 'CDR'%}
-                                    <td><a href="{{ request.get_full_path }}&amp;selected_facets=physical_format_exact:{{ physical_format.0|urlencode }}">{{ physical_format.0 }}</a> <span style="background-color:#6a0307" class="badge">{{ physical_format.1 }}</span></td>
-                                {% endifequal %}
-                                {% ifequal physical_format.0 'Disque'%}
-                                    <td><a href="{{ request.get_full_path }}&amp;selected_facets=physical_format_exact:{{ physical_format.0|urlencode }}">{{ physical_format.0 }}</a> <span style="background-color:#6a0307" class="badge">{{ physical_format.1 }}</span></td>
-                                {% endifequal %}
-                                {% ifequal physical_format.0 'Cylindre'%}
-                                    <td><a href="{{ request.get_full_path }}&amp;selected_facets=physical_format_exact:{{ physical_format.0|urlencode }}">{{ physical_format.0 }}</a> <span style="background-color:#6a0307" class="badge">{{ physical_format.1 }}</span></td>
-                                {% endifequal %}
-                            {% endfor %}
-                            {% if CDR_count == 0 %}
-                                <td> {% trans "CDR" %} <span class="badge">0</span></td><td></td>
-                            {% endif %}
-                            {% if Disque_count == 0 %}
-                                <td> {% trans "Disque" %} <span class="badge">0</span></td><td></td>
-                            {% endif %}
-                            {% if Cylindre_count == 0 %}
-                                <td> {% trans "Cylindre" %} <span class="badge">0</span></a></td><td></td>
-                            {% endif %}
-                        {% endif %}
-                    </tr>
-                </table>
-    </div>
-
-</div>
-
-{% if selected_facets %}
-     <p> <span class="glyphicon glyphicon-filter"> selected filters :
-         {{selected_facets|join:" + "}}</b></span><a class="pull-right" href="{% url "haystack_search_type" "type" %}?q={{ query }}&amp;page=1">&raquo; Remove All Filters</a></p>
- {% endif %}
-
-
-
-
diff --git a/telemeta/templates/search/indexes/telemeta/instrument_text.txt b/telemeta/templates/search/indexes/telemeta/instrument_text.txt
deleted file mode 100644 (file)
index 038e4c5..0000000
+++ /dev/null
@@ -1 +0,0 @@
-{{ object.name|safe }}
\ No newline at end of file
diff --git a/telemeta/templates/search/indexes/telemeta/instrumentalias_text.txt b/telemeta/templates/search/indexes/telemeta/instrumentalias_text.txt
deleted file mode 100644 (file)
index 038e4c5..0000000
+++ /dev/null
@@ -1 +0,0 @@
-{{ object.name|safe }}
\ No newline at end of file
diff --git a/telemeta/templates/search/indexes/telemeta/location_text.txt b/telemeta/templates/search/indexes/telemeta/location_text.txt
deleted file mode 100644 (file)
index 038e4c5..0000000
+++ /dev/null
@@ -1 +0,0 @@
-{{ object.name|safe }}
\ No newline at end of file
diff --git a/telemeta/templates/search/indexes/telemeta/locationalias_text.txt b/telemeta/templates/search/indexes/telemeta/locationalias_text.txt
deleted file mode 100644 (file)
index d6270a9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-{{ object.alias|safe }}
\ No newline at end of file
diff --git a/telemeta/templates/search/indexes/telemeta/mediacollection_text.txt b/telemeta/templates/search/indexes/telemeta/mediacollection_text.txt
deleted file mode 100644 (file)
index 6e56159..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-{{ object.title }}
-{{ object.alt_title }}
-{{ object.creator }}
-{{ object.recorded_from_year }}
-{{ object.recorded_to_year }}
-{{ object.description }}
-{{ object.collector }}
-{{ object.publisher_id }}
-{{ object.publisher_collection_id }}
-{{ object.publisher_serial }}
-{{ object.booklet_author }}
-{{ object.external_references }}
-{{ object.cnrs_contributor }}
-{{ object.booklet_description }}
-{{ object.alt_copies }}
-{{ object.comment }}
-{{ object.archiver_notes }}
-{{ object.items_done }}
-{{ object.conservation_site }}
-{% for item in object.items.all %}
-{{ item.location }}
-{{ item.location.current_location }}
-{% for anc in item.location.ancestor_relations.all %}
-{{ anc.ancestor_location }}
-{% endfor %}
-{% for alias in item.location.aliases.all %}
-{{ alias }}
-{% endfor %}
-{% endfor %}
-{{ object.code }}
-{{ object.countries }}
-{{ object.ethnic_groups }}
-{{ object.body }}
diff --git a/telemeta/templates/search/indexes/telemeta/mediacorpus_text.txt b/telemeta/templates/search/indexes/telemeta/mediacorpus_text.txt
deleted file mode 100644 (file)
index f6c4306..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{{ object.title }}
-{{ object.descriptions}}
-{{ object.body }}
\ No newline at end of file
diff --git a/telemeta/templates/search/indexes/telemeta/mediafonds_text.txt b/telemeta/templates/search/indexes/telemeta/mediafonds_text.txt
deleted file mode 100644 (file)
index f6c4306..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{{ object.title }}
-{{ object.descriptions}}
-{{ object.body }}
\ No newline at end of file
diff --git a/telemeta/templates/search/indexes/telemeta/mediaitem_text.txt b/telemeta/templates/search/indexes/telemeta/mediaitem_text.txt
deleted file mode 100644 (file)
index 2b2d99b..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-{{ object.title }}
-{{ object.alt_title }}
-{{ object.collector }}
-{{ object.recorded_from_date }}
-{{ object.recorded_to_date }}
-{{ object.code }}
-{{ object.old_code }}
-{{ object.location }}
-{{ object.location.current_location }}
-{% for anc in object.location.ancestor_relations.all %}
-{{ anc.ancestor_location }}
-{% endfor %}
-{% for alias in object.location.aliases.all %}
-{{ alias }}
-{% endfor %}
-{{ object.comment }}
-{{ object.external_references }}
-{{ object.location_comment }}
-{{ object.cultural_area }}
-{{ object.language }}
-{{ object.language_iso_id }}
-{{ object.ethnic_group_id }}
-{{ object.context_comment }}
-{{ object.moda_execut }}
-{{ object.vernacular_style_id }}
-{{ object.generic_style_id }}
-#{{ object.instrument_vernacular_names }}
-{{ object.body }}
\ No newline at end of file
diff --git a/telemeta/templates/search/mediacollection_listhaystack.html b/telemeta/templates/search/mediacollection_listhaystack.html
deleted file mode 100644 (file)
index c8c3704..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-{% load telemeta_tags %}
-{% load i18n %}
-
-{% if page.object_list %}
-
-<table class="listing" id="searchtable">
-<thead>
-<tr>
-    {% if user.is_authenticated %}
-        <th class="highlight"><input id="selectAll" type="checkbox"/> select all </th>
-        <th>{% trans "title" %}</th>
-    {% else %}
-        <th class="highlight">{% trans "title" %}</th>
-    {% endif %}
-    <th>{% trans "Digitized" %}</th>
-    <th>{% field_label "MediaCollection" "creator" %}</th>
-    <th>{% trans "Recordist" %}</th>
-    <th>{% trans "Recording period" %}</th>
-    <th>{% trans "Code" %}</th>
-</tr>
-</thead>
-{% if user.is_authenticated %}
-<tbody>
-    {% for result in page.object_list %}
-    <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-        <td class="highlight"><input type="checkbox" class="check1" name="selected_items_list" value="{{ result.object.id }}"/></td>
-        <td>
-            <a href="{% url "telemeta-collection-detail" result.object.public_id %}">{{ result.object.title }}</a>
-        </td>
-        <td>
-          {% if result.object.has_mediafile %}
-           <center><span class="glyphicon glyphicon-volume-up" style="font-size: 1.3em;"><p style="opacity:0;font-size:0">d</p></span></center>
-          {% endif %}
-        </td>
-
-        <td>{{ result.object.creator }}</td>
-        <td>{{ result.object.collector }}</td>
-        <td>
-        {% if result.object.recorded_from_year %}
-            {{ result.object.recorded_from_year }}
-            {% if result.object.recorded_to_year and not result.object.recorded_to_year|equals:result.object.recorded_from_year %}
-                - {{ result.object.recorded_to_year }}
-            {% endif %}
-        {% endif %}
-        </td>
-        <td>
-            {{ result.object.code|default:result.object.old_code }}
-        </td>
-    </tr>
-    {% endfor %}
-    </tbody>
-{% else %}
-    {% for result in page.object_list %}
-    <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-        <td class="highlight">
-            <a href="{% url "telemeta-collection-detail" result.object.public_id %}">{{ result.object.title }}</a>
-        </td>
-        <td>
-          {% if result.object.has_mediafile %}
-           <center><span class="glyphicon glyphicon-volume-up" style="font-size: 1.3em;"><p style="opacity:0;font-size:0">d</p></span></center>
-          {% endif %}
-        </td>
-
-        <td>{{ result.object.creator }}</td>
-        <td>{{ result.object.apparent_collector }}</td>
-        <td>
-        {% if result.object.recorded_from_year %}
-            {{ result.object.recorded_from_year }}
-            {% if result.object.recorded_to_year and not result.object.recorded_to_year|equals:result.object.recorded_from_year %}
-                - {{ result.object.recorded_to_year }}
-            {% endif %}
-        {% endif %}
-        </td>
-        <td>
-            {{ result.object.code|default:result.object.old_code }}
-        </td>
-    </tr>
-    {% endfor %}
-{% endif %}
-</table>
-{% else %}
-    <p>{% trans "No collection" %}</p>
-{% endif %}
diff --git a/telemeta/templates/search/mediaitem_listhaystack.html b/telemeta/templates/search/mediaitem_listhaystack.html
deleted file mode 100644 (file)
index e7a4fe8..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-{% load telemeta_tags %}
-{% load i18n %}
-
-{% if page.object_list %}
-
-<table class="listing" id="searchtable">
-<thead>
-<tr>
-    {% if user.is_authenticated %}
-        <th class="highlight"><input id="selectAll" type="checkbox"/> select all </th>
-        <th>{% trans "title" %}</th>
-    {% else %}
-        <th class="highlight">{% trans "title" %}</th>
-    {% endif %}
-    <th>{% trans "Digitized" %}</th>
-    <th>{% trans "Recordist" %}</th>
-    {% if location_name %}
-    <th>{% trans "Location" %}</th>
-    {% else %}
-    <th>{% trans "Country/Continent" %}</th>
-    {% endif %}
-    <th>{% trans "Year of recording" %}</th>
-    <th>{% trans "Code" %}</th>
-</tr>
-</thead>
-{% if user.is_authenticated %}
-<tbody>
-    {% for result in page.object_list %}
-    <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-        <td class="highlight"><input type="checkbox" class="check1" name="selected_items_list" value="{{ result.object.id }}"/></td>
-        <td>
-            <a href="{% url "telemeta-item-detail" result.object.public_id %}">{{ result.object }}</a></br>
-        </td>
-        <td align="center">
-            {% if result.object.file %}
-             <a href="{% url "telemeta-item-detail" result.object.public_id %}">
-              <center><span class="glyphicon glyphicon-volume-up" style="font-size: 1.3em;"><p style="opacity:0;font-size:0">d</p></span></center>
-            {% endif %}
-        </td>
-
-        <td>{{ result.object.collector }}</td>
-        <td>{{ result.object.location.name }}</td>
-        <td>
-        {% if result.object.recorded_from_date %}
-            {{ result.object.recorded_from_date.year }}
-            {% if result.object.recorded_to_date and not result.object.recorded_to_date.year|equals:result.object.recorded_from_date.year %}
-                - {{ result.object.recorded_to_date.year }}
-            {% endif %}
-        {% endif %}
-        </td>
-        <td>
-            {{ result.object.code|default:result.object.old_code }}
-        </td>
-    </tr>
-    {% endfor %}
-    </tbody>
-{% else %}
-    {% for result in page.object_list %}
-    <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-        <td class="highlight">
-            <a href="{% url "telemeta-item-detail" result.object.public_id %}">{{ result.object }}</a></br>
-        </td>
-        <td align="center">
-            {% if result.object.file %}
-             <a href="{% url "telemeta-item-detail" result.object.public_id %}">
-              <center><span class="glyphicon glyphicon-volume-up" style="font-size: 1.3em;"><p style="opacity:0;font-size:0">d</p></span></center>
-            {% endif %}
-        </td>
-
-        <td>{{ result.object.collector }}</td>
-        <td>{{ result.object.location.name }}</td>
-        <td>
-        {% if result.object.recorded_from_date %}
-            {{ result.object.recorded_from_date.year }}
-            {% if result.object.recorded_to_date and not result.object.recorded_to_date.year|equals:result.object.recorded_from_date.year %}
-                - {{ result.object.recorded_to_date.year }}
-            {% endif %}
-        {% endif %}
-        </td>
-        <td>
-            {{ result.object.code|default:result.object.old_code }}
-        </td>
-    </tr>
-    {% endfor %}
-{% endif %}
-
-</table>
-{% else %}
-    <p>{% trans "No results found" %}</p>
-{% endif %}
-
-
diff --git a/telemeta/templates/search/mediaresource_listhaystack.html b/telemeta/templates/search/mediaresource_listhaystack.html
deleted file mode 100644 (file)
index ed1ca57..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-{% load telemeta_tags %}
-{% load i18n %}
-
-{% if page.object_list %}
-
-<table class="listing" id="searchtable">
-<thead>
-<tr>
-    {% if user.is_authenticated %}
-        <th class="highlight"><input id="selectAll" type="checkbox"/> select all </th>
-        <th>{% trans "title" %}</th>
-    {% else %}
-        <th class="highlight">{% trans "title" %}</th>
-    {% endif %}
-    <th>{% trans "Digitized" %}</th>
-    <th>{% trans "Description" %}</th>
-    <th>{% trans "Code" %}</th>
-</tr>
-</thead>
-{% if user.is_authenticated %}
-<tbody>
-    {% for result in page.object_list %}
-    <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-        <td class="highlight"><input type="checkbox" class="check1" name="selected_items_list" value="{{ result.object.id }}"/></td>
-        <td>
-            <a href="{% url "telemeta-resource-detail" type result.object.public_id %}">{{ result.object.title }}</a>
-        </td>
-        <td>
-          {% if result.object.has_mediafile %}
-           <center><span class="glyphicon glyphicon-volume-up" style="font-size: 1.3em;"><p style="opacity:0;font-size:0">d</p></span></center>
-          {% endif %}
-        </td>
-
-        <td>{{ result.object.descriptions }}</td>
-        <td>
-            {{ result.object.code }}
-        </td>
-    </tr>
-    {% endfor %}
-    </tbody>
-{% else %}
-    {% for result in page.object_list %}
-    <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-        <td class="highlight"><input type="checkbox" class="check1" name="selected_items_list" value="{{ result.object.id }}"/></td>
-        <td>
-            <a href="{% url "telemeta-resource-detail" type result.object.public_id %}">{{ result.object.title }}</a>
-        </td>
-        <td>
-          {% if result.object.has_mediafile %}
-           <center><span class="glyphicon glyphicon-volume-up" style="font-size: 1.3em;"><p style="opacity:0;font-size:0">d</p></span></center>
-          {% endif %}
-        </td>
-
-        <td>{{ result.object.descriptions }}</td>
-        <td>
-            {{ result.object.code }}
-        </td>
-    </tr>
-    {% endfor %}
-{% endif %}
-</table>
-{% else %}
-    <p>{% trans "No " %}{{ type }} </p>
-{% endif %}
diff --git a/telemeta/templates/search/search.html b/telemeta/templates/search/search.html
deleted file mode 100644 (file)
index f2393d9..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-{% extends 'telemeta/base.html' %}
-{% load telemeta_tags %}
-{% load i18n %}
-{% load bootstrap_pagination %}
-
-{% block title %}
-{% endblock %}
-{% block extra_stylesheets %}
-    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/jquery-ui.css" />
-        <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/lists_sorttable.css" media="print, projection, screen"/>
-{% endblock %}
-{% block content %}
-        {% if query %}
-            <div class='row'>
-                <div class="col-md-3">
-                    <img src="{{ STATIC_URL }}telemeta/images/search_red.png" alt="search-results" style="vertical-align:middle" /> <h1>{% trans "Search Results" %}</h1>
-                </div>
-                <div class="col-md-6" >
-                    <center>{% bootstrap_paginate page range=10 show_first_last="True" %}</center>
-                </div>
-                <div class="col-md-0">&nbsp;</div>
-            </div>
-            <div class="row" style="margin-left:15px">
-                <div class="col-md-4">
-                    {% ifequal type 'collection'%}
-                            <p><b><a href="{% url "haystack_search_type" "item" %}?{{request.GET.urlencode}}">Items ({{item_count}}) </a>| Collections ({{collection_count}}) | <a href="{% url "haystack_search_type" "corpus" %}?{{request.GET.urlencode}}">Corpus ({{corpus_count}})</a> | <a href="{% url "haystack_search_type" "fonds" %}?{{request.GET.urlencode}}">Fonds ({{fonds_count}})</a></b></p>
-                    {% else %}
-                        {% ifequal type 'corpus'%}
-                            <p><b><a href="{% url "haystack_search_type" "item" %}?{{request.GET.urlencode}}">Items ({{item_count}}) </a>| <a href="{% url "haystack_search_type" "collection" %}?{{request.GET.urlencode}}">Collections ({{collection_count}})</a> | Corpus ({{corpus_count}}) | <a href="{% url "haystack_search_type" "fonds" %}?{{request.GET.urlencode}}">Fonds ({{fonds_count}})</a></b></p>
-                        {% else %}
-                            {% ifequal type 'fonds'%}
-                                <p><b><a href="{% url "haystack_search_type" "item" %}?{{request.GET.urlencode}}">Items ({{item_count}}) </a>| <a href="{% url "haystack_search_type" "collection" %}?{{request.GET.urlencode}}">Collections ({{collection_count}})</a> | <a href="{% url "haystack_search_type" "corpus" %}?{{request.GET.urlencode}}">Corpus ({{corpus_count}})</a> | Fonds ({{fonds_count}})</b></p>
-                            {% else %}
-                                {% ifequal type 'item' %}
-                                    <p><b>Items ({{item_count}}) | <a href="{% url "haystack_search_type" "collection" %}?{{request.GET.urlencode}}">Collections ({{collection_count}})</a> | <a href="{% url "haystack_search_type" "corpus" %}?{{request.GET.urlencode}}">Corpus ({{corpus_count}})</a> | <a href="{% url "haystack_search_type" "fonds" %}?{{request.GET.urlencode}}">Fonds ({{fonds_count}})</a></b></p>
-                                {% endifequal %}
-                            {% endifequal %}
-                        {% endifequal %}
-                    {% endifequal %}
-                 </div>
-                 <div class="col-md-4 col-md-offset-4" >
-                    <div class="pull-right"">
-                        <label style="display:inline-block;vertical-align:middle">{% trans "results per page"%}:</label>
-                        <div style="display:inline-block;vertical-align:middle">
-                            <select id="results-per-page" name="results_page">
-                                <option {% ifequal results_page 20 %}selected{% endifequal %} value="20">20</option>
-                                <option {% ifequal results_page 50 %}selected{% endifequal %} value="50">50</option>
-                                <option {% ifequal results_page 100 %}selected{% endifequal %} value="100">100</option>
-                                <option {% ifequal results_page 250 %}selected{% endifequal %} value="250">250</option>
-                                <option {% ifequal results_page 500 %}selected{% endifequal %} value="500">500</option>
-                                <option {% ifequal results_page 1000 %}selected{% endifequal %} value="1000">1000</option>
-                                <option {% ifequal results_page 10000 %}selected{% endifequal %} value="10000">10000</option>
-                            </select>
-                        </div>
-                    </div>
-                 </div>
-             </div>
-             {% include "search/filters.html" %}
-
-            <form method="POST" action="{% url "haystack_playlist" type %} ">{% csrf_token %}
-             {% with object_list as items %}
-                <div class="fullpage" style="display:none">
-                    {% ifequal type 'item' %}
-                        {% include "search/mediaitem_listhaystack.html" %}
-                    {% else %}
-                        {% ifequal type 'collection' %}
-                            {% include "search/mediacollection_listhaystack.html" %}
-                        {% else %}
-                            {% ifequal type 'corpus' %}
-                                {% include "search/mediaresource_listhaystack.html" %}
-                            {% else %}
-                                {% ifequal type 'fonds' %}
-                                    {% include "search/mediaresource_listhaystack.html" %}
-                                {%endifequal%}
-                            {%endifequal%}
-                        {%endifequal%}
-                    {%endifequal%}
-                </div>
-                <noscript>
-                    <div class="fullpage">
-                    {% ifequal type 'item' %}
-                        {% include "search/mediaitem_listhaystack.html" %}
-                    {% else %}
-                        {% ifequal type 'collection' %}
-                            {% include "search/mediacollection_listhaystack.html" %}
-                        {% else %}
-                            {% ifequal type 'corpus' %}
-                                {% include "search/mediaresource_listhaystack.html" %}
-                            {% else %}
-                                {% ifequal type 'fonds' %}
-                                    {% include "search/mediaresource_listhaystack.html" %}
-                                {%endifequal%}
-                            {%endifequal%}
-                        {%endifequal%}
-                    {%endifequal%}
-                    </div>
-                </noscript>
-            {% endwith %}
-
-            {% if user.is_authenticated %}
-                <input type="hidden" name="lastquerypath" value="{{request.get_full_path}}"/>
-                <button style="margin-top:10px" type="submit" id="btn" class="btn btn-default">{% trans "Add to playlist" %}</button>
-            {% endif %}
-            </form>
-        {% else %}
-            <meta http-equiv="REFRESH" content="0;url={% url "haystack_search" %}?q=+">
-        {% endif %}
-    </form>
-{% endblock %}
-{% block extra_javascript %}
-    <script src="{{ STATIC_URL }}jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
-    <script src="{{ STATIC_URL }}telemeta/js/search.js" type="text/javascript"></script>
-        <script src="{{ STATIC_URL }}tablesorter/jquery.tablesorter.min.js" type="text/javascript"></script>
-    <script>
-
-
-            $(function(){
-                $("#results-per-page").selectmenu({
-                icons : {button: "ui-icon-carat-2-n-s"},
-                change : function(){
-                    window.location = '?q={{ query }}&amp;page=1&amp;selected_facets={{selected_facets_url|join:'&selected_facets='}}&results_page='+$(this).val();
-                }
-            }).selectmenu("menuWidget").addClass("overflow");
-
-        });
-    </script>
-{% endblock %}
diff --git a/telemeta/templates/telemeta/inc/tabs.html b/telemeta/templates/telemeta/inc/tabs.html
new file mode 100644 (file)
index 0000000..096414a
--- /dev/null
@@ -0,0 +1,56 @@
+{% load i18n %}
+{% load telemeta_tags %}
+{% load bootstrap3 %}
+
+                        {# spaces between li and a elements breaks layout #}
+
+                        <ul id="nav">
+                            {% if user.is_authenticated %}
+                                <li><a href="{% url "telemeta-desk-lists" %}" class="blue">{% trans "Desk" %}</a></li>
+                            {% else %}
+                                <li><a href="{% url "telemeta-home" %}" class="blue">{% trans "Home" %}</a></li>
+                            {% endif %}
+
+                            <li><a href="#archives#" class="green">{% trans "Archives" %}</a>
+                                <ul>
+                                    <li><a href="{% url "telemeta-resource-list" "fonds" %}">{% trans "Fonds" %}</a></li>
+                                    <li><a href="{% url "telemeta-resource-list" "corpus" %}">{% trans "Corpus" %}</a></li>
+                                    <li><a href="{% url "telemeta-collections" %}">{% trans "Collections" %}</a></li>
+                                    <li><a href="{% url "telemeta-items" %}">{% trans "Items" %}</a></li>
+                                </ul>
+                            </li>
+
+                            <li><a href="{% url "telemeta-geo-continents" %}"
+                                   class="yellow">{% trans "Geo Navigator" %}</a></li>
+
+                            <li><a href="{% url "haystack_advance_search" %}"
+                                   class="orange">{% trans "Advanced search" %}</a></li>
+
+                            {% if user.is_authenticated and user.is_staff %}
+                                <li><a href="#vocabulary#" class="red">{% trans "Terminology" %}</a>
+                                    {% if perms.telemeta.change_physicalformat %}
+                                        <ul>
+                                            <li><a href="{% url "telemeta-admin-enumerations" %}">{% trans "Enumerations" %}</a></li>
+                                            <li><a href="{% url "telemeta-instrument-edit" %}">{% trans "Instruments" %}</a></li>
+                                            <li><a href="{% url "telemeta-instrument-alias-edit" %}">{% trans "Instrument (vernaculare)" %}</a></li>
+                                        </ul>
+                                    {% else %}
+                                        <ul>
+                                            <li><a href="{% url "telemeta-instruments" %}">{% trans "Instruments" %}</a>
+                                            <li><a href="{% url "telemeta-instrument-alias" %}">{% trans "Instruments (vernaculare)" %}</a></li>
+                                            {% for enu in menu %}
+                                                <li>
+                                                    <a href="{% url "telemeta-enumeration" enu.id %}">{{ enu.name |capfirst }}</a>
+                                                </li>
+                                            {% endfor %}
+                                        </ul>
+                                    {% endif %}
+                                </li>
+                            {% endif %}
+
+                            {% if user.is_authenticated and user.is_staff %}
+                                <li><a href="{% url "telemeta-home" %}admin/django/" class="violet">{% trans "Admin" %}</a>
+                                </li>
+                            {% endif %}
+
+                        </ul>
diff --git a/telemeta/templates/telemeta/search/addplaylist.html b/telemeta/templates/telemeta/search/addplaylist.html
new file mode 100644 (file)
index 0000000..f185a9d
--- /dev/null
@@ -0,0 +1,78 @@
+{% extends 'telemeta/base.html' %}
+{% load telemeta_tags %}
+{% load i18n %}
+
+{% block title %}
+{% trans "Add to playlist" %}
+{% endblock %}
+{% block extra_stylesheets %}
+    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/jquery-ui.css" />
+    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/search.css" />
+{% endblock %}
+{% block content %}
+
+    <form method="POST" action="{%url "add_confirmation" type %}">{% csrf_token %}
+    <div class="row">
+        <div class="col-md-4">
+            <table class="listing" style="width:100%">
+           <thead>
+            <tr><th>{% trans "Selected items : "%}</th>
+
+            </tr>
+           </thead><tbody>
+           {% ifequal type "item" %}
+                {% for item in selected_items_list %}
+                    <tr>
+
+                     <td><a href="#">
+                        {{item}}</a></td>
+                    </tr>
+                {% endfor %}
+            {% else %}
+                {% for item in selected_items_list %}
+                    <tr>
+
+                     <td><a href="#">
+                        {{item.title}}</a></td>
+                    </tr>
+                {% endfor %}
+            {% endifequal %}
+            </tbody>
+            </table>
+        </div>
+        <div class="col-md-4 col-md-offset-3">
+              <label for="selection">select your playlist : </label>
+              <select name="playlist_id" style="width:100%;" id="selection">
+                    {% for playlist in existing_playlists %}
+                        <option value="{{playlist.id}}">{{playlist.title}}</option>
+                    {% endfor %}
+              </select>
+        </div>
+      </div>
+      {% for item in selected_items_list %}
+          <input type="hidden" name="item_id" value="{{item.id}}"/>
+      {% endfor %}
+    {% if lastquerypath %}
+      <input type="hidden" name="lastquerypath" value="{{lastquerypath}}"/>
+      {% endif %}
+        <div class="row">
+          {% if lastquerypath %}
+          <div class="col-md-4"><a style="margin-top:10px;width:100%" href="{{lastquerypath}}" id="btn" class="btn btn-default">return to search results</a></div>
+              <div class="col-md-4 col-md-offset-3"><button style="margin-top:10px;width:100%" type="submit" id="btn" class="btn btn-default">{% trans "Add to Playlist" %}</button></div>
+          {% else %}
+              <div class="col-md-4 col-md-offset-7"><button style="margin-top:10px;width:100%" type="submit" id="btn" class="btn btn-default">{% trans "Add to Playlist" %}</button></div>
+
+          {% endif %}
+      </div>
+  </form>
+{% endblock %}
+{% block extra_javascript %}
+    <script src="{{ STATIC_URL }}jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
+    <script>
+        $(document).ready(function() {
+            $("#selection").selectmenu({
+                icons : {button: "ui-icon-carat-2-n-s"}
+            }).selectmenu("menuWidget").addClass("overflow");
+        });
+    </script>
+{% endblock %}
diff --git a/telemeta/templates/telemeta/search/confirmation_add_playslist.html b/telemeta/templates/telemeta/search/confirmation_add_playslist.html
new file mode 100644 (file)
index 0000000..ebadf7e
--- /dev/null
@@ -0,0 +1,37 @@
+{% extends 'telemeta/base.html' %}
+{% load telemeta_tags %}
+{% load i18n %}
+
+{% block title %}
+{% trans "Playlist Confirmation" %}
+{% endblock %}
+{% block content %}
+    <table class="listing" style="width:100%">
+       <thead>
+        <tr><th>{% trans "Added to playlist : "%}</th>
+
+        </tr>
+       </thead><tbody>
+       {% ifequal type "item" %}
+            {% for item in selected_items_list %}
+                <tr>
+
+                 <td><a href="#">
+                    {{item}}</a></td>
+                </tr>
+            {% endfor %}
+        {% else %}
+            {% for item in selected_items_list %}
+                <tr>
+
+                 <td><a href="#">
+                    {{item.title}}</a></td>
+                </tr>
+            {% endfor %}
+        {% endifequal %}
+        </tbody>
+    </table></br>
+    {% if lastquerypath %}
+    <a style="margin-top:10px" href="{{lastquerypath}}" id="btn" class="btn btn-default">return to search results</a>
+    {% endif %}
+{% endblock %}
\ No newline at end of file
diff --git a/telemeta/templates/telemeta/search/filters.html b/telemeta/templates/telemeta/search/filters.html
new file mode 100644 (file)
index 0000000..1cdd3de
--- /dev/null
@@ -0,0 +1,151 @@
+{% load telemeta_tags %}
+{% load i18n %}
+
+<div id="accordeon" style="margin-bottom:20px">
+    <div><a href="#">{% trans "Filters" %}</a></div>
+    <div>
+        <table class="table" style="font-size:0.9em">
+                <tr>
+                    {% if facets.fields.item_status %}
+                        <td>{% trans "Item Status" %}</td>
+                        {% for item_status in facets.fields.item_status %}
+                            <td><a href="{{ request.get_full_path }}&amp;selected_facets=item_status_exact:{{ item_status.0|urlencode }}">{% trans item_status.0 %}</a> <span style="background-color:#6a0307" class="badge">{{ item_status.1 }}</span></td>
+                        {% endfor %}
+                        {% if Published_count == 0 %}
+                            <td> {% trans "Published" %} <span class="badge">0</span></td><td></td>
+                        {% endif %}
+                        {% if Unpublished_count == 0 %}
+                            <td> {% trans "Unpublished" %} <span class="badge">0</span></td><td></td>
+                        {% endif %}
+                    {% else %}
+                        <td>{% trans "Item Status" %}</td>
+                        <td>{% trans "None" %}</td>
+                    {% endif %}
+                </tr>
+                <tr>
+                {% if facets.fields.digitized %}
+                    <td>{% trans "Player Status" %}</td>
+                    {% for digitized in facets.fields.digitized %}
+                        {% ifequal digitized.0 'T' %}
+                            <td><a href="{{ request.get_full_path }}&amp;selected_facets=digitized_exact:{{ digitized.0|urlencode }}">Sound</a> <span style="background-color:#6a0307" class="badge">{{ digitized.1 }}</span></td><td></td>
+                        {% endifequal %}
+                    {% endfor %}
+                    {% if digitized_count == 0 %}
+                        <td> {% trans "Sound" %} <span class="badge">0</span></td><td></td>
+                    {% endif %}
+                {% else %}
+                    <td>{% trans "Player Status" %}</td>
+                    <td>{% trans "None" %}</td>
+                {% endif %}
+            </tr>
+            <tr>
+                {% if facets.fields.item_acces %}
+                    <td>{% trans "Access Right" %}</td>
+                    {% if viewable_count != 0 %}
+                        <td><a href="{{ request.get_full_path }}&amp;selected_facets=item_acces_exact:{{ 'viewable'|urlencode }}">viewable</a> <span style="background-color:#6a0307" class="badge">{{viewable_count}}</span></td><td></td>
+                    {% endif %}
+                    {% if viewable_count == 0 %}
+                        <td>{% trans "viewable" %} <span class="badge">{{viewable_count}}</span></td><td></td>
+                    {% endif %}
+                    {% comment %}
+                        {% for item_acces in facets.fields.item_acces %}
+                        {# Faire un booleen dans la vue, le passer en contexte puis verifier si il est a true ou a false pour l'affichage' #}
+                            {% ifequal item_acces.0 'none' %}
+                                <td><a href="{{ request.get_full_path }}&amp;selected_facets=item_acces_exact:{{ item_acces.0|urlencode }}">{{ item_acces.0 }}</a> <span class="badge">{{ item_acces.1 }}</span></td>
+                            {% endifequal %}
+                        {% endfor %}
+                    {%endcomment%}
+                {% else %}
+                    <td>{% trans "Access Right" %}</td>
+                    <td>{% trans "None" %}</td>
+                {% endif %}
+            </tr>
+        </table>
+    </div>
+
+    <div><a href="#">{% trans "Other Filters" %}</a></div>
+    <div>
+        <table class="table" style="font-size:0.9em">
+                    <tr>
+                        {% if facets.fields.media_type %}
+                            <td>{% trans "Media Type" %}</td>
+                            {% for media_type in facets.fields.media_type %}
+                                {% ifequal media_type.0 'Audio'%}
+                                    <td><a href="{{ request.get_full_path }}&amp;selected_facets=media_type_exact:{{ media_type.0|urlencode }}">{{ media_type.0 }}</a> <span style="background-color:#6a0307" class="badge">{{ media_type.1 }}</span></td>
+                                {% endifequal %}
+                                {% ifequal media_type.0 'Video'%}
+                                    <td><a href="{{ request.get_full_path }}&amp;selected_facets=media_type_exact:{{ media_type.0|urlencode }}">{{ media_type.0 }}</a> <span style="background-color:#6a0307" class="badge">{{ media_type.1 }}</span></td>
+                                {% endifequal %}
+                            {% endfor %}
+                            {% if Video_count == 0 %}
+                                <td> {% trans "Video" %} <span class="badge">0</span></td><td></td>
+                            {% endif %}
+                            {% if Audio_count == 0 %}
+                                <td> {% trans "Audio" %} <span class="badge">0</span></td><td></td>
+                            {% endif %}
+                        {% endif %}
+                    </tr>
+                    <tr>
+                    <tr>
+                        {% if facets.fields.recording_context %}
+                            <td>{% trans "Recording Context" %}</td>
+                            {% for recording_context in facets.fields.recording_context %}
+                                {% ifequal recording_context.0 'Studio'%}
+                                    <td><a href="{{ request.get_full_path }}&amp;selected_facets=recording_context_exact:{{ recording_context.0|urlencode }}">{{ recording_context.0 }}</a> <span style="background-color:#6a0307" class="badge">{{ recording_context.1 }}</span></td>
+                                {% endifequal %}
+                                {% ifequal recording_context.0 'Radio'%}
+                                    <td><a href="{{ request.get_full_path }}&amp;selected_facets=recording_context_exact:{{ recording_context.0|urlencode }}">{{ recording_context.0 }}</a> <span style="background-color:#6a0307" class="badge">{{ recording_context.1 }}</span></td>
+                                {% endifequal %}
+                                {% ifequal recording_context.0 'Terrain'%}
+                                    <td><a href="{{ request.get_full_path }}&amp;selected_facets=recording_context_exact:{{ recording_context.0|urlencode }}">{{ recording_context.0 }}</a> <span style="background-color:#6a0307" class="badge">{{ recording_context.1 }}</span></td>
+                                {% endifequal %}
+                            {% endfor %}
+                            {% if Terrain_count == 0 %}
+                                <td> {% trans "Terrain" %} <span class="badge">0</span></td><td></td>
+                            {% endif %}
+                            {% if Radio_count == 0 %}
+                                <td> {% trans "Radio" %} <span class="badge">0</span></td><td></td>
+                            {% endif %}
+                            {% if Studio_count == 0 %}
+                                <td> {% trans "Studio" %} <span class="badge">0</span></td><td></td>
+                            {% endif %}
+                        {% endif %}
+                    </tr>
+                    <tr>
+                        {% if facets.fields.physical_format %}
+                            <td>{% trans "Physical Format" %}</td>
+                            {% for physical_format in facets.fields.physical_format %}
+                                {% ifequal physical_format.0 'CDR'%}
+                                    <td><a href="{{ request.get_full_path }}&amp;selected_facets=physical_format_exact:{{ physical_format.0|urlencode }}">{{ physical_format.0 }}</a> <span style="background-color:#6a0307" class="badge">{{ physical_format.1 }}</span></td>
+                                {% endifequal %}
+                                {% ifequal physical_format.0 'Disque'%}
+                                    <td><a href="{{ request.get_full_path }}&amp;selected_facets=physical_format_exact:{{ physical_format.0|urlencode }}">{{ physical_format.0 }}</a> <span style="background-color:#6a0307" class="badge">{{ physical_format.1 }}</span></td>
+                                {% endifequal %}
+                                {% ifequal physical_format.0 'Cylindre'%}
+                                    <td><a href="{{ request.get_full_path }}&amp;selected_facets=physical_format_exact:{{ physical_format.0|urlencode }}">{{ physical_format.0 }}</a> <span style="background-color:#6a0307" class="badge">{{ physical_format.1 }}</span></td>
+                                {% endifequal %}
+                            {% endfor %}
+                            {% if CDR_count == 0 %}
+                                <td> {% trans "CDR" %} <span class="badge">0</span></td><td></td>
+                            {% endif %}
+                            {% if Disque_count == 0 %}
+                                <td> {% trans "Disque" %} <span class="badge">0</span></td><td></td>
+                            {% endif %}
+                            {% if Cylindre_count == 0 %}
+                                <td> {% trans "Cylindre" %} <span class="badge">0</span></a></td><td></td>
+                            {% endif %}
+                        {% endif %}
+                    </tr>
+                </table>
+    </div>
+
+</div>
+
+{% if selected_facets %}
+     <p> <span class="glyphicon glyphicon-filter"> selected filters :
+         {{selected_facets|join:" + "}}</b></span><a class="pull-right" href="{% url "haystack_search_type" "type" %}?q={{ query }}&amp;page=1">&raquo; Remove All Filters</a></p>
+ {% endif %}
+
+
+
+
diff --git a/telemeta/templates/telemeta/search/indexes/telemeta/instrument_text.txt b/telemeta/templates/telemeta/search/indexes/telemeta/instrument_text.txt
new file mode 100644 (file)
index 0000000..038e4c5
--- /dev/null
@@ -0,0 +1 @@
+{{ object.name|safe }}
\ No newline at end of file
diff --git a/telemeta/templates/telemeta/search/indexes/telemeta/instrumentalias_text.txt b/telemeta/templates/telemeta/search/indexes/telemeta/instrumentalias_text.txt
new file mode 100644 (file)
index 0000000..038e4c5
--- /dev/null
@@ -0,0 +1 @@
+{{ object.name|safe }}
\ No newline at end of file
diff --git a/telemeta/templates/telemeta/search/indexes/telemeta/location_text.txt b/telemeta/templates/telemeta/search/indexes/telemeta/location_text.txt
new file mode 100644 (file)
index 0000000..038e4c5
--- /dev/null
@@ -0,0 +1 @@
+{{ object.name|safe }}
\ No newline at end of file
diff --git a/telemeta/templates/telemeta/search/indexes/telemeta/locationalias_text.txt b/telemeta/templates/telemeta/search/indexes/telemeta/locationalias_text.txt
new file mode 100644 (file)
index 0000000..d6270a9
--- /dev/null
@@ -0,0 +1 @@
+{{ object.alias|safe }}
\ No newline at end of file
diff --git a/telemeta/templates/telemeta/search/indexes/telemeta/mediacollection_text.txt b/telemeta/templates/telemeta/search/indexes/telemeta/mediacollection_text.txt
new file mode 100644 (file)
index 0000000..6e56159
--- /dev/null
@@ -0,0 +1,33 @@
+{{ object.title }}
+{{ object.alt_title }}
+{{ object.creator }}
+{{ object.recorded_from_year }}
+{{ object.recorded_to_year }}
+{{ object.description }}
+{{ object.collector }}
+{{ object.publisher_id }}
+{{ object.publisher_collection_id }}
+{{ object.publisher_serial }}
+{{ object.booklet_author }}
+{{ object.external_references }}
+{{ object.cnrs_contributor }}
+{{ object.booklet_description }}
+{{ object.alt_copies }}
+{{ object.comment }}
+{{ object.archiver_notes }}
+{{ object.items_done }}
+{{ object.conservation_site }}
+{% for item in object.items.all %}
+{{ item.location }}
+{{ item.location.current_location }}
+{% for anc in item.location.ancestor_relations.all %}
+{{ anc.ancestor_location }}
+{% endfor %}
+{% for alias in item.location.aliases.all %}
+{{ alias }}
+{% endfor %}
+{% endfor %}
+{{ object.code }}
+{{ object.countries }}
+{{ object.ethnic_groups }}
+{{ object.body }}
diff --git a/telemeta/templates/telemeta/search/indexes/telemeta/mediacorpus_text.txt b/telemeta/templates/telemeta/search/indexes/telemeta/mediacorpus_text.txt
new file mode 100644 (file)
index 0000000..f6c4306
--- /dev/null
@@ -0,0 +1,3 @@
+{{ object.title }}
+{{ object.descriptions}}
+{{ object.body }}
\ No newline at end of file
diff --git a/telemeta/templates/telemeta/search/indexes/telemeta/mediafonds_text.txt b/telemeta/templates/telemeta/search/indexes/telemeta/mediafonds_text.txt
new file mode 100644 (file)
index 0000000..f6c4306
--- /dev/null
@@ -0,0 +1,3 @@
+{{ object.title }}
+{{ object.descriptions}}
+{{ object.body }}
\ No newline at end of file
diff --git a/telemeta/templates/telemeta/search/indexes/telemeta/mediaitem_text.txt b/telemeta/templates/telemeta/search/indexes/telemeta/mediaitem_text.txt
new file mode 100644 (file)
index 0000000..2b2d99b
--- /dev/null
@@ -0,0 +1,28 @@
+{{ object.title }}
+{{ object.alt_title }}
+{{ object.collector }}
+{{ object.recorded_from_date }}
+{{ object.recorded_to_date }}
+{{ object.code }}
+{{ object.old_code }}
+{{ object.location }}
+{{ object.location.current_location }}
+{% for anc in object.location.ancestor_relations.all %}
+{{ anc.ancestor_location }}
+{% endfor %}
+{% for alias in object.location.aliases.all %}
+{{ alias }}
+{% endfor %}
+{{ object.comment }}
+{{ object.external_references }}
+{{ object.location_comment }}
+{{ object.cultural_area }}
+{{ object.language }}
+{{ object.language_iso_id }}
+{{ object.ethnic_group_id }}
+{{ object.context_comment }}
+{{ object.moda_execut }}
+{{ object.vernacular_style_id }}
+{{ object.generic_style_id }}
+#{{ object.instrument_vernacular_names }}
+{{ object.body }}
\ No newline at end of file
diff --git a/telemeta/templates/telemeta/search/mediacollection_listhaystack.html b/telemeta/templates/telemeta/search/mediacollection_listhaystack.html
new file mode 100644 (file)
index 0000000..c8c3704
--- /dev/null
@@ -0,0 +1,83 @@
+{% load telemeta_tags %}
+{% load i18n %}
+
+{% if page.object_list %}
+
+<table class="listing" id="searchtable">
+<thead>
+<tr>
+    {% if user.is_authenticated %}
+        <th class="highlight"><input id="selectAll" type="checkbox"/> select all </th>
+        <th>{% trans "title" %}</th>
+    {% else %}
+        <th class="highlight">{% trans "title" %}</th>
+    {% endif %}
+    <th>{% trans "Digitized" %}</th>
+    <th>{% field_label "MediaCollection" "creator" %}</th>
+    <th>{% trans "Recordist" %}</th>
+    <th>{% trans "Recording period" %}</th>
+    <th>{% trans "Code" %}</th>
+</tr>
+</thead>
+{% if user.is_authenticated %}
+<tbody>
+    {% for result in page.object_list %}
+    <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
+        <td class="highlight"><input type="checkbox" class="check1" name="selected_items_list" value="{{ result.object.id }}"/></td>
+        <td>
+            <a href="{% url "telemeta-collection-detail" result.object.public_id %}">{{ result.object.title }}</a>
+        </td>
+        <td>
+          {% if result.object.has_mediafile %}
+           <center><span class="glyphicon glyphicon-volume-up" style="font-size: 1.3em;"><p style="opacity:0;font-size:0">d</p></span></center>
+          {% endif %}
+        </td>
+
+        <td>{{ result.object.creator }}</td>
+        <td>{{ result.object.collector }}</td>
+        <td>
+        {% if result.object.recorded_from_year %}
+            {{ result.object.recorded_from_year }}
+            {% if result.object.recorded_to_year and not result.object.recorded_to_year|equals:result.object.recorded_from_year %}
+                - {{ result.object.recorded_to_year }}
+            {% endif %}
+        {% endif %}
+        </td>
+        <td>
+            {{ result.object.code|default:result.object.old_code }}
+        </td>
+    </tr>
+    {% endfor %}
+    </tbody>
+{% else %}
+    {% for result in page.object_list %}
+    <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
+        <td class="highlight">
+            <a href="{% url "telemeta-collection-detail" result.object.public_id %}">{{ result.object.title }}</a>
+        </td>
+        <td>
+          {% if result.object.has_mediafile %}
+           <center><span class="glyphicon glyphicon-volume-up" style="font-size: 1.3em;"><p style="opacity:0;font-size:0">d</p></span></center>
+          {% endif %}
+        </td>
+
+        <td>{{ result.object.creator }}</td>
+        <td>{{ result.object.apparent_collector }}</td>
+        <td>
+        {% if result.object.recorded_from_year %}
+            {{ result.object.recorded_from_year }}
+            {% if result.object.recorded_to_year and not result.object.recorded_to_year|equals:result.object.recorded_from_year %}
+                - {{ result.object.recorded_to_year }}
+            {% endif %}
+        {% endif %}
+        </td>
+        <td>
+            {{ result.object.code|default:result.object.old_code }}
+        </td>
+    </tr>
+    {% endfor %}
+{% endif %}
+</table>
+{% else %}
+    <p>{% trans "No collection" %}</p>
+{% endif %}
diff --git a/telemeta/templates/telemeta/search/mediaitem_listhaystack.html b/telemeta/templates/telemeta/search/mediaitem_listhaystack.html
new file mode 100644 (file)
index 0000000..e7a4fe8
--- /dev/null
@@ -0,0 +1,92 @@
+{% load telemeta_tags %}
+{% load i18n %}
+
+{% if page.object_list %}
+
+<table class="listing" id="searchtable">
+<thead>
+<tr>
+    {% if user.is_authenticated %}
+        <th class="highlight"><input id="selectAll" type="checkbox"/> select all </th>
+        <th>{% trans "title" %}</th>
+    {% else %}
+        <th class="highlight">{% trans "title" %}</th>
+    {% endif %}
+    <th>{% trans "Digitized" %}</th>
+    <th>{% trans "Recordist" %}</th>
+    {% if location_name %}
+    <th>{% trans "Location" %}</th>
+    {% else %}
+    <th>{% trans "Country/Continent" %}</th>
+    {% endif %}
+    <th>{% trans "Year of recording" %}</th>
+    <th>{% trans "Code" %}</th>
+</tr>
+</thead>
+{% if user.is_authenticated %}
+<tbody>
+    {% for result in page.object_list %}
+    <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
+        <td class="highlight"><input type="checkbox" class="check1" name="selected_items_list" value="{{ result.object.id }}"/></td>
+        <td>
+            <a href="{% url "telemeta-item-detail" result.object.public_id %}">{{ result.object }}</a></br>
+        </td>
+        <td align="center">
+            {% if result.object.file %}
+             <a href="{% url "telemeta-item-detail" result.object.public_id %}">
+              <center><span class="glyphicon glyphicon-volume-up" style="font-size: 1.3em;"><p style="opacity:0;font-size:0">d</p></span></center>
+            {% endif %}
+        </td>
+
+        <td>{{ result.object.collector }}</td>
+        <td>{{ result.object.location.name }}</td>
+        <td>
+        {% if result.object.recorded_from_date %}
+            {{ result.object.recorded_from_date.year }}
+            {% if result.object.recorded_to_date and not result.object.recorded_to_date.year|equals:result.object.recorded_from_date.year %}
+                - {{ result.object.recorded_to_date.year }}
+            {% endif %}
+        {% endif %}
+        </td>
+        <td>
+            {{ result.object.code|default:result.object.old_code }}
+        </td>
+    </tr>
+    {% endfor %}
+    </tbody>
+{% else %}
+    {% for result in page.object_list %}
+    <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
+        <td class="highlight">
+            <a href="{% url "telemeta-item-detail" result.object.public_id %}">{{ result.object }}</a></br>
+        </td>
+        <td align="center">
+            {% if result.object.file %}
+             <a href="{% url "telemeta-item-detail" result.object.public_id %}">
+              <center><span class="glyphicon glyphicon-volume-up" style="font-size: 1.3em;"><p style="opacity:0;font-size:0">d</p></span></center>
+            {% endif %}
+        </td>
+
+        <td>{{ result.object.collector }}</td>
+        <td>{{ result.object.location.name }}</td>
+        <td>
+        {% if result.object.recorded_from_date %}
+            {{ result.object.recorded_from_date.year }}
+            {% if result.object.recorded_to_date and not result.object.recorded_to_date.year|equals:result.object.recorded_from_date.year %}
+                - {{ result.object.recorded_to_date.year }}
+            {% endif %}
+        {% endif %}
+        </td>
+        <td>
+            {{ result.object.code|default:result.object.old_code }}
+        </td>
+    </tr>
+    {% endfor %}
+{% endif %}
+
+</table>
+{% else %}
+    <p>{% trans "No results found" %}</p>
+{% endif %}
+
+
diff --git a/telemeta/templates/telemeta/search/mediaresource_listhaystack.html b/telemeta/templates/telemeta/search/mediaresource_listhaystack.html
new file mode 100644 (file)
index 0000000..ed1ca57
--- /dev/null
@@ -0,0 +1,64 @@
+{% load telemeta_tags %}
+{% load i18n %}
+
+{% if page.object_list %}
+
+<table class="listing" id="searchtable">
+<thead>
+<tr>
+    {% if user.is_authenticated %}
+        <th class="highlight"><input id="selectAll" type="checkbox"/> select all </th>
+        <th>{% trans "title" %}</th>
+    {% else %}
+        <th class="highlight">{% trans "title" %}</th>
+    {% endif %}
+    <th>{% trans "Digitized" %}</th>
+    <th>{% trans "Description" %}</th>
+    <th>{% trans "Code" %}</th>
+</tr>
+</thead>
+{% if user.is_authenticated %}
+<tbody>
+    {% for result in page.object_list %}
+    <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
+        <td class="highlight"><input type="checkbox" class="check1" name="selected_items_list" value="{{ result.object.id }}"/></td>
+        <td>
+            <a href="{% url "telemeta-resource-detail" type result.object.public_id %}">{{ result.object.title }}</a>
+        </td>
+        <td>
+          {% if result.object.has_mediafile %}
+           <center><span class="glyphicon glyphicon-volume-up" style="font-size: 1.3em;"><p style="opacity:0;font-size:0">d</p></span></center>
+          {% endif %}
+        </td>
+
+        <td>{{ result.object.descriptions }}</td>
+        <td>
+            {{ result.object.code }}
+        </td>
+    </tr>
+    {% endfor %}
+    </tbody>
+{% else %}
+    {% for result in page.object_list %}
+    <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
+        <td class="highlight"><input type="checkbox" class="check1" name="selected_items_list" value="{{ result.object.id }}"/></td>
+        <td>
+            <a href="{% url "telemeta-resource-detail" type result.object.public_id %}">{{ result.object.title }}</a>
+        </td>
+        <td>
+          {% if result.object.has_mediafile %}
+           <center><span class="glyphicon glyphicon-volume-up" style="font-size: 1.3em;"><p style="opacity:0;font-size:0">d</p></span></center>
+          {% endif %}
+        </td>
+
+        <td>{{ result.object.descriptions }}</td>
+        <td>
+            {{ result.object.code }}
+        </td>
+    </tr>
+    {% endfor %}
+{% endif %}
+</table>
+{% else %}
+    <p>{% trans "No " %}{{ type }} </p>
+{% endif %}
diff --git a/telemeta/templates/telemeta/search/search.html b/telemeta/templates/telemeta/search/search.html
new file mode 100644 (file)
index 0000000..a55c0a9
--- /dev/null
@@ -0,0 +1,127 @@
+{% extends 'telemeta/base.html' %}
+{% load telemeta_tags %}
+{% load i18n %}
+{% load bootstrap_pagination %}
+
+{% block title %}
+{% endblock %}
+{% block extra_stylesheets %}
+    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/jquery-ui.css" />
+        <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/lists_sorttable.css" media="print, projection, screen"/>
+{% endblock %}
+{% block content %}
+        {% if query %}
+            <div class='row'>
+                <div class="col-md-3">
+                    <img src="{{ STATIC_URL }}telemeta/images/search_red.png" alt="search-results" style="vertical-align:middle" /> <h1>{% trans "Search Results" %}</h1>
+                </div>
+                <div class="col-md-6" >
+                    <center>{% bootstrap_paginate page range=10 show_first_last="True" %}</center>
+                </div>
+                <div class="col-md-0">&nbsp;</div>
+            </div>
+            <div class="row" style="margin-left:15px">
+                <div class="col-md-4">
+                    {% ifequal type 'collection'%}
+                            <p><b><a href="{% url "haystack_search_type" "item" %}?{{request.GET.urlencode}}">Items ({{item_count}}) </a>| Collections ({{collection_count}}) | <a href="{% url "haystack_search_type" "corpus" %}?{{request.GET.urlencode}}">Corpus ({{corpus_count}})</a> | <a href="{% url "haystack_search_type" "fonds" %}?{{request.GET.urlencode}}">Fonds ({{fonds_count}})</a></b></p>
+                    {% else %}
+                        {% ifequal type 'corpus'%}
+                            <p><b><a href="{% url "haystack_search_type" "item" %}?{{request.GET.urlencode}}">Items ({{item_count}}) </a>| <a href="{% url "haystack_search_type" "collection" %}?{{request.GET.urlencode}}">Collections ({{collection_count}})</a> | Corpus ({{corpus_count}}) | <a href="{% url "haystack_search_type" "fonds" %}?{{request.GET.urlencode}}">Fonds ({{fonds_count}})</a></b></p>
+                        {% else %}
+                            {% ifequal type 'fonds'%}
+                                <p><b><a href="{% url "haystack_search_type" "item" %}?{{request.GET.urlencode}}">Items ({{item_count}}) </a>| <a href="{% url "haystack_search_type" "collection" %}?{{request.GET.urlencode}}">Collections ({{collection_count}})</a> | <a href="{% url "haystack_search_type" "corpus" %}?{{request.GET.urlencode}}">Corpus ({{corpus_count}})</a> | Fonds ({{fonds_count}})</b></p>
+                            {% else %}
+                                {% ifequal type 'item' %}
+                                    <p><b>Items ({{item_count}}) | <a href="{% url "haystack_search_type" "collection" %}?{{request.GET.urlencode}}">Collections ({{collection_count}})</a> | <a href="{% url "haystack_search_type" "corpus" %}?{{request.GET.urlencode}}">Corpus ({{corpus_count}})</a> | <a href="{% url "haystack_search_type" "fonds" %}?{{request.GET.urlencode}}">Fonds ({{fonds_count}})</a></b></p>
+                                {% endifequal %}
+                            {% endifequal %}
+                        {% endifequal %}
+                    {% endifequal %}
+                 </div>
+                 <div class="col-md-4 col-md-offset-4" >
+                    <div class="pull-right">
+                        <label style="display:inline-block;vertical-align:middle">{% trans "results per page"%}:</label>
+                        <div style="display:inline-block;vertical-align:middle">
+                            <select id="results-per-page" name="results_page">
+                                <option {% ifequal results_page 20 %}selected{% endifequal %} value="20">20</option>
+                                <option {% ifequal results_page 50 %}selected{% endifequal %} value="50">50</option>
+                                <option {% ifequal results_page 100 %}selected{% endifequal %} value="100">100</option>
+                                <option {% ifequal results_page 250 %}selected{% endifequal %} value="250">250</option>
+                                <option {% ifequal results_page 500 %}selected{% endifequal %} value="500">500</option>
+                                <option {% ifequal results_page 1000 %}selected{% endifequal %} value="1000">1000</option>
+                                <option {% ifequal results_page 10000 %}selected{% endifequal %} value="10000">10000</option>
+                            </select>
+                        </div>
+                    </div>
+                 </div>
+             </div>
+             {% include "telemeta/search/filters.html" %}
+
+            <form method="POST" action="{% url "haystack_playlist" type %} ">{% csrf_token %}
+             {% with object_list as items %}
+                <div class="fullpage" style="display:none">
+                    {% ifequal type 'item' %}
+                        {% include "telemeta/search/mediaitem_listhaystack.html" %}
+                    {% else %}
+                        {% ifequal type 'collection' %}
+                            {% include "telemeta/search/mediacollection_listhaystack.html" %}
+                        {% else %}
+                            {% ifequal type 'corpus' %}
+                                {% include "telemeta/search/mediaresource_listhaystack.html" %}
+                            {% else %}
+                                {% ifequal type 'fonds' %}
+                                    {% include "telemeta/search/mediaresource_listhaystack.html" %}
+                                {%endifequal%}
+                            {%endifequal%}
+                        {%endifequal%}
+                    {%endifequal%}
+                </div>
+                <noscript>
+                    <div class="fullpage">
+                    {% ifequal type 'item' %}
+                        {% include "telemeta/search/mediaitem_listhaystack.html" %}
+                    {% else %}
+                        {% ifequal type 'collection' %}
+                            {% include "telemeta/search/mediacollection_listhaystack.html" %}
+                        {% else %}
+                            {% ifequal type 'corpus' %}
+                                {% include "telemeta/search/mediaresource_listhaystack.html" %}
+                            {% else %}
+                                {% ifequal type 'fonds' %}
+                                    {% include "telemeta/search/mediaresource_listhaystack.html" %}
+                                {%endifequal%}
+                            {%endifequal%}
+                        {%endifequal%}
+                    {%endifequal%}
+                    </div>
+                </noscript>
+            {% endwith %}
+
+            {% if user.is_authenticated %}
+                <input type="hidden" name="lastquerypath" value="{{request.get_full_path}}"/>
+                <button style="margin-top:10px" type="submit" id="btn" class="btn btn-default">{% trans "Add to playlist" %}</button>
+            {% endif %}
+            </form>
+        {% else %}
+            <meta http-equiv="REFRESH" content="0;url={% url "haystack_search" %}?q=+">
+        {% endif %}
+    </form>
+{% endblock %}
+{% block extra_javascript %}
+    <script src="{{ STATIC_URL }}jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
+    <script src="{{ STATIC_URL }}telemeta/js/search.js" type="text/javascript"></script>
+        <script src="{{ STATIC_URL }}tablesorter/jquery.tablesorter.min.js" type="text/javascript"></script>
+    <script>
+
+
+            $(function(){
+                $("#results-per-page").selectmenu({
+                icons : {button: "ui-icon-carat-2-n-s"},
+                change : function(){
+                    window.location = '?q={{ query }}&amp;page=1&amp;selected_facets={{selected_facets_url|join:'&selected_facets='}}&results_page='+$(this).val();
+                }
+            }).selectmenu("menuWidget").addClass("overflow");
+
+        });
+    </script>
+{% endblock %}
diff --git a/telemeta/templates/telemeta/search/search_advanced.html b/telemeta/templates/telemeta/search/search_advanced.html
new file mode 100644 (file)
index 0000000..01bf47f
--- /dev/null
@@ -0,0 +1,291 @@
+{% extends 'telemeta/base.html' %}
+{% load telemeta_tags %}
+{% load i18n %}
+{% load bootstrap_pagination %}
+
+{% block title %}
+{% trans "Search" %}
+{% endblock %}
+
+{% block extra_stylesheets %}
+    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/jquery-ui.css" />
+    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/search.css" />
+    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/lists_sorttable.css" media="print, projection, screen"/>
+{% endblock %}
+
+{% block extra_javascript %}
+    <script src="{{ STATIC_URL }}jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
+    <script src="{{ STATIC_URL }}tablesorter/jquery.tablesorter.min.js" type="text/javascript"></script>
+    <script src="{{ STATIC_URL }}telemeta/js/advanceSearch.js" type="text/javascript"></script>
+    <script>
+        $(function(){
+            $("#results-per-page").selectmenu({
+                icons : {button: "ui-icon-carat-2-n-s"},
+                change : function(){
+                    window.location = '?q={{request.GET.q}}&location={{request.GET.location}}&ethnic_group={{request.GET.ethnic_group}}&instruments={{request.GET.instruments}}&year_published_from={{request.GET.year_published_from}}&year_published_to={{request.GET.year_published_to}}&media_type={{request.GET.media_type}}&viewable={{request.GET.viewable}}&collectors={{request.GET.collectors}}&recorded_from_date={{request.GET.recorded_from_date}}&recorded_to_date={{request.GET.recorded_to_date}}&item_status={{request.GET.item_status}}&recording_context={{request.GET.recording_context}}&physical_format={{request.GET.physical_format}}&code={{ request.GET.code }}&page=1&results_page='+$(this).val();
+                }
+            }).selectmenu("menuWidget").addClass("overflow");
+
+        });
+    </script>
+{% endblock %}
+
+{% block content %}
+    <form method="get" action=".">
+        <div class="row">
+            <div class="col-md-5" id="left-form">
+                <div class="fieldWrapper">
+                    {{form.q.errors}}
+                    {{ form.q.label_tag }}</br>
+                    {{form.q}}
+                </div>
+                <div class="fieldWrapper">
+                    {{form.collectors.errors}}
+                    {% trans form.collectors.label_tag %}</br>
+                    {{form.collectors}}
+                </div>
+                <div class="fieldWrapper">
+                    {{form.location.errors}}
+                    {% trans form.location.label_tag %}</br>
+                    {{form.location}}
+                </div>
+                <div class="fieldWrapper">
+                    {{form.ethnic_group.errors}}
+                    {% trans form.ethnic_group.label_tag %}</br>
+                    {{form.ethnic_group}}
+                </div>
+                <div class="fieldWrapper">
+                    {{form.instruments.errors}}
+                    {% trans form.instruments.label_tag %}
+                    {{form.instruments}}
+                    {% comment %}<a href="#" id="btn" class="col-md-5 btn btn-default" style="width: 100%; margin-top: 1%">{% trans "Instruments : Boolean Search" %}</a>{% endcomment %}
+                </div>
+
+                <div class="fieldWrapper">
+                    {{form.media_type.errors}}
+                    <label>{% trans "media type" %} :</label></br>
+                    <ul id="id_media_type" style="margin-left:-40px">
+                        {%ifequal query.media_type 'audio'%}
+                            <li><label for="id_media_type_0">{% trans "no preference" %}</label><input id="id_media_type_0" type="radio" value="1" name="media_type"></input></li>
+                            <li><label for="id_media_type_1">{% trans "audio" %}</label><input id="id_media_type_1" type="radio" value="audio" name="media_type" checked="checked"></input></li>
+                            <li><label for="id_media_type_2">{% trans "video" %}</label><input id="id_media_type_2" type="radio" value="video" name="media_type"></input></li>
+                        {%else%}
+                            {%ifequal query.media_type 'video'%}
+                                <li><label for="id_media_type_0">{% trans "no preference" %}</label><input id="id_media_type_0" type="radio" value="1" name="media_type"></input></li>
+                                <li><label for="id_media_type_1">{% trans "audio" %}</label><input id="id_media_type_1" type="radio" value="audio" name="media_type"></input></li>
+                                <li><label for="id_media_type_2">{% trans "video" %}</label><input id="id_media_type_2" type="radio" value="video" name="media_type" checked="checked"></input></li>
+                            {%else%}
+                                <li><label for="id_media_type_0">{% trans "no preference" %}</label><input id="id_media_type_0" type="radio" value="1" name="media_type" checked="checked"></input></li>
+                                <li><label for="id_media_type_1">{% trans "audio" %}</label><input id="id_media_type_1" type="radio" value="audio" name="media_type"></input></li>
+                                <li><label for="id_media_type_2">{% trans "video" %}</label><input id="id_media_type_2" type="radio" value="video" name="media_type"></input></li>
+                            {%endifequal%}
+                        {%endifequal%}
+                    </ul>
+
+                </div>
+                <div class="fieldWrapper">
+                    {{form.viewable_errors}}
+                    <label>{% trans "Available for consultation media" %} : </label></br>
+                    <ul id="id_viewable" style="margin-left:-40px">
+                        {%ifequal query.viewable '2'%}
+                            <li><label for="id_viewable_0">{% trans "no preference" %}</label><input id="id_viewable_0" type="radio" value="1" name="viewable"></input></li>
+                            <li><label for="id_viewable_1">{% trans "online and public" %}</label><input id="id_viewable_1" type="radio" value="2" name="viewable" checked="checked"></input></li>
+                            <li><label for="id_viewable_2">{% trans "online (account required)" %}</label><input id="id_viewable_2" type="radio" value="3" name="viewable"></input></li>
+                        {%else%}
+                            {%ifequal query.viewable '3'%}
+                                <li><label for="id_viewable_0">{% trans "no preference" %}</label><input id="id_viewable_0" type="radio" value="1" name="viewable"></input></li>
+                                <li><label for="id_viewable_1">{% trans "online and public" %}</label><input id="id_viewable_1" type="radio" value="2" name="viewable"></input></li>
+                                <li><label for="id_viewable_2">{% trans "online (account required)" %}</label><input id="id_viewable_2" type="radio" value="3" name="viewable" checked="checked"></input></li>
+                            {%else%}
+                                <li><label for="id_viewable_0">{% trans "no preference" %}</label><input id="id_viewable_0" type="radio" value="1" name="viewable" checked="checked"></input></li>
+                                <li><label for="id_viewable_1">{% trans "online and public" %}</label><input id="id_viewable_1" type="radio" value="2" name="viewable"></input></li>
+                                <li><label for="id_viewable_2">{% trans "online (account required)" %} </label><input id="id_viewable_2" type="radio" value="3" name="viewable"></input></li>
+                            {%endifequal%}
+                        {%endifequal%}
+                    </ul>
+                </div>
+            </div>
+            <div class="col-md-5" id="right-form" style="margin-left:13%">
+                <div class="fieldWrapper">
+                    {{form.recorded_from_date.errors}} {{form.recorded_to_date.errors}}
+                    <label>{% trans "Recording date" %}:</label></br>
+                    {{form.recorded_from_date}} <span style="font-size:3em" aria-hidden="true">-</span> {{form.recorded_to_date}}
+                </div>
+                <div class="fieldWrapper">
+                    {{form.item_status_errors}}
+                    <label>{% trans "Document status" %} : </label></br>
+                    <ul id="id_item_status" style="margin-left:-40px">
+                        {%ifequal query.item_status 'pub'%}
+                            <li><label for="id_item_status_0">{% trans "no preference" %}</label><input id="id_item_status_0" type="radio" value="1" name="item_status"></input></li>
+                            <li><label for="id_item_status_1">{% trans "Published" %}</label><input id="id_item_status_1" type="radio" value="pub" name="item_status" checked="checked"></input></li>
+                            <li><label for="id_item_status_2">{% trans "Unpublished" %}</label><input id="id_item_status_2" type="radio" value="unpub" name="item_status"></input></li>
+                        {%else%}
+                            {%ifequal query.item_status 'unpub'%}
+                                <li><label for="id_item_status_0">{% trans "no preference" %}</label><input id="id_item_status_0" type="radio" value="1" name="item_status"></input></li>
+                                <li><label for="id_item_status_1">{% trans "Published" %}</label><input id="id_item_status_1" type="radio" value="pub" name="item_status"></input></li>
+                                <li><label for="id_item_status_2">{% trans "Unpublished" %}</label><input id="id_item_status_2" type="radio" value="unpub" name="item_status" checked="checked"></input></li>
+                            {%else%}
+                                <li><label for="id_item_status_0">{% trans "no preference" %}</label><input id="id_item_status_0" type="radio" value="1" name="item_status" checked="checked"></input></li>
+                                <li><label for="id_item_status_1">{% trans "Published" %}</label><input id="id_item_status_1" type="radio" value="pub" name="item_status"></input></li>
+                                <li><label for="id_item_status_2">{% trans "Unpublished" %}</label><input id="id_item_status_2" type="radio" value="unpub" name="item_status"></input></li>
+                            {%endifequal%}
+                        {%endifequal%}
+                    </ul>
+                </div>
+                <div class="fieldWrapper">
+                    {{form.year_published_from.errors}} {{form.year_published_to.errors}}
+                    <label> {% trans "year published" %} :</label></br>
+                    {{form.year_published_from}} <span style="font-size:3em" aria-hidden="true">-</span> {{form.year_published_to}}
+                </div>
+                <div class="fieldWrapper">
+                    {{form.recording_context.errors}}
+                    {{ form.recording_context.label_tag }}</br>
+                    {{form.recording_context}}
+                </div>
+                <div class="fieldWrapper">
+                    {{form.physical_format.errors}}
+                    {% trans form.physical_format.label_tag %}</br>
+                    {{form.physical_format}}
+                </div>
+                <div class="fieldWrapper">
+                    {{form.code.errors}}
+                    {% trans form.code.label_tag %}</br>
+                    {{form.code}}
+                </div>
+            </div>
+        </div></br>
+        <button id="btn" class="btn btn-default col-md-3 col-md-offset-4" type="submit" style="height:45px;font-size:1.2em;align:center"><span class="glyphicon glyphicon-search" aria-hidden="true"></span> {% trans "Search" %}</button></br></br>
+    </form>
+        <div id="anchor"></br></div>
+        {% if query %}
+
+            <div class="row" >
+                <div class="col-md-3" >
+                    <img src="{{ STATIC_URL }}telemeta/images/search_red.png" alt="search-results" style="vertical-align:middle" /> <h1>{% trans "Search Results" %}</h1>
+                </div>
+                <div class="col-md-6" >
+                    <center>{% bootstrap_paginate page range=10 show_first_last="True" %}</center>
+                </div>
+                <div class="col-md-0">&nbsp;</div>
+            </div>
+            <div class="row" style="margin-left:-15px">
+                <div class="col-md-4">
+                    {% ifequal type 'item' %}
+                         <p><b>Items ({{item_count}}) | <a href="{% url "haystack_advance_search_type" "collection" %}?{{request_url}}">Collections ({{collection_count}})</a> | <a href="{% url "haystack_advance_search_type" "corpus" %}?{{request_url}}">Corpus ({{corpus_count}})</a> | <a href="{% url "haystack_advance_search_type" "fonds" %}?{{request_url}}">Fonds ({{fonds_count}})</a></b></p>
+                    {% else %}
+                        {% ifequal type 'corpus' %}
+                            <p><b><a href="{% url "haystack_advance_search_type" "item" %}?{{request_url}}">Items ({{item_count}}) </a>| <a href="{% url "haystack_advance_search_type" "collection" %}?{{request_url}}">Collections ({{collection_count}})</a> | Corpus ({{corpus_count}})</a> | <a href="{% url "haystack_advance_search_type" "fonds" %}?{{request_url}}">Fonds ({{fonds_count}})</a></b></p>
+                        {% else %}
+                            {% ifequal type 'fonds' %}
+                                <p><b><a href="{% url "haystack_advance_search_type" "item" %}?{{request_url}}">Items ({{item_count}}) </a>| <a href="{% url "haystack_advance_search_type" "collection" %}?{{request_url}}">Collections ({{collection_count}})</a> | <a href="{% url "haystack_advance_search_type" "corpus" %}?{{request_url}}">Corpus ({{corpus_count}})</a> | Fonds ({{fonds_count}})</b></p>
+                            {% else %}
+                                {% ifequal type 'collection'%}
+                                    <p><b><a href="{% url "haystack_advance_search_type" "item" %}?{{request_url}}">Items ({{item_count}}) </a>| Collections ({{collection_count}}) | <a href="{% url "haystack_advance_search_type" "corpus" %}?{{request_url}}">Corpus ({{corpus_count}})</a> | <a href="{% url "haystack_advance_search_type" "fonds" %}?{{request_url}}">Fonds ({{fonds_count}})</a></b></p>
+                                {% endifequal %}
+                            {% endifequal %}
+                        {% endifequal %}
+                    {% endifequal %}
+                 </div>
+                 <div class="col-md-4 col-md-offset-4">
+                    <div class="pull-right">
+                        <label style="display:inline-block;vertical-align:middle">{% trans "results per page"%}:</label>
+                        <div style="display:inline-block;vertical-align:middle">
+                            <select id="results-per-page" name="results_page">
+                                <option {% ifequal results_page 20 %}selected{% endifequal %} value="20">20</option>
+                                <option {% ifequal results_page 50 %}selected{% endifequal %} value="50">50</option>
+                                <option {% ifequal results_page 100 %}selected{% endifequal %} value="100">100</option>
+                                <option {% ifequal results_page 250 %}selected{% endifequal %} value="250">250</option>
+                                <option {% ifequal results_page 500 %}selected{% endifequal %} value="500">500</option>
+                                <option {% ifequal results_page 1000 %}selected{% endifequal %} value="1000">1000</option>
+                                <option {% ifequal results_page 10000 %}selected{% endifequal %} value="10000">10000</option>
+                            </select>
+                        </div>
+                    </div>
+                 </div>
+            </div>
+             <form method="POST" action="{% url "haystack_playlist" type%} ">{% csrf_token %}
+             {% with object_list as items %}
+                <div class="fullpage" style="display:none">
+                    {% ifequal type 'item' %}
+                        {% include "telemeta/search/mediaitem_listhaystack.html" %}
+                    {% else %}
+                        {% ifequal type 'corpus' %}
+                            {% include "telemeta/search/mediaresource_listhaystack.html" %}
+                        {% else %}
+                            {% ifequal type 'fonds' %}
+                                {% include "telemeta/search/mediaresource_listhaystack.html" %}
+                            {% else %}
+                                {% ifequal type 'collection' %}
+                                    {% include "telemeta/search/mediacollection_listhaystack.html" %}
+                                {%endifequal%}
+                            {%endifequal%}
+                        {%endifequal%}
+                    {%endifequal%}
+                </div>
+                <noscript>
+                    <div class="fullpage">
+                        {% ifequal type 'item' %}
+                            {% include "telemeta/search/mediaitem_listhaystack.html" %}
+                        {% else %}
+                            {% ifequal type 'corpus' %}
+                                {% include "telemeta/search/mediaresource_listhaystack.html" %}
+                            {% else %}
+                                {% ifequal type 'fonds' %}
+                                    {% include "telemeta/search/mediaresource_listhaystack.html" %}
+                                {% else %}
+                                    {% ifequal type 'collection' %}
+                                        {% include "telemeta/search/mediacollection_listhaystack.html" %}
+                                    {%endifequal%}
+                                {%endifequal%}
+                            {%endifequal%}
+                        {%endifequal%}
+                    </div>
+                </noscript>
+
+
+            {% endwith %}
+            {% if user.is_authenticated %}
+                <input type="hidden" name="lastquerypath" value="{{request.get_full_path}}"/>
+                <button style="margin-top:10px" type="submit" id="btn" class="btn btn-default">{% trans "Add to playlist" %}</button>
+            {% endif %}
+            </form>
+        {% else %}
+            <div id="results"></div>{# Show some example queries to run, maybe query syntax, something else? #}
+        {% endif %}
+
+    {% comment %}
+
+        <div id="dialog" title="{% trans "Instruments : Boolean Search" %}">
+
+            <form>
+
+                {{ booleanForm.management_form}}
+                {% for form in booleanForm %}
+                    {% if forloop.counter0 == 0 %}
+                        <span style="margin-left: 13.5%">{{ form.start_bracket }}</span>
+                        {{ form.text_field }}
+                        {{ form.end_bracket }}
+                    {% else %}
+                        {% if forloop.counter0 == 1 %}
+                        <div id="copy">
+                        {% endif %}
+                            {{ form.as_p }}
+                        {% if forloop.counter0 == 1 %}
+                        </div>
+                        {% endif %}
+                    {% endif %}
+
+                {% endfor %}
+                <a class="btn btn-default" id="add" href="#">{% trans "Add field" %}</a>
+                <br/><input type="submit" value="{% trans "Validate the query" %}">
+
+
+            </form>
+
+        <p id="res"></p>
+
+        </div>
+
+        {% endcomment %}
+
+{% endblock %}
diff --git a/telemeta/templates/telemeta/search/search_criteria.html b/telemeta/templates/telemeta/search/search_criteria.html
new file mode 100644 (file)
index 0000000..c39cb53
--- /dev/null
@@ -0,0 +1,180 @@
+{% extends "telemeta/base.html" %}
+{% load telemeta_tags %}
+{% load i18n %}
+
+{% block head_title %}{% trans "Advanced Search" %} - {{ block.super }}{% endblock %}
+
+{% block stylesheets %}
+{{ block.super }}
+<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/jquery.autocomplete.css" />
+{% endblock %}
+
+{% block extra_javascript %}
+<script src="{{ STATIC_URL }}telemeta/js/jquery.bgiframe.js" type="text/javascript"></script>
+<script src="{{ STATIC_URL }}telemeta/js/jquery.mb.browser.min.js" type="text/javascript"></script>
+<script src="{{ STATIC_URL }}telemeta/js/jquery.autocomplete.js" type="text/javascript"></script>
+
+
+<script type="text/javascript">
+
+$(function(){
+    var txt = ''
+            +'jQuery.browser.ua  = '+jQuery.browser.ua+'<br>'
+            +'jQuery.browser.name  = '+jQuery.browser.name+'<br>'
+            +'jQuery.browser.fullVersion  = '+jQuery.browser.fullVersion+'<br>'
+            +'jQuery.browser.version = '+jQuery.browser.version+'<br><br><br>'
+            +'jQuery.browser.msie = '+jQuery.browser.msie+'<br>'
+            +'jQuery.browser.mozilla = '+jQuery.browser.mozilla+'<br>'
+            +'jQuery.browser.opera = '+jQuery.browser.opera+'<br>'
+            +'jQuery.browser.webkit = '+jQuery.browser.webkit+'<br>'
+            +'jQuery.browser.safari = '+jQuery.browser.safari+'<br>'
+            +'jQuery.browser.chrome = '+jQuery.browser.chrome+'<br>';
+    $("#result").html(txt);
+});
+
+
+function update_period(source, from_field, to_field) {
+    var from_year = $(from_field);
+    var to_year = $(to_field);
+
+    if (from_year.val() == "0") {
+        to_year.attr('disabled', '1');
+        to_year.val('0');
+    } else {
+        to_year.removeAttr('disabled');
+        if ($(source).is(to_field)) {
+            if (parseInt(from_year.val()) > parseInt(to_year.val()))
+                from_year.val(to_year.val());
+        } else if (parseInt(from_year.val()) > parseInt(to_year.val())) {
+            to_year.val(from_year.val());
+        }
+    }
+}
+
+$(document).ready(function () {
+    $('#location').autocomplete('{% url "telemeta-complete-location" %}', {
+        max: 20,
+        formatResult: function(data) {
+            return data[0].replace(/ *\([0-9]+.*\) *$/, '');
+        }
+    });
+    update_period('#rec_year_from', '#rec_year_to');
+    $('#rec_year_from, #rec_year_to').change(function () {
+        update_period(this, '#rec_year_from', '#rec_year_to');
+    });
+    update_period('#pub_year_from', '#pub_year_to');
+    $('#pub_year_from, #pub_year_to').change(function () {
+        update_period(this, '#pub_year_from', '#pub_year_to');
+    });
+});
+
+$(document).ready(function() {
+    $(this).keydown(function(e) {
+        if (e.keyCode == '13') {
+            $("#searchform").submit();
+        }
+    });
+});
+
+</script>
+{% endblock %}
+
+{% block title %}
+<div class='row'>
+    <div class="col-md-12">
+     <img src="{{ STATIC_URL }}telemeta/images/adv_search_red.png" alt="advanced-search" style="vertical-align:middle" /> {% trans "Advanced Search" %}
+    </div>
+</div>
+
+{% endblock %}
+
+{% block content %}
+<form action="{% url "telemeta-search" %}" id="searchform" method="get">
+<fieldset>
+
+    <p>
+    <label for="location">{% field_label "Location" %}</label>
+    <input type="text" name="location" id="location" value="{{ criteria.location }}" />
+    </p>
+
+    <p>
+    <label for="instrument">{% field_label "Instrument" %}</label>
+    <input type="text" name="instrument" id="instrument" />
+    </p>
+
+    <p>
+    <label for="ethnic_group">{% field_label "EthnicGroup" %}</label>
+    <select id="ethnic_group" name="ethnic_group">
+        <option value="">All ethnic groups</option>
+    {% for group in ethnic_groups %}
+        <option value="{{group.id}}" {% ifequal criteria.ethnic_group.id group.id %}selected {% endifequal %}>{{group|escape}}</option>
+    {% endfor %}
+    </select>
+    </p>
+
+    <p>
+    <label for="title">{% trans "Title" %}</label>
+    <input type="text" id="title" name="title" />
+    </p>
+
+    <p>
+    <label for="creator">{% field_label "MediaCollection" "creator" %}</label>
+    <input type="text" id="creator" name="creator" />
+    </p>
+
+    <p>
+    <label for="collector">{% field_label "MediaCollection" "collector" %}</label>
+    <input type="text" id="collector" name="collector" />
+    </p>
+
+    {% if rec_years %}
+    <p>
+    <label for="rec_date_from">{% trans "Year of recording" %}</label>
+    <select id="rec_year_from" name="rec_year_from" class="tiny">
+        <option value="0"></option>
+        {% for year in rec_years %}
+        <option value="{{ year }}" {% ifequal criteria.rec_year_from year %}selected {% endifequal %}>{{year}}</option>
+        {% endfor %}
+    </select>
+    {% trans "to" %}
+    <select id="rec_year_to" name="rec_year_to" class="tiny">
+        <option value="0"></option>
+        {% for year in rec_years %}
+        <option value="{{ year }}" {% ifequal criteria.rec_year_to year %}selected {% endifequal %}>{{year}}</option>
+        {% endfor %}
+    </select>
+    </p>
+    {% endif %}
+
+    {% if pub_years %}
+    <p>
+    <label for="pub_date_from">{% trans "Year of publication" %}</label>
+    <select id="pub_year_from" name="pub_year_from" class="tiny">
+        <option value="0"></option>
+        {% for year in pub_years %}
+        <option value="{{ year }}" {% ifequal criteria.pub_year_from year %}selected {% endifequal %}>{{year}}</option>
+        {% endfor %}
+    </select>
+    {% trans "to" %}
+    <select id="pub_year_to" name="pub_year_to" class="tiny">
+        <option value="0"></option>
+        {% for year in pub_years %}
+        <option value="{{ year }}" {% ifequal criteria.pub_year_to year %}selected {% endifequal %}>{{year}}</option>
+        {% endfor %}
+    </select>
+    </p>
+    {% endif %}
+
+    <p><label for="sound">{% trans "Digitized" %}</label>
+    <input type="checkbox" name="sound" value="True" align="left" />
+    </p>
+
+</fieldset>
+
+<p class="input">
+<a href="#" class="component_icon button icon_search"
+      onclick="document.getElementById('searchform').submit(); return false;">{% trans 'Search' %}</a>
+</p>
+
+</form>
+{% endblock %}
diff --git a/telemeta/templates/telemeta/search/search_results.html b/telemeta/templates/telemeta/search/search_results.html
new file mode 100644 (file)
index 0000000..034587b
--- /dev/null
@@ -0,0 +1,209 @@
+{% extends "telemeta/base.html" %}
+{% load telemeta_tags %}
+{% load i18n %}
+{% load bootstrap_pagination %}
+
+{% block head_title %}{% trans "Search Results" %} - {{ block.super }}{% endblock %}
+
+{% block title %}
+<div class='row'>
+<div class="col-md-5">
+  <img src="{{ STATIC_URL }}telemeta/images/search_red.png" alt="search-results" style="vertical-align:middle" /> {% trans "Search Results" %} ({{ page_obj.start_index }} - {{ page_obj.end_index }} / {{ count }})
+</div>
+<div class="col-md-7">
+{% bootstrap_paginate page_obj range=10 show_first_last="True" %}
+</div>
+<div class="col-md-0">&nbsp;</div>
+</div>
+{% endblock %}
+
+{% block title_buttons %}
+  <div class="btn-group">
+    {% ifequal type 'items' %}
+    <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
+      <span class="glyphicon glyphicon-filter"></span> {% trans "Filters" %} <span class="caret"></span>
+    </button>
+    <ul class="dropdown-menu" role="menu">
+      <li><a href="{% url "telemeta-search-type" "items" %}?{{criteria|with_no_sound|build_query_string}}" class="">{% trans "All" %}</a></li>
+      <li><a href="{% url "telemeta-search-type" "items" %}?{{criteria|with_sound|build_query_string}}">{% trans "Sounds" %}</a></li>
+      <li><a href="{% url "telemeta-search-published" "items" %}?{{criteria|with_no_sound|build_query_string}}">{% trans "Published" %}</a></li>
+      <li><a href="{% url "telemeta-search-unpublished" "items" %}?{{criteria|with_no_sound|build_query_string}}">{% trans "Unpublished" %}</a></li>
+      <li><a href="{% url "telemeta-search-full" "items" %}?{{criteria|with_no_sound|build_query_string}}">{% trans "Full" %}</a></li>
+      <li><a href="{% url "telemeta-search-none" "items" %}?{{criteria|with_no_sound|build_query_string}}">{% trans "None" %}</a></li>
+    </ul>
+    {% endifequal %}
+    {% ifequal type 'collections' %}
+    <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
+      <span class="glyphicon glyphicon-filter"></span> {% trans "Filters" %} <span class="caret"></span>
+    </button>
+    <ul class="dropdown-menu" role="menu">
+      <li><a href="{% url "telemeta-search-type" "collections" %}?{{criteria|with_no_sound|build_query_string}}" class="">{% trans "All" %}</a></li>
+      <li><a href="{% url "telemeta-search-type" "collections" %}?{{criteria|with_sound|build_query_string}}">{% trans "Sounds" %}</a></li>
+      <li><a href="{% url "telemeta-search-published" "collections" %}?{{criteria|with_no_sound|build_query_string}}">{% trans "Published" %}</a></li>
+      <li><a href="{% url "telemeta-search-unpublished" "collections" %}?{{criteria|with_no_sound|build_query_string}}">{% trans "Unpublished" %}</a></li>
+      <li><a href="{% url "telemeta-search-full" "collections" %}?{{criteria|with_no_sound|build_query_string}}">{% trans "Full" %}</a></li>
+      <li><a href="{% url "telemeta-search-none" "collections" %}?{{criteria|with_no_sound|build_query_string}}">{% trans "None" %}</a></li>
+    </ul>
+    {% endifequal %}
+  </div>
+{% endblock %}
+
+{% block content %}
+{% if criteria %}
+<ul>
+  {% if criteria.pattern %}
+    <li><b>{% trans "Search pattern" %}:</b> {{criteria.pattern}}</li>
+  {% endif %}
+  {% if criteria.location %}
+    <li><b>{% field_label "Location" %}:</b> {{criteria.location}}</li>
+  {% endif %}
+  {% if criteria.instrument %}
+  <li><b>{% field_label "Instrument" %}:</b> {{criteria.instrument}}</li>
+  {% endif %}
+  {% if criteria.ethnic_group %}
+    <li><b>{% field_label "EthnicGroup" %}:</b> {{criteria.ethnic_group}}</li>
+  {% endif %}
+  {% if criteria.creator %}
+    <li><b>{% field_label "MediaCollection" "creator" %}:</b> {{criteria.creator}}</li>
+  {% endif %}
+  {% if criteria.collector %}
+    <li><b>{% field_label "MediaCollection" "collector" %}:</b> {{criteria.collector}}</li>
+  {% endif %}
+  {% if criteria.title %}
+    <li><b>{% trans "Title" %}:</b> {{criteria.title}}</li>
+  {% endif %}
+  {% if criteria.rec_year_from %}
+    <li><b>{% trans "Year of recording" %}:</b> {{criteria.rec_year_from}}
+     {% ifnotequal criteria.rec_year_to criteria.rec_year_from %}
+     {% trans "to" %} {{criteria.rec_year_to}}
+     {% endifnotequal %}
+    </li>
+  {% endif %}
+  {% if criteria.pub_year_from %}
+    <li><b>{% trans "Year of publication" %}:</b> {{criteria.pub_year_from}}
+     {% ifnotequal criteria.pub_year_to criteria.pub_year_from %}
+     {% trans "to" %} {{criteria.pub_year_to}}
+     {% endifnotequal %}
+    </li>
+  {% endif %}
+    {% if criteria.sound %}
+    <li><b>{% trans "Sound" %}:</b> {{criteria.sound}}</li>
+  {% endif %}
+</ul>
+{% endif %}
+
+{% ifequal type 'items' %}
+    {% ifequal result_filter "published"%}
+        <p><b>Items ({{items_num}}) | <a href="{% url "telemeta-search-published" "collections" %}?{{criteria|build_query_string}}">Collections ({{collections_num}})</a> | <a href="{% url "telemeta-search-published" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | <a href="{% url "telemeta-search-published" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a></b></p>
+          {% with object_list as items %}
+           <div class="fullpage">
+              {% include "telemeta/inc/mediaitem_list.html" %}
+           </div>
+          {% endwith %}
+    {% else%}
+        {% ifequal result_filter "unpublished"%}
+            <p><b>Items ({{items_num}}) | <a href="{% url "telemeta-search-unpublished" "collections" %}?{{criteria|build_query_string}}">Collections ({{collections_num}})</a> | <a href="{% url "telemeta-search-unpublished" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | <a href="{% url "telemeta-search-unpublished" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a></b></p>
+              {% with object_list as items %}
+               <div class="fullpage">
+                  {% include "telemeta/inc/mediaitem_list.html" %}
+               </div>
+              {% endwith %}
+        {% else%}
+            {% ifequal result_filter "full"%}
+                <p><b>Items ({{items_num}}) | <a href="{% url "telemeta-search-full" "collections" %}?{{criteria|build_query_string}}">Collections ({{collections_num}})</a> | <a href="{% url "telemeta-search-full" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | <a href="{% url "telemeta-search-full" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a></b></p>
+                  {% with object_list as items %}
+                   <div class="fullpage">
+                      {% include "telemeta/inc/mediaitem_list.html" %}
+                   </div>
+                  {% endwith %}
+            {% else%}
+                {% ifequal result_filter "none"%}
+                    <p><b>Items ({{items_num}}) | <a href="{% url "telemeta-search-none" "collections" %}?{{criteria|build_query_string}}">Collections ({{collections_num}})</a> | <a href="{% url "telemeta-search-none" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | <a href="{% url "telemeta-search-none" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a></b></p>
+                      {% with object_list as items %}
+                       <div class="fullpage">
+                          {% include "telemeta/inc/mediaitem_list.html" %}
+                       </div>
+                      {% endwith %}
+                {% else%}
+                    <p><b>Items ({{items_num}}) | <a href="{% url "telemeta-search-type" "collections" %}?{{criteria|build_query_string}}">Collections ({{collections_num}})</a> | <a href="{% url "telemeta-search-type" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | <a href="{% url "telemeta-search-type" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a></b></p>
+                      {% with object_list as items %}
+                       <div class="fullpage">
+                          {% include "telemeta/inc/mediaitem_list.html" %}
+                       </div>
+                      {% endwith %}
+                {%endifequal%}
+            {%endifequal%}
+        {%endifequal%}
+    {% endifequal %}
+{% endifequal %}
+
+{% ifequal type 'collections' %}
+    {% ifequal result_filter "published"%}
+        <p><b><a href="{% url "telemeta-search-published" "items" %}?{{criteria|build_query_string}}">Items ({{items_num}})</a> | Collections ({{collections_num}}) | <a href="{% url "telemeta-search-published" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | <a href="{% url "telemeta-search-published" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a>
+          </b></p>
+          {% with object_list as collections %}
+           <div class="fullpage">
+              {% include "telemeta/inc/collection_list.html" %}
+           </div>
+          {% endwith %}
+    {% else %}
+        {%ifequal result_filter "unpublished"%}
+            <p><b><a href="{% url "telemeta-search-unpublished" "items" %}?{{criteria|build_query_string}}">Items ({{items_num}})</a> | Collections ({{collections_num}}) | <a href="{% url "telemeta-search-unpublished" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | <a href="{% url "telemeta-search-unpublished" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a>
+              </b></p>
+              {% with object_list as collections %}
+               <div class="fullpage">
+                  {% include "telemeta/inc/collection_list.html" %}
+               </div>
+               {% endwith %}
+        {%else%}
+            {%ifequal result_filter "full"%}
+                <p><b><a href="{% url "telemeta-search-full" "items" %}?{{criteria|build_query_string}}">Items ({{items_num}})</a> | Collections ({{collections_num}}) | <a href="{% url "telemeta-search-full" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | <a href="{% url "telemeta-search-full" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a>
+                  </b></p>
+                  {% with object_list as collections %}
+                   <div class="fullpage">
+                      {% include "telemeta/inc/collection_list.html" %}
+                   </div>
+                  {% endwith %}
+            {%else%}
+                {%ifequal result_filter "none"%}
+                    <p><b><a href="{% url "telemeta-search-none" "items" %}?{{criteria|build_query_string}}">Items ({{items_num}})</a> | Collections ({{collections_num}}) | <a href="{% url "telemeta-search-none" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | <a href="{% url "telemeta-search-none" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a>
+                      </b></p>
+                      {% with object_list as collections %}
+                       <div class="fullpage">
+                          {% include "telemeta/inc/collection_list.html" %}
+                       </div>
+                      {% endwith %}
+                {%else%}
+                    <p><b><a href="{% url "telemeta-search-type" "items" %}?{{criteria|build_query_string}}">Items ({{items_num}})</a> | Collections ({{collections_num}}) | <a href="{% url "telemeta-search-type" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | <a href="{% url "telemeta-search-type" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a>
+                      </b></p>
+                      {% with object_list as collections %}
+                       <div class="fullpage">
+                          {% include "telemeta/inc/collection_list.html" %}
+                       </div>
+                      {% endwith %}
+                {%endifequal%}
+            {%endifequal%}
+        {%endifequal%}
+    {%endifequal%}
+{% endifequal %}
+
+{% if type == 'corpus' %}
+<p><b><a href="{% url "telemeta-search-type" "items" %}?{{criteria|build_query_string}}">Items ({{items_num}})</a> | <a href="{% url "telemeta-search-type" "collections" %}?{{criteria|build_query_string}}">Collections ({{collections_num}})</a> | Corpus ({{corpus_num}}) | <a href="{% url "telemeta-search-type" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a>
+</b></p>
+{% endif %}
+
+{% if type == 'fonds' %}
+<p><b><a href="{% url "telemeta-search-type" "items" %}?{{criteria|build_query_string}}">Items ({{items_num}})</a> | <a href="{% url "telemeta-search-type" "collections" %}?{{criteria|build_query_string}}">Collections ({{collections_num}})</a> | <a href="{% url "telemeta-search-type" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | Fonds ({{fonds_num}})
+</b></p>
+{% endif %}
+
+{% if type == 'corpus' or type == 'fonds' %}
+{% with object_list as resources and type as type %}
+<div class="fullpage">
+{% include "telemeta/inc/resource_list.html" %}
+</div>
+{% endwith %}
+{% endif %}
+
+
+{% endblock %}
diff --git a/telemeta/templates/telemeta/search_criteria.html b/telemeta/templates/telemeta/search_criteria.html
deleted file mode 100644 (file)
index c39cb53..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_tags %}
-{% load i18n %}
-
-{% block head_title %}{% trans "Advanced Search" %} - {{ block.super }}{% endblock %}
-
-{% block stylesheets %}
-{{ block.super }}
-<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}telemeta/css/jquery.autocomplete.css" />
-{% endblock %}
-
-{% block extra_javascript %}
-<script src="{{ STATIC_URL }}telemeta/js/jquery.bgiframe.js" type="text/javascript"></script>
-<script src="{{ STATIC_URL }}telemeta/js/jquery.mb.browser.min.js" type="text/javascript"></script>
-<script src="{{ STATIC_URL }}telemeta/js/jquery.autocomplete.js" type="text/javascript"></script>
-
-
-<script type="text/javascript">
-
-$(function(){
-    var txt = ''
-            +'jQuery.browser.ua  = '+jQuery.browser.ua+'<br>'
-            +'jQuery.browser.name  = '+jQuery.browser.name+'<br>'
-            +'jQuery.browser.fullVersion  = '+jQuery.browser.fullVersion+'<br>'
-            +'jQuery.browser.version = '+jQuery.browser.version+'<br><br><br>'
-            +'jQuery.browser.msie = '+jQuery.browser.msie+'<br>'
-            +'jQuery.browser.mozilla = '+jQuery.browser.mozilla+'<br>'
-            +'jQuery.browser.opera = '+jQuery.browser.opera+'<br>'
-            +'jQuery.browser.webkit = '+jQuery.browser.webkit+'<br>'
-            +'jQuery.browser.safari = '+jQuery.browser.safari+'<br>'
-            +'jQuery.browser.chrome = '+jQuery.browser.chrome+'<br>';
-    $("#result").html(txt);
-});
-
-
-function update_period(source, from_field, to_field) {
-    var from_year = $(from_field);
-    var to_year = $(to_field);
-
-    if (from_year.val() == "0") {
-        to_year.attr('disabled', '1');
-        to_year.val('0');
-    } else {
-        to_year.removeAttr('disabled');
-        if ($(source).is(to_field)) {
-            if (parseInt(from_year.val()) > parseInt(to_year.val()))
-                from_year.val(to_year.val());
-        } else if (parseInt(from_year.val()) > parseInt(to_year.val())) {
-            to_year.val(from_year.val());
-        }
-    }
-}
-
-$(document).ready(function () {
-    $('#location').autocomplete('{% url "telemeta-complete-location" %}', {
-        max: 20,
-        formatResult: function(data) {
-            return data[0].replace(/ *\([0-9]+.*\) *$/, '');
-        }
-    });
-    update_period('#rec_year_from', '#rec_year_to');
-    $('#rec_year_from, #rec_year_to').change(function () {
-        update_period(this, '#rec_year_from', '#rec_year_to');
-    });
-    update_period('#pub_year_from', '#pub_year_to');
-    $('#pub_year_from, #pub_year_to').change(function () {
-        update_period(this, '#pub_year_from', '#pub_year_to');
-    });
-});
-
-$(document).ready(function() {
-    $(this).keydown(function(e) {
-        if (e.keyCode == '13') {
-            $("#searchform").submit();
-        }
-    });
-});
-
-</script>
-{% endblock %}
-
-{% block title %}
-<div class='row'>
-    <div class="col-md-12">
-     <img src="{{ STATIC_URL }}telemeta/images/adv_search_red.png" alt="advanced-search" style="vertical-align:middle" /> {% trans "Advanced Search" %}
-    </div>
-</div>
-
-{% endblock %}
-
-{% block content %}
-<form action="{% url "telemeta-search" %}" id="searchform" method="get">
-<fieldset>
-
-    <p>
-    <label for="location">{% field_label "Location" %}</label>
-    <input type="text" name="location" id="location" value="{{ criteria.location }}" />
-    </p>
-
-    <p>
-    <label for="instrument">{% field_label "Instrument" %}</label>
-    <input type="text" name="instrument" id="instrument" />
-    </p>
-
-    <p>
-    <label for="ethnic_group">{% field_label "EthnicGroup" %}</label>
-    <select id="ethnic_group" name="ethnic_group">
-        <option value="">All ethnic groups</option>
-    {% for group in ethnic_groups %}
-        <option value="{{group.id}}" {% ifequal criteria.ethnic_group.id group.id %}selected {% endifequal %}>{{group|escape}}</option>
-    {% endfor %}
-    </select>
-    </p>
-
-    <p>
-    <label for="title">{% trans "Title" %}</label>
-    <input type="text" id="title" name="title" />
-    </p>
-
-    <p>
-    <label for="creator">{% field_label "MediaCollection" "creator" %}</label>
-    <input type="text" id="creator" name="creator" />
-    </p>
-
-    <p>
-    <label for="collector">{% field_label "MediaCollection" "collector" %}</label>
-    <input type="text" id="collector" name="collector" />
-    </p>
-
-    {% if rec_years %}
-    <p>
-    <label for="rec_date_from">{% trans "Year of recording" %}</label>
-    <select id="rec_year_from" name="rec_year_from" class="tiny">
-        <option value="0"></option>
-        {% for year in rec_years %}
-        <option value="{{ year }}" {% ifequal criteria.rec_year_from year %}selected {% endifequal %}>{{year}}</option>
-        {% endfor %}
-    </select>
-    {% trans "to" %}
-    <select id="rec_year_to" name="rec_year_to" class="tiny">
-        <option value="0"></option>
-        {% for year in rec_years %}
-        <option value="{{ year }}" {% ifequal criteria.rec_year_to year %}selected {% endifequal %}>{{year}}</option>
-        {% endfor %}
-    </select>
-    </p>
-    {% endif %}
-
-    {% if pub_years %}
-    <p>
-    <label for="pub_date_from">{% trans "Year of publication" %}</label>
-    <select id="pub_year_from" name="pub_year_from" class="tiny">
-        <option value="0"></option>
-        {% for year in pub_years %}
-        <option value="{{ year }}" {% ifequal criteria.pub_year_from year %}selected {% endifequal %}>{{year}}</option>
-        {% endfor %}
-    </select>
-    {% trans "to" %}
-    <select id="pub_year_to" name="pub_year_to" class="tiny">
-        <option value="0"></option>
-        {% for year in pub_years %}
-        <option value="{{ year }}" {% ifequal criteria.pub_year_to year %}selected {% endifequal %}>{{year}}</option>
-        {% endfor %}
-    </select>
-    </p>
-    {% endif %}
-
-    <p><label for="sound">{% trans "Digitized" %}</label>
-    <input type="checkbox" name="sound" value="True" align="left" />
-    </p>
-
-</fieldset>
-
-<p class="input">
-<a href="#" class="component_icon button icon_search"
-      onclick="document.getElementById('searchform').submit(); return false;">{% trans 'Search' %}</a>
-</p>
-
-</form>
-{% endblock %}
diff --git a/telemeta/templates/telemeta/search_results.html b/telemeta/templates/telemeta/search_results.html
deleted file mode 100644 (file)
index 034587b..0000000
+++ /dev/null
@@ -1,209 +0,0 @@
-{% extends "telemeta/base.html" %}
-{% load telemeta_tags %}
-{% load i18n %}
-{% load bootstrap_pagination %}
-
-{% block head_title %}{% trans "Search Results" %} - {{ block.super }}{% endblock %}
-
-{% block title %}
-<div class='row'>
-<div class="col-md-5">
-  <img src="{{ STATIC_URL }}telemeta/images/search_red.png" alt="search-results" style="vertical-align:middle" /> {% trans "Search Results" %} ({{ page_obj.start_index }} - {{ page_obj.end_index }} / {{ count }})
-</div>
-<div class="col-md-7">
-{% bootstrap_paginate page_obj range=10 show_first_last="True" %}
-</div>
-<div class="col-md-0">&nbsp;</div>
-</div>
-{% endblock %}
-
-{% block title_buttons %}
-  <div class="btn-group">
-    {% ifequal type 'items' %}
-    <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
-      <span class="glyphicon glyphicon-filter"></span> {% trans "Filters" %} <span class="caret"></span>
-    </button>
-    <ul class="dropdown-menu" role="menu">
-      <li><a href="{% url "telemeta-search-type" "items" %}?{{criteria|with_no_sound|build_query_string}}" class="">{% trans "All" %}</a></li>
-      <li><a href="{% url "telemeta-search-type" "items" %}?{{criteria|with_sound|build_query_string}}">{% trans "Sounds" %}</a></li>
-      <li><a href="{% url "telemeta-search-published" "items" %}?{{criteria|with_no_sound|build_query_string}}">{% trans "Published" %}</a></li>
-      <li><a href="{% url "telemeta-search-unpublished" "items" %}?{{criteria|with_no_sound|build_query_string}}">{% trans "Unpublished" %}</a></li>
-      <li><a href="{% url "telemeta-search-full" "items" %}?{{criteria|with_no_sound|build_query_string}}">{% trans "Full" %}</a></li>
-      <li><a href="{% url "telemeta-search-none" "items" %}?{{criteria|with_no_sound|build_query_string}}">{% trans "None" %}</a></li>
-    </ul>
-    {% endifequal %}
-    {% ifequal type 'collections' %}
-    <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
-      <span class="glyphicon glyphicon-filter"></span> {% trans "Filters" %} <span class="caret"></span>
-    </button>
-    <ul class="dropdown-menu" role="menu">
-      <li><a href="{% url "telemeta-search-type" "collections" %}?{{criteria|with_no_sound|build_query_string}}" class="">{% trans "All" %}</a></li>
-      <li><a href="{% url "telemeta-search-type" "collections" %}?{{criteria|with_sound|build_query_string}}">{% trans "Sounds" %}</a></li>
-      <li><a href="{% url "telemeta-search-published" "collections" %}?{{criteria|with_no_sound|build_query_string}}">{% trans "Published" %}</a></li>
-      <li><a href="{% url "telemeta-search-unpublished" "collections" %}?{{criteria|with_no_sound|build_query_string}}">{% trans "Unpublished" %}</a></li>
-      <li><a href="{% url "telemeta-search-full" "collections" %}?{{criteria|with_no_sound|build_query_string}}">{% trans "Full" %}</a></li>
-      <li><a href="{% url "telemeta-search-none" "collections" %}?{{criteria|with_no_sound|build_query_string}}">{% trans "None" %}</a></li>
-    </ul>
-    {% endifequal %}
-  </div>
-{% endblock %}
-
-{% block content %}
-{% if criteria %}
-<ul>
-  {% if criteria.pattern %}
-    <li><b>{% trans "Search pattern" %}:</b> {{criteria.pattern}}</li>
-  {% endif %}
-  {% if criteria.location %}
-    <li><b>{% field_label "Location" %}:</b> {{criteria.location}}</li>
-  {% endif %}
-  {% if criteria.instrument %}
-  <li><b>{% field_label "Instrument" %}:</b> {{criteria.instrument}}</li>
-  {% endif %}
-  {% if criteria.ethnic_group %}
-    <li><b>{% field_label "EthnicGroup" %}:</b> {{criteria.ethnic_group}}</li>
-  {% endif %}
-  {% if criteria.creator %}
-    <li><b>{% field_label "MediaCollection" "creator" %}:</b> {{criteria.creator}}</li>
-  {% endif %}
-  {% if criteria.collector %}
-    <li><b>{% field_label "MediaCollection" "collector" %}:</b> {{criteria.collector}}</li>
-  {% endif %}
-  {% if criteria.title %}
-    <li><b>{% trans "Title" %}:</b> {{criteria.title}}</li>
-  {% endif %}
-  {% if criteria.rec_year_from %}
-    <li><b>{% trans "Year of recording" %}:</b> {{criteria.rec_year_from}}
-     {% ifnotequal criteria.rec_year_to criteria.rec_year_from %}
-     {% trans "to" %} {{criteria.rec_year_to}}
-     {% endifnotequal %}
-    </li>
-  {% endif %}
-  {% if criteria.pub_year_from %}
-    <li><b>{% trans "Year of publication" %}:</b> {{criteria.pub_year_from}}
-     {% ifnotequal criteria.pub_year_to criteria.pub_year_from %}
-     {% trans "to" %} {{criteria.pub_year_to}}
-     {% endifnotequal %}
-    </li>
-  {% endif %}
-    {% if criteria.sound %}
-    <li><b>{% trans "Sound" %}:</b> {{criteria.sound}}</li>
-  {% endif %}
-</ul>
-{% endif %}
-
-{% ifequal type 'items' %}
-    {% ifequal result_filter "published"%}
-        <p><b>Items ({{items_num}}) | <a href="{% url "telemeta-search-published" "collections" %}?{{criteria|build_query_string}}">Collections ({{collections_num}})</a> | <a href="{% url "telemeta-search-published" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | <a href="{% url "telemeta-search-published" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a></b></p>
-          {% with object_list as items %}
-           <div class="fullpage">
-              {% include "telemeta/inc/mediaitem_list.html" %}
-           </div>
-          {% endwith %}
-    {% else%}
-        {% ifequal result_filter "unpublished"%}
-            <p><b>Items ({{items_num}}) | <a href="{% url "telemeta-search-unpublished" "collections" %}?{{criteria|build_query_string}}">Collections ({{collections_num}})</a> | <a href="{% url "telemeta-search-unpublished" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | <a href="{% url "telemeta-search-unpublished" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a></b></p>
-              {% with object_list as items %}
-               <div class="fullpage">
-                  {% include "telemeta/inc/mediaitem_list.html" %}
-               </div>
-              {% endwith %}
-        {% else%}
-            {% ifequal result_filter "full"%}
-                <p><b>Items ({{items_num}}) | <a href="{% url "telemeta-search-full" "collections" %}?{{criteria|build_query_string}}">Collections ({{collections_num}})</a> | <a href="{% url "telemeta-search-full" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | <a href="{% url "telemeta-search-full" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a></b></p>
-                  {% with object_list as items %}
-                   <div class="fullpage">
-                      {% include "telemeta/inc/mediaitem_list.html" %}
-                   </div>
-                  {% endwith %}
-            {% else%}
-                {% ifequal result_filter "none"%}
-                    <p><b>Items ({{items_num}}) | <a href="{% url "telemeta-search-none" "collections" %}?{{criteria|build_query_string}}">Collections ({{collections_num}})</a> | <a href="{% url "telemeta-search-none" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | <a href="{% url "telemeta-search-none" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a></b></p>
-                      {% with object_list as items %}
-                       <div class="fullpage">
-                          {% include "telemeta/inc/mediaitem_list.html" %}
-                       </div>
-                      {% endwith %}
-                {% else%}
-                    <p><b>Items ({{items_num}}) | <a href="{% url "telemeta-search-type" "collections" %}?{{criteria|build_query_string}}">Collections ({{collections_num}})</a> | <a href="{% url "telemeta-search-type" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | <a href="{% url "telemeta-search-type" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a></b></p>
-                      {% with object_list as items %}
-                       <div class="fullpage">
-                          {% include "telemeta/inc/mediaitem_list.html" %}
-                       </div>
-                      {% endwith %}
-                {%endifequal%}
-            {%endifequal%}
-        {%endifequal%}
-    {% endifequal %}
-{% endifequal %}
-
-{% ifequal type 'collections' %}
-    {% ifequal result_filter "published"%}
-        <p><b><a href="{% url "telemeta-search-published" "items" %}?{{criteria|build_query_string}}">Items ({{items_num}})</a> | Collections ({{collections_num}}) | <a href="{% url "telemeta-search-published" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | <a href="{% url "telemeta-search-published" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a>
-          </b></p>
-          {% with object_list as collections %}
-           <div class="fullpage">
-              {% include "telemeta/inc/collection_list.html" %}
-           </div>
-          {% endwith %}
-    {% else %}
-        {%ifequal result_filter "unpublished"%}
-            <p><b><a href="{% url "telemeta-search-unpublished" "items" %}?{{criteria|build_query_string}}">Items ({{items_num}})</a> | Collections ({{collections_num}}) | <a href="{% url "telemeta-search-unpublished" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | <a href="{% url "telemeta-search-unpublished" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a>
-              </b></p>
-              {% with object_list as collections %}
-               <div class="fullpage">
-                  {% include "telemeta/inc/collection_list.html" %}
-               </div>
-               {% endwith %}
-        {%else%}
-            {%ifequal result_filter "full"%}
-                <p><b><a href="{% url "telemeta-search-full" "items" %}?{{criteria|build_query_string}}">Items ({{items_num}})</a> | Collections ({{collections_num}}) | <a href="{% url "telemeta-search-full" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | <a href="{% url "telemeta-search-full" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a>
-                  </b></p>
-                  {% with object_list as collections %}
-                   <div class="fullpage">
-                      {% include "telemeta/inc/collection_list.html" %}
-                   </div>
-                  {% endwith %}
-            {%else%}
-                {%ifequal result_filter "none"%}
-                    <p><b><a href="{% url "telemeta-search-none" "items" %}?{{criteria|build_query_string}}">Items ({{items_num}})</a> | Collections ({{collections_num}}) | <a href="{% url "telemeta-search-none" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | <a href="{% url "telemeta-search-none" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a>
-                      </b></p>
-                      {% with object_list as collections %}
-                       <div class="fullpage">
-                          {% include "telemeta/inc/collection_list.html" %}
-                       </div>
-                      {% endwith %}
-                {%else%}
-                    <p><b><a href="{% url "telemeta-search-type" "items" %}?{{criteria|build_query_string}}">Items ({{items_num}})</a> | Collections ({{collections_num}}) | <a href="{% url "telemeta-search-type" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | <a href="{% url "telemeta-search-type" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a>
-                      </b></p>
-                      {% with object_list as collections %}
-                       <div class="fullpage">
-                          {% include "telemeta/inc/collection_list.html" %}
-                       </div>
-                      {% endwith %}
-                {%endifequal%}
-            {%endifequal%}
-        {%endifequal%}
-    {%endifequal%}
-{% endifequal %}
-
-{% if type == 'corpus' %}
-<p><b><a href="{% url "telemeta-search-type" "items" %}?{{criteria|build_query_string}}">Items ({{items_num}})</a> | <a href="{% url "telemeta-search-type" "collections" %}?{{criteria|build_query_string}}">Collections ({{collections_num}})</a> | Corpus ({{corpus_num}}) | <a href="{% url "telemeta-search-type" "fonds" %}?{{criteria|build_query_string}}">Fonds ({{fonds_num}})</a>
-</b></p>
-{% endif %}
-
-{% if type == 'fonds' %}
-<p><b><a href="{% url "telemeta-search-type" "items" %}?{{criteria|build_query_string}}">Items ({{items_num}})</a> | <a href="{% url "telemeta-search-type" "collections" %}?{{criteria|build_query_string}}">Collections ({{collections_num}})</a> | <a href="{% url "telemeta-search-type" "corpus" %}?{{criteria|build_query_string}}">Corpus ({{corpus_num}})</a> | Fonds ({{fonds_num}})
-</b></p>
-{% endif %}
-
-{% if type == 'corpus' or type == 'fonds' %}
-{% with object_list as resources and type as type %}
-<div class="fullpage">
-{% include "telemeta/inc/resource_list.html" %}
-</div>
-{% endwith %}
-{% endif %}
-
-
-{% endblock %}
index 39c9405488ecd23379d6a89f9659894f4f85cf3d..aa55734786e7a5869c50cabc3cfd2ffc4902eaa2 100644 (file)
@@ -67,7 +67,7 @@ urlpatterns = patterns('',
     url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/dc/xml/$', item_view.item_detail, {'format': 'dublin_core_xml'}, name="telemeta-item-dublincore-xml"),
     url(r'^archives/items/download/(?P<public_id>[A-Za-z0-9._-]+)\.(?P<extension>' + export_extensions + ')$', item_view.item_export, name="telemeta-item-export"),
     url(r'^archives/items/download/(?P<public_id>[A-Za-z0-9._-]+)\.(?P<extension>' + export_extensions + ')/isAvailable$', item_view.item_export_available, name="telemeta-item-export-available"),
-                       
+
     url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/visualize/(?P<grapher_id>[0-9a-z_]+)/(?P<width>[0-9A-Z]+)x(?P<height>[0-9A-Z]+)/$', item_view.item_visualize, name="telemeta-item-visualize"),
     url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/analyze/xml/$', item_view.item_analyze_xml, name="telemeta-item-analyze-xml"),
     url(r'^archives/items/(?P<public_id>[A-Za-z0-9._-]+)/item_xspf.xml$', item_view.item_playlist, dict(template="telemeta/mediaitem_xspf.xml", mimetype="application/xspf+xml"), name="telemeta-item-xspf"),
@@ -131,8 +131,8 @@ urlpatterns = patterns('',
     url(r'^search/$', HaystackSearch(), name='haystack_search'),
     url(r'^search/autocomplete/$', autocomplete),
     url(r'^search/quick/(?P<type>[A-Za-z0-9._-]+)/$', HaystackSearch(), name='haystack_search_type'),
-    url(r'^search/advance/$', HaystackAdvanceSearch(form_class=HayAdvanceForm, template='search/advanceSearch.html'), name='haystack_advance_search'),
-    url(r'^search/advance/(?P<type>[A-Za-z0-9._-]+)/$', HaystackAdvanceSearch(form_class=HayAdvanceForm, template='search/advanceSearch.html'), name='haystack_advance_search_type'),
+    url(r'^search/advance/$', HaystackAdvanceSearch(form_class=HayAdvanceForm, template='telemeta/search/search_advanced.html'), name='haystack_advance_search'),
+    url(r'^search/advance/(?P<type>[A-Za-z0-9._-]+)/$', HaystackAdvanceSearch(form_class=HayAdvanceForm, template='telemeta/search/search_advanced.html'), name='haystack_advance_search_type'),
     #url(r'^search/booleaninstru/$', boolean_view.get_boolean_query),
 
     url(r'^search/playlist_add/(?P<type>[A-Za-z0-9._-]+)/$', NewPlaylistView().display, name='haystack_playlist'),
index fe8d016d18a2658323f9954bbc0e56c7f26fd536..648df7328d355d62c4fa20dd821dbf1c1c0cef8a 100644 (file)
@@ -9,7 +9,7 @@ class NewPlaylistView(object):
 
         self.type=type
 
-        template_name = loader.get_template('search/addplaylist.html')
+        template_name = loader.get_template('telemeta/search/addplaylist.html')
 
         idlist = request.POST.getlist('selected_items_list')
         itemlist = []
@@ -31,7 +31,7 @@ class NewPlaylistView(object):
     def addToPlaylist(self, request, type=None):
         self.type=type
 
-        template_name = loader.get_template('search/confirmation_add_playslist.html')
+        template_name = loader.get_template('telemeta/search/confirmation_add_playslist.html')
 
         idlist = request.POST.getlist('item_id')
         selected_playlist_id = request.POST.get('playlist_id')
@@ -58,5 +58,3 @@ class NewPlaylistView(object):
                 'type':self.type,
                 'lastquerypath': request.POST.get('lastquerypath')})
         return HttpResponse(template_name.render(context))
-
-