scinote-web/app/views/protocols/_steps.html.erb

53 lines
1.9 KiB
Text
Raw Normal View History

2016-07-21 19:11:15 +08:00
<div class="row">
<div class="pull-right" style="margin: 20px 15px 0 0;">
<% if can_manage_protocol_in_module?(@protocol) ||
can_manage_protocol_in_repository?(@protocol) %>
<a href="#"
class="btn btn-primary"
data-action="new-step"
data-href="<%= new_protocol_step_path(protocol_id: @protocol.id, format: :json) %>">
<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>
<% end %>
2018-03-29 19:58:14 +08:00
<a class="btn btn-default" data-action="collapse-steps">
<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">
<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>
<div class="col-xs-4">
<h2><%= t("protocols.steps.subtitle") %></h2>
</div>
</div>
<div id="steps">
<% @protocol.steps.order(:position).each do |step| %>
<%= render partial: "steps/step.html.erb", locals: { step: step } %>
2016-07-21 19:11:15 +08:00
<% end %>
</div>
<% if @protocol.steps.count == 0 %>
<div data-role="no-steps-text">
<em><%= t("protocols.steps.no_steps") %></em>
</div>
<% end %>
<%= javascript_include_tag "handsontable.full.min" %>
2016-09-05 21:06:48 +08:00
<!-- Libraries for formulas -->
<%= javascript_include_tag "lodash" %>
<%= javascript_include_tag "numeral" %>
<%= javascript_include_tag "numeric" %>
<%= javascript_include_tag "md5" %>
<%= javascript_include_tag "jstat" %>
<%= javascript_include_tag "formula" %>
<%= javascript_include_tag "parser" %>
<%= javascript_include_tag "ruleJS" %>
<%= javascript_include_tag "handsontable.formula" %>
<%= javascript_include_tag "big.min" %>
2016-09-05 21:06:48 +08:00
<%= stylesheet_link_tag "handsontable.formula" %>
<%= javascript_include_tag "protocols/steps" %>