mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-31 04:32:06 +08:00
fixes items assign flash message [fixes SCI-2395]
This commit is contained in:
parent
6deaa7235b
commit
89046e9787
2 changed files with 10 additions and 7 deletions
|
@ -418,6 +418,7 @@ class MyModulesController < ApplicationController
|
||||||
repository_row: record,
|
repository_row: record,
|
||||||
assigned_by: current_user
|
assigned_by: current_user
|
||||||
)
|
)
|
||||||
|
records_names << record.name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -428,16 +429,17 @@ class MyModulesController < ApplicationController
|
||||||
experiment: @experiment,
|
experiment: @experiment,
|
||||||
my_module: @my_module,
|
my_module: @my_module,
|
||||||
user: current_user,
|
user: current_user,
|
||||||
message: I18n.t(
|
message: I18n.t('activities.assign_repository_records',
|
||||||
'activities.assign_repository_records',
|
user: current_user.full_name,
|
||||||
user: current_user.full_name,
|
task: @my_module.name,
|
||||||
task: @my_module.name,
|
repository: @repository.name,
|
||||||
repository: @repository.name,
|
records: records_names.join(', ')
|
||||||
records: records_names.join(', ')
|
)
|
||||||
)
|
|
||||||
)
|
)
|
||||||
flash = I18n.t('repositories.assigned_records_flash',
|
flash = I18n.t('repositories.assigned_records_flash',
|
||||||
records: records_names.join(', '))
|
records: records_names.join(', '))
|
||||||
|
flash = I18n.t('repositories.assigned_records_downstream_flash',
|
||||||
|
records: records_names.join(', ')) if downstream
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.json { render json: { flash: flash }, status: :ok }
|
format.json { render json: { flash: flash }, status: :ok }
|
||||||
end
|
end
|
||||||
|
|
|
@ -1016,6 +1016,7 @@ en:
|
||||||
no_records_selected_flash: "There were no selected items."
|
no_records_selected_flash: "There were no selected items."
|
||||||
no_deleted_records_flash: "No items were deleted. %{other_records_number} of the selected items were created by other users and were not deleted."
|
no_deleted_records_flash: "No items were deleted. %{other_records_number} of the selected items were created by other users and were not deleted."
|
||||||
assigned_records_flash: "Successfully assigned item(s) <strong>%{records}</strong> to task"
|
assigned_records_flash: "Successfully assigned item(s) <strong>%{records}</strong> to task"
|
||||||
|
assigned_records_downstream_flash: "Successfully assigned item(s) <strong>%{records}</strong> to task and downstream tasks"
|
||||||
unassigned_records_flash: "Successfully unassigned item(s) <strong>%{records}</strong> from task"
|
unassigned_records_flash: "Successfully unassigned item(s) <strong>%{records}</strong> from task"
|
||||||
no_records_assigned_flash: "No items were assigned to task"
|
no_records_assigned_flash: "No items were assigned to task"
|
||||||
no_records_unassigned_flash: "No items were unassigned from task"
|
no_records_unassigned_flash: "No items were unassigned from task"
|
||||||
|
|
Loading…
Reference in a new issue