]> git.parisson.com Git - telemeta.git/commitdiff
add year of recording to tabular lists ; fix some js error
authorolivier <>
Tue, 9 Feb 2010 18:17:04 +0000 (18:17 +0000)
committerolivier <>
Tue, 9 Feb 2010 18:17:04 +0000 (18:17 +0000)
telemeta/htdocs/css/telemeta.css
telemeta/htdocs/js/player.js
telemeta/templates/telemeta_default/collection_detail.html
telemeta/templates/telemeta_default/inc/collection_list.html
telemeta/templates/telemeta_default/inc/mediaitem_list.html

index a77ee55cb9c759b627e7872b767408a1568968aa..fb90179c34098e913b8ee39aef9de0bf6775c810 100644 (file)
@@ -585,8 +585,10 @@ table.listing thead th {
 table.listing thead th :link:hover, table.listing thead th :visited:hover {\r
     background-color: transparent;\r
 }\r
-table.listing thead th a {\r
+table.listing a {\r
     border: none;\r
+}\r
+table.listing thead th a {\r
     padding-right: 12px;\r
 }\r
 table.listing th.asc a, table.listing th.desc a { font-weight: bold }\r
index 2a479828c5194644e30cf9ced24fd3c3783aafb9..4ff463d1c192db9eb5d499ebe7fae67978da6d91 100644 (file)
@@ -44,6 +44,9 @@ function change_visualizer() {
 
 function load_player(duration) {
     $(document).ready(function () {
+        if (!$('#player').length)
+            return;
+
         soundUrl = $('.ts-wave a').attr('href');
 
         $('.ts-wave a img').insertAfter('.ts-wave a');
index bf95a9f619d082dd1871929d8e2fa032c5297f35..46c27d7bb213126c0d61a33cf4d0e26ffc7ca502 100644 (file)
         </div>\r
         <h4>Items</h4>\r
         {% with collection.items.enriched as items %}\r
+        {% with "1" as location_name %}\r
             {% include "telemeta/inc/mediaitem_list.html" %}\r
         {% endwith %}\r
+        {% endwith %}\r
         <!--\r
         {% with collection.ordered_items as items %}\r
             {% include "telemeta/inc/mediaitem_list.html" %}\r
index 642ba3eb2a5d873021562d8200272307b96c44f6..1c99c65ebe9eb38c1ad7542bcb46b7f00a6024cc 100644 (file)
@@ -13,6 +13,7 @@
     <th class="highlight">{% trans "Title" %}</th>
     <th>{% field_label "MediaCollection" "creator" %}</th>
     <th>{% trans "Recordist" %}</th>
+    <th>{% trans "Year of recording" %}</th>
 </tr>
 {% for collection in collections %}
 <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
     </td>
     <td>{{ collection.creator }}</td>
     <td>{{ collection.apparent_collector }}</td>
+    <td>
+    {% if collection.recorded_from_year %}
+        {{ collection.recorded_from_year }}
+        {% if collection.recorded_to_year and collection.recorded_to_year != collection.recorded_from_year %}
+            - {{ collection.recorded_to_year }}
+        {% endif %}
+    {% endif %}
+    </td>
 </tr>
 {% endfor %}
 </table>
index 8d8f5a73d5cd8d8011a984d7ebe673d1a714e803..1bf86309bbf82c4093d2a60ebc9aef23e334fc8c 100644 (file)
 <tr>
     <th class="highlight">{% trans "Title" %}</th>
     <th>{% trans "Recordist" %}</th>
+    {% if location_name %}
+    <th>{% trans "Location" %}</th>
+    {% else %}
     <th>{% trans "Country/Continent" %}</th>
+    {% endif %}
+    <th>{% trans "Year of recording" %}</th>
 </tr>
 {% for item in items %}
 <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
         <a href="{% url telemeta-item-detail item.public_id %}">{{ item }}</a>
     </td>
     <td>{{ item.apparent_collector }}</td>
+    {% if location_name %}
+    <td>{{ item.location.name }}</td>
+    {% else %}
     <td>{{ item.country_or_continent|default:'&nbsp;' }}</td>
+    {% endif %}
+    <td>
+    {% if item.recorded_from_date %}
+        {{ item.recorded_from_date.year }}
+        {% if item.recorded_to_date and item.recorded_to_date.year != item.recorded_from_date.year %}
+            - {{ item.recorded_to_date.year }}
+        {% endif %}
+    {% endif %}
+    </td>
 </tr>
 {% endfor %}
 </table>