mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 17:51:13 +08:00
42 lines
2.1 KiB
Text
42 lines
2.1 KiB
Text
<div class="modal move-experiment-modal"
|
|
id="move-experiment-modal-<%= @experiment.id %>"
|
|
tabindex="-1"
|
|
role="dialog"
|
|
aria-labelledby="move-experiment-modal-label">
|
|
<%= form_with model: @experiment,
|
|
url: move_experiment_path(@experiment),
|
|
method: :post,
|
|
remote: true,
|
|
html: { class: 'experiment-action-form' } do |f| %>
|
|
<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">
|
|
<p><small><%= t("experiments.move.notice") %></small></p>
|
|
<% if @projects.any? && can_manage_all_experiment_my_modules?(@experiment) %>
|
|
<%= f.select :project_id, options_for_select(@projects.collect { |p| [ p.name, p.id ] }),
|
|
{ label: t("experiments.move.target_project") }, { class: "form-control selectpicker", "data-role" => "clear" } %>
|
|
<% else %>
|
|
<div class="warning-message">
|
|
<i class="fas fa-exclamation-triangle"></i>
|
|
<% if @projects.blank? %>
|
|
<%= t("experiments.move.no_projects") %>
|
|
<% elsif !can_manage_all_experiment_my_modules?(@experiment) %>
|
|
<%= t("experiments.move.task_permission") %>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%=t "general.cancel" %></button>
|
|
<% if @projects.any? && can_manage_all_experiment_my_modules?(@experiment) %>
|
|
<%= f.submit t("experiments.move.modal_submit"), class: "btn btn-primary" %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div>
|