commit/galaxy-central: natefoo: Add the download/save icon to errored datasets which contain data. Fixes #207 and #583.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/3fb285cb031d/ changeset: 3fb285cb031d user: natefoo date: 2011-06-20 23:02:51 summary: Add the download/save icon to errored datasets which contain data. Fixes #207 and #583. affected #: 1 file (50 bytes) --- a/templates/root/history_common.mako Wed May 25 17:26:36 2011 +0100 +++ b/templates/root/history_common.mako Mon Jun 20 17:02:51 2011 -0400 @@ -1,9 +1,35 @@ <% _=n_ %> + +<%def name="render_download_links( data, dataset_id )"> + <% + from galaxy.datatypes.metadata import FileParameter + %> + %if not data.purged: + ## Check for downloadable metadata files + <% meta_files = [ k for k in data.metadata.spec.keys() if isinstance( data.metadata.spec[k].param, FileParameter ) ] %> + %if meta_files: + <div popupmenu="dataset-${dataset_id}-popup"> + <a class="action-button" href="${h.url_for( controller='dataset', action='display', dataset_id=dataset_id, \ + to_ext=data.ext )}">Download Dataset</a> + <a>Additional Files</a> + %for file_type in meta_files: + <a class="action-button" href="${h.url_for( controller='dataset', action='get_metadata_file', \ + hda_id=dataset_id, metadata_name=file_type )}">Download ${file_type}</a> + %endfor + </div> + <div style="float:left;" class="menubutton split popup" id="dataset-${dataset_id}-popup"> + %endif + <a href="${h.url_for( controller='dataset', action='display', dataset_id=dataset_id, to_ext=data.ext )}" title="Download" class="icon-button disk tooltip"></a> + %if meta_files: + </div> + %endif + %endif +</%def> + ## Render the dataset `data` as history item, using `hid` as the displayed id <%def name="render_dataset( data, hid, show_deleted_on_refresh = False, for_editing = True, display_structured = False )"><% dataset_id = trans.security.encode_id( data.id ) - from galaxy.datatypes.metadata import FileParameter if data.state in ['no state','',None]: data_state = "queued" @@ -126,6 +152,9 @@ </div><div><a href="${h.url_for( controller='dataset', action='errors', id=data.id )}" target="galaxy_main" title="View or report this error" class="icon-button bug tooltip"></a> + %if data.has_data(): + ${render_download_links( data, dataset_id )} + %endif <a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title="View Details" class="icon-button information tooltip"></a> %if for_editing: <a href="${h.url_for( controller='tool_runner', action='rerun', id=data.id )}" target="galaxy_main" title="Run this job again" class="icon-button arrow-circle tooltip"></a> @@ -169,26 +198,7 @@ %endif <div> %if data.has_data(): - %if not data.purged: - ## Check for downloadable metadata files - <% meta_files = [ k for k in data.metadata.spec.keys() if isinstance( data.metadata.spec[k].param, FileParameter ) ] %> - %if meta_files: - <div popupmenu="dataset-${dataset_id}-popup"> - <a class="action-button" href="${h.url_for( controller='dataset', action='display', dataset_id=dataset_id, \ - to_ext=data.ext )}">Download Dataset</a> - <a>Additional Files</a> - %for file_type in meta_files: - <a class="action-button" href="${h.url_for( controller='dataset', action='get_metadata_file', \ - hda_id=dataset_id, metadata_name=file_type )}">Download ${file_type}</a> - %endfor - </div> - <div style="float:left;" class="menubutton split popup" id="dataset-${dataset_id}-popup"> - %endif - <a href="${h.url_for( controller='dataset', action='display', dataset_id=dataset_id, to_ext=data.ext )}" title="Download" class="icon-button disk tooltip"></a> - %if meta_files: - </div> - %endif - %endif + ${render_download_links( data, dataset_id )} <a href="${h.url_for( controller='dataset', action='show_params', dataset_id=dataset_id )}" target="galaxy_main" title="View Details" class="icon-button information tooltip"></a> Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket