Merge pull request #2866 from urbanrotnik/ur-sci-5053

Fix protocol import modal [SCI-5053]
This commit is contained in:
Urban Rotnik 2020-09-23 13:19:23 +02:00 committed by GitHub
commit 33d53c958d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,24 +27,25 @@
</a>
</div>
<div class="panel-options pull-right">
<% if step.completed? %>
<button data-action="uncomplete-step"
data-link-url="<%= toggle_step_state_step_path(step)%>"
class="btn btn-secondary"
<%= 'disabled' if !can_complete_or_checkbox_step?(@protocol) || preview %>>
<span class="fas fa-times"></span>
<%= t("protocols.steps.options.uncomplete_title") %>
</button>
<% else %>
<button data-action="complete-step"
data-link-url="<%= toggle_step_state_step_path(step)%>"
class="btn btn-secondary"
<%= 'disabled' if !can_complete_or_checkbox_step?(@protocol) || preview %>>
<span class="fas fa-check"></span>
<%= t("protocols.steps.options.complete_title") %>
</button>
<% unless preview %>
<% if step.completed? %>
<button data-action="uncomplete-step"
data-link-url="<%= toggle_step_state_step_path(step)%>"
class="btn btn-secondary"
<%= 'disabled' if !can_complete_or_checkbox_step?(@protocol) || preview %>>
<span class="fas fa-times"></span>
<%= t("protocols.steps.options.uncomplete_title") %>
</button>
<% else %>
<button data-action="complete-step"
data-link-url="<%= toggle_step_state_step_path(step)%>"
class="btn btn-secondary"
<%= 'disabled' if !can_complete_or_checkbox_step?(@protocol) || preview %>>
<span class="fas fa-check"></span>
<%= t("protocols.steps.options.complete_title") %>
</button>
<% end %>
<% end %>
<% if (can_manage_protocol_in_module?(@protocol) || can_manage_protocol_in_repository?(@protocol)) && !(preview) %>
<%= link_to(move_up_step_path(step),
class: 'btn btn-light icon-btn',