mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-05 22:20:17 +08:00
adds label to current project in clone experiment modal [fixes SCI-341]
This commit is contained in:
parent
9440371f3f
commit
d482dff2e6
2 changed files with 11 additions and 2 deletions
|
|
@ -13,8 +13,16 @@
|
|||
<h4 class="modal-title" id="clone-experiment-modal-label"><%= t("experiments.clone.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 ] },
|
||||
@project.id ),
|
||||
<%= f.select :project_id,
|
||||
options_for_select(
|
||||
@projects.collect do |p|
|
||||
if p == @experiment.project
|
||||
[ "#{p.name} #{t('experiments.clone.current_project')}", p.id ]
|
||||
else
|
||||
[ p.name, p.id ]
|
||||
end
|
||||
end,
|
||||
@project.id ),
|
||||
{}, {class: "form-control selectpicker", "data-role" => "clear"} %>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
|
|
|||
|
|
@ -631,6 +631,7 @@ en:
|
|||
modal_submit: 'Clone'
|
||||
success_flash: "Successfully cloned experiment %{experiment}"
|
||||
error_flash: 'Could not clone the experiment.'
|
||||
current_project: '(current project)'
|
||||
move:
|
||||
modal_title: 'Move experiment %{experiment}'
|
||||
notice: 'Moving is possible only to projects that contain same (or additional) users.'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue