<%inherit file="/base.mako"/> <%namespace file="/message.mako" import="render_msg" /> <%namespace file="/webapps/tool_shed/common/common.mako" import="*" /> <%namespace file="/webapps/tool_shed/repository/common.mako" import="*" /> <%namespace file="/webapps/tool_shed/common/repository_actions_menu.mako" import="render_tool_shed_repository_actions" /> <% from galaxy.web.framework.helpers import time_ago from tool_shed.util.basic_util import to_html_string from tool_shed.util.metadata_util import is_malicious from tool_shed.repository_types.util import TOOL_DEPENDENCY_DEFINITION if repository.metadata_revisions: has_metadata = True else: has_metadata = False is_admin = trans.user_is_admin() is_new = repository.is_new( trans.app ) if repository.deprecated: is_deprecated = True else: is_deprecated = False if is_malicious( trans.app, trans.security.encode_id( repository.id ), repository.tip( trans.app ) ): changeset_is_malicious = True else: changeset_is_malicious = False if not is_deprecated and trans.app.security_agent.can_push( trans.app, trans.user, repository ): can_push = True else: can_push = False if not is_deprecated and not is_new and ( not changeset_is_malicious or can_push ): can_download = True else: can_download = False if has_metadata and not is_deprecated and trans.app.security_agent.user_can_review_repositories( trans.user ): can_review_repository = True else: can_review_repository = False if not is_new and not is_deprecated: can_set_metadata = True else: can_set_metadata = False if changeset_revision == repository.tip( trans.app ): changeset_revision_is_repository_tip = True else: changeset_revision_is_repository_tip = False if metadata and can_set_metadata and is_admin and changeset_revision_is_repository_tip: can_set_malicious = True else: can_set_malicious = False can_view_change_log = not is_new if repository_metadata and repository_metadata.includes_tools: includes_tools = True else: includes_tools = False if changeset_revision_is_repository_tip: tip_str = 'repository tip' sharable_link_label = 'Sharable link to this repository:' sharable_link_changeset_revision = None else: tip_str = '' sharable_link_label = 'Sharable link to this repository revision:' sharable_link_changeset_revision = changeset_revision if repository_metadata is None: can_render_skip_tool_test_section = False else: if repository_metadata.changeset_revision is None: can_render_skip_tool_test_section = False else: if includes_tools or repository.type == TOOL_DEPENDENCY_DEFINITION: can_render_skip_tool_test_section = True else: can_render_skip_tool_test_section = False if heads: multiple_heads = len( heads ) > 1 else: multiple_heads = False if repository_metadata is None: revision_installable = False else: if repository_metadata.downloadable is None: revision_installable = 'unknown' else: revision_installable = repository_metadata.downloadable %> <%! def inherit(context): if context.get('use_panels'): return '/webapps/tool_shed/base_panels.mako' else: return '/base.mako' %> <%inherit file="${inherit(context)}"/> <%def name="stylesheets()"> ${parent.stylesheets()} ${h.css('base','library','jquery.rating')} <%def name="javascripts()"> ${parent.javascripts()} ${h.js("libs/jquery/jquery.rating", "libs/jquery/jstorage" )} ${container_javascripts()} ${render_tool_shed_repository_actions( repository, metadata=metadata, changeset_revision=changeset_revision )} %if message: ${render_msg( message, status )} %endif %if repository.deprecated:
This repository has been marked as deprecated, so some tool shed features may be restricted.
%endif: %if multiple_heads: ${render_multiple_heads_message( heads )} %endif %if deprecated_repository_dependency_tups: ${render_deprecated_repository_dependencies_message( deprecated_repository_dependency_tups )} %endif %if len( changeset_revision_select_field.options ) > 1:
Repository revision
${changeset_revision_select_field.get_html()} ${tip_str}
%if can_review_repository: Select a revision to inspect for adding or managing a review or for download or installation. %else: Select a revision to inspect for download or installation. %endif

%endif

Repository '${repository.name | h}'
${render_sharable_str( repository, changeset_revision=sharable_link_changeset_revision )}
%if can_download or can_push:
${render_clone_str( repository )}
%endif
%if repository.times_downloaded > 0: ${repository.name} %else: %endif
Repository names cannot be changed if the repository has been cloned.
${render_repository_type_select_field( repository_type_select_field, render_help=True )}
%if long_description:
%else: %endif
%if can_view_change_log: ${revision_label} %else: ${revision_label} %endif
${repository.user.username | h}
${revision_installable}
${repository.times_downloaded | h}
%if is_admin:
${repository.repo_path( trans.app ) | h}
${repository.deleted | h}
%endif
${render_repository_items( metadata, containers_dict, can_set_metadata=True, render_repository_actions_for='tool_shed' )} %if can_render_skip_tool_test_section:

%if repository.type == TOOL_DEPENDENCY_DEFINITION:
Automated tool dependency test
%else:
Automated tool tests
%endif
%if repository.type == TOOL_DEPENDENCY_DEFINITION: %else: %endif ${skip_tool_tests_check_box.get_html()}
%if repository.type == TOOL_DEPENDENCY_DEFINITION: Check the box and click Save to skip automated testing of this tool dependency recipe. %else: Check the box and click Save to skip automated testing of the tools in this revision. %endif
%if skip_tool_test:
%else: %endif
%endif

Manage categories
Multi-select list - hold the appropriate key while clicking to select multiple categories.
%if trans.app.config.smtp_server:

Notification on update
${alerts_check_box.get_html()}
Check the box and click Save to receive email alerts when updates to this repository occur.
%endif

Grant authority to make changes
%for username in current_allow_push_list: %if username != repository.user.username: %endif %endfor
${repository.user.username | h} owner  
${username | h} write remove

${allow_push_select_field.get_html()}
Multi-select usernames to grant permission to make changes to this repository
%if repository.ratings:

Rating
${num_ratings | h}
${render_star_rating( 'avg_rating', avg_rating, disabled=True )}

%if display_reviews:
<% count = 0 %> %for review in repository.ratings: <% count += 1 name = 'rating%d' % count %> %endfor
Rating Comments Reviewed User
${render_star_rating( name, review.rating, disabled=True )} ${render_review_comment( to_html_string( review.comment ) )} ${time_ago( review.update_time )} ${review.user.username | h}
%else:
%endif
%endif

%if can_set_malicious:

Malicious repository tip
${malicious_check_box.get_html()}
Check the box and click Save to define this repository's tip as malicious, restricting it from being download-able.
%endif