source: telemeta/templates/telemeta_default/collection_detail.html @ 510ed41

cremcrem2devdev2diademsfeature/breadcrumbsfeature/ts-0.5feature/ts-0.5.4feature/writecacheformagenericinstru_searchlamlam2mapsv3mergenlivemultiproductionrelease/1.4.4sabiodsecurityserversocialstoragetelecastertestvideo
Last change on this file since 510ed41 was 510ed41, checked in by yomguy <yomguy@…>, 3 years ago

fix titles again

  • Property mode set to 100644
File size: 9.8 KB
Line 
1{% extends "telemeta/base.html" %}
2{% load i18n %}
3{% load telemeta_utils %}
4
5{% block head_title %}{% trans "Collection" %}{{collection|prepend:' : '}} - {{ block.super }}{% endblock %}
6
7{% block extra_javascript %}
8<script src="{% url telemeta-js "swfobject.js" %}" type="text/javascript"></script>
9<script src="{% url telemeta-js "popupdiv.js" %}" type="text/javascript"></script>
10<script src="{% url telemeta-js "playlist.js" %}" type="text/javascript"></script>
11<script>
12    {% if user.is_authenticated %}
13    jQuery(document).ready(function(){
14        var p = playlistUtils;
15       
16        {% for playlist in playlists %}
17        p.addPlaylist('{{ playlist.playlist.title }}','{{playlist.playlist.public_id}}');
18        {% endfor %}
19
20        {% if collection %}
21        var anchor = jQuery('#_add_to_playlist');
22        if(anchor.length){
23        anchor.click(function(){
24            p.showAddResourceToPlaylist(anchor,'collection','{{collection.id}}',gettrans('collection added to the selected playlist'));return false;
25        });
26        }
27        {% endif %}
28    });
29        {% endif %}
30</script>
31{% endblock %}
32
33{% if collection %}
34
35{% block title %}
36    <img src="{% url telemeta-images "collections_red.png" %}" style="vertical-align:middle" /> Collection : {{ collection.title }}
37{% endblock %}
38
39{% block title_buttons %}
40  <div class="fixedWidthAsPlayer">
41    {% if user.is_authenticated and perms.telemeta.change_mediacollection %}
42      <a href="{% url telemeta-collection-edit collection.public_id %}" class="component_icon button icon_edit">{% trans "Edit" %}</a>
43      <a href="{% url telemeta-collection-copy collection.public_id %}" class="component_icon button icon_copy">{% trans "Copy" %}</a>
44      <a href="{% url telemeta-collection-additem collection.public_id %}" class="component_icon button icon_add">{% trans "Add item" %}</a>
45     {% endif %}
46    {% if user.is_authenticated %}
47    <a href=# id ="_add_to_playlist" class="component_icon button icon_add_to_playlist">{% trans "Add to playlist" %}</a>
48    {% endif %}
49    <a href="{% url telemeta-collection-dublincore collection.public_id %}" class="component_icon button icon_dublin_core">Dublin Core</a>
50   </div>
51{% endblock %}
52
53{% block content %}
54    <div class="{% if collection.has_mediafile %}{% if public_access or perms.telemeta.can_play_all_items %}with-rightcol{% endif %}{% endif %}">
55        {% if collection.has_mediafile %}
56        {% if public_access or perms.telemeta.can_play_all_items %}
57        <div id="rightcol">
58            <div id="collection_player">
59             <div class="title">
60              <h3><b>{% trans "Listen to this collection" %}</b>
61              (<a href="{% url telemeta-collection-m3u collection.public_id %}">M3U</a>,
62              <a href="{% url telemeta-collection-xspf collection.public_id %}">XSPF</a>)</h3>
63             </div>
64                <!-- This is Jeroen Wijering's Flash MP3 Player,
65                  under CC Attribution-NonCommercial-ShareAlike 2.0 license
66                  from: http://www.jeroenwijering.com/?item=Flash_MP3_Player-->
67                <p id="collection_player_c">
68                  <a href="http://www.macromedia.com/go/getflashplayer">Get Flash</a> to see this player.
69                </p>
70                <script type="text/javascript">
71                  var so = new SWFObject('{% url telemeta-swf "mp3player.swf" %}','playlist','362','200','7');
72                  so.addVariable("file","{% url telemeta-collection-xspf collection.public_id %}");
73                  so.addVariable("displayheight","0");
74                  so.addParam("wmode", "opaque");
75                  so.write('collection_player_c');
76                </script> 
77            </div>
78        </div>
79        {% endif %}
80        {% endif %}
81      {% block infos %}
82        <div class="intro">
83            <span><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> {% if collection.items.count %}{{ collection.items.count }} {% ifequal collection.items.count 1 %}item{% else %}items{% endifequal %}{% else %}No item{% endif %}</span>
84        </div>
85        <div class="infos">
86        {% block general_info %}
87            <dl class="listing">
88                {% dl_field collection "reference" %}
89                {% dl_field collection "title"  %}
90                {% dl_field collection "alt_title" %}
91                {% dl_field collection "creator" placeholder %}
92                {% dl_field collection "recording_context" %}
93                <dt>{% trans "Recording period" %}</dt>
94                    <dd>{% if collection.recorded_from_year %}{{ collection.recorded_from_year }}{% endif %}{% if collection.recorded_from_year and collection.recorded_to_year %} - {% endif %}{% if  collection.recorded_to_year %}{{ collection.recorded_to_year}}{% endif %}</dd>
95                {% dl_field collection "year_published" placeholder %}
96            </dl>
97        {% endblock general_info %}
98        </div>
99        <div class="extraInfos">
100        {% block geoethnic_data %}
101            <div>
102                <h4><a href="#">{% trans "Geographic and cultural informations" %}</a></h4>
103                <div>
104                    <dl class="listing">
105                        {% dl_field collection "countries" join with ", " %}
106                        {% dl_field collection "ethnic_groups" join with ", " placeholder %}
107                    </dl>
108                </div>
109            </div>
110        {% endblock geoethnic_data %}
111        </div>
112        <div class="extraInfos">
113        {% block legal_data %}
114            <div>
115                <h4><a href="#">{% trans "Legal notices" %}</a></h4>
116                <div>
117                    <dl class="listing">
118                        {% if collection.collector_is_creator %}
119                          {% if collection.creator %}
120                          <dt>{% trans "Recordist" %}</dt><dd>{{ collection.creator }}</dd>
121                          {% endif%}
122                        {% else %}
123                        {% dl_field collection "collector" %}
124                        {% endif %}
125                        {% dl_field collection "publisher" %}
126                        {% dl_field collection "publisher_collection" %}
127                        {% dl_field collection "publisher_serial" %}
128                        {% dl_field collection "booklet_author" %}
129                        <dt>{% trans "Bibliographic references" %}</dt>
130                        <dd>{{ collection.external_references|html_line_break|safe }}</dd>
131                        {% dl_field collection "doctype_code" %}
132                        {% dl_field collection "public_access_label" %}
133                        {% dl_field collection "legal_rights" %}
134                    </dl>
135                </div>
136            </div>
137        {% endblock legal_data %}
138        </div>
139        <div class="extraInfos">
140        {% block archive_data %}
141            <div>
142                <h4><a href="#">{% trans "Archiving data" %}</a></h4>
143                <div>
144                    <dl class="listing">
145                        {% dl_field collection "acquisition_mode" %}
146                        {% dl_field collection "cnrs_contributor" %}
147                        {% dl_field collection "metadata_author" %}
148                        <dt>{% trans "Related documentation" %}</dt>
149                        <dd>{{ collection.booklet_description|html_line_break|safe }}</dd>
150                        {% dl_field collection "publishing_status" %}
151                        {% dl_field collection "alt_ids" %}
152                        <dt>{% trans "Comments" %}</dt>
153                        <dd>{{ collection.comment|html_line_break|safe }}</dd>
154                        {% dl_field collection "metadata_writer" %}
155                        {% dl_field collection "travail" %}
156                        {% dl_field collection "items_done" %}
157                        {% dl_field collection "conservation_site" %}
158                    </dl>
159                </div>
160            </div>
161        {% endblock archive_data %}
162        </div>
163        <div class="extraInfos">
164        {% block technical_data %}
165            <div>
166                <h4><a href="#">{% trans "Technical data" %}</a></h4>
167                <div>
168                    <dl class="listing">
169                        {% dl_field collection "code" %}
170                        {% dl_field collection "old_code" %}
171                        <dt>{% trans "Media type" %}</dt><dd>{% trans "Audio" %}</dd>
172                        {% dl_field collection "approx_duration" %}
173                        {% dl_field collection "computed_duration" %}
174                        {% dl_field collection "physical_items_num" %}
175                        <div class="wazing"></div>
176                        <dt>{% trans "Number of items" %}</dt><dd>{{ collection.items.count }}</dd>
177                        {% dl_field collection "physical_format" %}
178                        {% dl_field collection "ad_conversion" %}
179                    </dl>
180                </div>
181            </div>
182        {% endblock technical_data %}
183        </div>
184        <h4>Items</h4>
185        {% with collection.items.enriched as items %}
186        {% with "1" as location_name %}
187            {% include "telemeta/inc/mediaitem_list.html" %}
188        {% endwith %}
189        {% endwith %}
190        <!--
191        {% with collection.ordered_items as items %}
192            {% include "telemeta/inc/mediaitem_list.html" %}
193        {% endwith %}
194        -->
195
196        {% endblock infos %}
197    </div>
198{% endblock %}
199
200{% block delete %}
201{% if user.is_authenticated and perms.telemeta.delete_mediacollection %}
202 <a href="#" onclick="if(confirm(gettrans('delete the collection permanently?'))){window.location.href='{% url telemeta-collection-delete collection.public_id %}';};return false;"
203        class="component_icon button icon_delete" style="float:right;margin-top:0.5em;margin-bottom:1em">{% trans "Delete" %}</a>
204{% endif %}
205
206{% endblock %}
207
208{% else %}
209    <p>No such collection</p>
210{% endif %}
211
Note: See TracBrowser for help on using the repository browser.