<%inherit file="/base.mako"/> <%namespace file="/message.mako" import="render_msg" /> <%namespace file="/library/common/common.mako" import="render_template_fields" /> <% from galaxy import util from galaxy.web.controllers.library_common import branch_deleted, get_containing_library_from_library_dataset from galaxy.web.framework.helpers import time_ago if ldda == ldda.library_dataset.library_dataset_dataset_association: current_version = True else: current_version = False if ldda.user: uploaded_by = ldda.user.email else: uploaded_by = 'anonymous' if trans.user_is_admin() and cntrller == 'library_admin': can_modify = can_manage = True elif cntrller in [ 'library', 'requests' ]: can_modify = trans.app.security_agent.can_modify_library_item( current_user_roles, ldda.library_dataset ) can_manage = trans.app.security_agent.can_manage_library_item( current_user_roles, ldda.library_dataset ) else: can_modify = can_manage = False %> <%def name="javascripts()"> ${parent.javascripts()} %if current_version: This is the latest version of this library dataset %else: This is an expired version of this library dataset %endif

%if message: ${render_msg( message, status )} %endif
Information about %if not library.deleted and not branch_deleted( ldda.library_dataset.folder ) and not ldda.library_dataset.deleted:
%if can_modify: Edit information %if not info_association: Add template %else: Edit template Delete template %endif %endif %if can_manage: Edit permissions %endif %if current_version and can_modify: Upload a new version of this dataset %endif %if cntrller=='library' and ldda.has_data(): Import this dataset into your current history Download this dataset %endif
%endif
%if ldda.message:
${ldda.message}
%endif
${uploaded_by}
${ldda.create_time.strftime( "%Y-%m-%d" )}
${ldda.get_size( nice_size=True )}
${ldda.ext}
${ldda.dbkey}
${ldda.info}
${ldda.blurb}
%for name, spec in ldda.metadata.spec.items():
<% metadata_val = ldda.metadata.get( name ) if isinstance( metadata_val, trans.model.MetadataFile ): metadata_val = metadata_val.file_name elif isinstance( metadata_val, list ): metadata_val = ', '.join( metadata_val ) %> ${metadata_val}
%endfor %if ldda.peek != "no peek":
${ldda.display_peek()}
%endif %if trans.user_is_admin() and cntrller == 'library_admin':
${ldda.file_name}
%endif
%if widgets: ${render_template_fields( cntrller=cntrller, item_type='ldda', library_id=library_id, widgets=widgets, widget_fields_have_contents=widget_fields_have_contents, info_association=info_association, inherited=inherited, folder_id=trans.security.encode_id( ldda.library_dataset.folder.id ), ldda_id=trans.security.encode_id( ldda.id ), editable=False )} %endif %if trans.user_is_admin() and cntrller == 'library_admin': %if associated_hdas:

Active (undeleted) history items that use this library dataset's disk file

%for hda in associated_hdas: %endfor
History History Item Last Updated User
%if hda.history: ${hda.history.get_display_name()} %else: no history %endif ${hda.get_display_name()} ${time_ago( hda.update_time )} %if hda.history and hda.history.user: ${hda.history.user.email} %else: anonymous %endif

%endif %if associated_lddas:

Other active (undeleted) library datasets that use this library dataset's disk file

%for copied_ldda in associated_lddas: <% containing_library = get_containing_library_from_library_dataset( trans, copied_ldda.library_dataset ) %> %endfor
Library Library Folder Library Dataset Last Updated User
<% if containing_library: library_display_name = containing_library.get_display_name() else: library_display_name = 'no library' %> %if containing_library: ${library_display_name} %else: ${library_display_name} %endif <% library_dataset = copied_ldda.library_dataset folder = library_dataset.folder folder_display_name = folder.get_display_name() if folder_display_name == library_display_name: folder_display_name = 'library root' %> ${folder_display_name} ${copied_ldda.library_dataset.folder.get_display_name()} ${copied_ldda.get_display_name()} ${time_ago( copied_ldda.update_time )} %if copied_ldda.user: ${copied_ldda.user.email} %else: anonymous %endif

%endif %endif %if current_version: <% expired_lddas = [ e_ldda for e_ldda in ldda.library_dataset.expired_datasets ] %> %if expired_lddas:

Expired versions of ${ldda.name}
%for expired_ldda in expired_lddas:
${expired_ldda.name}
%endfor %endif %endif