Changeset ed5ad88


Ignore:
Timestamp:
08/06/2011 16:54:28 (3 years ago)
Author:
yomguy <yomguy@…>
Branches:
master, crem, crem2, dev, dev2, diadems, 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, security, server, social, storage, telecaster, test
Children:
a844b32
Parents:
db74edd (diff), 4a6a82a (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@…> (08/06/2011 16:54:28)
git-committer:
yomguy <yomguy@…> (08/06/2011 16:54:28)
Message:

fix no collection player when no rights

Files:
6 added
3 edited

Legend:

Unmodified
Added
Removed
  • telemeta/templates/telemeta_default/collection_detail.html

    r698a134 r4a6a82a  
    7474 
    7575{% block content %} 
    76     <div class="{% if collection.has_mediafile %}with-rightcol{% endif %}"> 
     76    <div class="{% if collection.has_mediafile %}{% if item.public_access == 'full' or public_access or user.is_staff %}with-rightcol{% endif %}{% endif %}"> 
    7777        {% if collection.has_mediafile %} 
     78        {% if public_access or user.is_staff or user.is_superuser %} 
    7879        <div id="rightcol"> 
    7980            <div id="collection_player"> 
     
    99100        </div> 
    100101        {% endif %} 
     102        {% endif %} 
    101103      {% block infos %} 
    102104        <div class="intro"> 
  • telemeta/models/media.py

    r698a134 rdb74edd  
    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 
  • telemeta/templates/telemeta_default/mediaitem_detail.html

    rfb689eb r97dbca2  
    259259    {% endblock infos %} 
    260260</div> <!-- with-rightcol --> 
    261 {% if user.is_authenticated and perms.telemeta.delete_mediaitem %} 
    262 <div style="float: right;"> 
    263  <a href="{% url telemeta-item-delete item.public_id %}" class="component_icon button icon_delete">{% trans "Delete" %}</a> 
    264 </div> 
    265 {% endif %} 
    266261{% endblock %} 
    267262{% else %} 
Note: See TracChangeset for help on using the changeset viewer.