myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [3397] branches/wf4ever/app/controllers: changed


From: noreply
Subject: [myexperiment-hackers] [3397] branches/wf4ever/app/controllers: changed pack creation to store title/description to RODL
Date: Tue, 5 Feb 2013 17:00:56 +0000 (UTC)

Revision
3397
Author
dgc
Date
2013-02-05 17:00:55 +0000 (Tue, 05 Feb 2013)

Log Message

changed pack creation to store title/description to RODL

Modified Paths

Diff

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)
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]