Skip to content

Commit

Permalink
Allow display of install_resolver_checkbox when installing data manag…
Browse files Browse the repository at this point in the history
…er tools

by merging select_shed_tool_panel_config.mako functionality into
select_tool_panel_section.mako (thx @nsoranzo for this suggestion).
  • Loading branch information
mvdbeek committed Mar 9, 2017
1 parent 944feb2 commit 7988ae5
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 198 deletions.
76 changes: 24 additions & 52 deletions lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
Expand Up @@ -1129,7 +1129,7 @@ def prepare_for_install( self, trans, **kwd ):
if not has_repository_dependencies:
has_repository_dependencies = dependencies_for_repository_dict.get( 'has_repository_dependencies', False )
if not includes_tool_dependencies:
includes_tool_dependencies = dependencies_for_repository_dict.get( 'includes_tool_dependencies', False )
includes_tool_dependencies = dependencies_for_repository_dict.get( 'includes_tool_dependencies', False ) or requirements_status
if not includes_tools:
includes_tools = dependencies_for_repository_dict.get( 'includes_tools', False )
if not includes_tools_for_display_in_tool_panel:
Expand Down Expand Up @@ -1214,57 +1214,29 @@ def prepare_for_install( self, trans, **kwd ):
install_resolver_dependencies_check_box = None
encoded_repo_info_dicts = encoding_util.encoding_sep.join( encoded_repo_info_dicts )
tool_shed_url = kwd[ 'tool_shed_url' ]
if includes_tools_for_display_in_tool_panel:
return trans.fill_template( '/admin/tool_shed_repository/select_tool_panel_section.mako',
encoded_repo_info_dicts=encoded_repo_info_dicts,
updating=updating,
updating_repository_id=updating_repository_id,
updating_to_ctx_rev=updating_to_ctx_rev,
updating_to_changeset_revision=updating_to_changeset_revision,
encoded_updated_metadata=encoded_updated_metadata,
includes_tools=includes_tools,
includes_tools_for_display_in_tool_panel=includes_tools_for_display_in_tool_panel,
includes_tool_dependencies=includes_tool_dependencies,
install_tool_dependencies_check_box=install_tool_dependencies_check_box,
install_resolver_dependencies_check_box=install_resolver_dependencies_check_box,
has_repository_dependencies=has_repository_dependencies,
install_repository_dependencies_check_box=install_repository_dependencies_check_box,
new_tool_panel_section_label=new_tool_panel_section_label,
containers_dict=containers_dict,
shed_tool_conf=shed_tool_conf,
shed_tool_conf_select_field=shed_tool_conf_select_field,
tool_panel_section_select_field=tool_panel_section_select_field,
tool_shed_url=tool_shed_url,
requirements_status=requirements_status,
message=message,
status=status )
else:
# If installing repositories that includes no tools and has no repository dependencies, display a page
# allowing the Galaxy administrator to select a shed-related tool panel configuration file whose tool_path
# setting will be the location the repositories will be installed.
return trans.fill_template( '/admin/tool_shed_repository/select_shed_tool_panel_config.mako',
encoded_repo_info_dicts=encoded_repo_info_dicts,
updating=updating,
updating_repository_id=updating_repository_id,
updating_to_ctx_rev=updating_to_ctx_rev,
updating_to_changeset_revision=updating_to_changeset_revision,
encoded_updated_metadata=encoded_updated_metadata,
includes_tools=includes_tools,
includes_tools_for_display_in_tool_panel=includes_tools_for_display_in_tool_panel,
includes_tool_dependencies=includes_tool_dependencies,
install_tool_dependencies_check_box=install_tool_dependencies_check_box,
install_resolver_dependencies_check_box=install_resolver_dependencies_check_box,
has_repository_dependencies=has_repository_dependencies,
install_repository_dependencies_check_box=install_repository_dependencies_check_box,
new_tool_panel_section_label=new_tool_panel_section_label,
containers_dict=containers_dict,
shed_tool_conf=shed_tool_conf,
shed_tool_conf_select_field=shed_tool_conf_select_field,
tool_panel_section_select_field=tool_panel_section_select_field,
tool_shed_url=tool_shed_url,
tool_requirements=tool_requirements,
message=message,
status=status )
return trans.fill_template( '/admin/tool_shed_repository/select_tool_panel_section.mako',
encoded_repo_info_dicts=encoded_repo_info_dicts,
updating=updating,
updating_repository_id=updating_repository_id,
updating_to_ctx_rev=updating_to_ctx_rev,
updating_to_changeset_revision=updating_to_changeset_revision,
encoded_updated_metadata=encoded_updated_metadata,
includes_tools=includes_tools,
includes_tools_for_display_in_tool_panel=includes_tools_for_display_in_tool_panel,
includes_tool_dependencies=includes_tool_dependencies,
install_tool_dependencies_check_box=install_tool_dependencies_check_box,
install_resolver_dependencies_check_box=install_resolver_dependencies_check_box,
has_repository_dependencies=has_repository_dependencies,
install_repository_dependencies_check_box=install_repository_dependencies_check_box,
new_tool_panel_section_label=new_tool_panel_section_label,
containers_dict=containers_dict,
shed_tool_conf=shed_tool_conf,
shed_tool_conf_select_field=shed_tool_conf_select_field,
tool_panel_section_select_field=tool_panel_section_select_field,
tool_shed_url=tool_shed_url,
requirements_status=requirements_status,
message=message,
status=status )

@web.expose
@web.require_admin
Expand Down

This file was deleted.

42 changes: 24 additions & 18 deletions templates/admin/tool_shed_repository/select_tool_panel_section.mako
Expand Up @@ -131,12 +131,14 @@ or manually satisfy the dependencies listed below.</p>
<div style="clear: both"></div>
%endif
%if shed_tool_conf_select_field:
<div class="form-row">
<table class="colored" width="100%">
<th bgcolor="#EBD9B2">Choose the tool panel section to contain the installed tools (optional)</th>
</table>
</div>
%if includes_tools_for_display_in_tool_panel:
<div class="form-row">
<table class="colored" width="100%">
<th bgcolor="#EBD9B2">Choose the tool panel section to contain the installed tools (optional)</th>
</table>
</div>
<div class="detail-section">
%endif
<%
if len( shed_tool_conf_select_field.options ) == 1:
select_help = "Your Galaxy instance is configured with 1 shed-related tool configuration file, so repositories will be "
Expand All @@ -157,24 +159,28 @@ or manually satisfy the dependencies listed below.</p>
%else:
<input type="hidden" name="shed_tool_conf" value="${shed_tool_conf|h}"/>
%endif
<div class="form-row">
<label>Add new tool panel section:</label>
<input name="new_tool_panel_section_label" type="textfield" value="${new_tool_panel_section_label|h}" size="40"/>
<div class="toolParamHelp" style="clear: both;">
Add a new tool panel section to contain the installed tools (optional).
%if includes_tools_for_display_in_tool_panel:
<div class="form-row">
<label>Add new tool panel section:</label>
<input name="new_tool_panel_section_label" type="textfield" value="${new_tool_panel_section_label|h}" size="40"/>
<div class="toolParamHelp" style="clear: both;">
Add a new tool panel section to contain the installed tools (optional).
</div>
</div>
</div>
<div class="form-row">
<label>Select existing tool panel section:</label>
${tool_panel_section_select_field.get_html()}
<div class="toolParamHelp" style="clear: both;">
Choose an existing section in your tool panel to contain the installed tools (optional).
<div class="form-row">
<label>Select existing tool panel section:</label>
${tool_panel_section_select_field.get_html()}
<div class="toolParamHelp" style="clear: both;">
Choose an existing section in your tool panel to contain the installed tools (optional).
</div>
</div>
</div>
%endif
<div class="form-row">
<input type="submit" name="select_tool_panel_section_button" value="Install"/>
<div class="toolParamHelp" style="clear: both;">
Clicking <b>Install</b> without selecting a tool panel section will load the installed tools into the tool panel outside of any sections.
%if includes_tools_for_display_in_tool_panel:
Clicking <b>Install</b> without selecting a tool panel section will load the installed tools into the tool panel outside of any sections.
%endif
</div>
</div>
</form>
Expand Down

0 comments on commit 7988ae5

Please sign in to comment.