mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-10 17:36:33 +08:00
Add check for empty projects on move experiments
This commit is contained in:
parent
c16eed5e63
commit
275106c27c
2 changed files with 11 additions and 2 deletions
|
@ -13,8 +13,16 @@
|
|||
<h4 class="modal-title" id="move-experiment-modal-label"><%= t("experiments.move.modal_title", experiment: @experiment.name ) %></h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<%= f.select :project_id, options_for_select(@projects.collect { |p| [ p.name, p.id ] }),
|
||||
{}, {class: "form-control selectpicker", "data-role" => "clear"} %>
|
||||
<% if !@projects.blank? %>
|
||||
<%= f.select :project_id, options_for_select(@projects.collect { |p| [ p.name, p.id ] }),
|
||||
{}, {class: "form-control selectpicker", "data-role" => "clear"} %>
|
||||
<% else %>
|
||||
<div>
|
||||
<em>
|
||||
<%= t("experiments.move.no_projects") %>
|
||||
</em>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<%= f.submit t("experiments.move.modal_submit"), class: "btn btn-primary" %>
|
||||
|
|
|
@ -627,6 +627,7 @@ en:
|
|||
modal_submit: 'Move'
|
||||
success_flash: "Successfully moved experiment %{experiment}"
|
||||
error_flash: 'Could not move the experiment.'
|
||||
no_projects: 'No projects to move this experiment to.'
|
||||
canvas:
|
||||
archive_confirm: "Are you sure to archive this experiment?"
|
||||
actions: 'Actions'
|
||||
|
|
Loading…
Reference in a new issue