]> git.parisson.com Git - telemeta.git/commitdiff
fixed old submenu div, now block title and title_buttons. The latter can stretch...
authorriccardo <riccardo@parisson.com>
Wed, 6 Apr 2011 14:39:36 +0000 (16:39 +0200)
committerriccardo <riccardo@parisson.com>
Wed, 6 Apr 2011 14:39:36 +0000 (16:39 +0200)
added:
  telemeta/templates/telemeta/mediaitem.html
  telemeta/templates/telemeta_default/mediaitem.html
modified:
  telemeta/htdocs/css/telemeta.css
  telemeta/htdocs/css/telemeta_ie6.css
  telemeta/htdocs/js/application.js
  telemeta/htdocs/timeside/src/controller.js
  telemeta/htdocs/timeside/src/markermap.js
  telemeta/templates/telemeta_default/base.html
  telemeta/templates/telemeta_default/collection_add.html
  telemeta/templates/telemeta_default/collection_detail.html
  telemeta/templates/telemeta_default/collection_detail_dc.html
  telemeta/templates/telemeta_default/collection_edit.html
  telemeta/templates/telemeta_default/collection_list.html
  telemeta/templates/telemeta_default/geo_continents.html
  telemeta/templates/telemeta_default/mediaitem_add.html
  telemeta/templates/telemeta_default/mediaitem_copy.html
  telemeta/templates/telemeta_default/mediaitem_detail.html
  telemeta/templates/telemeta_default/mediaitem_detail_dc.html
  telemeta/templates/telemeta_default/mediaitem_edit.html
  telemeta/templates/telemeta_default/mediaitem_list.html
  telemeta/templates/telemeta_default/profile_edit.html
unknown:
  telemeta/htdocs/images/wait.gif
  telemeta/htdocs/timeside/skins/lab/img/empty.png
  telemeta/htdocs/timeside/src/marker.js.moved

21 files changed:
telemeta/htdocs/css/telemeta.css
telemeta/htdocs/css/telemeta_ie6.css
telemeta/htdocs/js/application.js
telemeta/htdocs/timeside/src/controller.js
telemeta/htdocs/timeside/src/markermap.js
telemeta/templates/telemeta/mediaitem.html [new file with mode: 0644]
telemeta/templates/telemeta_default/base.html
telemeta/templates/telemeta_default/collection_add.html
telemeta/templates/telemeta_default/collection_detail.html
telemeta/templates/telemeta_default/collection_detail_dc.html
telemeta/templates/telemeta_default/collection_edit.html
telemeta/templates/telemeta_default/collection_list.html
telemeta/templates/telemeta_default/geo_continents.html
telemeta/templates/telemeta_default/mediaitem.html [new file with mode: 0644]
telemeta/templates/telemeta_default/mediaitem_add.html
telemeta/templates/telemeta_default/mediaitem_copy.html
telemeta/templates/telemeta_default/mediaitem_detail.html
telemeta/templates/telemeta_default/mediaitem_detail_dc.html
telemeta/templates/telemeta_default/mediaitem_edit.html
telemeta/templates/telemeta_default/mediaitem_list.html
telemeta/templates/telemeta_default/profile_edit.html

index 3a95847ac66607e1807a442dc0ae55f18e6e3cda..c504d50302e5d46a84d4fc5ebbcd04a935013769 100644 (file)
@@ -54,18 +54,16 @@ a img { border: none; }
 }
 
 #content {
-    margin-top: 1em;
+    /*margin-top: 1em;*/
     margin-bottom: 0em;
 }
 
-#content, #content_header {
+#content {
     position: relative;
     margin-left: 2em;
     margin-right: 2em;
 }
-#content_header {
-    top:-.45em; /*must be header.margin_bottom (0.9em)*/
-}
+
 
 #content ul, #content ul ul, #content ol {
     list-style: square;
@@ -85,7 +83,7 @@ a img { border: none; }
 #content li a {
     padding: .1em 0;
 }
-#content h3, #content_header h3 {
+#content h3 {
     color: #6a0307;
     font-weight: bold;
     display:  inline;
@@ -97,56 +95,40 @@ a img { border: none; }
     width: 90%;
     padding: 0.3em 0.3em 0.3em 0.5em;
 }
+#logo a, #logo a:hover { border: none; background: transparent; }
 
 #header {
     padding: 0.2em 0;
-    margin-bottom: .9em;
     background: url("/images/waves.png") 100% 0% no-repeat;
 }
 
-#logo a, #logo a:hover { border: none; background: transparent; }
-
-#submenu {
-    position: relative;
-    margin: 5px 2em 0;
-    /*height:3ex;*/ /*no longer used, and it also shifts up the bottom content*/
-    z-index: 10;
+#content_header, #header{
+    margin-bottom: .8em;
 }
-/*#submenu h3, #submenu div {
-    min-height: 1.6em;
-}*/
-
-
 
-#submenu h3 {
-    margin-right: 80px;
-}
-#submenu div {
-    position: absolute;
-    right: 0;
-    top: 0;
+#content_header{
+    width:100%;
+    border-collapse:collapse;
 }
-/*#submenu a {
-    height: 1.6em;
-    color: #4d508a;
-    font-size: 0.9em;
-    font-weight: bold;
-}*/
 
-#content_header table{
-    width:100%;
+#content_header td{
+    vertical-align: top;
 }
-#content_header table td{
-    vertical-align: bottom;
+#content_header td.rightcol{
+    text-align:right;
+    white-space:nowrap; /**this implies to stretach righcol to accomodate all the width,
+                        UNLESS there is a div.fixedWidthAsPlayer inside td.rightcol (see blow)*/
 }
-
-#content_header td.rightcol a{
+#content_header td.rightcol div.fixedWidthAsPlayer{
+    width:374px; /*must be width+2*padding, see #rightcol below*/
+    float:right;
+    white-space:normal; /*to override no-wrap defined in #content_header td.rightcol*/
+}
+#content_header td.rightcol div.fixedWidthAsPlayer a{
     display:inline-block;
     margin-top:0.5ex;
 }
-#content_header td.rightcol {
-    width:374px; /*must be width+2*padding, see #rightcol below*/
-}
+
 #rightcol {
     width: 362px; /**if u change this, change also width #content_header td.rightcol, see above*/
     padding: 6px; /**if u change this, change also width #content_header td.rightcol, see above*/
@@ -1056,7 +1038,7 @@ a.image-link {
 .button,  .button:visited, .button:hover{
     font-weight: bold;
     border:  1px solid #e1e1e1;
-    
+    white-space:nowrap;
 /*    border-top:  1px solid #e1e1e1 !important;
     border-left:  1px solid #e1e1e1 !important;
     border-right:  1px solid #e1e1e1 !important;
index e546a4a8d317af88680bc6b4f758b35b48039a8f..4b3fb5f98cfac6a09d064b800a66461a693ccf20 100644 (file)
@@ -1,4 +1,4 @@
 /* Min-width */\r
-#submenu h3, #submenu div {\r
+/*#submenu h3, #submenu div {\r
     height: 1.6em;\r
-}\r
+}*/\r
index 918601cabb2b1408994a7cd3527ce6f0bedf94ef..fbb40187505535c660ef2454f6f34c2da8ddbf61 100644 (file)
@@ -227,20 +227,20 @@ var popup={
             return div;\r
         },\r
         className: 'component',\r
-        divShadow: function(){\r
-            var divShadow =  this.jQuery('<div/>').css({ //this is _cfg_\r
-                position: 'absolute',\r
-                display: 'none',\r
-                overflow:'visible',\r
-                padding: '0 !important', //otherwise setting divShadow dimension is tricky\r
-                backgroundColor:'#000 !important', //shadow must be black\r
-                zIndex:999\r
-            });\r
-            if(this.className){\r
-                divShadow.addClass(this.className);\r
-            }\r
-            return divShadow;\r
-        },\r
+//        divShadow: function(){\r
+//            var divShadow =  this.jQuery('<div/>').css({ //this is _cfg_\r
+//                position: 'absolute',\r
+//                display: 'none',\r
+//                overflow:'visible',\r
+//                padding: '0 !important', //otherwise setting divShadow dimension is tricky\r
+//                backgroundColor:'#000 !important', //shadow must be black\r
+//                zIndex:999\r
+//            });\r
+//            if(this.className){\r
+//                divShadow.addClass(this.className);\r
+//            }\r
+//            return divShadow;\r
+//        },\r
         //        mouseDownNamespace : "mousedown.popup__",\r
         //        keyDownNamespace : "keydown.popup__",\r
 \r
@@ -363,7 +363,7 @@ var popup={
         var windowH = wdow.height();\r
         var windowW = wdow.width();\r
         var position = div.offset();\r
-        var shadowOffset=2;\r
+        var shadowOffset=5;\r
         var size = {\r
             width:div.outerWidth(true)+shadowOffset,\r
             height:div.outerHeight(true)+shadowOffset\r
@@ -397,10 +397,15 @@ var popup={
         }; //setting width on a div means the width(),\r
         //but calculations here are made according to outerWidth(true), so we need this variable (se below)\r
 \r
+        //the shadow in the background will be created according to the actual div size\r
+        //However, since we do not specify neither width nor height, the calculation of the div size\r
+        //works if maxWidth and maxHeight do set a width and height. In order to do so, they\r
+        //must be lower or equal to the actual div width and height. That's why the "min" here below:'\r
         div.css({\r
-            'maxWidth': maxSize.width-divPadding.left,\r
-            'maxHeight': maxSize.height-divPadding.top\r
+            'maxWidth': Math.min(div.width(), maxSize.width-divPadding.left),\r
+            'maxHeight': Math.min(div.height(), maxSize.height-divPadding.top)\r
         });\r
+\r
         //last thing: if invoker element exist, set width at least invoker element width\r
         if(invokerElement){\r
             var iEw = invokerElement.outerWidth(); //no margins considered\r
@@ -410,10 +415,8 @@ var popup={
                 });\r
             }\r
         }\r
-        //var divShadow = this._cfg_.divShadow().insertAfter(div);\r
-\r
+        //now we can build the divShadow\r
         var divShadow = div.clone(false,false).empty().css({'zIndex':999,'borderColor':'#000','display':'none','backgroundColor':'#000'}).insertAfter(div);\r
-        \r
         //store the divs to be removed\r
         this._cfg_.divsToDelete = [div,divShadow];\r
         //add a listener to the document. If one of the content children is clicked/keypressed,\r
index 706d1c915e2ca2ed99814a4e3aee6d884e37eaf5..0683a511d42391fe3ff8aa5bebfc499c594d2e99 100644 (file)
@@ -21,8 +21,6 @@ TimeSide(function($N) {
                 this.cfg.player = new $N.Player(this.cfg.player);
             }
             this._setupPlayer();
-        //setting the divmarkers
-        //this.cfg.map.observe('add')
             this.loadHTTP();
             
         },
@@ -30,19 +28,12 @@ TimeSide(function($N) {
         _setupPlayer: function() {
             this.debug('_setupPlayer');
             this.cfg.player
-            //.setSoundProvider(this.cfg.soundProvider)
             .setMarkerMap(this.cfg.map)
-//            .observe('play', $N.attachFunction(this.cfg.soundProvider, this.cfg.soundProvider.play))
-//            .observe('pause', $N.attachFunction(this.cfg.soundProvider, this.cfg.soundProvider.pause))
-//            .observe('move', this.attach(this._onMove))
             .observe('markeradd', this.attach(this._onMarkerAdd))
             //player markermove listens for changes of ruler markermove which listens
             //foir changes in each marker move
             .observe('markermove', this.attach(this._onMarkerMove))
-            
-//            .draw();
             ._setupInterface();
-            //this.loadHTTP();
 
             this.cfg.map.observe('add',this.attach(this._onMarkerMapAdd));
             this.cfg.map.observe('remove',this.attach(this._onMarkerMapRemove));
@@ -50,11 +41,6 @@ TimeSide(function($N) {
             
         },
 
-
-//        _onMove: function(e, data) {
-//            this.cfg.soundProvider.seek(data.offset);
-//        },
-
         //called whenever a marker is moved in the ruler BUT NOT in the map
         _onMarkerMove: function(e, data) {
             if (this.cfg.map) {
@@ -168,9 +154,7 @@ TimeSide(function($N) {
 
                     }
                     util.setUpTabs.apply(util, [tabIndex]);
-//                setTabs(tabIndex);
             };
-            //json(param, method, onSuccesFcn(data, textStatus, jqXHR), onErrorFcn(jqXHR, textStatus, errorThrown))
             json([itemId],"telemeta.get_markers", onSuccess);
         }
     });
index 7ab4d0df73eb887a4315f82f64cfb39caa6a44bb..b7ecf7b141c7c78e19ea4016102b67ab36bbd2d2 100644 (file)
@@ -38,15 +38,13 @@ TimeSide(function($N, $J) {
                 marker: marker,
                 index: idx
             });
-            //this.fireRefreshLabels(idx+1,this.markers.length);
-            //this._reorder(marker.offset);
-            //this.fireEditMode(marker);
             return idx;
         },
+
         //argument is either an object loaded from server or a number specifying the marker offset
         createMarker: function(argument){
             var marker = null;
-            if(typeof argument == 'string'){
+            if(typeof argument == 'string'){ //to be sure, it might be that we pass an offset in string format
                 argument = parseFloat(argument);
             }
             if(typeof argument == 'object'){
diff --git a/telemeta/templates/telemeta/mediaitem.html b/telemeta/templates/telemeta/mediaitem.html
new file mode 100644 (file)
index 0000000..7665a03
--- /dev/null
@@ -0,0 +1 @@
+{% extends "telemeta_default/mediaitem.html" %}
index c42e1de04a83f7ffd16a0f9fdc247353c5e8f091..c05199f01481c0da0de8609126c06b016e4bd36e 100644 (file)
 {% endblock %}
 </div>
 </div>
-<div id="submenu">
-{% block submenu %}{% endblock %}
-</div>
-<div id="content_header">
-{% block content_header %}{% endblock %}
-</div>
+
 <div id="content">
+    <table id="content_header"><tr>
+            <td class="leftcol"><h3>{% block title %}{% endblock %}</h3></td>
+            <td class="rightcol">{% block title_buttons %}{% endblock %}</td>
+    </tr></table>
 {% block content %}{% endblock %}
 <div class="nett"></div>
 </div>
index 6d0c0bbf64d59aa4962ba8bf41cebe205e94bcd9..c1d53e4eb5618e7b6e3b318c926528a652c4b2fb 100644 (file)
@@ -2,12 +2,8 @@
 {% load i18n %}
 {% load telemeta_utils %}
 
-{% block submenu %}
-    <div>    
-     {% block tools %}
-      <a href="{% url telemeta-collections %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-     {% endblock tools %}
-    </div>
+{% block title_buttons %}
+     <a href="{% url telemeta-collections %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
 {% endblock %}
 
 
index 6c9ccc94a7f9723ce1e3571faffacc4a7576b0b3..f852fd7b1ecf5356b5ccaf72a3628e92485dd49f 100644 (file)
 
 {% if collection %}
 
-{% block submenu %}
-    <div>
-    {% block tools %}
+{% block title %}
+    Collection: {{ collection }}
+{% endblock %}
+
+{% block title_buttons %}
       <a href="{% url telemeta-collection-dublincore collection.public_id %}" class="component_icon button icon_dublin_core">Dublin Core</a>
     {% if user.is_authenticated and perms.telemeta.change_mediacollection %}
       <a href="{% url telemeta-collection-edit collection.public_id %}" class="component_icon button icon_edit">{% trans "Edit" %}</a>
     {% if user.is_authenticated %}
     <a href=# id ="_add_to_playlist" class="component_icon button icon_add">{% trans "Add to playlist" %}</a>
     {% endif %}
-    {% endblock tools %}
-    
-    
-    </div>
 {% endblock %}
 
 {% block content %}
-    <h3>Collection: {{ collection }}</h3>
+<!--    <h3>Collection: {{ collection }}</h3>-->
     <div class="{% if collection.has_mediafile %}with-rightcol{% endif %}">
         {% if collection.has_mediafile %}
         <div id="rightcol">
index f102c36e3ffecdb47e77373804e4f2e0951bccd6..e100ffde78374ff9849c90f8cbdd5b3b0b2232bf 100644 (file)
@@ -5,9 +5,11 @@
 {% block head_title %}{% trans "Collection" %}{{collection|prepend:': '}} - {{ block.super }}{% endblock %}
 
 {% if collection %}
-{% block submenu %}
-    <h3>Collection: {{ collection }}</h3>
-    <div><a href="{% url telemeta-collection-detail collection.public_id %}">{% trans "Normal View" %}</a></div>
+{% block title %}
+    Collection: {{ collection }}
+{% endblock %}
+{% block title_buttons %}
+    <a class="component_icon button icon_previous" href="{% url telemeta-collection-detail collection.public_id %}">{% trans "Normal View" %}</a>
 {% endblock %}
 
 {% block content %}
index fd7eeb8973c36d413af86a370929b1dc2c3268f0..75f131135226e41fe14dd29c7686e4f8f3494cce 100644 (file)
@@ -2,9 +2,7 @@
 {% load i18n %}
 {% load telemeta_utils %}
 
-{% block tools %}
-     <a href="{% url telemeta-collection-detail collection.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-{% endblock %}
+<a href="{% url telemeta-collection-detail collection.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
 
 {% block infos %}
         <div class="infos">
index a3386ca710d4ff0dcd4d85fdcd314ddf81a9c7c6..8e3a3f2652f90f02992b7c69383de2ccd413df77 100644 (file)
@@ -4,20 +4,19 @@
 
 {% block head_title %}{% trans "Media Collections" %} - {{ block.super }}{% endblock %}
 
-{% block submenu %}
-    <div class="buttons">  
+{% block title%}
+    {% trans "Media Collections" %}
+{% endblock %}
+{% block title_buttons %} 
      <a href="{% url telemeta-collections %}" class="component_icon button icon_search">{% trans "All" %}</a>
      <a href="{% url telemeta-collections-novel %}" class="component_icon button icon_filter">{% trans "Novel" %}</a>
      <a href="{% url telemeta-collections-published %}" class="component_icon button icon_filter">{% trans "Published" %}</a>
     {% if user.is_authenticated and perms.telemeta.add_mediacollection %}
       <a href="{% url telemeta-collection-add %}" class="component_icon button icon_add">{% trans "Add" %}</a>
     {% endif %}
-    </div>
 {% endblock %}
 
 {% block content %}
-<h3>{% trans "Media Collections" %}</h3>
-
 {% with object_list as collections %}
 <div class="fullpage">
 {% include "telemeta/inc/collection_list.html" %}
index 8bca231972a623f1b641191f45331ce5e7b67478..d20e8a4ffb16b464a92fa4145a910b6b6e60af5f 100644 (file)
@@ -16,16 +16,16 @@ var resourceMap = new ResourceMap('.continents', {
 {% endif %}
 {% endblock %}
 
-{% block submenu %}
-    <div>
+{% block title %}
+    {% trans "Geographic Navigator" %}
+{% endblock %}
+{% block title_buttons %}
         {% if continents %}
         <a href="#" onclick="resourceMap.toggle('map'); return false;" class="component button">{% trans "Map" %}</a> |
         <a href="#" onclick="resourceMap.toggle('list'); return false;" class="component button">{% trans "List" %}</a>
         {% endif %}
-    </div>
 {% endblock %}
 {% block content %}
-<h3>{% trans "Geographic Navigator" %}</h3>
 {% if continents %}
 <ul class="continents">
 {% for group in continents %}
diff --git a/telemeta/templates/telemeta_default/mediaitem.html b/telemeta/templates/telemeta_default/mediaitem.html
new file mode 100644 (file)
index 0000000..a13faeb
--- /dev/null
@@ -0,0 +1,295 @@
+{% extends "telemeta/base.html" %}
+{% load telemeta_utils %}
+{% load i18n %}
+
+{% block head_title %}{% trans "Item" %}- {{ block.super }}{% endblock %}
+
+{% block stylesheets %}
+{{ block.super }}
+<link rel="stylesheet" type="text/css" href="{% url telemeta-timeside "css/timeside.css" %}" />
+      <link rel="stylesheet" type="text/css" href="{% url telemeta-timeside "skins/lab/style.css" %}" />
+      <link rel="stylesheet" type="text/css" href="{% url telemeta-css "player.css" %}" />
+      {% endblock %}
+
+      {% block extra_javascript %}
+      <!--<script src="{% url telemeta-js "wz_jsgraphics.js" %}" type="text/javascript"></script>-->
+<script src="{% url telemeta-js "soundmanager2.js" %}" type="text/javascript"></script>
+<script src="{% url telemeta-timeside "src/playlist.js" %}" type="text/javascript"></script>
+<script type="text/javascript">
+    soundManager.url = '{% url telemeta-swf "./" %}';
+    soundManager.flashVersion = 9;
+    soundManager.useMovieStar = true; // enable MP4/M4A/AAC
+    soundManager.debugMode = false;
+    soundManager.allowPolling = true;
+
+    var setupPlaylist = function(){
+        {% if user.is_authenticated %}
+        var p = playlistUtils;
+        {% for playlist in playlists %}
+        p.addPlaylist('{{ playlist.playlist.title }}','{{playlist.playlist.public_id}}');
+        {% endfor %}
+
+        {% endif %}
+        {% if item %}
+        var anchor = jQuery('#_add_to_playlist');
+        if(anchor.length){
+            anchor.click(function(evtObj_){
+                p.showPopupAddToPlaylist(evtObj_,'item','{{item.public_id}}','item added to selected playlist');return false;
+            });
+        }
+        {% endif %}
+    };
+    
+    {% if item %}
+    var ITEM_PUBLIC_ID = '{{item.public_id}}';
+    {% endif %}
+
+    var scripts = ["{% url telemeta-js "wz_jsgraphics.js" %}",
+        //"{% url telemeta-timeside "src/playlist.js" %}",
+        "{% url telemeta-timeside "src/timeside.js" %}","{% url telemeta-js "playerUtils.js" %}"];
+
+    var _sound_manager_loaded=false;
+    var _jQuery_loaded = false;
+
+    jQuery(document).ready(function(){
+        _jQuery_loaded=true;
+        if(_sound_manager_loaded){
+            loadScripts(scripts, function(){loadPlayer('{% url telemeta-item-analyze-xml item.public_id %}',$('.ts-wave a').attr('href'));setupPlaylist()});
+        }
+    });
+    //$('.ts-wave a').attr('href')
+    soundManager.onready(function() {
+        _sound_manager_loaded=true;
+        if(_jQuery_loaded){
+            loadScripts(scripts, function(){loadPlayer('{% url telemeta-item-analyze-xml item.public_id %}',$('.ts-wave a').attr('href'));setupPlaylist()});
+        }
+    });
+    
+</script>
+<!--item.approx_duration-->
+
+{% endblock %}
+
+
+{% if item %}
+
+{% block title %}
+{% endblock %}
+{% block title_buttons %}
+{% endblock %}
+
+{% block content %}
+<!--<div id="div_title" style="padding-bottom:2ex;padding-right:362px"><h3><img src="images/item.png" style="vertical-align:middle" /> Item : {{ item }}</h3></div>-->
+
+<div class="{% if item.file %}{% if item.public_access == 'full' or public_access or user.is_staff %}with-rightcol{% endif %}{% endif %}">
+    {% if item.file %}
+    {% if public_access or user.is_staff %}
+    <div id="player_maximized" class="ts-skin-lab">
+        <a href="#" class="toggle">Minimize</a>
+        <div class="wazing"></div>
+    </div>
+    <div id="rightcol">
+        <div id="player_minimized" class="ts-skin-lab">
+            <a href="#" class="toggle">Maximize</a>
+            <div class="wazing"></div>
+            <div id="player" class="ts-player">
+                <div class="ts-viewer">
+                    <div class="ts-wave">
+                        <div class="ts-image-container">
+                            <a href="{% url telemeta-item-export item.public_id,"mp3" %}">
+                               <img class="ts-image" src="{% url telemeta-item-visualize item.public_id,visualizer_id,360,130 %}"
+                                 alt="" /></a>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="item_visualization" id="item_visualization_id">
+            <form id="visualizer_id_form" method="get" action="#">
+                <img src="images/plots.png" style="vertical-align:middle" />&nbsp;Visualization :
+                <select id="visualizer_id" name="visualizer_id">
+                    {% for v in visualizers %}
+                    <option value="{% url telemeta-item-visualize item.public_id,v.id,"WIDTH","HEIGHT" %}">
+                            {{v.name}}</option>
+                    {% endfor %}
+                </select>
+                <input style="visibility: hidden;" type="submit" value="Set" />
+            </form>
+
+            <!--
+                    <form method="get" action="#">
+                        <p>&nbsp;Vamp plugin analysis</p>
+                        <select name="vamp_id">
+                        {% for plugin in vamp_plugins %}
+                        <option value="{{ plugin }}" {% ifequal plugin vamp_id %} selected="selected" {% endifequal %}>
+                        {{ plugin }}</option>
+                        {% endfor %}
+                        </select>
+                        <input type="submit" value="Get" />
+                    </form>
+            -->
+        </div>
+
+        <div id="tabs_container">
+            <!-- this div will be hidden when everything is fully loaded-->
+            <span id="loading_span" href="#"><img style="vertical-align:middle" src="/images/wait.gif"/>&nbsp;
+                <span id="loading_span_text">Loading...</span></span>
+            <a id="tab_analysis" style="display:none" name ="analyzer_div_id" href="#">{% trans "Analysis" %}</a>
+            <a id="tab_markers" style="display:none" name="markers_div_id" href="#">{% trans "Markers" %}</a>
+        </div>
+
+        <div class="markers" id="markers_div_id"></div>
+
+        <div class="analyzer" id="analyzer_div_id">
+            <table width="100%">
+                <tr class="analyzer-title">
+                    <td>{% trans "Property" %}</td>
+                    <td>{% trans "Value" %}</td>
+                    <td>{% trans "Unit" %}</td>
+                </tr>
+               <!-- {% for analyser in analysers %}
+                <tr class="analyzer-line">
+                    <td>
+                        {{ analyser.name }}
+                    </td>
+                    <td>
+                        {{ analyser.value }}
+                    </td>
+                    <td>
+                        {{ analyser.unit }}
+                    </td>
+                </tr>
+                {% endfor %}-->
+            </table>
+        </div>
+        <!--</div>-->
+
+        {% if audio_export_enabled %}
+        <div class="exporter">
+            <p><img src="images/download.png" style="vertical-align:middle" /> {% trans "Download:" %}
+                {% for format in export_formats %}
+                <a href="{% url telemeta-item-export item.public_id,format.extension %}">
+                    <img src="images/{{ format.extension }}.png" style="vertical-align:middle" alt="{{ format.extension }}" /></a>
+                {% endfor %}</p>
+        </div>
+        {% endif %}
+
+    </div>
+    {% endif %}
+    {% endif %}
+
+    {% block infos %}
+    <div class="infos">
+        {% block general_info %}
+        <dl class="listing">
+            {% dl_field item "title" %}
+            {% dl_field item "alt_title" %}
+            {% dl_field item "collector" %}
+            <dt>{% field_label item "collection" %}</dt>
+            <dd><a href="{% url telemeta-collection-detail item.collection.public_id %}">{{ item.collection }}</a></dd>
+            {% if item.recorded_from_date %}
+            <dt>{% trans "Recording date" %}</dt>
+            <dd>{{ item.recorded_from_date }} {{ item.recorded_to_date|prepend:" - "  }}</dd>
+            {% endif %}
+        </dl>
+        {% endblock general_info %}
+    </div>
+    <div class="extraInfos">
+        {% block geoethnic_data %}
+        <div>
+            <h4><a href="#">{% trans "Geographic and cultural informations" %}</a></h4>
+            <dl class="listing">
+                {% if item.location %}
+                <dt>{% trans "Location" %}</dt>
+                <dd>{{ item.location.fullnames|join:"<br/>" }}</dd>
+                {% endif %}
+                {% dl_field item "location_comment" %}
+                {% dl_field item "cultural_area" %}
+                {% dl_field item "ethnic_group" %}
+                {% dl_field item "context_comment" %}
+                {% dl_field item "keywords" join with ", " %}
+            </dl>
+        </div>
+        {% endblock geoethnic_data %}
+    </div>
+    <div class="extraInfos">
+        {% block musical_data %}
+        <div>
+            <h4><a href="#">{% trans "Musical informations" %}</a></h4>
+            <dl class="listing">
+                {% dl_field item "vernacular_style" %}
+                {% dl_field item "generic_style" %}
+                {% dl_field item "author" %}
+            </dl>
+            {% if item.performances %}
+            <div class="instruments">
+                <table class="instruments">
+                    <thead>
+                        <tr>
+                            <td>{% field_label "MediaItemPerformance" "instruments_num" %}</td>
+                            <td>{% field_label "MediaItemPerformance" "instrument" %}</td>
+                            <td>{% field_label "MediaItemPerformance" "alias" %}</td>
+                            <td>{% field_label "MediaItemPerformance" "musicians" %}</td>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        {% for performance in item.performances.all %}
+                        <tr>
+                            <td>{{ performance.instruments_num }}</td>
+                            <td>{{ performance.instrument|default:"" }}</td>
+                            <td>{{ performance.alias|default:"" }}</td>
+                            <td>{{ performance.musicians }}</td>
+                        </tr>
+                        {% endfor %}
+                    </tbody>
+                </table>
+            </div>
+            {% endif %}
+        </div>
+        {% endblock musical_data %}
+    </div>
+    <div class="extraInfos">
+        {% block general_data %}
+        <div>
+            <h4><a href="#">{% trans "General informations" %}</a></h4>
+            <dl class="listing">
+                {% dl_field item "comment" %}
+                {% dl_field item "collector_selection" %}
+            </dl>
+        </div>
+        {% endblock general_data %}
+    </div>
+    <div class="extraInfos">
+        {% block archive_data %}
+        <div>
+            <h4><a href="#">{% trans "Archiving data" %}</a></h4>
+            <dl class="listing">
+                {% dl_field item "code" %}
+                {% dl_field item "old_code" %}
+                {% dl_field item "track" %}
+                {% dl_field item "creator_reference" %}
+                {% dl_field item "external_references" %}
+                {% dl_field item "public_access_label" %}
+            </dl>
+        </div>
+        {% endblock archive_data %}
+    </div>
+    <div class="extraInfos">
+        {% block technical_data %}
+        <div>
+            <h4><a href="#">{% trans "Technical data" %}</a></h4>
+            <div>
+                <dl class="listing">
+                    <dt>{% trans "Media type" %}</dt><dd>{% trans "Audio" %}</dd>
+                    {% dl_field item "approx_duration" %}
+                </dl>
+            </div>
+        </div>
+        {% endblock technical_data %}
+    </div>
+    {% endblock infos %}
+</div> <!-- with-rightcol -->
+{% endblock %}
+{% else %}
+<p>No such item</p>
+{% endif %}
index b85621beff10610ffa01e8f75741a71537ff4d0d..70092706c83b603e00501f65049dde93bc749a1d 100644 (file)
@@ -6,21 +6,17 @@
 
 
 {% if item %}
-{% block submenu %}
-<div>
+{% block title %}
+    <img src="images/item.png" style="vertical-align:middle" /> Item : NEW
+{% endblock %}
+{% block title_buttons %}
     {% if perms.telemeta.add_mediaitem %}
-    {% block tools %}
       <a href="{% url telemeta-items %}"
            class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-    {% endblock tools %}
-    
     {% endif %}
-</div>
 {% endblock %}
 
 {% block content %}
-<h3><img src="images/item.png" style="vertical-align:middle" /> Item : NEW</h3>
-
     {% block infos %}
     <div class="infos">
      <form method="POST" id="_addItemForm" action="" enctype="multipart/form-data">{% csrf_token %}
index e40361888fc625fb0c0cefaea5e5497d74c43aa1..ed03bef31b1bbc9268306a1635a43b54d0f283b6 100644 (file)
@@ -1,4 +1,4 @@
-{% extends "telemeta/mediaitem_detail.html" %}
+{% extends "telemeta/mediaitem.html" %}
 {% load telemeta_utils %}
 {% load i18n %}
 
@@ -7,19 +7,16 @@
 {% block extra_javascript %}
 {% endblock %}
 
-{% block submenu %}
-<div>
+{% block title %}
+    <img src="images/item.png" style="vertical-align:middle" /> Item : {{ item }}
+{% endblock %}
+{% block title_buttons %}
     {% if user.is_authenticated and perms.telemeta.add_mediaitem %}
-    {% block tools %}
     <a href="{% url telemeta-item-detail item.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-    {% endblock tools %}
     {% endif %}
-</div>
 {% endblock %}
 
 {% block content %}
-<h3><img src="images/item.png" style="vertical-align:middle" /> Item : {{ item }}</h3>
-  
   {% block infos %}    
     <div class="infos">
      <form enctype="multipart/form-data" id="_mediaItemCopyForm" method="POST" action="">{% csrf_token %}
index fb7d6e9193771d3843ff01e7040c50f7bd434302..bd2cf46a0ef0d21d84589c2f7673ebbe756932ab 100644 (file)
-{% extends "telemeta/base.html" %}
+{% extends "telemeta/mediaitem.html" %}
 {% load telemeta_utils %}
 {% load i18n %}
 
-{% block head_title %}{% trans "Item" %}- {{ block.super }}{% endblock %}
-
-{% block stylesheets %}
-{{ block.super }}
-<link rel="stylesheet" type="text/css" href="{% url telemeta-timeside "css/timeside.css" %}" />
-      <link rel="stylesheet" type="text/css" href="{% url telemeta-timeside "skins/lab/style.css" %}" />
-      <link rel="stylesheet" type="text/css" href="{% url telemeta-css "player.css" %}" />
-      {% endblock %}
-
-      {% block extra_javascript %}
-      <!--<script src="{% url telemeta-js "wz_jsgraphics.js" %}" type="text/javascript"></script>-->
-<script src="{% url telemeta-js "soundmanager2.js" %}" type="text/javascript"></script>
-<script src="{% url telemeta-timeside "src/playlist.js" %}" type="text/javascript"></script>
-<script type="text/javascript">
-    soundManager.url = '{% url telemeta-swf "./" %}';
-    soundManager.flashVersion = 9;
-    soundManager.useMovieStar = true; // enable MP4/M4A/AAC
-    soundManager.debugMode = false;
-    soundManager.allowPolling = true;
-
-    var setupPlaylist = function(){
-        {% if user.is_authenticated %}
-        var p = playlistUtils;
-        {% for playlist in playlists %}
-        p.addPlaylist('{{ playlist.playlist.title }}','{{playlist.playlist.public_id}}');
-        {% endfor %}
-
-        {% endif %}
-        {% if item %}
-        var anchor = jQuery('#_add_to_playlist');
-        if(anchor.length){
-            anchor.click(function(evtObj_){
-                p.showPopupAddToPlaylist(evtObj_,'item','{{item.public_id}}','item added to selected playlist');return false;
-            });
-        }
-        {% endif %}
-    };
-    
-    {% if item %}
-    var ITEM_PUBLIC_ID = '{{item.public_id}}';
-    {% endif %}
-
-    var scripts = ["{% url telemeta-js "wz_jsgraphics.js" %}",
-        //"{% url telemeta-timeside "src/playlist.js" %}",
-        "{% url telemeta-timeside "src/timeside.js" %}","{% url telemeta-js "playerUtils.js" %}"];
-
-    var _sound_manager_loaded=false;
-    var _jQuery_loaded = false;
-
-    jQuery(document).ready(function(){
-        _jQuery_loaded=true;
-        if(_sound_manager_loaded){
-            loadScripts(scripts, function(){loadPlayer('{% url telemeta-item-analyze-xml item.public_id %}',$('.ts-wave a').attr('href'));setupPlaylist()});
-        }
-    });
-    //$('.ts-wave a').attr('href')
-    soundManager.onready(function() {
-        _sound_manager_loaded=true;
-        if(_jQuery_loaded){
-            loadScripts(scripts, function(){loadPlayer('{% url telemeta-item-analyze-xml item.public_id %}',$('.ts-wave a').attr('href'));setupPlaylist()});
-        }
-    });
-    
-</script>
-<!--item.approx_duration-->
-
-{% endblock %}
-
-
-{% if item %}
-{% block submenu %}
 
+{% block title %}
+<img src="images/item.png" style="vertical-align:middle" /> Item : {{ item }}
 {% endblock %}
-
-{% block content_header %}
-<table><tr><td>
-            <h3><img src="images/item.png" style="vertical-align:middle" /> Item : {{ item }}</h3>
-        </td><td class="rightcol">
-            {% block tools %}
-            {% if user.is_authenticated and perms.telemeta.change_mediaitem %}
+{% block title_buttons %}
+    <div class="fixedWidthAsPlayer">
+      {% if user.is_authenticated and perms.telemeta.change_mediaitem %}
             <a href="{% url telemeta-item-edit item.public_id %}" class="component_icon button icon_edit">{% trans "Edit" %}</a>
             <a href="{% url telemeta-item-copy item.public_id %}" class="component_icon button icon_copy">{% trans "Copy" %}</a>
-            {% endif %}
-            {% if user.is_authenticated %}
+      {% endif %}
+      {% if user.is_authenticated %}
             <a id="_add_to_playlist" href='#' class="component_icon button icon_add">{% trans "Add to playlist" %}</a>
-
-            {% endif %}
-            <a href="{% url telemeta-item-detail previous %}" class="component_icon button icon_previous">{% trans "Previous" %}</a>
-            <a href="{% url telemeta-item-detail next %}" class="component_icon button icon_next">{% trans "Next" %}</a>
-            <a href="{% url telemeta-item-dublincore item.public_id %}" class="component_icon button icon_dublin_core">Dublin Core</a>
-            {% endblock tools %}
-        </td></tr></table>
-{% endblock %}
-
-{% block content %}
-<!--<div id="div_title" style="padding-bottom:2ex;padding-right:362px"><h3><img src="images/item.png" style="vertical-align:middle" /> Item : {{ item }}</h3></div>-->
-
-<div class="{% if item.file %}{% if item.public_access == 'full' or public_access or user.is_staff %}with-rightcol{% endif %}{% endif %}">
-    {% if item.file %}
-    {% if public_access or user.is_staff %}
-    <div id="player_maximized" class="ts-skin-lab">
-        <a href="#" class="toggle">Minimize</a>
-        <div class="wazing"></div>
-    </div>
-    <div id="rightcol">
-        <div id="player_minimized" class="ts-skin-lab">
-            <a href="#" class="toggle">Maximize</a>
-            <div class="wazing"></div>
-            <div id="player" class="ts-player">
-                <div class="ts-viewer">
-                    <div class="ts-wave">
-                        <div class="ts-image-container">
-                            <a href="{% url telemeta-item-export item.public_id,"mp3" %}">
-                               <img class="ts-image" src="{% url telemeta-item-visualize item.public_id,visualizer_id,360,130 %}"
-                                 alt="" /></a>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-        <div class="item_visualization" id="item_visualization_id">
-            <form id="visualizer_id_form" method="get" action="#">
-                <img src="images/plots.png" style="vertical-align:middle" />&nbsp;Visualization :
-                <select id="visualizer_id" name="visualizer_id">
-                    {% for v in visualizers %}
-                    <option value="{% url telemeta-item-visualize item.public_id,v.id,"WIDTH","HEIGHT" %}">
-                            {{v.name}}</option>
-                    {% endfor %}
-                </select>
-                <input style="visibility: hidden;" type="submit" value="Set" />
-            </form>
-
-            <!--
-                    <form method="get" action="#">
-                        <p>&nbsp;Vamp plugin analysis</p>
-                        <select name="vamp_id">
-                        {% for plugin in vamp_plugins %}
-                        <option value="{{ plugin }}" {% ifequal plugin vamp_id %} selected="selected" {% endifequal %}>
-                        {{ plugin }}</option>
-                        {% endfor %}
-                        </select>
-                        <input type="submit" value="Get" />
-                    </form>
-            -->
-        </div>
-
-        <div id="tabs_container">
-            <!-- this div will be hidden when everything is fully loaded-->
-            <span id="loading_span" href="#"><img style="vertical-align:middle" src="/images/wait.gif"/>&nbsp;
-                <span id="loading_span_text">Loading...</span></span>
-            <a id="tab_analysis" style="display:none" name ="analyzer_div_id" href="#">{% trans "Analysis" %}</a>
-            <a id="tab_markers" style="display:none" name="markers_div_id" href="#">{% trans "Markers" %}</a>
-        </div>
-
-        <div class="markers" id="markers_div_id"></div>
-
-        <div class="analyzer" id="analyzer_div_id">
-            <table width="100%">
-                <tr class="analyzer-title">
-                    <td>{% trans "Property" %}</td>
-                    <td>{% trans "Value" %}</td>
-                    <td>{% trans "Unit" %}</td>
-                </tr>
-               <!-- {% for analyser in analysers %}
-                <tr class="analyzer-line">
-                    <td>
-                        {{ analyser.name }}
-                    </td>
-                    <td>
-                        {{ analyser.value }}
-                    </td>
-                    <td>
-                        {{ analyser.unit }}
-                    </td>
-                </tr>
-                {% endfor %}-->
-            </table>
-        </div>
-        <!--</div>-->
-
-        {% if audio_export_enabled %}
-        <div class="exporter">
-            <p><img src="images/download.png" style="vertical-align:middle" /> {% trans "Download:" %}
-                {% for format in export_formats %}
-                <a href="{% url telemeta-item-export item.public_id,format.extension %}">
-                    <img src="images/{{ format.extension }}.png" style="vertical-align:middle" alt="{{ format.extension }}" /></a>
-                {% endfor %}</p>
-        </div>
-        {% endif %}
-
-    </div>
-    {% endif %}
-    {% endif %}
-
-    {% block infos %}
-    <div class="infos">
-        {% block general_info %}
-        <dl class="listing">
-            {% dl_field item "title" %}
-            {% dl_field item "alt_title" %}
-            {% dl_field item "collector" %}
-            <dt>{% field_label item "collection" %}</dt>
-            <dd><a href="{% url telemeta-collection-detail item.collection.public_id %}">{{ item.collection }}</a></dd>
-            {% if item.recorded_from_date %}
-            <dt>{% trans "Recording date" %}</dt>
-            <dd>{{ item.recorded_from_date }} {{ item.recorded_to_date|prepend:" - "  }}</dd>
-            {% endif %}
-        </dl>
-        {% endblock general_info %}
-    </div>
-    <div class="extraInfos">
-        {% block geoethnic_data %}
-        <div>
-            <h4><a href="#">{% trans "Geographic and cultural informations" %}</a></h4>
-            <dl class="listing">
-                {% if item.location %}
-                <dt>{% trans "Location" %}</dt>
-                <dd>{{ item.location.fullnames|join:"<br/>" }}</dd>
-                {% endif %}
-                {% dl_field item "location_comment" %}
-                {% dl_field item "cultural_area" %}
-                {% dl_field item "ethnic_group" %}
-                {% dl_field item "context_comment" %}
-                {% dl_field item "keywords" join with ", " %}
-            </dl>
-        </div>
-        {% endblock geoethnic_data %}
-    </div>
-    <div class="extraInfos">
-        {% block musical_data %}
-        <div>
-            <h4><a href="#">{% trans "Musical informations" %}</a></h4>
-            <dl class="listing">
-                {% dl_field item "vernacular_style" %}
-                {% dl_field item "generic_style" %}
-                {% dl_field item "author" %}
-            </dl>
-            {% if item.performances %}
-            <div class="instruments">
-                <table class="instruments">
-                    <thead>
-                        <tr>
-                            <td>{% field_label "MediaItemPerformance" "instruments_num" %}</td>
-                            <td>{% field_label "MediaItemPerformance" "instrument" %}</td>
-                            <td>{% field_label "MediaItemPerformance" "alias" %}</td>
-                            <td>{% field_label "MediaItemPerformance" "musicians" %}</td>
-                        </tr>
-                    </thead>
-                    <tbody>
-                        {% for performance in item.performances.all %}
-                        <tr>
-                            <td>{{ performance.instruments_num }}</td>
-                            <td>{{ performance.instrument|default:"" }}</td>
-                            <td>{{ performance.alias|default:"" }}</td>
-                            <td>{{ performance.musicians }}</td>
-                        </tr>
-                        {% endfor %}
-                    </tbody>
-                </table>
-            </div>
-            {% endif %}
-        </div>
-        {% endblock musical_data %}
-    </div>
-    <div class="extraInfos">
-        {% block general_data %}
-        <div>
-            <h4><a href="#">{% trans "General informations" %}</a></h4>
-            <dl class="listing">
-                {% dl_field item "comment" %}
-                {% dl_field item "collector_selection" %}
-            </dl>
-        </div>
-        {% endblock general_data %}
-    </div>
-    <div class="extraInfos">
-        {% block archive_data %}
-        <div>
-            <h4><a href="#">{% trans "Archiving data" %}</a></h4>
-            <dl class="listing">
-                {% dl_field item "code" %}
-                {% dl_field item "old_code" %}
-                {% dl_field item "track" %}
-                {% dl_field item "creator_reference" %}
-                {% dl_field item "external_references" %}
-                {% dl_field item "public_access_label" %}
-            </dl>
-        </div>
-        {% endblock archive_data %}
-    </div>
-    <div class="extraInfos">
-        {% block technical_data %}
-        <div>
-            <h4><a href="#">{% trans "Technical data" %}</a></h4>
-            <div>
-                <dl class="listing">
-                    <dt>{% trans "Media type" %}</dt><dd>{% trans "Audio" %}</dd>
-                    {% dl_field item "approx_duration" %}
-                </dl>
-            </div>
-        </div>
-        {% endblock technical_data %}
-    </div>
-    {% endblock infos %}
-</div> <!-- with-rightcol -->
+      {% endif %}
+      <a href="{% url telemeta-item-detail previous %}" class="component_icon button icon_previous">{% trans "Previous" %}</a>
+      <a href="{% url telemeta-item-detail next %}" class="component_icon button icon_next">{% trans "Next" %}</a>
+      <a href="{% url telemeta-item-dublincore item.public_id %}" class="component_icon button icon_dublin_core">Dublin Core</a>
+      </div>
 {% endblock %}
-{% else %}
-<p>No such item</p>
-{% endif %}
index 16a82f1029a18b97346c25933a8145f2d623b247..061666323083fbe0994eaeb6f705d138b6ff4ddb 100644 (file)
@@ -1,10 +1,10 @@
-{% extends "telemeta/mediaitem_detail.html" %}\r
+{% extends "telemeta/mediaitem.html" %}\r
 {% load telemeta_utils %}\r
 {% load i18n %}\r
 \r
 {% if item %}\r
-{% block submenu %}\r
-    <div><a href="{% url telemeta-item-detail item.public_id %}">{% trans "Normal View" %}</a></div>\r
+{% block title_buttons %}\r
+    <a class="component_icon button icon_previous" href="{% url telemeta-item-detail item.public_id %}">{% trans "Normal View" %}</a>\r
 {% endblock %}\r
 \r
 {% block infos %}\r
index b53fe78cfa624b2b155fff0e66c17d56dd29d0ba..0a3061b9a1a49638ea2596ab9e45061804324845 100644 (file)
@@ -1,10 +1,13 @@
-{% extends "telemeta/mediaitem_detail.html" %}
+{% extends "telemeta/mediaitem.html" %}
 {% load i18n %}
 {% load telemeta_utils %}
 
-  {% block tools %}
+{% block title %}
+  {% endblock %}
+  {% block title_buttons %}
    <a href="{% url telemeta-item-detail item.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-  {% endblock tools %}
+  {% endblock %}
 
   {% block infos %}    
     <div class="infos">
index 40155f96989d11a130109d78f63631802daaf764..af97e0f1861151ff4605cbb0ba7d0ecd1d9b83d0 100644 (file)
@@ -4,17 +4,16 @@
 
 {% block head_title %}{% trans "Media Items" %} - {{ block.super }}{% endblock %}
 
-
-{% block submenu %}
-    <div class="buttons">  
+{% block title %}
+    <img src="images/item.png" style="vertical-align:middle" /> {% trans "Media Items" %}
+{% endblock %}
+{% block title_buttons %}
     {% if user.is_authenticated and perms.telemeta.add_mediaitem %}
       <a href="{% url telemeta-item-add %}" class="component_icon button icon_add">{% trans "Add" %}</a>
     {% endif %}
-    </div>
 {% endblock %}
 
 {% block content %}
-<h3><img src="images/item.png" style="vertical-align:middle" /> {% trans "Media Items" %}</h3>
 {% with object_list as items %}
 <div class="fullpage">
 {% include "telemeta/inc/mediaitem_list.html" %}
index 936f03b225ccb21865dcba6341d3be9e851ebc79..fa96be2c77d13418d05791c31666d1b0ae66721c 100644 (file)
@@ -2,9 +2,7 @@
 {% load i18n %}
 {% load telemeta_utils %}
 
-{% block tools %}
-     <a href="{% url telemeta-profile-detail usr.username %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-{% endblock %}
+<a href="{% url telemeta-profile-detail usr.username %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
 
 {% block content %}
        <h3>{% trans "User profile" %} : {{ usr.username }}</h3>