]> git.parisson.com Git - telemeta.git/commitdiff
Merging corpus and fonds templates into a single one
authorRaouf Benmansour <rbenmansour@iut.univ-paris8.fr>
Thu, 7 Jan 2016 10:52:18 +0000 (11:52 +0100)
committerRaouf Benmansour <rbenmansour@iut.univ-paris8.fr>
Fri, 8 Jan 2016 09:43:45 +0000 (10:43 +0100)
telemeta/templates/search/advanceSearch.html
telemeta/templates/search/mediacorpus_listhaystack.html [deleted file]
telemeta/templates/search/mediafonds_listhaystack.html [deleted file]
telemeta/templates/search/mediaresource_listhaystack.html [new file with mode: 0644]
telemeta/templates/search/search.html

index ca1c381a019ce6355ab78ba98201dba92a1fb068..6a7e373b3b16774d6aa3655ee7d02396f7966d6f 100644 (file)
                         {% 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" %}
                             {% 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 (file)
index bfc102f..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% if page.object_list %}
-
-<table class="listing">
-<tr>
-    {% if user.is_authenticated %}
-        <th class="highlight"><input id="selectAll" type="checkbox"/> select all </th>
-        <th>{% trans "title" %}</th>
-    {% else %}
-        <th class="highlight">{% trans "title" %}</th>
-    {% endif %}
-    <th>{% trans "Digitized" %}</th>
-    <th>{% trans "Description" %}</th>
-    <th>{% trans "Code" %}</th>
-</tr>
-{% if user.is_authenticated %}
-    {% for result in page.object_list %}
-    <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-        <td class="highlight"><input type="checkbox" class="check1" name="selected_items_list" value="{{ result.object.id }}"/></td>
-        <td>
-            <a href="{% url "telemeta-resource-detail" type result.object.public_id %}">{{ result.object.title }}</a>
-        </td>
-        <td>
-          {% if result.object.has_mediafile %}
-           <center><span class="glyphicon glyphicon-volume-up" style="font-size: 1.3em;"></span></center>
-          {% endif %}
-        </td>
-
-        <td>{{ result.object.description }}</td>
-        <td>
-            {{ result.object.code }}
-        </td>
-    </tr>
-    {% endfor %}
-{% else %}
-    {% for result in page.object_list %}
-    <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-        <td class="highlight"><input type="checkbox" class="check1" name="selected_items_list" value="{{ result.object.id }}"/></td>
-        <td>
-            <a href="{% url "telemeta-resource-detail" type result.object.public_id %}">{{ result.object.title }}</a>
-        </td>
-        <td>
-          {% if result.object.has_mediafile %}
-           <center><span class="glyphicon glyphicon-volume-up" style="font-size: 1.3em;"></span></center>
-          {% endif %}
-        </td>
-
-        <td>{{ result.object.description }}</td>
-        <td>
-            {{ result.object.code }}
-        </td>
-    </tr>
-    {% endfor %}
-{% endif %}
-</table>
-{% else %}
-    <p>{% trans "No corpus" %}</p>
-{% endif %}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/telemeta/templates/search/mediafonds_listhaystack.html b/telemeta/templates/search/mediafonds_listhaystack.html
deleted file mode 100644 (file)
index 53bef27..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-{% load telemeta_utils %}
-{% load i18n %}
-
-{% if page.object_list %}
-
-<table class="listing">
-<tr>
-    {% if user.is_authenticated %}
-        <th class="highlight"><input id="selectAll" type="checkbox"/> select all </th>
-        <th>{% trans "title" %}</th>
-    {% else %}
-        <th class="highlight">{% trans "title" %}</th>
-    {% endif %}
-    <th>{% trans "Digitized" %}</th>
-    <th>{% trans "Description" %}</th>
-    <th>{% trans "Code" %}</th>
-</tr>
-{% if user.is_authenticated %}
-    {% for result in page.object_list %}
-    <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-        <td class="highlight"><input type="checkbox" class="check1" name="selected_items_list" value="{{ result.object.id }}"/></td>
-        <td>
-            <a href="{% url "telemeta-resource-detail" type result.object.public_id %}">{{ result.object.title }}</a>
-        </td>
-        <td>
-          {% if result.object.has_mediafile %}
-           <center><span class="glyphicon glyphicon-volume-up" style="font-size: 1.3em;"></span></center>
-          {% endif %}
-        </td>
-
-        <td>{{ result.object.description }}</td>
-        <td>
-            {{ result.object.code }}
-        </td>
-    </tr>
-    {% endfor %}
-{% else %}
-    {% for result in page.object_list %}
-    <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-        <td class="highlight"><input type="checkbox" class="check1" name="selected_items_list" value="{{ result.object.id }}"/></td>
-        <td>
-            <a href="{% url "telemeta-resource-detail" type result.object.public_id %}">{{ result.object.title }}</a>
-        </td>
-        <td>
-          {% if result.object.has_mediafile %}
-           <center><span class="glyphicon glyphicon-volume-up" style="font-size: 1.3em;"></span></center>
-          {% endif %}
-        </td>
-
-        <td>{{ result.object.description }}</td>
-        <td>
-            {{ result.object.code }}
-        </td>
-    </tr>
-    {% endfor %}
-{% endif %}
-</table>
-{% else %}
-    <p>{% trans "No fonds" %}</p>
-{% endif %}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/telemeta/templates/search/mediaresource_listhaystack.html b/telemeta/templates/search/mediaresource_listhaystack.html
new file mode 100644 (file)
index 0000000..44de7db
--- /dev/null
@@ -0,0 +1,60 @@
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% if page.object_list %}
+
+<table class="listing">
+<tr>
+    {% if user.is_authenticated %}
+        <th class="highlight"><input id="selectAll" type="checkbox"/> select all </th>
+        <th>{% trans "title" %}</th>
+    {% else %}
+        <th class="highlight">{% trans "title" %}</th>
+    {% endif %}
+    <th>{% trans "Digitized" %}</th>
+    <th>{% trans "Description" %}</th>
+    <th>{% trans "Code" %}</th>
+</tr>
+{% if user.is_authenticated %}
+    {% for result in page.object_list %}
+    <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
+        <td class="highlight"><input type="checkbox" class="check1" name="selected_items_list" value="{{ result.object.id }}"/></td>
+        <td>
+            <a href="{% url "telemeta-resource-detail" type result.object.public_id %}">{{ result.object.title }}</a>
+        </td>
+        <td>
+          {% if result.object.has_mediafile %}
+           <center><span class="glyphicon glyphicon-volume-up" style="font-size: 1.3em;"></span></center>
+          {% endif %}
+        </td>
+
+        <td>{{ result.object.description }}</td>
+        <td>
+            {{ result.object.code }}
+        </td>
+    </tr>
+    {% endfor %}
+{% else %}
+    {% for result in page.object_list %}
+    <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
+        <td class="highlight"><input type="checkbox" class="check1" name="selected_items_list" value="{{ result.object.id }}"/></td>
+        <td>
+            <a href="{% url "telemeta-resource-detail" type result.object.public_id %}">{{ result.object.title }}</a>
+        </td>
+        <td>
+          {% if result.object.has_mediafile %}
+           <center><span class="glyphicon glyphicon-volume-up" style="font-size: 1.3em;"></span></center>
+          {% endif %}
+        </td>
+
+        <td>{{ result.object.description }}</td>
+        <td>
+            {{ result.object.code }}
+        </td>
+    </tr>
+    {% endfor %}
+{% endif %}
+</table>
+{% else %}
+    <p>{% trans "No " %}{{ type }} </p>
+{% endif %}
index ada518284542080d905ef48a39fe2606f386e57e..9dea75e97a0ad842a1cdb1b0cdbd5f63ab762f11 100644 (file)
                             {% 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%}
                             {% 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%}