details:
http://www.bx.psu.edu/hg/galaxy/rev/ee9a29c9efc1
changeset: 2390:ee9a29c9efc1
user: Dan Blankenberg <dan(a)bx.psu.edu>
date: Thu Apr 30 16:12:59 2009 -0400
description:
Reintroduce the ability to copy a history item between histories (and within the same).
3 file(s) affected in this change:
lib/galaxy/web/controllers/dataset.py
templates/dataset/copy_view.mako
templates/dataset/edit_attributes.mako
diffs (53 lines):
diff -r 54be726b7711 -r ee9a29c9efc1 lib/galaxy/web/controllers/dataset.py
--- a/lib/galaxy/web/controllers/dataset.py Thu Apr 30 15:37:37 2009 -0400
+++ b/lib/galaxy/web/controllers/dataset.py Thu Apr 30 16:12:59 2009 -0400
@@ -157,6 +157,7 @@
user = trans.get_user()
history = trans.get_history()
create_new_history = False
+ refresh_frames = []
if source_dataset_ids:
if not isinstance( source_dataset_ids, list ):
source_dataset_ids = source_dataset_ids.split( "," )
@@ -203,6 +204,8 @@
else:
for hist in target_histories:
hist.add_dataset( data.copy( copy_children = True ) )
+ if history in target_histories:
+ refresh_frames = ['history']
trans.app.model.flush()
done_msg = "%i datasets copied to %i histories." % ( len(
source_dataset_ids ) - invalid_datasets, len( target_histories ) )
history.refresh()
@@ -220,4 +223,5 @@
target_histories = target_histories,
new_history_name = new_history_name,
done_msg = done_msg,
- error_msg = error_msg )
+ error_msg = error_msg,
+ refresh_frames = refresh_frames )
diff -r 54be726b7711 -r ee9a29c9efc1 templates/dataset/copy_view.mako
--- a/templates/dataset/copy_view.mako Thu Apr 30 15:37:37 2009 -0400
+++ b/templates/dataset/copy_view.mako Thu Apr 30 16:12:59 2009 -0400
@@ -1,5 +1,8 @@
<%inherit file="/base.mako"/>
+<%namespace file="/message.mako" import="javascripts" />
<%def name="title()">Copy History Items</%def>
+
+${javascripts()}
%if error_msg:
<p>
diff -r 54be726b7711 -r ee9a29c9efc1 templates/dataset/edit_attributes.mako
--- a/templates/dataset/edit_attributes.mako Thu Apr 30 15:37:37 2009 -0400
+++ b/templates/dataset/edit_attributes.mako Thu Apr 30 16:12:59 2009 -0400
@@ -155,3 +155,10 @@
</div>
</div>
%endif
+<p/>
+<div class="toolForm">
+<div class="toolFormTitle">Copy History Item</div>
+<div class="toolFormBody">
+ Click <a href="${h.url_for( controller='dataset',
action='copy_datasets', source_dataset_ids=data.id,
target_history_ids=data.history_id )}"
target="galaxy_main">here</a> to make a copy of this history item.
+</div>
+</div>