Changeset 227c2ca


Ignore:
Timestamp:
Jun 22, 2011 7:02:21 PM (3 years ago)
Author:
yomguy <yomguy@…>
Branches:
master, crem, crem2, crem3, dev, dev2, diadems, dj1.6, feature/breadcrumbs, feature/ts-0.5, feature/ts-0.5.4, feature/writecache, forma, generic, instru_search, lam, lam2, mapsv3, merge, nlivemulti, production, release/1.4.4, sabiod, search, security, server, social, storage, telecaster, test
Children:
a11b4af
Parents:
9dff2f9 (diff), 2845945 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
yomguy <yomguy@…> (22/06/2011 19:02:21)
git-committer:
yomguy <yomguy@…> (22/06/2011 19:02:21)
Message:

yomguy 2011-06-22 fix admin color, fix collection column titles
yomguy 2011-06-22 fix message on collection delete
yomguy 2011-06-22 fix wrong </div>
yomguy 2011-06-22 fix collection delete url, add js locale
riccardo 2011-06-22 fixed delete item and collection buttons
yomguy 2011-06-22 add collection delete url and view
riccardo 2011-06-22 fixed delete item button

Files:
6 added
14 edited

Legend:

Unmodified
Added
Removed
  • telemeta/htdocs/css/telemeta.css

    rea7656e r2845945  
    467467#menu .black { border-bottom-color:  #000000; } 
    468468#menu .red { border-bottom-color:  #DD0000; } 
    469 #menu .indogo { border-bottom-color:  #4B0082; } 
     469#menu .violet { border-bottom-color:  #A00020; } 
    470470 
    471471* html #menu :link, * html #menu :visited { background-position: 1px 0 } 
  • telemeta/htdocs/js/locale.js

    r65fa35a r40265bd  
    1010    'author' : gettext('author'), 
    1111    'Paste HTML to embed player in website': gettext('Paste HTML to embed player in website'), 
     12    'delete the item permanently?' : gettext('delete the item permanently?'), 
     13    'delete the collection permanently?' : gettext('delete the collection permanently?') 
    1214}; 
    1315 
  • telemeta/locale/de/LC_MESSAGES/djangojs.po

    r6ad1e97 r6a2413f  
    99"Project-Id-Version: PACKAGE VERSION\n" 
    1010"Report-Msgid-Bugs-To: \n" 
    11 "POT-Creation-Date: 2011-06-22 17:56+0200\n" 
     11"POT-Creation-Date: 2011-06-22 18:37+0200\n" 
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 
     
    5656 
    5757#: htdocs/js/locale.js:11 
    58 msgid "Paste HTML to embed in website" 
     58msgid "Paste HTML to embed player in website" 
    5959msgstr "" 
     60 
     61#: htdocs/js/locale.js:12 
     62msgid "delete the item permanently?" 
     63msgstr "" 
     64 
     65#: htdocs/js/locale.js:13 
     66msgid "delete the collection permanently?" 
     67msgstr "" 
  • telemeta/locale/fr/LC_MESSAGES/djangojs.po

    r6ad1e97 r6a2413f  
    99"Project-Id-Version: PACKAGE VERSION\n" 
    1010"Report-Msgid-Bugs-To: \n" 
    11 "POT-Creation-Date: 2011-06-22 17:56+0200\n" 
     11"POT-Creation-Date: 2011-06-22 18:37+0200\n" 
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 
    1313"Last-Translator: Guillaume Pellerin <yomguy@parisson.com>\n" 
     
    5858msgid "Paste HTML to embed player in website" 
    5959msgstr "Coller le code HTML pour inclure le lecteur dans un site" 
     60 
     61#: htdocs/js/locale.js:12 
     62msgid "delete the item permanently?" 
     63msgstr "supprimer l'item définitivement ?" 
     64 
     65#: htdocs/js/locale.js:13 
     66msgid "delete the collection permanently?" 
     67msgstr "supprimer la collection définitivement ?" 
  • telemeta/templates/telemeta_default/base.html

    rea7656e r2845945  
    8888 {% endif %} 
    8989 {% if user.is_staff or user.is_superuser %} 
    90  <a href="{% url telemeta-admin %}" class="black">{% trans "Admin" %}</a> 
     90 <a href="{% url telemeta-admin %}" class="violet">{% trans "Admin" %}</a> 
    9191 {% endif %} 
    9292 
     
    103103{% block content %}{% endblock %} 
    104104<div class="nett"></div> 
     105{% block deleteitem %}{% endblock %} 
    105106</div> 
    106107 
  • telemeta/templates/telemeta_default/collection_detail.html

    rb21dbf0 r6082da9  
    3030 
    3131        {% endif %} 
    32 //    var setupPlaylist = function(){ 
    33 //        {% if user.is_authenticated %} 
    34 //        var p = playlistUtils; 
    35 //        {% for playlist in playlists %} 
    36 //        p.addPlaylist('{{ playlist.playlist.title }}','{{playlist.playlist.public_id}}'); 
    37 //        {% endfor %} 
    38 // 
    39 //        {% endif %} 
    40 //        {% if collection %} 
    41 //        var anchor = jQuery('#_add_to_playlist'); 
    42 //        if(anchor.length){ 
    43 //        anchor.click(function(){ 
    44 //            p.showAddResourceToPlaylist(anchor,'collection','{{collection.id}}',gettrans('collection added to the selected playlist'));return false; 
    45 //        }); 
    46 //        } 
    47 //        {% endif %} 
    48 //    }; 
    49 //    jQuery(document).ready(function(){ 
    50 //        setupPlaylist(); 
    51 //    }); 
     32 
    5233</script> 
    5334{% endblock %} 
     
    215196        {% endwith %} 
    216197        --> 
    217         </div> 
     198 
    218199        {% endblock infos %} 
    219200    </div> 
    220201{% endblock %} 
     202 
     203{% block deleteitem %} 
     204{% if user.is_authenticated and perms.telemeta.delete_mediacollection %} 
     205 <a href="#" onclick="if(confirm(gettrans('delete the collection permanently?'))){window.location.href='{% url telemeta-collection-delete collection.public_id %}';};return false;" 
     206        class="component_icon button icon_delete" style="float:right;margin-top:0.5em;margin-bottom:1em">{% trans "Delete" %}</a> 
     207{% endif %} 
     208 
     209{% endblock %} 
     210 
    221211{% else %} 
    222212    <p>No such collection</p> 
  • telemeta/templates/telemeta_default/home.html

    r8a47ef5 r2845945  
    4848            <th>{% trans "Code" %}</th> 
    4949            <th>{% trans "Recordist" %}</th> 
    50             <th>{% trans "Year of recording" %}</th> 
     50            <th>{% trans "Recording period" %}</th> 
    5151            <th>{% trans "Sound" %}</th> 
    5252            <th>{% trans "Action" %}</th> 
  • telemeta/templates/telemeta_default/inc/collection_list.html

    re7b24f5 r2845945  
    1515    <th>{% field_label "MediaCollection" "creator" %}</th> 
    1616    <th>{% trans "Recordist" %}</th> 
    17     <th>{% trans "Year of recording" %}</th> 
     17    <th>{% trans "Recording period" %}</th> 
    1818    <th>{% trans "Sound" %}</th> 
    1919</tr> 
  • telemeta/templates/telemeta_default/mediaitem_detail.html

    r59a51a3 r8f0f9d0  
    263263    {% endblock infos %} 
    264264</div> <!-- with-rightcol --> 
     265 
     266{% endblock %} 
     267 
     268{% block deleteitem %} 
    265269{% if user.is_authenticated and perms.telemeta.delete_mediaitem %} 
    266 <div style="float: right;"> 
    267  <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">{% trans "Delete" %}</a> 
    268 </div> 
     270 <a href="#" onclick="if(confirm(gettrans('delete the item permanently?'))){window.location.href='{% url telemeta-item-delete item.public_id %}';};return false;"   
     271        class="component_icon button icon_delete" style="float:right;margin-top:0.5em;margin-bottom:1em">{% trans "Delete" %}</a> 
    269272{% endif %} 
    270273{% endblock %} 
     274 
    271275{% else %} 
    272276<p>No such item</p> 
  • telemeta/urls.py

    rea7656e r6a2413f  
    142142    url(r'^collections/(?P<public_id>[A-Za-z0-9._-]+)/copy/$', collection_view.collection_copy, 
    143143        dict(template='telemeta/collection_edit.html'), name="telemeta-collection-copy"), 
    144     url(r'^collection/add/$', collection_view.collection_add, 
     144    url(r'^collections/add/$', collection_view.collection_add, 
    145145        dict(template='telemeta/collection_add.html'), name="telemeta-collection-add"), 
    146     url(r'^collection/(?P<public_id>[A-Za-z0-9._-]+)/add_item/$', item_view.item_add, 
     146    url(r'^collections/(?P<public_id>[A-Za-z0-9._-]+)/add_item/$', item_view.item_add, 
    147147        dict(template='telemeta/mediaitem_add.html'), name="telemeta-collection-additem"), 
    148  
     148    url(r'^collections/(?P<public_id>[A-Za-z0-9._-]+)/delete/$', collection_view.collection_delete, name="telemeta-collection-delete"), 
     149     
    149150    # search 
    150151    url(r'^search/$', general_view.search, name="telemeta-search"), 
  • telemeta/web/base.py

    rea7656e r9b202e11  
    398398        return HttpResponse(template.render(context), mimetype=mimetype) 
    399399 
     400    @method_decorator(permission_required('telemeta.delete_mediacollection')) 
     401    def collection_delete(self, request, public_id): 
     402        """Delete a given collection""" 
     403        collection = MediaCollection.objects.get(public_id=public_id) 
     404        collection.delete() 
     405        return HttpResponseRedirect('/collections/') 
     406     
    400407 
    401408class ItemView(object): 
  • telemeta/models/media.py

    rd490e6f r9dff2f9  
    7474 
    7575 
    76 collection_published_code_regex   = '[A-Za-z0-9._-]*' 
    77 collection_unpublished_code_regex = '[A-Za-z0-9._-]*' 
     76collection_published_code_regex   = 'CNRSMH_E_[0-9]{4}(?:_[0-9]{3}){2}' 
     77collection_unpublished_code_regex = 'CNRSMH_I_[0-9]{4}_[0-9]{3}' 
    7878collection_code_regex             = '(?:%s|%s)' % (collection_published_code_regex,  
    7979                                                    collection_unpublished_code_regex) 
     
    218218         
    219219 
    220 item_published_code_regex    = '[A-Za-z0-9._-]*' 
    221 item_unpublished_code_regex  = '[A-Za-z0-9._-]*' 
     220item_published_code_regex    = collection_published_code_regex + '(?:_[0-9]{2,3}){1,2}' 
     221item_unpublished_code_regex  = collection_unpublished_code_regex + '_[0-9]{2,3}(?:_[0-9]{2,3}){0,2}' 
    222222item_code_regex              = '(?:%s|%s)' % (item_published_code_regex, item_unpublished_code_regex) 
    223223 
Note: See TracChangeset for help on using the changeset viewer.