]> git.parisson.com Git - telemeta.git/commitdiff
fixed delete item and collection buttons
authorriccardo <riccardo@parisson.com>
Wed, 22 Jun 2011 16:36:33 +0000 (18:36 +0200)
committerriccardo <riccardo@parisson.com>
Wed, 22 Jun 2011 16:36:33 +0000 (18:36 +0200)
telemeta/htdocs/js/locale.js
telemeta/templates/telemeta_default/collection_detail.html
telemeta/templates/telemeta_default/mediaitem_detail.html

index 6df8ea5c2b289c0a4034b21c0aeb5bccb3049b9a..4cb4fef161a50da0d4caad8919dde9af3418645d 100644 (file)
@@ -9,7 +9,8 @@ var localeStrings = {
     'If you exit the page you will loose your changes' : gettext('If you exit the page you will loose your changes'),
     'author' : gettext('author'),
     'Paste HTML to embed player in website': gettext('Paste HTML to embed player in website'),
-    'delete the item permanently?' : gettext('delete the item permanently?')
+    'delete the item permanently?' : gettext('delete the item permanently?'),
+    'delete the collection permanently?' : gettext('delete the collection permanently?')
 };
 
 function gettrans(str){
index 9c2eb46f40d12cd7f76005c3a1a173faae36dd72..2ce57fa9366dc7b438bdedaf6aa18ff0394b6abe 100644 (file)
     });
 
         {% endif %}
-//    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 collection %}
-//        var anchor = jQuery('#_add_to_playlist');
-//        if(anchor.length){
-//        anchor.click(function(){
-//            p.showAddResourceToPlaylist(anchor,'collection','{{collection.id}}',gettrans('collection added to the selected playlist'));return false;
-//        });
-//        }
-//        {% endif %}
-//    };
-//    jQuery(document).ready(function(){
-//        setupPlaylist();
-//    });
+
 </script>
 {% endblock %}
 
         {% endblock infos %}
     </div>
 {% endblock %}
+{% block deleteitem %}
+{% if user.is_authenticated and perms.telemeta.delete_mediacollection %}
+ <a href="#" onclick="if(confirm(gettrans('delete the item permanently?'))){window.location.href='{% url telemeta-collection-delete collection.public_id %}';};return false;"
+        class="component_icon button icon_delete" style="float:right;margin-top:0.5em;margin-bottom:1em">{% trans "Delete" %}</a>
+{% endif %}
+
+{% endblock %}
+
 {% else %}
     <p>No such collection</p>
 {% endif %}
index 865eeb89f7ecb7c8e0bf0f4eb5355ca269354761..ef16fdbebe41de2cf4cfc224c8758658ebe0ee96 100644 (file)
     </div>
     {% endblock infos %}
 </div> <!-- with-rightcol -->
-{% if user.is_authenticated and perms.telemeta.delete_mediaitem %}
-{% endif %}
+
 {% endblock %}
 {% block deleteitem %}
+{% if user.is_authenticated and perms.telemeta.delete_mediaitem %}
  <a href="#" onclick="if(confirm(gettrans('delete the item permanently?'))){window.location.href='{% url telemeta-item-delete item.public_id %}';};return false;"  
         class="component_icon button icon_delete" style="float:right;margin-top:0.5em;margin-bottom:1em">{% trans "Delete" %}</a>
+{% endif %}
 {% endblock %}
 {% else %}
 <p>No such item</p>