<%! def inherit( context ): if context.get('no_panels'): return '/base.mako' else: return '/webapps/galaxy/base_panels.mako' from galaxy.model import History, StoredWorkflow, Page from galaxy.web.framework.helpers import iff %> <%inherit file="${inherit( context )}"/> <%namespace file="/tagging_common.mako" import="render_individual_tagging_element, render_community_tagging_element" /> <%namespace file="/display_common.mako" import="*" /> ## ## Functions used by base.mako and base_panels.mako to display content. ## <%def name="title()"> Galaxy | ${iff( item.published, "Published ", iff( item.importable , "Accessible ", iff( item.users_shared_with, "Shared ", "Private " ) ) ) + get_class_display_name( item.__class__ )} | ${get_item_name( item ) | h} <%def name="init()"> <% self.has_left_panel=False self.has_right_panel=True self.message_box_visible=False self.active_view="shared" self.overlay_visible=False %> <%def name="javascripts()"> ${parent.javascripts()} ${h.js( "jquery", "jquery.tipsy", "galaxy.base", "json2", "class", "jquery.jstore", "jquery.autocomplete", "jquery.rating", "autocomplete_tagging", "trackster" )} <%def name="stylesheets()"> ${parent.stylesheets()} ${h.css( "autocomplete_tagging", "embed_item", "trackster", "jquery.rating" )} <%def name="render_item_links( item )"> ## Override. <%def name="render_item_header( item )">

Galaxy ${get_class_display_name( item.__class__ )} '${get_item_name( item )| h}'

%if hasattr( item, "annotation") and item.annotation is not None:
Annotation: ${item.annotation}
%endif
<%def name="render_item( item, item_data=None )"> ## Override. ## For base.mako <%def name="body()"> ${self.render_content()} ## For base_panels.mako <%def name="center_panel()"> ${self.render_content()} ## ## Render page content. Pages that inherit this page should override render_item_links() and render_item() ## <%def name="render_content()"> ## Get URL to other published items owned by user that owns this item. <% ##TODO: is there a better way to create this URL? Can't use 'f-username' as a key b/c it's not a valid identifier. controller_name = get_controller_name( item ) item_plural = get_item_plural( item ) href_to_all_items = h.url_for( controller='/' + controller_name, action='list_published') href_to_user_items = h.url_for( controller='/' + controller_name, action='list_published', xxx=item.user.username) href_to_user_items = href_to_user_items.replace( 'xxx', 'f-username') %>
%if item.published: Published ${item_plural} | ${item.user.username} %elif item.importable: Accessible ${get_class_display_name( item.__class__ )} %elif item.users_shared_with: Shared ${get_class_display_name( item.__class__ )} %else: Private ${get_class_display_name( item.__class__ )} %endif | ${get_item_name( item )}
${self.render_item_links( item )}
${self.render_item_header( item )}
${self.render_item( item, item_data )}
<%def name="right_panel()"> <% ## FIXME: duplicated from above for now controller_name = get_controller_name( item ) item_plural = get_item_plural( item ) href_to_all_items = h.url_for( controller='/' + controller_name, action='list_published') href_to_user_items = h.url_for( controller='/' + controller_name, action='list_published', xxx=item.user.username) href_to_user_items = href_to_user_items.replace( 'xxx', 'f-username') %>
About this ${get_class_display_name( item.__class__ )}

Author

${item.user.username | h}

## Related items.

Related ${item_plural}

All published ${item_plural.lower()}
Published ${item_plural.lower()} by ${item.user.username | h} ## Rating.

Rating

<% label = "ratings" if num_ratings == 1: label = "rating" %>
Community
(${num_ratings} ${label}, ${"%.1f" % ave_item_rating} average)
0 and ave_item_rating <= 1.5: checked="checked" %endif /> 1.5 and ave_item_rating <= 2.5: checked="checked" %endif /> 2.5 and ave_item_rating <= 3.5: checked="checked" %endif /> 3.5 and ave_item_rating <= 4.5: checked="checked" %endif /> 4.5: checked="checked" %endif />
%if trans.get_user():
Yours
%endif
## Tags.

Tags

## Community tags.

Community: ${render_community_tagging_element( tagged_item=item, tag_click_fn='community_tag_click', use_toggle_link=False )} %if len ( item.tags ) == 0: none %endif
## Individual tags. %if trans.get_user():

Yours: ${render_individual_tagging_element( user=trans.get_user(), tagged_item=item, elt_context='view.mako', use_toggle_link=False, tag_click_fn='community_tag_click' )}
%endif