| 1 | {% extends "telemeta/base.html" %} |
|---|
| 2 | {% load telemeta_utils %} |
|---|
| 3 | {% load i18n %} |
|---|
| 4 | |
|---|
| 5 | {% block head_title %}{{ block.super }} - {% trans "Item" %} : {{ item.title }}{% endblock %} |
|---|
| 6 | |
|---|
| 7 | {% block stylesheets %} |
|---|
| 8 | {{ block.super }} |
|---|
| 9 | <link rel="stylesheet" type="text/css" href="{% url telemeta-timeside "skins/lab/style.css" %}" /> |
|---|
| 10 | <link rel="stylesheet" type="text/css" href="{% url telemeta-css "player.css" %}" /> |
|---|
| 11 | {% endblock %} |
|---|
| 12 | |
|---|
| 13 | {% block extra_javascript %} |
|---|
| 14 | {% if item %} |
|---|
| 15 | |
|---|
| 16 | <script src="{% url telemeta-timeside "js/libs/soundmanager2-nodebug-jsmin.js" %}" type="text/javascript"></script> |
|---|
| 17 | <script src="{% url telemeta-timeside "js/libs/raphael-min.js" %}" type="text/javascript"></script> |
|---|
| 18 | <script src="{% url telemeta-timeside "js/timeside.js" %}" type="text/javascript"></script> |
|---|
| 19 | <script src="{% url telemeta-js "popupdiv.js" %}" type="text/javascript"></script> |
|---|
| 20 | <script src="{% url telemeta-js "playlist.js" %}" type="text/javascript"></script> |
|---|
| 21 | <script src="{% url telemeta-js "playerLoader.js" %}" type="text/javascript"></script> |
|---|
| 22 | <script src="{% url telemeta-js "divmarker.js" %}" type="text/javascript"></script> |
|---|
| 23 | |
|---|
| 24 | <script type="text/javascript"> |
|---|
| 25 | //soundManager.url = '{% url telemeta-swf "./" %}'; |
|---|
| 26 | soundManager.url = "{% url telemeta-timeside "swf/" %}"; |
|---|
| 27 | soundManager.flashVersion = 9; |
|---|
| 28 | soundManager.useMovieStar = true; // enable MP4/M4A/AAC |
|---|
| 29 | soundManager.debugMode = false; |
|---|
| 30 | soundManager.allowPolling = true; |
|---|
| 31 | |
|---|
| 32 | {% if user.is_authenticated %} |
|---|
| 33 | {% for playlist in playlists %} |
|---|
| 34 | playlistUtils.addPlaylist('{{ playlist.playlist.title }}','{{playlist.playlist.public_id}}'); |
|---|
| 35 | {% endfor %} |
|---|
| 36 | {% endif %} |
|---|
| 37 | |
|---|
| 38 | jQuery(window).ready(function(){ |
|---|
| 39 | var anchor = jQuery('#_add_to_playlist'); |
|---|
| 40 | if(anchor.length){ |
|---|
| 41 | anchor.unbind('click').click(function(){ |
|---|
| 42 | playlistUtils.showAddResourceToPlaylist(anchor,'item','{{item.id}}',gettrans('item added to the selected playlist')); |
|---|
| 43 | return false; |
|---|
| 44 | }); |
|---|
| 45 | } |
|---|
| 46 | }); |
|---|
| 47 | |
|---|
| 48 | //initializing the visualizers to be passed to the player |
|---|
| 49 | var visualizers = {}; |
|---|
| 50 | {% for v in visualizers %} |
|---|
| 51 | visualizers["{{v.name}}"] = "{% url telemeta-item-visualize item.public_id,v.id,"WIDTH","HEIGHT" %}"; |
|---|
| 52 | {% endfor %} |
|---|
| 53 | |
|---|
| 54 | |
|---|
| 55 | //loadPlayer(analizerUrl, soundUrl, itemId, visualizers, currentUserName, isStaffOrSuperuser) |
|---|
| 56 | {% if user.is_staff or user.is_superuser %} |
|---|
| 57 | var superuser = true; |
|---|
| 58 | {% else %} |
|---|
| 59 | var superuser = false; |
|---|
| 60 | {% endif %} |
|---|
| 61 | loadPlayer('{% url telemeta-item-analyze-xml item.public_id %}', |
|---|
| 62 | "{% url telemeta-item-export item.public_id,"mp3" %}", '{{item.id}}', visualizers, CURRENT_USER_NAME, superuser); |
|---|
| 63 | |
|---|
| 64 | </script> |
|---|
| 65 | {% endif %} |
|---|
| 66 | {% endblock %} |
|---|
| 67 | |
|---|
| 68 | {% if item %} |
|---|
| 69 | |
|---|
| 70 | {% block title %} |
|---|
| 71 | <img src="images/item.png" alt="item" style="vertical-align:middle" /> Item : {{ item }} |
|---|
| 72 | {% endblock %} |
|---|
| 73 | |
|---|
| 74 | {% block title_buttons %} |
|---|
| 75 | <div class="fixedWidthAsPlayer"> |
|---|
| 76 | {% if user.is_authenticated and perms.telemeta.change_mediaitem %} |
|---|
| 77 | <a href="{% url telemeta-item-edit item.public_id %}" class="component_icon button icon_edit">{% trans "Edit" %}</a> |
|---|
| 78 | <a href="{% url telemeta-item-copy item.public_id %}" class="component_icon button icon_copy">{% trans "Copy" %}</a> |
|---|
| 79 | {% endif %} |
|---|
| 80 | {% if user.is_authenticated %} |
|---|
| 81 | <a id="_add_to_playlist" href='#' class="component_icon button icon_add_to_playlist">{% trans "Add to playlist" %}</a> |
|---|
| 82 | {% endif %} |
|---|
| 83 | <a href="{% url telemeta-item-detail previous %}" class="component_icon button icon_previous">{% trans "Previous" %}</a> |
|---|
| 84 | <a href="{% url telemeta-item-detail next %}" class="component_icon button icon_next">{% trans "Next" %}</a> |
|---|
| 85 | <a href="{% url telemeta-item-dublincore item.public_id %}" class="component_icon button icon_dublin_core">Dublin Core</a> |
|---|
| 86 | </div> |
|---|
| 87 | {% endblock %} |
|---|
| 88 | |
|---|
| 89 | {% block content %} |
|---|
| 90 | <div class="{% if item.file %}{% if item.public_access == 'full' or public_access or user.is_staff %}with-rightcol{% endif %}{% endif %}"> |
|---|
| 91 | {% if item.file %} |
|---|
| 92 | {% if public_access or user.is_staff or user.is_superuser %} |
|---|
| 93 | <div id="player_maximized" class="ts-skin-lab"> |
|---|
| 94 | <a href="#" class="toggle">Minimize</a> |
|---|
| 95 | <div class="wazing"></div> |
|---|
| 96 | </div> |
|---|
| 97 | <div id="rightcol"> |
|---|
| 98 | <div id="player_minimized" class="ts-skin-lab"> |
|---|
| 99 | <a href="#" class="toggle">Maximize</a> |
|---|
| 100 | <div class="wazing"></div> |
|---|
| 101 | <div id="player" class="ts-player"> |
|---|
| 102 | </div> |
|---|
| 103 | </div> |
|---|
| 104 | |
|---|
| 105 | <!-- </div> --> |
|---|
| 106 | <div id="tabs_container"> |
|---|
| 107 | <!-- this div will be hidden when everything is fully loaded--> |
|---|
| 108 | <span id="loading_span" href="#"><img style="vertical-align:middle" alt="wait" src="/images/wait.gif"/> |
|---|
| 109 | <span id="loading_span_text">Loading...</span></span> |
|---|
| 110 | <a id="tab_analysis" style="display:none" class ="tab" href="#">{% trans "Analysis" %}</a><!-- |
|---|
| 111 | do not let space here as it appears in the document!!!!! |
|---|
| 112 | --><a id="tab_markers" style="display:none" class="tab" href="#">{% trans "Markers" %}</a> |
|---|
| 113 | </div> |
|---|
| 114 | |
|---|
| 115 | <div class="markers" id="markers_div_id"></div> |
|---|
| 116 | |
|---|
| 117 | <div class="analyzer" id="analyzer_div_id"> |
|---|
| 118 | <table width="100%"> |
|---|
| 119 | <tr class="analyzer-title"> |
|---|
| 120 | <td>{% trans "Property" %}</td> |
|---|
| 121 | <td>{% trans "Value" %}</td> |
|---|
| 122 | <td>{% trans "Unit" %}</td> |
|---|
| 123 | </tr> |
|---|
| 124 | </table> |
|---|
| 125 | </div> |
|---|
| 126 | <!--</div>--> |
|---|
| 127 | |
|---|
| 128 | {% if audio_export_enabled %} |
|---|
| 129 | <div class="exporter"> |
|---|
| 130 | <p><img src="images/download.png" alt="download" style="vertical-align:middle" /> {% trans "Download:" %} |
|---|
| 131 | {% for format in export_formats %} |
|---|
| 132 | <a href="{% url telemeta-item-export item.public_id,format.extension %}"> |
|---|
| 133 | <img src="images/{{ format.extension }}.png" style="vertical-align:middle" alt="{{ format.extension }}" /></a> |
|---|
| 134 | {% endfor %}</p> |
|---|
| 135 | </div> |
|---|
| 136 | {% endif %} |
|---|
| 137 | |
|---|
| 138 | </div> |
|---|
| 139 | {% endif %} |
|---|
| 140 | {% endif %} |
|---|
| 141 | |
|---|
| 142 | {% block infos %} |
|---|
| 143 | <div class="infos"> |
|---|
| 144 | {% block general_info %} |
|---|
| 145 | <dl class="listing"> |
|---|
| 146 | {% dl_field item "title" placeholder %} |
|---|
| 147 | {% dl_field item "alt_title" %} |
|---|
| 148 | {% dl_field item "collector" placeholder %} |
|---|
| 149 | <dt>{% field_label item "collection" %}</dt> |
|---|
| 150 | <dd><a href="{% url telemeta-collection-detail item.collection.public_id %}">{{ item.collection }}</a></dd> |
|---|
| 151 | <dt>{% trans "Recording date" %}</dt> |
|---|
| 152 | |
|---|
| 153 | <dd>{% if item.recorded_from_date %}{{ item.recorded_from_date }} {{ item.recorded_to_date|prepend:" - " }}{% endif %}</dd> |
|---|
| 154 | |
|---|
| 155 | </dl> |
|---|
| 156 | {% endblock general_info %} |
|---|
| 157 | </div> |
|---|
| 158 | <div class="extraInfos"> |
|---|
| 159 | {% block geoethnic_data %} |
|---|
| 160 | <div> |
|---|
| 161 | <h4><a href="#">{% trans "Geographic and cultural informations" %}</a></h4> |
|---|
| 162 | <dl class="listing"> |
|---|
| 163 | <dt>{% trans "Location" %}</dt> |
|---|
| 164 | <dd>{% if item.location %}{{ item.location.fullnames|join:"<br/>" }}{% endif %}</dd> |
|---|
| 165 | {% dl_field item "location_comment" %} |
|---|
| 166 | {% dl_field item "cultural_area" %} |
|---|
| 167 | {% dl_field item "language" %} |
|---|
| 168 | {% dl_field item "ethnic_group" placeholder %} |
|---|
| 169 | <dt>{% trans "Comments" %}</dt> |
|---|
| 170 | <dd>{{ item.context_comment|html_line_break|safe }}</dd> |
|---|
| 171 | {% dl_field item "keywords" join with ", " %} |
|---|
| 172 | </dl> |
|---|
| 173 | </div> |
|---|
| 174 | {% endblock geoethnic_data %} |
|---|
| 175 | </div> |
|---|
| 176 | {% if user.is_authenticated and perms.telemeta.change_mediaitem %} |
|---|
| 177 | <a href="{% url telemeta-item-keywords_edit item.public_id %}" class="component_icon button icon_edit">{% trans "Edit" %} {% trans "keywords" %}</a> |
|---|
| 178 | {% endif %} |
|---|
| 179 | <div class="extraInfos"> |
|---|
| 180 | {% block musical_data %} |
|---|
| 181 | <div> |
|---|
| 182 | <h4><a href="#">{% trans "Musical informations" %}</a></h4> |
|---|
| 183 | <dl class="listing"> |
|---|
| 184 | {% dl_field item "vernacular_style" %} |
|---|
| 185 | {% dl_field item "generic_style" %} |
|---|
| 186 | {% dl_field item "author" %} |
|---|
| 187 | </dl> |
|---|
| 188 | {% if item.performances %} |
|---|
| 189 | <div class="instruments"> |
|---|
| 190 | <table class="instruments"> |
|---|
| 191 | <thead> |
|---|
| 192 | <tr> |
|---|
| 193 | <td>{% field_label "MediaItemPerformance" "instruments_num" %}</td> |
|---|
| 194 | <td>{% field_label "MediaItemPerformance" "instrument" %}</td> |
|---|
| 195 | <td>{% field_label "MediaItemPerformance" "alias" %}</td> |
|---|
| 196 | <td>{% field_label "MediaItemPerformance" "musicians" %}</td> |
|---|
| 197 | </tr> |
|---|
| 198 | </thead> |
|---|
| 199 | <tbody> |
|---|
| 200 | {% for performance in item.performances.all %} |
|---|
| 201 | <tr> |
|---|
| 202 | <td>{{ performance.instruments_num }}</td> |
|---|
| 203 | <td>{{ performance.instrument|default:"" }}</td> |
|---|
| 204 | <td>{{ performance.alias|default:"" }}</td> |
|---|
| 205 | <td>{{ performance.musicians }}</td> |
|---|
| 206 | </tr> |
|---|
| 207 | {% endfor %} |
|---|
| 208 | </tbody> |
|---|
| 209 | </table> |
|---|
| 210 | </div> |
|---|
| 211 | {% endif %} |
|---|
| 212 | </div> |
|---|
| 213 | {% endblock musical_data %} |
|---|
| 214 | </div> |
|---|
| 215 | {% if user.is_authenticated and perms.telemeta.change_mediaitem %} |
|---|
| 216 | <a href="{% url telemeta-item-performances_edit item.public_id %}" class="component_icon button icon_edit">{% trans "Edit"%} {% trans "performance"%}</a> |
|---|
| 217 | {% endif %} |
|---|
| 218 | <div class="extraInfos"> |
|---|
| 219 | {% block general_data %} |
|---|
| 220 | <div> |
|---|
| 221 | <h4><a href="#">{% trans "General informations" %}</a></h4> |
|---|
| 222 | <dl class="listing"> |
|---|
| 223 | <dt>{% trans "Remarks" %}</dt> |
|---|
| 224 | <dd>{{ item.comment|html_line_break|safe }}</dd> |
|---|
| 225 | {% dl_field item "collector_selection" %} |
|---|
| 226 | </dl> |
|---|
| 227 | </div> |
|---|
| 228 | {% endblock general_data %} |
|---|
| 229 | </div> |
|---|
| 230 | <div class="extraInfos"> |
|---|
| 231 | {% block archive_data %} |
|---|
| 232 | <div> |
|---|
| 233 | <h4><a href="#">{% trans "Archiving data" %}</a></h4> |
|---|
| 234 | <dl class="listing"> |
|---|
| 235 | {% dl_field item "code" %} |
|---|
| 236 | {% dl_field item "old_code" %} |
|---|
| 237 | {% dl_field item "track" %} |
|---|
| 238 | {% dl_field item "creator_reference" %} |
|---|
| 239 | <dt>{% trans "Published references" %}</dt> |
|---|
| 240 | <dd>{{ item.external_references|html_line_break|safe }}</dd> |
|---|
| 241 | {% dl_field item "public_access_label" %} |
|---|
| 242 | </dl> |
|---|
| 243 | </div> |
|---|
| 244 | {% endblock archive_data %} |
|---|
| 245 | </div> |
|---|
| 246 | <div class="extraInfos"> |
|---|
| 247 | {% block technical_data %} |
|---|
| 248 | <div> |
|---|
| 249 | <h4><a href="#">{% trans "Technical data" %}</a></h4> |
|---|
| 250 | <div> |
|---|
| 251 | <dl class="listing"> |
|---|
| 252 | <dt>{% trans "Media type" %}</dt><dd>{% trans "Audio" %}</dd> |
|---|
| 253 | {% dl_field item "approx_duration" %} |
|---|
| 254 | </dl> |
|---|
| 255 | </div> |
|---|
| 256 | </div> |
|---|
| 257 | {% endblock technical_data %} |
|---|
| 258 | </div> |
|---|
| 259 | {% endblock infos %} |
|---|
| 260 | </div> <!-- with-rightcol --> |
|---|
| 261 | {% endblock %} |
|---|
| 262 | {% else %} |
|---|
| 263 | <p>No such item</p> |
|---|
| 264 | {% endif %} |
|---|