PageRenderTime 17ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/templates/library/common/folder_permissions.mako

https://bitbucket.org/cistrome/cistrome-harvard/
Mako | 19 lines | 15 code | 3 blank | 1 comment | 3 complexity | f97a13f327df5e607392ec7bd34372c3 MD5 | raw file
 1<%inherit file="/base.mako"/>
 2<%namespace file="/message.mako" import="render_msg" />
 3<%namespace file="/dataset/security_common.mako" import="render_permission_form" />
 4
 5<br/><br/>
 6<ul class="manage-table-actions">
 7    <li>
 8        <a class="action-button" href="${h.url_for( controller='library_common', action='browse_library', cntrller=cntrller, id=library_id, use_panels=use_panels, show_deleted=show_deleted )}"><span>Browse this data library</span></a>
 9    </li>
10</ul>
11
12%if message:
13    ${render_msg( message, status )}
14%endif
15
16%if ( trans.user_is_admin() and cntrller in [ 'library_admin', 'requests_admin' ] ) or trans.app.security_agent.can_manage_library_item( current_user_roles, folder ):
17    ## LIBRARY_ACCESS is a special permission that is set only at the library level.
18    ${render_permission_form( folder, folder.name, h.url_for( controller='library_common', action='folder_permissions', cntrller=cntrller, id=trans.security.encode_id( folder.id ), library_id=library_id, show_deleted=show_deleted ), roles, do_not_render=[ 'LIBRARY_ACCESS' ] )}
19%endif