From: riccardo Date: Wed, 22 Jun 2011 16:36:33 +0000 (+0200) Subject: fixed delete item and collection buttons X-Git-Tag: 1.1~77 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=40265bdc16bded6e7d0ca4d27ad0ed1b93b32ef9;p=telemeta.git fixed delete item and collection buttons --- diff --git a/telemeta/htdocs/js/locale.js b/telemeta/htdocs/js/locale.js index 6df8ea5c..4cb4fef1 100644 --- a/telemeta/htdocs/js/locale.js +++ b/telemeta/htdocs/js/locale.js @@ -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){ diff --git a/telemeta/templates/telemeta_default/collection_detail.html b/telemeta/templates/telemeta_default/collection_detail.html index 9c2eb46f..2ce57fa9 100644 --- a/telemeta/templates/telemeta_default/collection_detail.html +++ b/telemeta/templates/telemeta_default/collection_detail.html @@ -29,26 +29,7 @@ }); {% 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(); -// }); + {% endblock %} @@ -218,6 +199,14 @@ {% endblock infos %} {% endblock %} +{% block deleteitem %} +{% if user.is_authenticated and perms.telemeta.delete_mediacollection %} + {% trans "Delete" %} +{% endif %} + +{% endblock %} + {% else %}

No such collection

{% endif %} diff --git a/telemeta/templates/telemeta_default/mediaitem_detail.html b/telemeta/templates/telemeta_default/mediaitem_detail.html index 865eeb89..ef16fdbe 100644 --- a/telemeta/templates/telemeta_default/mediaitem_detail.html +++ b/telemeta/templates/telemeta_default/mediaitem_detail.html @@ -262,12 +262,13 @@ {% endblock infos %} -{% if user.is_authenticated and perms.telemeta.delete_mediaitem %} -{% endif %} + {% endblock %} {% block deleteitem %} +{% if user.is_authenticated and perms.telemeta.delete_mediaitem %} {% trans "Delete" %} +{% endif %} {% endblock %} {% else %}

No such item