## ## Base template for sharing or publishing an item. Template expects the following parameters: ## (a) item - item to be shared. ## <%! def inherit(context): if context.get('use_panels', False) == True: if context.get('webapp'): webapp = context.get('webapp') else: webapp = 'galaxy' return '/webapps/%s/base_panels.mako' % webapp else: return '/base.mako' %> <%inherit file="${inherit(context)}"/> <%namespace file="/display_common.mako" import="*" /> <%namespace file="/message.mako" import="render_msg" /> ## ## Page methods. ## <%def name="init()"> <% self.has_left_panel=False self.has_right_panel=False self.message_box_visible=False self.overlay_visible=False self.message_box_class="" self.active_view="" self.body_class="" %> %def> <%def name="title()"> Sharing and Publishing ${get_class_display_name( item.__class__ )} '${get_item_name( item )}' %def> <%def name="javascripts()"> ${parent.javascripts()} %def> <%def name="stylesheets()"> ${parent.stylesheets()} %def> <%def name="center_panel()"> ${self.body()} %def> <%def name="body()"> ## Set use_panels var for use in page's URLs. <% use_panels = context.get('use_panels', False) %> ## Render message. %if message: ${render_msg( message, status )} %endif <% # # Setup and variables needed for page. # # Get class name strings. item_class_name = get_class_display_name( item.__class__ ) item_class_name_lc = item_class_name.lower() item_class_plural_name = get_class_plural_display_name( item.__class__ ) item_class_plural_name_lc = item_class_plural_name.lower() # Get item name. item_name = get_item_name(item) %>
%else: ## User has a public username, so private sharing and publishing options.
Anyone can view and import this ${item_class_name_lc} by visiting the following URL:
<% url = h.url_for( action='display_by_username_and_slug', username=trans.get_user().username, slug=item.slug, qualified=True ) url_parts = url.split("/") %> ${url}%if item.published: This ${item_class_name_lc} is publicly listed and searchable in Galaxy's Published ${item_class_plural_name} section. %endif
You can:
%endif ## ## Sharing with Galaxy users. ##
The following users will see this ${item_class_name_lc} in their ${item_class_name_lc} list and will be able to view, import, and run it.
Share with another user %else:
You have not shared this ${item_class_name_lc} with any users.
Share with a user