1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/c8493a61bbea/ changeset: c8493a61bbea user: jgoecks date: 2011-11-28 20:37:57 summary: Support display of extra files/composite types in published items. Fixes #628 affected #: 3 files diff -r e539a8940288d068ca431b36acf1360910e71050 -r c8493a61bbeabc8a2f254fa77e1a9b7d4d551a12 lib/galaxy/web/buildapp.py --- a/lib/galaxy/web/buildapp.py +++ b/lib/galaxy/web/buildapp.py @@ -98,7 +98,7 @@ webapp.add_route( '/datasets/:dataset_id/display/{filename:.+?}', controller='dataset', action='display', dataset_id=None, filename=None) webapp.add_route( '/datasets/:dataset_id/:action/:filename', controller='dataset', action='index', dataset_id=None, filename=None) webapp.add_route( '/display_application/:dataset_id/:app_name/:link_name/:user_id/:app_action/:action_param', controller='dataset', action='display_application', dataset_id=None, user_id=None, app_name = None, link_name = None, app_action = None, action_param = None ) - webapp.add_route( '/u/:username/d/:slug', controller='dataset', action='display_by_username_and_slug' ) + webapp.add_route( '/u/:username/d/:slug/:filename', controller='dataset', action='display_by_username_and_slug', filename=None ) webapp.add_route( '/u/:username/p/:slug', controller='page', action='display_by_username_and_slug' ) webapp.add_route( '/u/:username/h/:slug', controller='history', action='display_by_username_and_slug' ) webapp.add_route( '/u/:username/w/:slug', controller='workflow', action='display_by_username_and_slug' ) diff -r e539a8940288d068ca431b36acf1360910e71050 -r c8493a61bbeabc8a2f254fa77e1a9b7d4d551a12 lib/galaxy/web/controllers/dataset.py --- a/lib/galaxy/web/controllers/dataset.py +++ b/lib/galaxy/web/controllers/dataset.py @@ -683,10 +683,14 @@ return self.get_ave_item_rating_data( trans.sa_session, dataset ) @web.expose - def display_by_username_and_slug( self, trans, username, slug, preview=True ): + def display_by_username_and_slug( self, trans, username, slug, filename=None, preview=True ): """ Display dataset by username and slug; because datasets do not yet have slugs, the slug is the dataset's id. """ dataset = self.get_dataset( trans, slug, False, True ) if dataset: + # Filename used for composite types. + if filename: + return self.display( trans, dataset_id=slug, filename=filename) + truncated, dataset_data = self.get_data( dataset, preview ) dataset.annotation = self.get_item_annotation_str( trans.sa_session, dataset.history.user, dataset ) diff -r e539a8940288d068ca431b36acf1360910e71050 -r c8493a61bbeabc8a2f254fa77e1a9b7d4d551a12 templates/root/history_common.mako --- a/templates/root/history_common.mako +++ b/templates/root/history_common.mako @@ -87,7 +87,7 @@ # Get URL for display only. if data.history.user and data.history.user.username: display_url = h.url_for( controller='dataset', action='display_by_username_and_slug', - username=data.history.user.username, slug=dataset_id ) + username=data.history.user.username, slug=dataset_id, filename='' ) else: # HACK: revert to for_editing display URL when there is no user/username. This should only happen when # there's no user/username because dataset is being displayed by history/view after error reported. Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.