From: Guillaume Pellerin Date: Mon, 18 Sep 2017 10:00:15 +0000 (+0200) Subject: Re-move search templates X-Git-Tag: 1.6.4b~1 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=fb99c7e060c5058efe5885bc24b3b5a4a402cc3e;p=telemeta.git Re-move search templates --- diff --git a/telemeta/templates/search/addplaylist.html b/telemeta/templates/search/addplaylist.html new file mode 100644 index 00000000..f185a9db --- /dev/null +++ b/telemeta/templates/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/search/confirmation_add_playslist.html b/telemeta/templates/search/confirmation_add_playslist.html new file mode 100644 index 00000000..ebadf7ec --- /dev/null +++ b/telemeta/templates/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/search/filters.html b/telemeta/templates/search/filters.html new file mode 100644 index 00000000..1cdd3ded --- /dev/null +++ b/telemeta/templates/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/search/mediacollection_listhaystack.html b/telemeta/templates/search/mediacollection_listhaystack.html new file mode 100644 index 00000000..c8c37046 --- /dev/null +++ b/telemeta/templates/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/search/mediaitem_listhaystack.html b/telemeta/templates/search/mediaitem_listhaystack.html new file mode 100644 index 00000000..e7a4fe83 --- /dev/null +++ b/telemeta/templates/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/search/mediaresource_listhaystack.html b/telemeta/templates/search/mediaresource_listhaystack.html new file mode 100644 index 00000000..ed1ca57b --- /dev/null +++ b/telemeta/templates/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/search/search.html b/telemeta/templates/search/search.html new file mode 100644 index 00000000..ec9b8ee0 --- /dev/null +++ b/telemeta/templates/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 "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/search/search_advanced.html b/telemeta/templates/search/search_advanced.html new file mode 100644 index 00000000..22b43b37 --- /dev/null +++ b/telemeta/templates/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/search/search_criteria.html b/telemeta/templates/search/search_criteria.html new file mode 100644 index 00000000..c39cb535 --- /dev/null +++ b/telemeta/templates/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/search/search_results.html b/telemeta/templates/search/search_results.html new file mode 100644 index 00000000..034587b2 --- /dev/null +++ b/telemeta/templates/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/addplaylist.html b/telemeta/templates/telemeta/search/addplaylist.html deleted file mode 100644 index f185a9db..00000000 --- a/telemeta/templates/telemeta/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/telemeta/search/confirmation_add_playslist.html b/telemeta/templates/telemeta/search/confirmation_add_playslist.html deleted file mode 100644 index ebadf7ec..00000000 --- a/telemeta/templates/telemeta/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/telemeta/search/filters.html b/telemeta/templates/telemeta/search/filters.html deleted file mode 100644 index 1cdd3ded..00000000 --- a/telemeta/templates/telemeta/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/telemeta/search/mediacollection_listhaystack.html b/telemeta/templates/telemeta/search/mediacollection_listhaystack.html deleted file mode 100644 index c8c37046..00000000 --- a/telemeta/templates/telemeta/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/telemeta/search/mediaitem_listhaystack.html b/telemeta/templates/telemeta/search/mediaitem_listhaystack.html deleted file mode 100644 index e7a4fe83..00000000 --- a/telemeta/templates/telemeta/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/telemeta/search/mediaresource_listhaystack.html b/telemeta/templates/telemeta/search/mediaresource_listhaystack.html deleted file mode 100644 index ed1ca57b..00000000 --- a/telemeta/templates/telemeta/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/telemeta/search/search.html b/telemeta/templates/telemeta/search/search.html deleted file mode 100644 index a55c0a90..00000000 --- a/telemeta/templates/telemeta/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 "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 deleted file mode 100644 index 01bf47f6..00000000 --- a/telemeta/templates/telemeta/search/search_advanced.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 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 deleted file mode 100644 index c39cb535..00000000 --- a/telemeta/templates/telemeta/search/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/search_results.html b/telemeta/templates/telemeta/search/search_results.html deleted file mode 100644 index 034587b2..00000000 --- a/telemeta/templates/telemeta/search/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 d047f972..26b17236 100644 --- a/telemeta/urls.py +++ b/telemeta/urls.py @@ -133,8 +133,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='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/advance/$', HaystackAdvanceSearch(form_class=HayAdvanceForm, template='search/search_advanced.html'), name='haystack_advance_search'), + url(r'^search/advance/(?P[A-Za-z0-9._-]+)/$', HaystackAdvanceSearch(form_class=HayAdvanceForm, template='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 648df732..b629d12f 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('telemeta/search/addplaylist.html') + template_name = loader.get_template('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('telemeta/search/confirmation_add_playslist.html') + template_name = loader.get_template('search/confirmation_add_playslist.html') idlist = request.POST.getlist('item_id') selected_playlist_id = request.POST.get('playlist_id') diff --git a/telemeta/views/search.py b/telemeta/views/search.py index 2bef482a..dbcd44ca 100644 --- a/telemeta/views/search.py +++ b/telemeta/views/search.py @@ -29,8 +29,9 @@ from django.http import HttpResponse class HaystackSearch(FacetedSearchView, SavedSearchView): - search_key = 'quick' + search_key = 'quick' + def __call__(self, request, type=None): self.type = type self.form_class = HaySearchForm @@ -204,4 +205,4 @@ def autocomplete(request): return HttpResponse(the_data, content_type='application/json') def escape_accent_and_lower(chaine): - return unicodedata.normalize('NFD', chaine).encode('ascii', 'ignore').lower() \ No newline at end of file + return unicodedata.normalize('NFD', chaine).encode('ascii', 'ignore').lower()