## ## 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 name="title()"> Sharing and Publishing ${get_class_display_name( item.__class__ )} '${get_item_name( item )}' <%def name="javascripts()"> ${parent.javascripts()} <%def name="stylesheets()"> ${parent.stylesheets()} <%def name="center_panel()"> ${self.body()} <%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) %>

Share or Publish ${item_class_name} '${item_name}'

## Require that user have a public username before sharing or publishing an item. %if trans.get_user().username is None or trans.get_user().username is "": To make a ${item_class_name_lc} accessible via link or publish it, you must create a public username:

%else: ## User has a public username, so private sharing and publishing options.

Making ${item_class_name} Accessible via Link and Publishing It

%if item.importable: <% item_status = "accessible via link" if item.published: item_status = item_status + " and published" %> This ${item_class_name_lc} is currently ${item_status}.

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:

%if not item.published: ## Item is importable but not published. User can disable importable or publish.
Disables ${item_class_name_lc}'s link so that it is not accessible.

Publishes the ${item_class_name_lc} to Galaxy's Published ${item_class_plural_name} section, where it is publicly listed and searchable.

%else: ## item.published == True ## Item is importable and published. User can unpublish or disable import and unpublish.
Removes this ${item_class_name_lc} from Galaxy's Published ${item_class_plural_name} section so that it is not publicly listed or searchable.

Disables this ${item_class_name_lc}'s link so that it is not accessible and removes ${item_class_name_lc} from Galaxy's Published ${item_class_plural_name} section so that it is not publicly listed or searchable.
%endif
%else: This ${item_class_name_lc} is currently restricted so that only you and the users listed below can access it. You can:

Generates a web link that you can share with other people so that they can view and import the ${item_class_name_lc}.

Makes the ${item_class_name_lc} accessible via link (see above) and publishes the ${item_class_name_lc} to Galaxy's Published ${item_class_plural_name} section, where it is publicly listed and searchable.
%endif ## ## Sharing with Galaxy users. ##

Sharing ${item_class_name} with Specific Users

%if item.users_shared_with:

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.

%for i, association in enumerate( item.users_shared_with ): <% user = association.user %> %endfor
Email

Share with another user %else:

You have not shared this ${item_class_name_lc} with any users.

Share with a user
%endif
%endif



Back to ${item_class_plural_name} List