diff --git a/static/june_2007_style/blue/library.css b/static/june_2007_style/blue/library.css index 2ee7a388265..f0369dba7f6 100644 --- a/static/june_2007_style/blue/library.css +++ b/static/june_2007_style/blue/library.css @@ -12,4 +12,6 @@ ul{list-style:none;} pre.peek{background:white;color:black;width:100%;overflow:auto;} pre.peek th{color:white;background:#023858;} a.expandLink{text-decoration:none;} -span.expandLink{width:100%;height:100%;display:block;} +span.expandLink{width:16px;height:16px;display:inline-block;vertical-align:middle;background:url(../images/silk/resultset_next.png);} +.folderRow.expanded span.expandLink{background:url(../images/silk/resultset_bottom.png);} +.folderRow span.rowIcon{width:16px;height:16px;display:inline-block;vertical-align:middle;background:url(../images/silk/folder.png);} diff --git a/static/june_2007_style/library.css.tmpl b/static/june_2007_style/library.css.tmpl index 8ebea36998e..4a2c24a5bbf 100644 --- a/static/june_2007_style/library.css.tmpl +++ b/static/june_2007_style/library.css.tmpl @@ -69,7 +69,22 @@ a.expandLink { } span.expandLink { - width: 100%; - height: 100%; - display: block; + width: 16px; + height: 16px; + display: inline-block; + vertical-align: middle; + background: url(../images/silk/resultset_next.png); } + +.folderRow.expanded span.expandLink { + background: url(../images/silk/resultset_bottom.png); +} + +.folderRow span.rowIcon { + width: 16px; + height: 16px; + display: inline-block; + vertical-align: middle; + background: url(../images/silk/folder.png); +} + diff --git a/templates/library/browse_library.mako b/templates/library/browse_library.mako index 43d7213c6fb..6cacd272d60 100644 --- a/templates/library/browse_library.mako +++ b/templates/library/browse_library.mako @@ -1,5 +1,5 @@ <%inherit file="/base.mako"/> -<%namespace file="common.mako" import="render_dataset" /> +## <%namespace file="common.mako" import="render_dataset" /> <%namespace file="/message.mako" import="render_msg" /> <% from galaxy import util %> @@ -10,102 +10,144 @@ <% + def name_sorted( l ): return sorted( l, lambda a, b: cmp( a.name.lower(), b.name.lower() ) ) + +class RowCounter( object ): + def __init__( self ): + self.count = 0 + def increment( self ): + self.count += 1 + def __str__( self ): + return str( self.count ) + %> - - - +<%def name="render_dataset( library_dataset, selected, library, pad, parent, row_conter )"> + <% + ## The received data must always be a LibraryDataset object, but the object id passed to methods from the drop down menu + ## should be the underlying ldda id to prevent id collision ( which could happen when displaying children, which are always + ## lddas ). We also need to make sure we're displaying the latest version of this library_dataset, so we display the attributes + ## from the ldda. + ldda = library_dataset.library_dataset_dataset_association + if ldda.user: + uploaded_by = ldda.user.email + else: + uploaded_by = 'anonymous' + if ldda == ldda.library_dataset.library_dataset_dataset_association: + current_version = True + else: + current_version = False + %> -<%def name="render_folder( folder, folder_pad, created_ldda_ids, library_id )"> + + + + + %if selected: + + %else: + + %endif + + ${ldda.name[:60]} + + +
+ %if trans.app.security_agent.allow_action( trans.user, trans.app.security_agent.permitted_actions.LIBRARY_MODIFY, library_item=ldda.library_dataset ): + Edit this dataset's information + %else: + View this dataset's information + %endif + ## We're disabling the ability to add templates at the LDDA and LibraryDataset level, but will leave this here for possible future use + ##%if trans.app.security_agent.allow_action( trans.user, trans.app.security_agent.permitted_actions.LIBRARY_ADD, library_item=ldda.library_dataset ): + ## Add an information template to this dataset + ##%endif + %if trans.app.security_agent.allow_action( trans.user, trans.app.security_agent.permitted_actions.DATASET_MANAGE_PERMISSIONS, dataset=ldda.dataset ) and trans.app.security_agent.allow_action( trans.user, trans.app.security_agent.permitted_actions.LIBRARY_MANAGE, library_item=ldda.library_dataset ): + Edit this dataset's permissions + %if current_version and trans.app.security_agent.allow_action( trans.user, trans.app.security_agent.permitted_actions.LIBRARY_MODIFY, library_item=ldda.library_dataset ): + Upload a new version of this dataset + %endif + %endif + %if ldda.has_data: + Import this dataset into your current history + Download this dataset + %endif +
+ + + ${ldda.message} + ${uploaded_by} + ${ldda.create_time.strftime( "%Y-%m-%d" )} + + + <% + my_row = row_counter.count + row_counter.increment() + %> + + + + + +<%def name="render_folder( folder, folder_pad, created_ldda_ids, library_id, parent=None, row_counter=None )"> <% def show_folder(): if trans.app.security_agent.check_folder_contents( trans.user, folder ) or trans.app.security_agent.show_library_item( trans.user, folder ): @@ -119,27 +161,36 @@ def name_sorted( l ): else: pad = folder_pad + 20 if folder_pad == 0: - expander = "/static/images/silk/resultset_bottom.png" - folder_img = "/static/images/silk/folder_page.png" subfolder = False else: - expander = "/static/images/silk/resultset_next.png" - folder_img = "/static/images/silk/folder.png" subfolder = True 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 ] + my_row = None %> %if not root_folder: -
  • - -
    - + + + + + + + + + ${folder.name} %if folder.description: - ${folder.description} %endif + +
    %if trans.app.security_agent.allow_action( trans.user, trans.app.security_agent.permitted_actions.LIBRARY_ADD, library_item=folder ): Add datasets to this folder @@ -167,126 +218,136 @@ def name_sorted( l ): %endif
    -
  • + + + <% + my_row = row_counter.count + row_counter.increment() + %> %endif - %if subfolder: -