1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/79eb75175339/ Changeset: 79eb75175339 User: dan Date: 2013-05-08 19:30:05 Summary: Display a warning to users when previewing a deleted dataset. Allow dataset owner to undelete dataset. Affected #: 3 files diff -r 58a0529c0a0654db9751f6021bb14fb5a36093ad -r 79eb75175339ec9c0f7a8a5395b2e30491369952 templates/webapps/galaxy/dataset/display.mako --- a/templates/webapps/galaxy/dataset/display.mako +++ b/templates/webapps/galaxy/dataset/display.mako @@ -61,6 +61,7 @@ <%def name="render_item( data, data_to_render )"> ## Chunkable data is rendered in JavaScript above; render unchunkable data below. + ${ render_deleted_data_message( data ) } %if not data.datatype.CHUNKABLE and data_to_render: %if truncated: <div class="warningmessagelarge"> @@ -75,6 +76,17 @@ %endif </%def> +<%def name="render_deleted_data_message( data )"> + %if data.deleted: + <div class="errormessagelarge" id="deleted-data-message"> + You are viewing a deleted dataset. + %if data.history and data.history.user == trans.get_user(): + <br /> + <a href="#" onclick="$.ajax( {type: 'GET', cache: false, url: '${h.url_for( controller='dataset', action='undelete_async', dataset_id=trans.security.encode_id( data.id ) )}', dataType: 'text', contentType: 'text/html', success: function( data, textStatus, jqXHR ){ if (data == 'OK' ){ $( '#deleted-data-message' ).slideUp( 'slow' ) } else { alert( 'Undelete failed.' ) } }, error: function( data, textStatus, jqXHR ){ alert( 'Undelete failed.' ); } } );">Undelete</a> + %endif + </div> + %endif +</%def><%def name="center_panel()"><div class="unified-panel-header" unselectable="on"> diff -r 58a0529c0a0654db9751f6021bb14fb5a36093ad -r 79eb75175339ec9c0f7a8a5395b2e30491369952 templates/webapps/galaxy/dataset/large_file.mako --- a/templates/webapps/galaxy/dataset/large_file.mako +++ b/templates/webapps/galaxy/dataset/large_file.mako @@ -1,4 +1,7 @@ <%inherit file="/base.mako"/> +<%namespace file="/dataset/display.mako" import="render_deleted_data_message" /> + +${ render_deleted_data_message( data ) } <div class="warningmessagelarge"> This dataset is large and only the first megabyte is shown below.<br /> diff -r 58a0529c0a0654db9751f6021bb14fb5a36093ad -r 79eb75175339ec9c0f7a8a5395b2e30491369952 templates/webapps/galaxy/dataset/tabular_chunked.mako --- a/templates/webapps/galaxy/dataset/tabular_chunked.mako +++ b/templates/webapps/galaxy/dataset/tabular_chunked.mako @@ -1,5 +1,5 @@ <%inherit file="/base.mako"/> - +<%namespace file="/dataset/display.mako" import="render_deleted_data_message" /><%def name="title()">Dataset Display</%def> @@ -37,3 +37,5 @@ <%def name="stylesheets()"> ${parent.stylesheets()} </%def> + +${ render_deleted_data_message( dataset ) } \ No newline at end of file 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.