Modified: branches/wf4ever/app/controllers/application_controller.rb (3396 => 3397)
--- branches/wf4ever/app/controllers/application_controller.rb 2013-02-05 16:45:38 UTC (rev 3396)
+++ branches/wf4ever/app/controllers/application_controller.rb 2013-02-05 17:00:55 UTC (rev 3397)
@@ -1080,7 +1080,7 @@
doc
end
- def update_annotations_aux(contributable, ro_uri, resource_uri)
+ def update_annotations_aux(contributable, ro_uri, resource_uri, params)
session = ROSRS::Session.new(ro_uri, Conf.rodl_bearer_token)
Modified: branches/wf4ever/app/controllers/packs_controller.rb (3396 => 3397)
--- branches/wf4ever/app/controllers/packs_controller.rb 2013-02-05 16:45:38 UTC (rev 3396)
+++ branches/wf4ever/app/controllers/packs_controller.rb 2013-02-05 17:00:55 UTC (rev 3397)
@@ -103,7 +103,7 @@
def update_annotations
resource_uri = @pack.ro_uri
- update_annotations_aux(@pack, @pack.ro_uri, resource_uri)
+ update_annotations_aux(@pack, @pack.ro_uri, resource_uri, params)
redirect_to edit_annotations_pack_path(@pack)
end
@@ -269,7 +269,7 @@
resource_uri = @pack.resolve_resource_uri(params[:resource_path])
puts " [params[:resource_path], resource_uri] = #{ [params[:resource_path], resource_uri].inspect}"
- update_annotations_aux(@pack, @pack.ro_uri, resource_uri)
+ update_annotations_aux(@pack, @pack.ro_uri, resource_uri, params)
redirect_to(pack_resource_edit_path(@pack, params[:resource_path]))
end
@@ -332,6 +332,18 @@
flash.now[:error] = err
end
+ # Store given title and description (if given)
+
+ if params[:pack][:title]
+ update_annotations_aux(@pack, @pack.ro_uri, @pack.ro_uri,
+ { :commit => 'Add', :template => 'Title', :value => params[:pack][:title] } )
+ end
+
+ if params[:pack][:description]
+ update_annotations_aux(@pack, @pack.ro_uri, @pack.ro_uri,
+ { :commit => 'Add', :template => 'Description', :value => params[:pack][:description] } )
+ end
+
# update policy
policy_err_msg = update_policy(@pack, params)
update_layout(@pack, params[:layout])
Modified: branches/wf4ever/app/controllers/workflows_controller.rb (3396 => 3397)
--- branches/wf4ever/app/controllers/workflows_controller.rb 2013-02-05 16:45:38 UTC (rev 3396)
+++ branches/wf4ever/app/controllers/workflows_controller.rb 2013-02-05 17:00:55 UTC (rev 3397)
@@ -702,7 +702,7 @@
resource_uri = workflow_url(@workflow)
- update_annotations_aux(@workflow, @workflow.ro_uri, resource_uri)
+ update_annotations_aux(@workflow, @workflow.ro_uri, resource_uri, params)
redirect_to edit_annotations_workflow_path(@workflow)