Merge pull request #3189 from aignatov-bio/ai-sci-5474-fix-duplicated-new-step-button

Fix duplicated new step button [SCI-5474]
This commit is contained in:
aignatov-bio 2021-03-08 10:17:26 +01:00 committed by GitHub
commit 39227e20e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,20 +8,6 @@
<span><%= t("protocols.steps.expand_label") %></a></span>
</div>
</div>
<% if can_manage_protocol_in_module?(@protocol) || can_manage_protocol_in_repository?(@protocol) %>
<div class="row">
<div class="pull-left" style="margin: 0 0 20px 15px;">
<a href="#"
class="btn btn-primary"
data-action="new-step"
data-href="<%= new_protocol_step_path(protocol_id: @protocol.id, format: :json) %>"
style="<%= @protocol.steps.empty? ? 'display: none;' : '' %>">
<span class="fas fa-plus" aria-hidden="true"></span>
<span class="hidden-xs"><%=t "protocols.steps.new_step" %></span>
</a>
</div>
</div>
<% end %>
<div id="steps">
<% @protocol.steps.order(:position).each do |step| %>
<%= render partial: "steps/step.html.erb", locals: { step: step } %>