adds label to current project in clone experiment modal [fixes SCI-341]

This commit is contained in:
zmagod 2016-09-07 08:26:36 +02:00
parent 9440371f3f
commit d482dff2e6
2 changed files with 11 additions and 2 deletions

View file

@ -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">

View file

@ -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.'