scinote-web/app/views/canvas/edit/modal/_move_module_group.html.erb

36 lines
1.6 KiB
Text
Raw Normal View History

<div class="modal fade" id="modal-move-module-group" tabindex="-1" role="dialog" aria-labelledby="modal-move-module-group-label">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="modal-move-module-group-label"><%=t "experiments.canvas.edit.modal_move_module_group.title" %></h4>
</div>
<div class="modal-body">
<% experiments = @experiment.project.experiments.managable_by_user(current_user).order(name: :asc).active %>
<% if experiments.count > 1 %>
2016-08-23 16:37:48 +08:00
<%= bootstrap_form_tag do |f| %>
<%= f.select :experiment_id, experiments
2016-08-23 16:37:48 +08:00
.select { |e| e != @experiment }
.collect { |e| [ e.name, e.id ] }, {},
{class: "form-control selectpicker", "data-role" => "clear"} %>
<% end %>
<% else %>
<div>
<em>
<%= t("experiments.canvas.edit.modal_move_module.no_experiments") %>
</em>
</div>
<% end %>
</div>
<div class="modal-footer">
2016-08-30 18:14:15 +08:00
<% if experiments.count > 1 %>
2020-01-07 23:13:34 +08:00
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%=t "general.cancel" %></button>
<button type="button" class="btn btn-primary" data-action="confirm">
<%=t "experiments.canvas.edit.modal_move_module_group.confirm" %>
</button>
2016-08-30 18:14:15 +08:00
<% end %>
</div>
</div>
</div>
</div>