2016-08-12 17:26:18 +08:00
|
|
|
<!-- Move experiment modal -->
|
|
|
|
<div class="modal"
|
|
|
|
id="move-experiment-modal-<%= @experiment.id %>"
|
|
|
|
tabindex="-1"
|
|
|
|
role="dialog"
|
|
|
|
aria-labelledby="move-experiment-modal-label">
|
|
|
|
<%= bootstrap_form_for @experiment, url: move_experiment_path(),
|
2016-09-02 22:31:17 +08:00
|
|
|
method: :post,
|
|
|
|
remote: true do |f| %>
|
2016-08-12 17:26:18 +08:00
|
|
|
<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">×</span></button>
|
|
|
|
<h4 class="modal-title" id="move-experiment-modal-label"><%= t("experiments.move.modal_title", experiment: @experiment.name ) %></h5>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
2016-08-16 16:20:36 +08:00
|
|
|
<% if !@projects.blank? %>
|
|
|
|
<%= f.select :project_id, options_for_select(@projects.collect { |p| [ p.name, p.id ] }),
|
2016-09-02 22:31:17 +08:00
|
|
|
{}, { class: "form-control selectpicker", "data-role" => "clear" } %>
|
2016-08-16 16:20:36 +08:00
|
|
|
<% else %>
|
|
|
|
<div>
|
|
|
|
<em>
|
|
|
|
<%= t("experiments.move.no_projects") %>
|
|
|
|
</em>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2016-08-24 17:36:50 +08:00
|
|
|
<%= t("experiments.move.notice") %>
|
2016-08-12 17:26:18 +08:00
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2018-04-25 19:57:12 +08:00
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal"><%=t "general.cancel" %></button>
|
2016-08-24 17:09:03 +08:00
|
|
|
<% if !@projects.blank? %>
|
2018-04-25 19:57:12 +08:00
|
|
|
<%= f.submit t("experiments.move.modal_submit"), class: "btn btn-success" %>
|
2016-08-24 17:09:03 +08:00
|
|
|
<% end %>
|
2016-08-12 17:26:18 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|