Skip to content

Commit

Permalink
Change can_manage? to can_edit? and removed the template from the…
Browse files Browse the repository at this point in the history
… general information.
  • Loading branch information
Kevin De Pelseneer committed Jun 27, 2023
1 parent 9382256 commit d8c4444
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions app/views/single_pages/sample_upload_content.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% can_upload = true %>
<div id="upload-summary">
<%= folding_panel("General Information", true, :id => "general-information-panel") do %>
<% [@project, @study, @sample_type, @template]. map do | asset | %>
<% [@project, @study, @sample_type]. map do | asset | %>
<% asset_name = asset.class.to_s.singularize %>
<h4> <%= asset_name %> </h4>
<p><b>ID: </b><span><%= asset.id%></span></p>
Expand All @@ -15,16 +15,11 @@
<% can_upload = false %>
<% end %>
<% else %>
<% if asset.can_manage?%>
<p><b><%= current_user.person.name %> can manage: </b><span class="glyphicon glyphicon-ok-sign" style="color: green;"></span></p>
<% if asset.can_edit?%>
<p><b><%= current_user.person.name %> can edit: </b><span class="glyphicon glyphicon-ok-sign" style="color: green;"></span></p>
<% else %>
<p><b><%= current_user.person.name %> can manage: </b> <span class="glyphicon glyphicon-remove-sign" style="color: red;"></span></p>
<%
=begin%>
<% can_upload = false %>
<%
=end%>
<% can_upload = false unless asset_name == "Template" %>
<p><b><%= current_user.person.name %> can edit: </b> <span class="glyphicon glyphicon-remove-sign" style="color: red;"></span></p>
<% can_upload = false %>
<% end %>
<% end %>
<hr>
Expand Down

0 comments on commit d8c4444

Please sign in to comment.