2019-05-11 22:04:28 +08:00
|
|
|
<% if can_manage_protocol_in_module?(@protocol) ||
|
|
|
|
can_manage_protocol_in_repository?(@protocol) %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<div class="row">
|
2019-05-21 16:21:30 +08:00
|
|
|
<div class="pull-left" style="margin: 0 0 20px 15px;">
|
2017-05-16 17:52:07 +08:00
|
|
|
<a href="#"
|
|
|
|
class="btn btn-primary"
|
|
|
|
data-action="new-step"
|
|
|
|
data-href="<%= new_protocol_step_path(protocol_id: @protocol.id, format: :json) %>">
|
2018-07-09 19:13:44 +08:00
|
|
|
<span class="fas fa-plus" aria-hidden="true"></span>
|
2016-09-06 16:10:49 +08:00
|
|
|
<span class="hidden-xs"><%=t "protocols.steps.new_step" %></span>
|
2016-07-21 19:11:15 +08:00
|
|
|
</a>
|
2019-05-11 22:04:28 +08:00
|
|
|
</div>
|
|
|
|
<% unless @protocol.steps.empty? %>
|
2019-05-21 16:21:30 +08:00
|
|
|
<div class="pull-right" style="margin: 0 15px 20px 0;">
|
2018-03-29 19:58:14 +08:00
|
|
|
<a class="btn btn-default" data-action="collapse-steps">
|
2018-07-09 19:13:44 +08:00
|
|
|
<span class="fas fa-caret-square-up"></span>
|
2016-07-21 19:11:15 +08:00
|
|
|
<span class="hidden-xs"><%= t("protocols.steps.collapse_label") %></a></span>
|
2018-03-29 19:58:14 +08:00
|
|
|
<a class="btn btn-default" data-action="expand-steps">
|
2018-07-09 19:13:44 +08:00
|
|
|
<span class="fas fa-caret-square-down"></span>
|
2016-07-21 19:11:15 +08:00
|
|
|
<span class="hidden-xs"><%= t("protocols.steps.expand_label") %></a></span>
|
|
|
|
</div>
|
2019-05-11 22:04:28 +08:00
|
|
|
<% end %>
|
2016-07-21 19:11:15 +08:00
|
|
|
</div>
|
2019-05-11 22:04:28 +08:00
|
|
|
<% end %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<div id="steps">
|
|
|
|
<% @protocol.steps.order(:position).each do |step| %>
|
2018-11-23 22:07:08 +08:00
|
|
|
<%= render partial: "steps/step.html.erb", locals: { step: step } %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
2018-11-26 21:05:02 +08:00
|
|
|
<%= javascript_include_tag "handsontable.full.min" %>
|
2016-09-05 21:06:48 +08:00
|
|
|
|
|
|
|
<!-- Libraries for formulas -->
|
2019-05-13 16:45:12 +08:00
|
|
|
<%= render partial: "shared/formulas_libraries.html.erb" %>
|
2018-11-26 21:05:02 +08:00
|
|
|
|
2019-03-16 03:59:15 +08:00
|
|
|
<%= javascript_include_tag "assets/wopi/create_wopi_file" %>
|
2018-11-26 21:05:02 +08:00
|
|
|
<%= javascript_include_tag "protocols/steps" %>
|