diff --git a/templates/library/browse_library.mako b/templates/library/browse_library.mako index 26624725214..3a7c1415374 100644 --- a/templates/library/browse_library.mako +++ b/templates/library/browse_library.mako @@ -122,9 +122,6 @@ def name_sorted( l ): expander = "/static/images/silk/resultset_next.png" folder = "/static/images/silk/folder.png" subfolder = True - add_folder_item = trans.app.security_agent.allow_action( trans.user, trans.app.security_agent.permitted_actions.LIBRARY_ADD, library_item=parent ) - modify_folder = trans.app.security_agent.allow_action( trans.user, trans.app.security_agent.permitted_actions.LIBRARY_MODIFY, library_item=parent ) - manage_folder = trans.app.security_agent.allow_action( trans.user, trans.app.security_agent.permitted_actions.LIBRARY_MANAGE, library_item=parent ) created_ldda_id_list = util.listify( created_ldda_ids ) if created_ldda_id_list: created_ldda_ids = [ int( ldda_id ) for ldda_id in created_ldda_id_list ] @@ -137,25 +134,21 @@ def name_sorted( l ): %if parent.description: - ${parent.description} %endif - %if add_folder_item or modify_folder or manage_folder: - -
- %endif - %if add_folder_item: - Add datasets to this folder - Create a new sub-folder in this folder - %endif - %if modify_folder: - Edit this folder's information - %else: - View this folder's information - %endif - %if manage_folder: - Edit this folder's permissions - %endif - %if add_folder_item or modify_folder or manage_folder: -
- %endif + +
+ %if trans.app.security_agent.allow_action( trans.user, trans.app.security_agent.permitted_actions.LIBRARY_ADD, library_item=parent ): + Add datasets to this folder + Create a new sub-folder in this folder + %endif + %if trans.app.security_agent.allow_action( trans.user, trans.app.security_agent.permitted_actions.LIBRARY_MODIFY, library_item=parent ): + Edit this folder's information + %else: + View this folder's information + %endif + %if trans.app.security_agent.allow_action( trans.user, trans.app.security_agent.permitted_actions.LIBRARY_MANAGE, library_item=parent ): + Edit this folder's permissions + %endif +
%if subfolder: