From 728c736b11df34ca341aa1c229dafb6e6aa44ce5 Mon Sep 17 00:00:00 2001 From: Raouf Benmansour Date: Thu, 7 Jan 2016 11:52:18 +0100 Subject: [PATCH] Merging corpus and fonds templates into a single one --- telemeta/templates/search/advanceSearch.html | 8 +- .../search/mediacorpus_listhaystack.html | 73 ------------------- ...k.html => mediaresource_listhaystack.html} | 15 +--- telemeta/templates/search/search.html | 16 +--- 4 files changed, 9 insertions(+), 103 deletions(-) delete mode 100644 telemeta/templates/search/mediacorpus_listhaystack.html rename telemeta/templates/search/{mediafonds_listhaystack.html => mediaresource_listhaystack.html} (97%) diff --git a/telemeta/templates/search/advanceSearch.html b/telemeta/templates/search/advanceSearch.html index ca1c381a..6a7e373b 100644 --- a/telemeta/templates/search/advanceSearch.html +++ b/telemeta/templates/search/advanceSearch.html @@ -190,10 +190,10 @@ {% include "search/mediaitem_listhaystack.html" %} {% else %} {% ifequal type 'corpus' %} - {% include "search/mediacorpus_listhaystack.html" %} + {% include "search/mediaresource_listhaystack.html" %} {% else %} {% ifequal type 'fonds' %} - {% include "search/mediafonds_listhaystack.html" %} + {% include "search/mediaresource_listhaystack.html" %} {% else %} {% ifequal type 'collection' %} {% include "search/mediacollection_listhaystack.html" %} @@ -208,10 +208,10 @@ {% include "search/mediaitem_listhaystack.html" %} {% else %} {% ifequal type 'corpus' %} - {% include "search/mediacorpus_listhaystack.html" %} + {% include "search/mediaresource_listhaystack.html" %} {% else %} {% ifequal type 'fonds' %} - {% include "search/mediafonds_listhaystack.html" %} + {% include "search/mediaresource_listhaystack.html" %} {% else %} {% ifequal type 'collection' %} {% include "search/mediacollection_listhaystack.html" %} diff --git a/telemeta/templates/search/mediacorpus_listhaystack.html b/telemeta/templates/search/mediacorpus_listhaystack.html deleted file mode 100644 index bfc102f3..00000000 --- a/telemeta/templates/search/mediacorpus_listhaystack.html +++ /dev/null @@ -1,73 +0,0 @@ -{% load telemeta_utils %} -{% 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 %} -
- {% endif %} -
{{ result.object.description }} - {{ result.object.code }} -
- {{ result.object.title }} - - {% if result.object.has_mediafile %} -
- {% endif %} -
{{ result.object.description }} - {{ result.object.code }} -
-{% else %} -

{% trans "No corpus" %}

-{% endif %} - - - - - - - - - - - - - diff --git a/telemeta/templates/search/mediafonds_listhaystack.html b/telemeta/templates/search/mediaresource_listhaystack.html similarity index 97% rename from telemeta/templates/search/mediafonds_listhaystack.html rename to telemeta/templates/search/mediaresource_listhaystack.html index 53bef277..44de7db7 100644 --- a/telemeta/templates/search/mediafonds_listhaystack.html +++ b/telemeta/templates/search/mediaresource_listhaystack.html @@ -56,18 +56,5 @@ {% endif %} {% else %} -

{% trans "No fonds" %}

+

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

{% endif %} - - - - - - - - - - - - - diff --git a/telemeta/templates/search/search.html b/telemeta/templates/search/search.html index ada51828..9dea75e9 100644 --- a/telemeta/templates/search/search.html +++ b/telemeta/templates/search/search.html @@ -66,14 +66,10 @@ {% include "search/mediacollection_listhaystack.html" %} {% else %} {% ifequal type 'corpus' %} - {% include "search/mediacorpus_listhaystack.html" %} + {% include "search/mediaresource_listhaystack.html" %} {% else %} {% ifequal type 'fonds' %} - {% include "search/mediafonds_listhaystack.html" %} - {% else %} - {% ifequal type 'fonds' %} - {% include "search/mediafonds_listhaystack.html" %} - {%endifequal%} + {% include "search/mediaresource_listhaystack.html" %} {%endifequal%} {%endifequal%} {%endifequal%} @@ -88,14 +84,10 @@ {% include "search/mediacollection_listhaystack.html" %} {% else %} {% ifequal type 'corpus' %} - {% include "search/mediacorpus_listhaystack.html" %} + {% include "search/mediaresource_listhaystack.html" %} {% else %} {% ifequal type 'fonds' %} - {% include "search/mediafonds_listhaystack.html" %} - {% else %} - {% ifequal type 'fonds' %} - {% include "search/mediafonds_listhaystack.html" %} - {%endifequal%} + {% include "search/mediaresource_listhaystack.html" %} {%endifequal%} {%endifequal%} {%endifequal%} -- 2.39.5