myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [3657] branches/packs/app/views/packs/item_show.h


From: noreply
Subject: [myexperiment-hackers] [3657] branches/packs/app/views/packs/item_show.html.erb: edit links appear only when you have edit access
Date: Mon, 2 Sep 2013 09:02:46 +0000 (UTC)

Revision
3657
Author
dgc
Date
2013-09-02 09:02:46 +0000 (Mon, 02 Sep 2013)

Log Message

edit links appear only when you have edit access

Modified Paths

Diff

Modified: branches/packs/app/views/packs/item_show.html.erb (3656 => 3657)


--- branches/packs/app/views/packs/item_show.html.erb	2013-09-02 08:58:32 UTC (rev 3656)
+++ branches/packs/app/views/packs/item_show.html.erb	2013-09-02 09:02:46 UTC (rev 3657)
@@ -60,14 +60,16 @@
   </ul>
 <% end %>
 
-<h2>Actions</h2>
+<% if Authorization.check('edit', @pack, current_user) %>
+  <h2>Actions</h2>
 
-<ul>
-<li>[<%= link_to('Add description', new_pack_annotation_path(@pack, { :template => 'description', :resource => @item.ore_path })) -%>]</li>
-<li>[<%= link_to("Select an input file", new_pack_annotation_path(@pack, { :template => 'input_selection_relationship', :workflow => @item.ore_path })) -%>]</li>
-<li>[<%= link_to("Add new hardware requirement", new_pack_annotation_path(@pack, { :template => 'requires_hardware', :resource => @item.ore_path })) -%>]</li>
-<li>[<%= link_to("Add new software requirement", new_pack_annotation_path(@pack, { :template => 'requires_software', :resource => @item.ore_path })) -%>]</li>
-</ul>
+  <ul>
+    <li>[<%= link_to('Add description', new_pack_annotation_path(@pack, { :template => 'description', :resource => @item.ore_path })) -%>]</li>
+    <li>[<%= link_to("Select an input file", new_pack_annotation_path(@pack, { :template => 'input_selection_relationship', :workflow => @item.ore_path })) -%>]</li>
+    <li>[<%= link_to("Add new hardware requirement", new_pack_annotation_path(@pack, { :template => 'requires_hardware', :resource => @item.ore_path })) -%>]</li>
+    <li>[<%= link_to("Add new software requirement", new_pack_annotation_path(@pack, { :template => 'requires_software', :resource => @item.ore_path })) -%>]</li>
+  </ul>
+<% end %>
 
 <h2>Debug</h2>
 

reply via email to

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