From: Guillaume Pellerin Date: Fri, 4 Aug 2017 14:00:52 +0000 (+0200) Subject: Fix advanced search page using jquery-ui 1.11, mv search template directory X-Git-Tag: search~1^2~1 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=118417c6c055b2dcf98c0b64729160e85ea44e6c;p=telemeta.git Fix advanced search page using jquery-ui 1.11, mv search template directory --- diff --git a/app/settings.py b/app/settings.py index d7f30355..22875ab9 100644 --- a/app/settings.py +++ b/app/settings.py @@ -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', - ) diff --git a/docker-compose.yml b/docker-compose.yml index b064e296..8fbb25cc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 index f185a9db..00000000 --- a/telemeta/templates/search/addplaylist.html +++ /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 %} - - -{% endblock %} -{% block content %} - -
{% csrf_token %} -
-
- - - - - - - {% ifequal type "item" %} - {% for item in selected_items_list %} - - - - - {% endfor %} - {% else %} - {% for item in selected_items_list %} - - - - - {% endfor %} - {% endifequal %} - -
{% trans "Selected items : "%}
- {{item}}
- {{item.title}}
-
-
- - -
-
- {% for item in selected_items_list %} - - {% endfor %} - {% if lastquerypath %} - - {% endif %} -
- {% if lastquerypath %} - -
- {% else %} -
- - {% endif %} -
-
-{% endblock %} -{% block extra_javascript %} - - -{% endblock %} diff --git a/telemeta/templates/search/advanceSearch.html b/telemeta/templates/search/advanceSearch.html deleted file mode 100644 index 7e3d6393..00000000 --- a/telemeta/templates/search/advanceSearch.html +++ /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 %} - - - -{% endblock %} -{% block content %} -
-
-
-
- {{form.q.errors}} - {{ form.q.label_tag }}
- {{form.q}} -
-
- {{form.collectors.errors}} - {% trans form.collectors.label_tag %}
- {{form.collectors}} -
-
- {{form.location.errors}} - {% trans form.location.label_tag %}
- {{form.location}} -
-
- {{form.ethnic_group.errors}} - {% trans form.ethnic_group.label_tag %}
- {{form.ethnic_group}} -
-
- {{form.instruments.errors}} - {% trans form.instruments.label_tag %} - {{form.instruments}} - {% comment %}{% trans "Instruments : Boolean Search" %}{% endcomment %} -
- -
- {{form.media_type.errors}} -
-
    - {%ifequal query.media_type 'audio'%} -
  • -
  • -
  • - {%else%} - {%ifequal query.media_type 'video'%} -
  • -
  • -
  • - {%else%} -
  • -
  • -
  • - {%endifequal%} - {%endifequal%} -
- -
-
- {{form.viewable_errors}} -
-
    - {%ifequal query.viewable '2'%} -
  • -
  • -
  • - {%else%} - {%ifequal query.viewable '3'%} -
  • -
  • -
  • - {%else%} -
  • -
  • -
  • - {%endifequal%} - {%endifequal%} -
-
-
-
-
- {{form.recorded_from_date.errors}} {{form.recorded_to_date.errors}} -
- {{form.recorded_from_date}} {{form.recorded_to_date}} -
-
- {{form.item_status_errors}} -
-
    - {%ifequal query.item_status 'pub'%} -
  • -
  • -
  • - {%else%} - {%ifequal query.item_status 'unpub'%} -
  • -
  • -
  • - {%else%} -
  • -
  • -
  • - {%endifequal%} - {%endifequal%} -
-
-
- {{form.year_published_from.errors}} {{form.year_published_to.errors}} -
- {{form.year_published_from}} {{form.year_published_to}} -
-
- {{form.recording_context.errors}} - {{ form.recording_context.label_tag }}
- {{form.recording_context}} -
-
- {{form.physical_format.errors}} - {% trans form.physical_format.label_tag %}
- {{form.physical_format}} -
-
- {{form.code.errors}} - {% trans form.code.label_tag %}
- {{form.code}} -
-
-

-

-
-

- {% if query %} - -
-
- search-results

{% trans "Search Results" %}

-
-
-
{% bootstrap_paginate page range=10 show_first_last="True" %}
-
-
 
-
-
-
- {% ifequal type 'item' %} -

Items ({{item_count}}) | Collections ({{collection_count}}) | Corpus ({{corpus_count}}) | Fonds ({{fonds_count}})

- {% else %} - {% ifequal type 'corpus' %} -

Items ({{item_count}}) | Collections ({{collection_count}}) | Corpus ({{corpus_count}}) | Fonds ({{fonds_count}})

- {% else %} - {% ifequal type 'fonds' %} -

Items ({{item_count}}) | Collections ({{collection_count}}) | Corpus ({{corpus_count}}) | Fonds ({{fonds_count}})

- {% else %} - {% ifequal type 'collection'%} -

Items ({{item_count}}) | Collections ({{collection_count}}) | Corpus ({{corpus_count}}) | Fonds ({{fonds_count}})

- {% endifequal %} - {% endifequal %} - {% endifequal %} - {% endifequal %} -
-
-
- -
- -
-
-
-
-
{% csrf_token %} - {% with object_list as items %} - - - - - {% endwith %} - {% if user.is_authenticated %} - - - {% endif %} -
- {% else %} -
{# Show some example queries to run, maybe query syntax, something else? #} - {% endif %} - - {% comment %} - -
- -
- - {{ booleanForm.management_form}} - {% for form in booleanForm %} - {% if forloop.counter0 == 0 %} - {{ form.start_bracket }} - {{ form.text_field }} - {{ form.end_bracket }} - {% else %} - {% if forloop.counter0 == 1 %} -
- {% endif %} - {{ form.as_p }} - {% if forloop.counter0 == 1 %} -
- {% endif %} - {% endif %} - - {% endfor %} - {% trans "Add field" %} -
- - -
- -

- -
- - {% endcomment %} - -{% endblock %} -{% block extra_javascript %} - - - - - -{% endblock %} diff --git a/telemeta/templates/search/confirmation_add_playslist.html b/telemeta/templates/search/confirmation_add_playslist.html deleted file mode 100644 index ebadf7ec..00000000 --- a/telemeta/templates/search/confirmation_add_playslist.html +++ /dev/null @@ -1,37 +0,0 @@ -{% extends 'telemeta/base.html' %} -{% load telemeta_tags %} -{% load i18n %} - -{% block title %} -{% trans "Playlist Confirmation" %} -{% endblock %} -{% block content %} - - - - - - - {% ifequal type "item" %} - {% for item in selected_items_list %} - - - - - {% endfor %} - {% else %} - {% for item in selected_items_list %} - - - - - {% endfor %} - {% endifequal %} - -
{% trans "Added to playlist : "%}
- {{item}}
- {{item.title}}

- {% if lastquerypath %} - return to search results - {% 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 index 1cdd3ded..00000000 --- a/telemeta/templates/search/filters.html +++ /dev/null @@ -1,151 +0,0 @@ -{% load telemeta_tags %} -{% load i18n %} - -
-
{% trans "Filters" %}
-
- - - {% if facets.fields.item_status %} - - {% for item_status in facets.fields.item_status %} - - {% endfor %} - {% if Published_count == 0 %} - - {% endif %} - {% if Unpublished_count == 0 %} - - {% endif %} - {% else %} - - - {% endif %} - - - {% if facets.fields.digitized %} - - {% for digitized in facets.fields.digitized %} - {% ifequal digitized.0 'T' %} - - {% endifequal %} - {% endfor %} - {% if digitized_count == 0 %} - - {% endif %} - {% else %} - - - {% endif %} - - - {% if facets.fields.item_acces %} - - {% if viewable_count != 0 %} - - {% endif %} - {% if viewable_count == 0 %} - - {% 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' %} - - {% endifequal %} - {% endfor %} - {%endcomment%} - {% else %} - - - {% endif %} - -
{% trans "Item Status" %}{% trans item_status.0 %} {{ item_status.1 }} {% trans "Published" %} 0 {% trans "Unpublished" %} 0{% trans "Item Status" %}{% trans "None" %}
{% trans "Player Status" %}Sound {{ digitized.1 }} {% trans "Sound" %} 0{% trans "Player Status" %}{% trans "None" %}
{% trans "Access Right" %}viewable {{viewable_count}}{% trans "viewable" %} {{viewable_count}}{{ item_acces.0 }} {{ item_acces.1 }}{% trans "Access Right" %}{% trans "None" %}
-
- -
{% trans "Other Filters" %}
-
- - - {% if facets.fields.media_type %} - - {% for media_type in facets.fields.media_type %} - {% ifequal media_type.0 'Audio'%} - - {% endifequal %} - {% ifequal media_type.0 'Video'%} - - {% endifequal %} - {% endfor %} - {% if Video_count == 0 %} - - {% endif %} - {% if Audio_count == 0 %} - - {% endif %} - {% endif %} - - - - {% if facets.fields.recording_context %} - - {% for recording_context in facets.fields.recording_context %} - {% ifequal recording_context.0 'Studio'%} - - {% endifequal %} - {% ifequal recording_context.0 'Radio'%} - - {% endifequal %} - {% ifequal recording_context.0 'Terrain'%} - - {% endifequal %} - {% endfor %} - {% if Terrain_count == 0 %} - - {% endif %} - {% if Radio_count == 0 %} - - {% endif %} - {% if Studio_count == 0 %} - - {% endif %} - {% endif %} - - - {% if facets.fields.physical_format %} - - {% for physical_format in facets.fields.physical_format %} - {% ifequal physical_format.0 'CDR'%} - - {% endifequal %} - {% ifequal physical_format.0 'Disque'%} - - {% endifequal %} - {% ifequal physical_format.0 'Cylindre'%} - - {% endifequal %} - {% endfor %} - {% if CDR_count == 0 %} - - {% endif %} - {% if Disque_count == 0 %} - - {% endif %} - {% if Cylindre_count == 0 %} - - {% endif %} - {% endif %} - -
{% trans "Media Type" %}{{ media_type.0 }} {{ media_type.1 }}{{ media_type.0 }} {{ media_type.1 }} {% trans "Video" %} 0 {% trans "Audio" %} 0
{% trans "Recording Context" %}{{ recording_context.0 }} {{ recording_context.1 }}{{ recording_context.0 }} {{ recording_context.1 }}{{ recording_context.0 }} {{ recording_context.1 }} {% trans "Terrain" %} 0 {% trans "Radio" %} 0 {% trans "Studio" %} 0
{% trans "Physical Format" %}{{ physical_format.0 }} {{ physical_format.1 }}{{ physical_format.0 }} {{ physical_format.1 }}{{ physical_format.0 }} {{ physical_format.1 }} {% trans "CDR" %} 0 {% trans "Disque" %} 0 {% trans "Cylindre" %} 0
-
- -
- -{% if selected_facets %} -

selected filters : - {{selected_facets|join:" + "}}» Remove All Filters

- {% 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 index 038e4c54..00000000 --- a/telemeta/templates/search/indexes/telemeta/instrument_text.txt +++ /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 index 038e4c54..00000000 --- a/telemeta/templates/search/indexes/telemeta/instrumentalias_text.txt +++ /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 index 038e4c54..00000000 --- a/telemeta/templates/search/indexes/telemeta/location_text.txt +++ /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 index d6270a96..00000000 --- a/telemeta/templates/search/indexes/telemeta/locationalias_text.txt +++ /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 index 6e56159f..00000000 --- a/telemeta/templates/search/indexes/telemeta/mediacollection_text.txt +++ /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 index f6c4306b..00000000 --- a/telemeta/templates/search/indexes/telemeta/mediacorpus_text.txt +++ /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 index f6c4306b..00000000 --- a/telemeta/templates/search/indexes/telemeta/mediafonds_text.txt +++ /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 index 2b2d99b5..00000000 --- a/telemeta/templates/search/indexes/telemeta/mediaitem_text.txt +++ /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 index c8c37046..00000000 --- a/telemeta/templates/search/mediacollection_listhaystack.html +++ /dev/null @@ -1,83 +0,0 @@ -{% load telemeta_tags %} -{% load i18n %} - -{% if page.object_list %} - - - - - {% if user.is_authenticated %} - - - {% else %} - - {% endif %} - - - - - - - -{% if user.is_authenticated %} - - {% for result in page.object_list %} - - - - - - - - - - - {% endfor %} - -{% else %} - {% for result in page.object_list %} - - - - - - - - - - {% endfor %} -{% endif %} -
select all {% trans "title" %}{% trans "title" %}{% trans "Digitized" %}{% field_label "MediaCollection" "creator" %}{% trans "Recordist" %}{% trans "Recording period" %}{% trans "Code" %}
- {{ result.object.title }} - - {% if result.object.has_mediafile %} -

d

- {% endif %} -
{{ result.object.creator }}{{ result.object.collector }} - {% 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 %} - - {{ result.object.code|default:result.object.old_code }} -
- {{ result.object.title }} - - {% if result.object.has_mediafile %} -

d

- {% endif %} -
{{ result.object.creator }}{{ result.object.apparent_collector }} - {% 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 %} - - {{ result.object.code|default:result.object.old_code }} -
-{% else %} -

{% trans "No collection" %}

-{% endif %} diff --git a/telemeta/templates/search/mediaitem_listhaystack.html b/telemeta/templates/search/mediaitem_listhaystack.html deleted file mode 100644 index e7a4fe83..00000000 --- a/telemeta/templates/search/mediaitem_listhaystack.html +++ /dev/null @@ -1,92 +0,0 @@ -{% load telemeta_tags %} -{% load i18n %} - -{% if page.object_list %} - - - - - {% if user.is_authenticated %} - - - {% else %} - - {% endif %} - - - {% if location_name %} - - {% else %} - - {% endif %} - - - - -{% if user.is_authenticated %} - - {% for result in page.object_list %} - - - - - - - - - - - {% endfor %} - -{% else %} - {% for result in page.object_list %} - - - - - - - - - - {% endfor %} -{% endif %} - -
select all {% trans "title" %}{% trans "title" %}{% trans "Digitized" %}{% trans "Recordist" %}{% trans "Location" %}{% trans "Country/Continent" %}{% trans "Year of recording" %}{% trans "Code" %}
- {{ result.object }}
-
- {% if result.object.file %} - -

d

- {% endif %} -
{{ result.object.collector }}{{ result.object.location.name }} - {% 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 %} - - {{ result.object.code|default:result.object.old_code }} -
- {{ result.object }}
-
- {% if result.object.file %} - -

d

- {% endif %} -
{{ result.object.collector }}{{ result.object.location.name }} - {% 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 %} - - {{ result.object.code|default:result.object.old_code }} -
-{% else %} -

{% trans "No results found" %}

-{% endif %} - - diff --git a/telemeta/templates/search/mediaresource_listhaystack.html b/telemeta/templates/search/mediaresource_listhaystack.html deleted file mode 100644 index ed1ca57b..00000000 --- a/telemeta/templates/search/mediaresource_listhaystack.html +++ /dev/null @@ -1,64 +0,0 @@ -{% load telemeta_tags %} -{% load i18n %} - -{% if page.object_list %} - - - - - {% if user.is_authenticated %} - - - {% else %} - - {% endif %} - - - - - -{% if user.is_authenticated %} - - {% for result in page.object_list %} - - - - - - - - - {% endfor %} - -{% else %} - {% for result in page.object_list %} - - - - - - - - - {% endfor %} -{% endif %} -
select all {% trans "title" %}{% trans "title" %}{% trans "Digitized" %}{% trans "Description" %}{% trans "Code" %}
- {{ result.object.title }} - - {% if result.object.has_mediafile %} -

d

- {% endif %} -
{{ result.object.descriptions }} - {{ result.object.code }} -
- {{ result.object.title }} - - {% if result.object.has_mediafile %} -

d

- {% endif %} -
{{ result.object.descriptions }} - {{ result.object.code }} -
-{% else %} -

{% trans "No " %}{{ type }}

-{% endif %} diff --git a/telemeta/templates/search/search.html b/telemeta/templates/search/search.html deleted file mode 100644 index f2393d93..00000000 --- a/telemeta/templates/search/search.html +++ /dev/null @@ -1,127 +0,0 @@ -{% extends 'telemeta/base.html' %} -{% load telemeta_tags %} -{% load i18n %} -{% load bootstrap_pagination %} - -{% block title %} -{% endblock %} -{% block extra_stylesheets %} - - -{% endblock %} -{% block content %} - {% if query %} -
-
- search-results

{% trans "Search Results" %}

-
-
-
{% bootstrap_paginate page range=10 show_first_last="True" %}
-
-
 
-
-
-
- {% ifequal type 'collection'%} -

Items ({{item_count}}) | Collections ({{collection_count}}) | Corpus ({{corpus_count}}) | Fonds ({{fonds_count}})

- {% else %} - {% ifequal type 'corpus'%} -

Items ({{item_count}}) | Collections ({{collection_count}}) | Corpus ({{corpus_count}}) | Fonds ({{fonds_count}})

- {% else %} - {% ifequal type 'fonds'%} -

Items ({{item_count}}) | Collections ({{collection_count}}) | Corpus ({{corpus_count}}) | Fonds ({{fonds_count}})

- {% else %} - {% ifequal type 'item' %} -

Items ({{item_count}}) | Collections ({{collection_count}}) | Corpus ({{corpus_count}}) | Fonds ({{fonds_count}})

- {% endifequal %} - {% endifequal %} - {% endifequal %} - {% endifequal %} -
-
-
- -
- -
-
-
-
- {% include "search/filters.html" %} - -
{% csrf_token %} - {% with object_list as items %} - - - {% endwith %} - - {% if user.is_authenticated %} - - - {% endif %} -
- {% else %} - - {% endif %} - -{% endblock %} -{% block extra_javascript %} - - - - -{% endblock %} diff --git a/telemeta/templates/telemeta/inc/tabs.html b/telemeta/templates/telemeta/inc/tabs.html new file mode 100644 index 00000000..096414a6 --- /dev/null +++ b/telemeta/templates/telemeta/inc/tabs.html @@ -0,0 +1,56 @@ +{% load i18n %} +{% load telemeta_tags %} +{% load bootstrap3 %} + + {# spaces between li and a elements breaks layout #} + + diff --git a/telemeta/templates/telemeta/search/addplaylist.html b/telemeta/templates/telemeta/search/addplaylist.html new file mode 100644 index 00000000..f185a9db --- /dev/null +++ b/telemeta/templates/telemeta/search/addplaylist.html @@ -0,0 +1,78 @@ +{% extends 'telemeta/base.html' %} +{% load telemeta_tags %} +{% load i18n %} + +{% block title %} +{% trans "Add to playlist" %} +{% endblock %} +{% block extra_stylesheets %} + + +{% endblock %} +{% block content %} + +
{% csrf_token %} +
+
+ + + + + + + {% ifequal type "item" %} + {% for item in selected_items_list %} + + + + + {% endfor %} + {% else %} + {% for item in selected_items_list %} + + + + + {% endfor %} + {% endifequal %} + +
{% trans "Selected items : "%}
+ {{item}}
+ {{item.title}}
+
+
+ + +
+
+ {% for item in selected_items_list %} + + {% endfor %} + {% if lastquerypath %} + + {% endif %} +
+ {% if lastquerypath %} + +
+ {% else %} +
+ + {% endif %} +
+
+{% endblock %} +{% block extra_javascript %} + + +{% 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 index 00000000..ebadf7ec --- /dev/null +++ b/telemeta/templates/telemeta/search/confirmation_add_playslist.html @@ -0,0 +1,37 @@ +{% extends 'telemeta/base.html' %} +{% load telemeta_tags %} +{% load i18n %} + +{% block title %} +{% trans "Playlist Confirmation" %} +{% endblock %} +{% block content %} + + + + + + + {% ifequal type "item" %} + {% for item in selected_items_list %} + + + + + {% endfor %} + {% else %} + {% for item in selected_items_list %} + + + + + {% endfor %} + {% endifequal %} + +
{% trans "Added to playlist : "%}
+ {{item}}
+ {{item.title}}

+ {% if lastquerypath %} + return to search results + {% 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 index 00000000..1cdd3ded --- /dev/null +++ b/telemeta/templates/telemeta/search/filters.html @@ -0,0 +1,151 @@ +{% load telemeta_tags %} +{% load i18n %} + +
+
{% trans "Filters" %}
+
+ + + {% if facets.fields.item_status %} + + {% for item_status in facets.fields.item_status %} + + {% endfor %} + {% if Published_count == 0 %} + + {% endif %} + {% if Unpublished_count == 0 %} + + {% endif %} + {% else %} + + + {% endif %} + + + {% if facets.fields.digitized %} + + {% for digitized in facets.fields.digitized %} + {% ifequal digitized.0 'T' %} + + {% endifequal %} + {% endfor %} + {% if digitized_count == 0 %} + + {% endif %} + {% else %} + + + {% endif %} + + + {% if facets.fields.item_acces %} + + {% if viewable_count != 0 %} + + {% endif %} + {% if viewable_count == 0 %} + + {% 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' %} + + {% endifequal %} + {% endfor %} + {%endcomment%} + {% else %} + + + {% endif %} + +
{% trans "Item Status" %}{% trans item_status.0 %} {{ item_status.1 }} {% trans "Published" %} 0 {% trans "Unpublished" %} 0{% trans "Item Status" %}{% trans "None" %}
{% trans "Player Status" %}Sound {{ digitized.1 }} {% trans "Sound" %} 0{% trans "Player Status" %}{% trans "None" %}
{% trans "Access Right" %}viewable {{viewable_count}}{% trans "viewable" %} {{viewable_count}}{{ item_acces.0 }} {{ item_acces.1 }}{% trans "Access Right" %}{% trans "None" %}
+
+ +
{% trans "Other Filters" %}
+
+ + + {% if facets.fields.media_type %} + + {% for media_type in facets.fields.media_type %} + {% ifequal media_type.0 'Audio'%} + + {% endifequal %} + {% ifequal media_type.0 'Video'%} + + {% endifequal %} + {% endfor %} + {% if Video_count == 0 %} + + {% endif %} + {% if Audio_count == 0 %} + + {% endif %} + {% endif %} + + + + {% if facets.fields.recording_context %} + + {% for recording_context in facets.fields.recording_context %} + {% ifequal recording_context.0 'Studio'%} + + {% endifequal %} + {% ifequal recording_context.0 'Radio'%} + + {% endifequal %} + {% ifequal recording_context.0 'Terrain'%} + + {% endifequal %} + {% endfor %} + {% if Terrain_count == 0 %} + + {% endif %} + {% if Radio_count == 0 %} + + {% endif %} + {% if Studio_count == 0 %} + + {% endif %} + {% endif %} + + + {% if facets.fields.physical_format %} + + {% for physical_format in facets.fields.physical_format %} + {% ifequal physical_format.0 'CDR'%} + + {% endifequal %} + {% ifequal physical_format.0 'Disque'%} + + {% endifequal %} + {% ifequal physical_format.0 'Cylindre'%} + + {% endifequal %} + {% endfor %} + {% if CDR_count == 0 %} + + {% endif %} + {% if Disque_count == 0 %} + + {% endif %} + {% if Cylindre_count == 0 %} + + {% endif %} + {% endif %} + +
{% trans "Media Type" %}{{ media_type.0 }} {{ media_type.1 }}{{ media_type.0 }} {{ media_type.1 }} {% trans "Video" %} 0 {% trans "Audio" %} 0
{% trans "Recording Context" %}{{ recording_context.0 }} {{ recording_context.1 }}{{ recording_context.0 }} {{ recording_context.1 }}{{ recording_context.0 }} {{ recording_context.1 }} {% trans "Terrain" %} 0 {% trans "Radio" %} 0 {% trans "Studio" %} 0
{% trans "Physical Format" %}{{ physical_format.0 }} {{ physical_format.1 }}{{ physical_format.0 }} {{ physical_format.1 }}{{ physical_format.0 }} {{ physical_format.1 }} {% trans "CDR" %} 0 {% trans "Disque" %} 0 {% trans "Cylindre" %} 0
+
+ +
+ +{% if selected_facets %} +

selected filters : + {{selected_facets|join:" + "}}» Remove All Filters

+ {% 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 index 00000000..038e4c54 --- /dev/null +++ b/telemeta/templates/telemeta/search/indexes/telemeta/instrument_text.txt @@ -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 index 00000000..038e4c54 --- /dev/null +++ b/telemeta/templates/telemeta/search/indexes/telemeta/instrumentalias_text.txt @@ -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 index 00000000..038e4c54 --- /dev/null +++ b/telemeta/templates/telemeta/search/indexes/telemeta/location_text.txt @@ -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 index 00000000..d6270a96 --- /dev/null +++ b/telemeta/templates/telemeta/search/indexes/telemeta/locationalias_text.txt @@ -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 index 00000000..6e56159f --- /dev/null +++ b/telemeta/templates/telemeta/search/indexes/telemeta/mediacollection_text.txt @@ -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 index 00000000..f6c4306b --- /dev/null +++ b/telemeta/templates/telemeta/search/indexes/telemeta/mediacorpus_text.txt @@ -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 index 00000000..f6c4306b --- /dev/null +++ b/telemeta/templates/telemeta/search/indexes/telemeta/mediafonds_text.txt @@ -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 index 00000000..2b2d99b5 --- /dev/null +++ b/telemeta/templates/telemeta/search/indexes/telemeta/mediaitem_text.txt @@ -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 index 00000000..c8c37046 --- /dev/null +++ b/telemeta/templates/telemeta/search/mediacollection_listhaystack.html @@ -0,0 +1,83 @@ +{% load telemeta_tags %} +{% load i18n %} + +{% if page.object_list %} + + + + + {% if user.is_authenticated %} + + + {% else %} + + {% endif %} + + + + + + + +{% if user.is_authenticated %} + + {% for result in page.object_list %} + + + + + + + + + + + {% endfor %} + +{% else %} + {% for result in page.object_list %} + + + + + + + + + + {% endfor %} +{% endif %} +
select all {% trans "title" %}{% trans "title" %}{% trans "Digitized" %}{% field_label "MediaCollection" "creator" %}{% trans "Recordist" %}{% trans "Recording period" %}{% trans "Code" %}
+ {{ result.object.title }} + + {% if result.object.has_mediafile %} +

d

+ {% endif %} +
{{ result.object.creator }}{{ result.object.collector }} + {% 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 %} + + {{ result.object.code|default:result.object.old_code }} +
+ {{ result.object.title }} + + {% if result.object.has_mediafile %} +

d

+ {% endif %} +
{{ result.object.creator }}{{ result.object.apparent_collector }} + {% 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 %} + + {{ result.object.code|default:result.object.old_code }} +
+{% else %} +

{% trans "No collection" %}

+{% endif %} diff --git a/telemeta/templates/telemeta/search/mediaitem_listhaystack.html b/telemeta/templates/telemeta/search/mediaitem_listhaystack.html new file mode 100644 index 00000000..e7a4fe83 --- /dev/null +++ b/telemeta/templates/telemeta/search/mediaitem_listhaystack.html @@ -0,0 +1,92 @@ +{% load telemeta_tags %} +{% load i18n %} + +{% if page.object_list %} + + + + + {% if user.is_authenticated %} + + + {% else %} + + {% endif %} + + + {% if location_name %} + + {% else %} + + {% endif %} + + + + +{% if user.is_authenticated %} + + {% for result in page.object_list %} + + + + + + + + + + + {% endfor %} + +{% else %} + {% for result in page.object_list %} + + + + + + + + + + {% endfor %} +{% endif %} + +
select all {% trans "title" %}{% trans "title" %}{% trans "Digitized" %}{% trans "Recordist" %}{% trans "Location" %}{% trans "Country/Continent" %}{% trans "Year of recording" %}{% trans "Code" %}
+ {{ result.object }}
+
+ {% if result.object.file %} + +

d

+ {% endif %} +
{{ result.object.collector }}{{ result.object.location.name }} + {% 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 %} + + {{ result.object.code|default:result.object.old_code }} +
+ {{ result.object }}
+
+ {% if result.object.file %} + +

d

+ {% endif %} +
{{ result.object.collector }}{{ result.object.location.name }} + {% 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 %} + + {{ result.object.code|default:result.object.old_code }} +
+{% else %} +

{% trans "No results found" %}

+{% endif %} + + diff --git a/telemeta/templates/telemeta/search/mediaresource_listhaystack.html b/telemeta/templates/telemeta/search/mediaresource_listhaystack.html new file mode 100644 index 00000000..ed1ca57b --- /dev/null +++ b/telemeta/templates/telemeta/search/mediaresource_listhaystack.html @@ -0,0 +1,64 @@ +{% load telemeta_tags %} +{% load i18n %} + +{% if page.object_list %} + + + + + {% if user.is_authenticated %} + + + {% else %} + + {% endif %} + + + + + +{% if user.is_authenticated %} + + {% for result in page.object_list %} + + + + + + + + + {% endfor %} + +{% else %} + {% for result in page.object_list %} + + + + + + + + + {% endfor %} +{% endif %} +
select all {% trans "title" %}{% trans "title" %}{% trans "Digitized" %}{% trans "Description" %}{% trans "Code" %}
+ {{ result.object.title }} + + {% if result.object.has_mediafile %} +

d

+ {% endif %} +
{{ result.object.descriptions }} + {{ result.object.code }} +
+ {{ result.object.title }} + + {% if result.object.has_mediafile %} +

d

+ {% endif %} +
{{ result.object.descriptions }} + {{ result.object.code }} +
+{% else %} +

{% trans "No " %}{{ type }}

+{% endif %} diff --git a/telemeta/templates/telemeta/search/search.html b/telemeta/templates/telemeta/search/search.html new file mode 100644 index 00000000..a55c0a90 --- /dev/null +++ b/telemeta/templates/telemeta/search/search.html @@ -0,0 +1,127 @@ +{% extends 'telemeta/base.html' %} +{% load telemeta_tags %} +{% load i18n %} +{% load bootstrap_pagination %} + +{% block title %} +{% endblock %} +{% block extra_stylesheets %} + + +{% endblock %} +{% block content %} + {% if query %} +
+
+ search-results

{% trans "Search Results" %}

+
+
+
{% bootstrap_paginate page range=10 show_first_last="True" %}
+
+
 
+
+
+
+ {% ifequal type 'collection'%} +

Items ({{item_count}}) | Collections ({{collection_count}}) | Corpus ({{corpus_count}}) | Fonds ({{fonds_count}})

+ {% else %} + {% ifequal type 'corpus'%} +

Items ({{item_count}}) | Collections ({{collection_count}}) | Corpus ({{corpus_count}}) | Fonds ({{fonds_count}})

+ {% else %} + {% ifequal type 'fonds'%} +

Items ({{item_count}}) | Collections ({{collection_count}}) | Corpus ({{corpus_count}}) | Fonds ({{fonds_count}})

+ {% else %} + {% ifequal type 'item' %} +

Items ({{item_count}}) | Collections ({{collection_count}}) | Corpus ({{corpus_count}}) | Fonds ({{fonds_count}})

+ {% endifequal %} + {% endifequal %} + {% endifequal %} + {% endifequal %} +
+
+
+ +
+ +
+
+
+
+ {% include "telemeta/search/filters.html" %} + +
{% csrf_token %} + {% with object_list as items %} + + + {% endwith %} + + {% if user.is_authenticated %} + + + {% endif %} +
+ {% else %} + + {% endif %} + +{% endblock %} +{% block extra_javascript %} + + + + +{% endblock %} diff --git a/telemeta/templates/telemeta/search/search_advanced.html b/telemeta/templates/telemeta/search/search_advanced.html new file mode 100644 index 00000000..01bf47f6 --- /dev/null +++ b/telemeta/templates/telemeta/search/search_advanced.html @@ -0,0 +1,291 @@ +{% extends 'telemeta/base.html' %} +{% load telemeta_tags %} +{% load i18n %} +{% load bootstrap_pagination %} + +{% block title %} +{% trans "Search" %} +{% endblock %} + +{% block extra_stylesheets %} + + + +{% endblock %} + +{% block extra_javascript %} + + + + +{% endblock %} + +{% block content %} +
+
+
+
+ {{form.q.errors}} + {{ form.q.label_tag }}
+ {{form.q}} +
+
+ {{form.collectors.errors}} + {% trans form.collectors.label_tag %}
+ {{form.collectors}} +
+
+ {{form.location.errors}} + {% trans form.location.label_tag %}
+ {{form.location}} +
+
+ {{form.ethnic_group.errors}} + {% trans form.ethnic_group.label_tag %}
+ {{form.ethnic_group}} +
+
+ {{form.instruments.errors}} + {% trans form.instruments.label_tag %} + {{form.instruments}} + {% comment %}{% trans "Instruments : Boolean Search" %}{% endcomment %} +
+ +
+ {{form.media_type.errors}} +
+
    + {%ifequal query.media_type 'audio'%} +
  • +
  • +
  • + {%else%} + {%ifequal query.media_type 'video'%} +
  • +
  • +
  • + {%else%} +
  • +
  • +
  • + {%endifequal%} + {%endifequal%} +
+ +
+
+ {{form.viewable_errors}} +
+
    + {%ifequal query.viewable '2'%} +
  • +
  • +
  • + {%else%} + {%ifequal query.viewable '3'%} +
  • +
  • +
  • + {%else%} +
  • +
  • +
  • + {%endifequal%} + {%endifequal%} +
+
+
+
+
+ {{form.recorded_from_date.errors}} {{form.recorded_to_date.errors}} +
+ {{form.recorded_from_date}} {{form.recorded_to_date}} +
+
+ {{form.item_status_errors}} +
+
    + {%ifequal query.item_status 'pub'%} +
  • +
  • +
  • + {%else%} + {%ifequal query.item_status 'unpub'%} +
  • +
  • +
  • + {%else%} +
  • +
  • +
  • + {%endifequal%} + {%endifequal%} +
+
+
+ {{form.year_published_from.errors}} {{form.year_published_to.errors}} +
+ {{form.year_published_from}} {{form.year_published_to}} +
+
+ {{form.recording_context.errors}} + {{ form.recording_context.label_tag }}
+ {{form.recording_context}} +
+
+ {{form.physical_format.errors}} + {% trans form.physical_format.label_tag %}
+ {{form.physical_format}} +
+
+ {{form.code.errors}} + {% trans form.code.label_tag %}
+ {{form.code}} +
+
+

+

+
+

+ {% if query %} + +
+
+ search-results

{% trans "Search Results" %}

+
+
+
{% bootstrap_paginate page range=10 show_first_last="True" %}
+
+
 
+
+
+
+ {% ifequal type 'item' %} +

Items ({{item_count}}) | Collections ({{collection_count}}) | Corpus ({{corpus_count}}) | Fonds ({{fonds_count}})

+ {% else %} + {% ifequal type 'corpus' %} +

Items ({{item_count}}) | Collections ({{collection_count}}) | Corpus ({{corpus_count}}) | Fonds ({{fonds_count}})

+ {% else %} + {% ifequal type 'fonds' %} +

Items ({{item_count}}) | Collections ({{collection_count}}) | Corpus ({{corpus_count}}) | Fonds ({{fonds_count}})

+ {% else %} + {% ifequal type 'collection'%} +

Items ({{item_count}}) | Collections ({{collection_count}}) | Corpus ({{corpus_count}}) | Fonds ({{fonds_count}})

+ {% endifequal %} + {% endifequal %} + {% endifequal %} + {% endifequal %} +
+
+
+ +
+ +
+
+
+
+
{% csrf_token %} + {% with object_list as items %} + + + + + {% endwith %} + {% if user.is_authenticated %} + + + {% endif %} +
+ {% else %} +
{# Show some example queries to run, maybe query syntax, something else? #} + {% endif %} + + {% comment %} + +
+ +
+ + {{ booleanForm.management_form}} + {% for form in booleanForm %} + {% if forloop.counter0 == 0 %} + {{ form.start_bracket }} + {{ form.text_field }} + {{ form.end_bracket }} + {% else %} + {% if forloop.counter0 == 1 %} +
+ {% endif %} + {{ form.as_p }} + {% if forloop.counter0 == 1 %} +
+ {% endif %} + {% endif %} + + {% endfor %} + {% trans "Add field" %} +
+ + +
+ +

+ +
+ + {% endcomment %} + +{% endblock %} diff --git a/telemeta/templates/telemeta/search/search_criteria.html b/telemeta/templates/telemeta/search/search_criteria.html new file mode 100644 index 00000000..c39cb535 --- /dev/null +++ b/telemeta/templates/telemeta/search/search_criteria.html @@ -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 }} + +{% endblock %} + +{% block extra_javascript %} + + + + + + +{% endblock %} + +{% block title %} +
+
+ advanced-search {% trans "Advanced Search" %} +
+
+ +{% endblock %} + +{% block content %} +
+
+ +

+ + +

+ +

+ + +

+ +

+ + +

+ +

+ + +

+ +

+ + +

+ +

+ + +

+ + {% if rec_years %} +

+ + + {% trans "to" %} + +

+ {% endif %} + + {% if pub_years %} +

+ + + {% trans "to" %} + +

+ {% endif %} + +

+ +

+ +
+ +

+{% trans 'Search' %} +

+ +
+{% endblock %} diff --git a/telemeta/templates/telemeta/search/search_results.html b/telemeta/templates/telemeta/search/search_results.html new file mode 100644 index 00000000..034587b2 --- /dev/null +++ b/telemeta/templates/telemeta/search/search_results.html @@ -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 %} +
+
+ search-results {% trans "Search Results" %} ({{ page_obj.start_index }} - {{ page_obj.end_index }} / {{ count }}) +
+
+{% bootstrap_paginate page_obj range=10 show_first_last="True" %} +
+
 
+
+{% endblock %} + +{% block title_buttons %} +
+ {% ifequal type 'items' %} + + + {% endifequal %} + {% ifequal type 'collections' %} + + + {% endifequal %} +
+{% endblock %} + +{% block content %} +{% if criteria %} + +{% endif %} + +{% ifequal type 'items' %} + {% ifequal result_filter "published"%} +

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}})

+ {% with object_list as items %} +
+ {% include "telemeta/inc/mediaitem_list.html" %} +
+ {% endwith %} + {% else%} + {% ifequal result_filter "unpublished"%} +

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}})

+ {% with object_list as items %} +
+ {% include "telemeta/inc/mediaitem_list.html" %} +
+ {% endwith %} + {% else%} + {% ifequal result_filter "full"%} +

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}})

+ {% with object_list as items %} +
+ {% include "telemeta/inc/mediaitem_list.html" %} +
+ {% endwith %} + {% else%} + {% ifequal result_filter "none"%} +

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}})

+ {% with object_list as items %} +
+ {% include "telemeta/inc/mediaitem_list.html" %} +
+ {% endwith %} + {% else%} +

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}})

+ {% with object_list as items %} +
+ {% include "telemeta/inc/mediaitem_list.html" %} +
+ {% endwith %} + {%endifequal%} + {%endifequal%} + {%endifequal%} + {% endifequal %} +{% endifequal %} + +{% ifequal type 'collections' %} + {% ifequal result_filter "published"%} +

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}}) +

+ {% with object_list as collections %} +
+ {% include "telemeta/inc/collection_list.html" %} +
+ {% endwith %} + {% else %} + {%ifequal result_filter "unpublished"%} +

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}}) +

+ {% with object_list as collections %} +
+ {% include "telemeta/inc/collection_list.html" %} +
+ {% endwith %} + {%else%} + {%ifequal result_filter "full"%} +

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}}) +

+ {% with object_list as collections %} +
+ {% include "telemeta/inc/collection_list.html" %} +
+ {% endwith %} + {%else%} + {%ifequal result_filter "none"%} +

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}}) +

+ {% with object_list as collections %} +
+ {% include "telemeta/inc/collection_list.html" %} +
+ {% endwith %} + {%else%} +

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}}) +

+ {% with object_list as collections %} +
+ {% include "telemeta/inc/collection_list.html" %} +
+ {% endwith %} + {%endifequal%} + {%endifequal%} + {%endifequal%} + {%endifequal%} +{% endifequal %} + +{% if type == 'corpus' %} +

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}}) +

+{% endif %} + +{% if type == 'fonds' %} +

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}}) +

+{% endif %} + +{% if type == 'corpus' or type == 'fonds' %} +{% with object_list as resources and type as type %} +
+{% include "telemeta/inc/resource_list.html" %} +
+{% endwith %} +{% endif %} + + +{% endblock %} diff --git a/telemeta/templates/telemeta/search_criteria.html b/telemeta/templates/telemeta/search_criteria.html deleted file mode 100644 index c39cb535..00000000 --- a/telemeta/templates/telemeta/search_criteria.html +++ /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 }} - -{% endblock %} - -{% block extra_javascript %} - - - - - - -{% endblock %} - -{% block title %} -
-
- advanced-search {% trans "Advanced Search" %} -
-
- -{% endblock %} - -{% block content %} -
-
- -

- - -

- -

- - -

- -

- - -

- -

- - -

- -

- - -

- -

- - -

- - {% if rec_years %} -

- - - {% trans "to" %} - -

- {% endif %} - - {% if pub_years %} -

- - - {% trans "to" %} - -

- {% endif %} - -

- -

- -
- -

-{% trans 'Search' %} -

- -
-{% endblock %} diff --git a/telemeta/templates/telemeta/search_results.html b/telemeta/templates/telemeta/search_results.html deleted file mode 100644 index 034587b2..00000000 --- a/telemeta/templates/telemeta/search_results.html +++ /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 %} -
-
- search-results {% trans "Search Results" %} ({{ page_obj.start_index }} - {{ page_obj.end_index }} / {{ count }}) -
-
-{% bootstrap_paginate page_obj range=10 show_first_last="True" %} -
-
 
-
-{% endblock %} - -{% block title_buttons %} -
- {% ifequal type 'items' %} - - - {% endifequal %} - {% ifequal type 'collections' %} - - - {% endifequal %} -
-{% endblock %} - -{% block content %} -{% if criteria %} - -{% endif %} - -{% ifequal type 'items' %} - {% ifequal result_filter "published"%} -

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}})

- {% with object_list as items %} -
- {% include "telemeta/inc/mediaitem_list.html" %} -
- {% endwith %} - {% else%} - {% ifequal result_filter "unpublished"%} -

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}})

- {% with object_list as items %} -
- {% include "telemeta/inc/mediaitem_list.html" %} -
- {% endwith %} - {% else%} - {% ifequal result_filter "full"%} -

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}})

- {% with object_list as items %} -
- {% include "telemeta/inc/mediaitem_list.html" %} -
- {% endwith %} - {% else%} - {% ifequal result_filter "none"%} -

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}})

- {% with object_list as items %} -
- {% include "telemeta/inc/mediaitem_list.html" %} -
- {% endwith %} - {% else%} -

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}})

- {% with object_list as items %} -
- {% include "telemeta/inc/mediaitem_list.html" %} -
- {% endwith %} - {%endifequal%} - {%endifequal%} - {%endifequal%} - {% endifequal %} -{% endifequal %} - -{% ifequal type 'collections' %} - {% ifequal result_filter "published"%} -

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}}) -

- {% with object_list as collections %} -
- {% include "telemeta/inc/collection_list.html" %} -
- {% endwith %} - {% else %} - {%ifequal result_filter "unpublished"%} -

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}}) -

- {% with object_list as collections %} -
- {% include "telemeta/inc/collection_list.html" %} -
- {% endwith %} - {%else%} - {%ifequal result_filter "full"%} -

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}}) -

- {% with object_list as collections %} -
- {% include "telemeta/inc/collection_list.html" %} -
- {% endwith %} - {%else%} - {%ifequal result_filter "none"%} -

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}}) -

- {% with object_list as collections %} -
- {% include "telemeta/inc/collection_list.html" %} -
- {% endwith %} - {%else%} -

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}}) -

- {% with object_list as collections %} -
- {% include "telemeta/inc/collection_list.html" %} -
- {% endwith %} - {%endifequal%} - {%endifequal%} - {%endifequal%} - {%endifequal%} -{% endifequal %} - -{% if type == 'corpus' %} -

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}}) -

-{% endif %} - -{% if type == 'fonds' %} -

Items ({{items_num}}) | Collections ({{collections_num}}) | Corpus ({{corpus_num}}) | Fonds ({{fonds_num}}) -

-{% endif %} - -{% if type == 'corpus' or type == 'fonds' %} -{% with object_list as resources and type as type %} -
-{% include "telemeta/inc/resource_list.html" %} -
-{% endwith %} -{% endif %} - - -{% endblock %} diff --git a/telemeta/urls.py b/telemeta/urls.py index 39c94054..aa557347 100644 --- a/telemeta/urls.py +++ b/telemeta/urls.py @@ -67,7 +67,7 @@ urlpatterns = patterns('', url(r'^archives/items/(?P[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[A-Za-z0-9._-]+)\.(?P' + export_extensions + ')$', item_view.item_export, name="telemeta-item-export"), url(r'^archives/items/download/(?P[A-Za-z0-9._-]+)\.(?P' + export_extensions + ')/isAvailable$', item_view.item_export_available, name="telemeta-item-export-available"), - + url(r'^archives/items/(?P[A-Za-z0-9._-]+)/visualize/(?P[0-9a-z_]+)/(?P[0-9A-Z]+)x(?P[0-9A-Z]+)/$', item_view.item_visualize, name="telemeta-item-visualize"), url(r'^archives/items/(?P[A-Za-z0-9._-]+)/analyze/xml/$', item_view.item_analyze_xml, name="telemeta-item-analyze-xml"), url(r'^archives/items/(?P[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[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[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[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[A-Za-z0-9._-]+)/$', NewPlaylistView().display, name='haystack_playlist'), diff --git a/telemeta/views/new_playlist.py b/telemeta/views/new_playlist.py index fe8d016d..648df732 100644 --- a/telemeta/views/new_playlist.py +++ b/telemeta/views/new_playlist.py @@ -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)) - -