From fb6e5ed8ccba3d09dc3546db26b4830e1c6b3752 Mon Sep 17 00:00:00 2001 From: Greg Von Kuster Date: Fri, 14 Aug 2009 09:22:31 -0400 Subject: [PATCH] Change GUI references to Library to now be Data Library, and merge 2 history grid templates into 1. --- lib/galaxy/web/controllers/history.py | 8 +- lib/galaxy/web/controllers/requests.py | 29 ++- lib/galaxy/web/controllers/requests_admin.py | 5 +- templates/admin/center.mako | 22 +- templates/admin/dataset_security/role.mako | 2 +- templates/admin/index.mako | 2 +- templates/admin/library/browse_libraries.mako | 4 +- templates/admin/library/browse_library.mako | 22 +- templates/admin/library/folder_info.mako | 2 +- .../admin/library/folder_permissions.mako | 2 +- templates/admin/library/ldda_edit_info.mako | 2 +- templates/admin/library/ldda_info.mako | 2 +- templates/admin/library/ldda_permissions.mako | 2 +- .../admin/library/library_dataset_info.mako | 2 +- .../library/library_dataset_permissions.mako | 2 +- templates/admin/library/library_info.mako | 2 +- .../admin/library/library_permissions.mako | 2 +- templates/admin/library/new_dataset.mako | 6 +- templates/admin/library/new_folder.mako | 2 +- templates/admin/library/new_library.mako | 4 +- .../admin/library/select_info_template.mako | 2 +- templates/admin/requests/show_request.mako | 2 +- templates/base_panels.mako | 4 +- templates/history/shared_grid.mako | 197 ------------------ templates/history/stored_grid.mako | 196 ----------------- templates/library/browse_libraries.mako | 4 +- templates/library/browse_library.mako | 4 +- templates/library/folder_info.mako | 2 +- templates/library/folder_permissions.mako | 2 +- templates/library/ldda_edit_info.mako | 2 +- templates/library/ldda_info.mako | 2 +- templates/library/ldda_permissions.mako | 2 +- templates/library/library_dataset_info.mako | 2 +- .../library/library_dataset_permissions.mako | 2 +- templates/library/library_info.mako | 2 +- templates/library/library_permissions.mako | 2 +- templates/library/new_dataset.mako | 4 +- templates/library/new_folder.mako | 2 +- templates/library/select_info_template.mako | 2 +- templates/requests/edit_request.mako | 2 +- templates/requests/new_request.mako | 2 +- templates/requests/show_request.mako | 2 +- .../functional/test_security_and_libraries.py | 2 +- 43 files changed, 84 insertions(+), 483 deletions(-) delete mode 100644 templates/history/shared_grid.mako delete mode 100644 templates/history/stored_grid.mako diff --git a/lib/galaxy/web/controllers/history.py b/lib/galaxy/web/controllers/history.py index 376db342a43..f9a9bc45085 100644 --- a/lib/galaxy/web/controllers/history.py +++ b/lib/galaxy/web/controllers/history.py @@ -161,7 +161,7 @@ class HistoryController( BaseController ): status, message = self._list_undelete( trans, histories ) trans.sa_session.flush() # Render the list view - return self.stored_list_grid( trans, status=status, message=message, template='/history/stored_grid.mako', **kwargs ) + return self.stored_list_grid( trans, status=status, message=message, template='/history/grid.mako', **kwargs ) def _list_delete( self, trans, histories ): """Delete histories""" n_deleted = 0 @@ -239,14 +239,14 @@ class HistoryController( BaseController ): if operation == "clone": if not id: message = "Select a history to clone" - return self.shared_list_grid( trans, status='error', message=message, template='/history/shared_grid.mako', **kwargs ) + return self.shared_list_grid( trans, status='error', message=message, template='/history/grid.mako', **kwargs ) # When cloning shared histories, only copy active datasets new_kwargs = { 'clone_choice' : 'active' } return self.clone( trans, id, **new_kwargs ) elif operation == 'unshare': if not id: message = "Select a history to unshare" - return self.shared_list_grid( trans, status='error', message=message, template='/history/shared_grid.mako', **kwargs ) + return self.shared_list_grid( trans, status='error', message=message, template='/history/grid.mako', **kwargs ) ids = util.listify( id ) histories = [] for history_id in ids: @@ -260,7 +260,7 @@ class HistoryController( BaseController ): message = "Unshared %d shared histories" % len( ids ) status = 'done' # Render the list view - return self.shared_list_grid( trans, status=status, message=message, template='/history/shared_grid.mako', **kwargs ) + return self.shared_list_grid( trans, status=status, message=message, template='/history/grid.mako', **kwargs ) @web.expose def delete_current( self, trans ): """Delete just the active history -- this does not require a logged in user.""" diff --git a/lib/galaxy/web/controllers/requests.py b/lib/galaxy/web/controllers/requests.py index ed72519375a..32f2043b3e2 100644 --- a/lib/galaxy/web/controllers/requests.py +++ b/lib/galaxy/web/controllers/requests.py @@ -152,16 +152,12 @@ class Requests( BaseController ): helptext='')) # library associated if request.library: - request_details.append(dict(label='Library', - value=request.library.name, - helptext='Associated library where the resultant \ - dataset will be stored')) + value = request.library.name else: - request_details.append(dict(label='Library', - value=None, - helptext='Associated library where the resultant \ - dataset will be stored')) - + value = None + request_details.append( dict( label='Data library', + value=value, + helptext='Data library where the resultant dataset will be stored' ) ) # form fields for index, field in enumerate(request.type.request_form.fields): if field['required']: @@ -492,18 +488,17 @@ class Requests( BaseController ): else: lib_list.add_option(lib.name, lib.id) if lib_id == 'new': - lib_list.add_option('Create a new library', 'new', selected=True) + lib_list.add_option('Create a new data library', 'new', selected=True) else: - lib_list.add_option('Create a new library', 'new') - widget = dict(label='Library', + lib_list.add_option('Create a new data library', 'new') + widget = dict(label='Data library', widget=lib_list, - helptext='Associated library where the resultant \ - dataset will be stored.') + helptext='Data library where the resultant dataset will be stored.') if lib_id == 'new': - new_lib = dict(label='Create a new Library', + new_lib = dict(label='Create a new data library', widget=TextField('new_library_name', 40, util.restore_text( params.get( 'new_library_name', '' ) )), - helptext='Enter a library name here to request a new library') + helptext='Enter a name here to request a new data library') return [widget, new_lib] else: return [widget] @@ -558,7 +553,7 @@ class Requests( BaseController ): ''' empty_fields = [] if not request.library: - empty_fields.append('Library') + empty_fields.append('Data library') # check rest of the fields of the form for index, field in enumerate(request.type.request_form.fields): if field['required'] == 'required' and request.values.content[index] in ['', None]: diff --git a/lib/galaxy/web/controllers/requests_admin.py b/lib/galaxy/web/controllers/requests_admin.py index 9f744baf5aa..a645b01a3e8 100644 --- a/lib/galaxy/web/controllers/requests_admin.py +++ b/lib/galaxy/web/controllers/requests_admin.py @@ -144,10 +144,9 @@ class Requests( BaseController ): value=str(request.user.email), helptext='')) # library associated - request_details.append(dict(label='Library', + request_details.append(dict(label='Data library', value=trans.app.model.Library.get(request.library_id).name, - helptext='Associated library where the resultant \ - dataset will be stored')) + helptext='Data library where the resultant dataset will be stored')) # form fields for index, field in enumerate(request.type.request_form.fields): if field['required']: diff --git a/templates/admin/center.mako b/templates/admin/center.mako index 5800f847c43..47a9e544ae8 100644 --- a/templates/admin/center.mako +++ b/templates/admin/center.mako @@ -17,7 +17,7 @@
  • Manage groups - provides a view of all groups along with the members of the group and the roles associated with each group (both private and non-private roles). Non-private roles include a link to a page that allows you to manage the users - and groups that are associated with the role. The page also includes a view of the library datasets that are associated with the + and groups that are associated with the role. The page also includes a view of the data library datasets that are associated with the role and the permissions applied to each dataset.
  • @@ -32,9 +32,9 @@

    -

    Data Security and Dataset Libraries

    +

    Data Security and Data Libraries

    Security - Data security in Galaxy is a new feature, so familiarize yourself with the details which can be found here or in our data security page. The data security @@ -121,8 +121,8 @@ in the way Galaxy has behaved in the past. access - users associated with the role can import this dataset into their history for analysis.

    If no roles with the "access" permission are associated with a dataset, the dataset is "public" and may be accessed by - anyone. Public library datasets will be accessible to all users (as well as anyone not logged in during a Galaxy session) - from the list of libraries displayed when the "Libraries" menu item is selected. + anyone. Public data library datasets will be accessible to all users (as well as anyone not logged in during a Galaxy session) + from the list of data libraries displayed when the "Data Libraries" menu item is selected.

    Associating a dataset with a role that includes the "access" permission restricts the set of users that can access it. diff --git a/templates/admin/dataset_security/role.mako b/templates/admin/dataset_security/role.mako index eda5a7f25a8..652d3abeb10 100644 --- a/templates/admin/dataset_security/role.mako +++ b/templates/admin/dataset_security/role.mako @@ -84,7 +84,7 @@ $().ready(function() {

    %if len( library_dataset_actions ) > 0: -

    Library datasets associated with role '${role.name}'

    +

    Data library datasets associated with role '${role.name}'

    diff --git a/templates/history/shared_grid.mako b/templates/history/shared_grid.mako deleted file mode 100644 index 6d5e7ad29bd..00000000000 --- a/templates/history/shared_grid.mako +++ /dev/null @@ -1,197 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> - -<%def name="title()">${grid.title} - -<%def name="javascripts()"> - ${parent.javascripts()} - - - -<%def name="stylesheets()"> - - - - -%if grid.standard_filters: -
    -

    ${grid.title}

    - Filter: - %for i, filter in enumerate( grid.standard_filters ): - %if i > 0: - | - %endif - ${filter.label} - %endfor -
    -%endif - -%if message: -

    -

    ${message}
    -
    -

    -%endif -%if msg: - ${render_msg( msg, messagetype )} -%endif - - -
    diff --git a/templates/admin/index.mako b/templates/admin/index.mako index 60d6c95ecd5..4bcb65ae6b2 100644 --- a/templates/admin/index.mako +++ b/templates/admin/index.mako @@ -89,7 +89,7 @@
    diff --git a/templates/admin/library/browse_libraries.mako b/templates/admin/library/browse_libraries.mako index 45c199404fb..2d69717ea66 100644 --- a/templates/admin/library/browse_libraries.mako +++ b/templates/admin/library/browse_libraries.mako @@ -1,13 +1,13 @@ <%inherit file="/base.mako"/> <%namespace file="/message.mako" import="render_msg" /> -<%def name="title()">Browse Libraries +<%def name="title()">Browse Data Libraries

    %if deleted: Deleted %endif - Libraries + Data Libraries

      diff --git a/templates/admin/library/browse_library.mako b/templates/admin/library/browse_library.mako index 6d7b505e552..827c7ef70b0 100644 --- a/templates/admin/library/browse_library.mako +++ b/templates/admin/library/browse_library.mako @@ -162,16 +162,16 @@ def name_sorted( l ): %if deleted: Deleted %endif - Library '${library.name}' + Data Library “${library.name}” @@ -200,24 +200,24 @@ def name_sorted( l ): library_item_ids = {} library_item_ids[ 'library' ] = library.id %> - Edit this library's information + Edit this data library's information ## Editing templates disabled until we determine optimal approach to re-linking library item to new version of form definition ##%if library.info_association: ## <% form_id = library.info_association[0].template.id %> - ## Edit this library's information template + ## Edit this data library's information template ##%else: %if not library.info_association: - Add an information template to this library + Add an information template to this data library %endif - Edit this library's permissions - Delete this library and its contents + Edit this data library's permissions + Delete this data library and its contents %if show_deleted: - Hide deleted library items + Hide deleted data library items %else: - Show deleted library items + Show deleted data library items %endif %elif not library.purged: - Undelete this library + Undelete this data library %endif diff --git a/templates/admin/library/folder_info.mako b/templates/admin/library/folder_info.mako index 2a288dfcdec..52d392390ca 100644 --- a/templates/admin/library/folder_info.mako +++ b/templates/admin/library/folder_info.mako @@ -5,7 +5,7 @@

      diff --git a/templates/admin/library/folder_permissions.mako b/templates/admin/library/folder_permissions.mako index 61f8d7aab20..de580c2eba9 100644 --- a/templates/admin/library/folder_permissions.mako +++ b/templates/admin/library/folder_permissions.mako @@ -5,7 +5,7 @@

      diff --git a/templates/admin/library/ldda_edit_info.mako b/templates/admin/library/ldda_edit_info.mako index 33b7793c9b5..568c91f38cf 100644 --- a/templates/admin/library/ldda_edit_info.mako +++ b/templates/admin/library/ldda_edit_info.mako @@ -12,7 +12,7 @@ diff --git a/templates/admin/library/ldda_info.mako b/templates/admin/library/ldda_info.mako index c389d7b5220..d7ab07f45ae 100644 --- a/templates/admin/library/ldda_info.mako +++ b/templates/admin/library/ldda_info.mako @@ -20,7 +20,7 @@ diff --git a/templates/admin/library/ldda_permissions.mako b/templates/admin/library/ldda_permissions.mako index 14610490bce..6ea3a74b7a6 100644 --- a/templates/admin/library/ldda_permissions.mako +++ b/templates/admin/library/ldda_permissions.mako @@ -15,7 +15,7 @@

      diff --git a/templates/admin/library/library_dataset_info.mako b/templates/admin/library/library_dataset_info.mako index 3e53bdbfabf..576336ab3b8 100644 --- a/templates/admin/library/library_dataset_info.mako +++ b/templates/admin/library/library_dataset_info.mako @@ -11,7 +11,7 @@ diff --git a/templates/admin/library/library_dataset_permissions.mako b/templates/admin/library/library_dataset_permissions.mako index f83c4aa1a9c..e99a9fc49d2 100644 --- a/templates/admin/library/library_dataset_permissions.mako +++ b/templates/admin/library/library_dataset_permissions.mako @@ -11,7 +11,7 @@ diff --git a/templates/admin/library/library_info.mako b/templates/admin/library/library_info.mako index 59b2dfff339..64e21b8fab1 100644 --- a/templates/admin/library/library_info.mako +++ b/templates/admin/library/library_info.mako @@ -5,7 +5,7 @@

      diff --git a/templates/admin/library/library_permissions.mako b/templates/admin/library/library_permissions.mako index 8943e361cfe..4594ac1db5a 100644 --- a/templates/admin/library/library_permissions.mako +++ b/templates/admin/library/library_permissions.mako @@ -5,7 +5,7 @@

      diff --git a/templates/admin/library/new_dataset.mako b/templates/admin/library/new_dataset.mako index 2dd770e07e2..97dc25f83fd 100644 --- a/templates/admin/library/new_dataset.mako +++ b/templates/admin/library/new_dataset.mako @@ -4,7 +4,7 @@ <% import os, os.path %> -Create new library datasets +Create new data library datasets
      Upload files @@ -16,7 +16,7 @@

      @@ -142,7 +142,7 @@
      - This information will be displayed in the "Information" column for this dataset in the library browser + This information will be displayed in the "Information" column for this dataset in the data library browser
      diff --git a/templates/admin/library/new_folder.mako b/templates/admin/library/new_folder.mako index 42783a69d74..60007fd83ee 100644 --- a/templates/admin/library/new_folder.mako +++ b/templates/admin/library/new_folder.mako @@ -4,7 +4,7 @@
      diff --git a/templates/admin/library/new_library.mako b/templates/admin/library/new_library.mako index c514d2965b3..2d6a7487f35 100644 --- a/templates/admin/library/new_library.mako +++ b/templates/admin/library/new_library.mako @@ -6,13 +6,13 @@ %endif
      -
      Create a new library
      +
      Create a new data library
      - +
      diff --git a/templates/admin/library/select_info_template.mako b/templates/admin/library/select_info_template.mako index 9f2c7fc8aa9..2116f762268 100644 --- a/templates/admin/library/select_info_template.mako +++ b/templates/admin/library/select_info_template.mako @@ -4,7 +4,7 @@

      diff --git a/templates/admin/requests/show_request.mako b/templates/admin/requests/show_request.mako index 09bf859438e..1d5e89b28e6 100644 --- a/templates/admin/requests/show_request.mako +++ b/templates/admin/requests/show_request.mako @@ -48,7 +48,7 @@ %if not rd['value']: None %else: - %if rd['label'] == 'Library': + %if rd['label'] == 'Data library': ${rd['value']} %else: ${rd['value']} diff --git a/templates/base_panels.mako b/templates/base_panels.mako index ddab2a3e538..0d0f01f2df8 100644 --- a/templates/base_panels.mako +++ b/templates/base_panels.mako @@ -139,14 +139,14 @@ ${tab( "workflow", "Workflow", h.url_for( controller='workflow', action='index' ))} - ${tab( "libraries", "Libraries", h.url_for( controller='library', action='index' ))} + ${tab( "libraries", "Data Libraries", h.url_for( controller='library', action='index' ))} %if trans.request_types():
    Lab
    - - - - %for column in grid.columns: - %if column.visible: - <% - href = "" - extra = "" - if column.sortable: - if sort_key == column.key: - if sort_order == "asc": - href = url( sort=( "-" + column.key ) ) - extra = "↓" - else: - href = url( sort=( column.key ) ) - extra = "↑" - else: - href = url( sort=column.key ) - %> - 1: - colspan="${column.ncells}" - %endif - > - %if href: - ${column.label} - %else: - ${column.label} - %endif - ${extra} - - %endif - %endfor - - - - - %for i, history in enumerate( query ): - - ## Item selection column - - ## Data columns - %for column in grid.columns: - %if column.visible: - <% - # Link - link = column.get_link( trans, grid, history ) - if link: - href = url( **link ) - else: - href = None - # Value (coerced to list so we can loop) - value = column.get_value( trans, grid, history ) - if column.ncells == 1: - value = [ value ] - %> - %for cellnum, v in enumerate( value ): - <% - # Attach popup menu? - if column.attach_popup and cellnum == 0: - extra = '' % i - else: - extra = "" - %> - %if href: - - %else: - - %endif - - %endfor - %endif - %endfor - ## Actions column - - - %endfor - - - - - - - -
    - - ${v} ${extra}${v}${extra} -
    - %for operation in grid.operations: - %if operation.allowed( history ): - ${operation.label} - %endif - %endfor -
    -
    - For selected histories: - %for operation in grid.operations: - %if operation.allow_multiple: - - %endif - %endfor -
    - diff --git a/templates/history/stored_grid.mako b/templates/history/stored_grid.mako deleted file mode 100644 index 2ddbf135c40..00000000000 --- a/templates/history/stored_grid.mako +++ /dev/null @@ -1,196 +0,0 @@ -<%inherit file="/base.mako"/> -<%def name="title()">${grid.title} - -%if message: -

    -

    ${message}
    -
    -

    -%endif - -<%def name="javascripts()"> - ${parent.javascripts()} - - - -<%def name="stylesheets()"> - - - - -%if grid.standard_filters: -
    -

    ${grid.title}

    - Filter: - %for i, filter in enumerate( grid.standard_filters ): - %if i > 0: - | - %endif - ${filter.label} - %endfor -
    -%endif - -
    - - - - - %for column in grid.columns: - %if column.visible: - <% - href = "" - extra = "" - if column.sortable: - if sort_key == column.key: - if sort_order == "asc": - href = url( sort=( "-" + column.key ) ) - extra = "↓" - else: - href = url( sort=( column.key ) ) - extra = "↑" - else: - href = url( sort=column.key ) - %> - 1: - colspan="${column.ncells}" - %endif - > - %if href: - ${column.label} - %else: - ${column.label} - %endif - ${extra} - - %endif - %endfor - - - - - %for i, item in enumerate( query ): - - ## Item selection column - - ## Data columns - %for column in grid.columns: - %if column.visible: - <% - # Link - link = column.get_link( trans, grid, item ) - if link: - href = url( **link ) - else: - href = None - # Value (coerced to list so we can loop) - value = column.get_value( trans, grid, item ) - if column.ncells == 1: - value = [ value ] - %> - %for cellnum, v in enumerate( value ): - <% - # Attach popup menu? - if column.attach_popup and cellnum == 0: - extra = '' % i - else: - extra = "" - %> - %if href: - - %else: - - %endif - - %endfor - %endif - %endfor - ## Actions column - - - %endfor - - - - - - - -
    - - ${v} ${extra}${v}${extra} -
    - %for operation in grid.operations: - %if operation.allowed( item ): - ${operation.label} - %endif - %endfor -
    -
    - For selected histories: - %for operation in grid.operations: - %if operation.allow_multiple: - - %endif - %endfor -
    -
    diff --git a/templates/library/browse_libraries.mako b/templates/library/browse_libraries.mako index c52fd8a8eb7..e318daaaa72 100644 --- a/templates/library/browse_libraries.mako +++ b/templates/library/browse_libraries.mako @@ -1,9 +1,9 @@ <%inherit file="/base.mako"/> <%namespace file="/message.mako" import="render_msg" /> -<%def name="title()">Browse Libraries +<%def name="title()">Browse Data Libraries -

    Libraries

    +

    Data Libraries

    %if msg: ${render_msg( msg, messagetype )} diff --git a/templates/library/browse_library.mako b/templates/library/browse_library.mako index af2f320042c..0ef2fae1003 100644 --- a/templates/library/browse_library.mako +++ b/templates/library/browse_library.mako @@ -2,7 +2,7 @@ <%namespace file="/message.mako" import="render_msg" /> <% from galaxy import util %> -<%def name="title()">Browse Library +<%def name="title()">Browse data library <%def name="stylesheets()"> @@ -211,7 +211,7 @@ class RowCounter( object ): %endfor -

    Library “${library.name}”

    +

    Data Library “${library.name}”