From: Marius Balteanu Date: Mon, 16 May 2022 22:38:20 +0000 (+0000) Subject: Ask more specific confirmation questions when closing/reopening/archiving projects... X-Git-Tag: 5.1.0~598 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9e8a7abddbf3b5c6cff511ca0d81e1222cc15ded;p=redmine.git Ask more specific confirmation questions when closing/reopening/archiving projects (#36891). Patch by Holger Just. git-svn-id: https://svn.redmine.org/redmine/trunk@21589 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/views/context_menus/projects.html.erb b/app/views/context_menus/projects.html.erb index d6a1177c7..c5db9084a 100644 --- a/app/views/context_menus/projects.html.erb +++ b/app/views/context_menus/projects.html.erb @@ -3,14 +3,13 @@ <% if @project.archived? %>
  • <%= context_menu_link l(:button_unarchive), unarchive_project_path(@project), method: :post, class: 'icon icon-unlock' %>
  • <% else %> -
  • <%= context_menu_link l(:button_archive), archive_project_path(@project), data: {confirm: l(:text_are_you_sure)}, method: :post, class: 'icon icon-lock' %>
  • +
  • <%= context_menu_link l(:button_archive), archive_project_path(@project), data: {confirm: l(:text_project_archive_confirmation, @project.to_s)}, method: :post, class: 'icon icon-lock' %>
  • <% end %>
  • <%= context_menu_link l(:button_copy), copy_project_path(@projects), class: 'icon icon-copy' %>
  • - <%= context_menu_link l(:button_delete), project_path(@project, back_url: @back), - method: :delete, data: {confirm: l(:text_project_destroy_confirmation)}, class: 'icon icon-del' %> + <%= context_menu_link l(:button_delete), project_path(@project, back_url: @back), method: :delete, class: 'icon icon-del' %>
  • <% end %> diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 5c7ef440c..a1035927f 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -7,9 +7,9 @@ <% end %> <% if User.current.allowed_to?(:close_project, @project) %> <% if @project.active? %> - <%= link_to l(:button_close), close_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock' %> + <%= link_to l(:button_close), close_project_path(@project), :data => {:confirm => l(:text_project_close_confirmation, @project.to_s)}, :method => :post, :class => 'icon icon-lock' %> <% else %> - <%= link_to l(:button_reopen), reopen_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-unlock' %> + <%= link_to l(:button_reopen), reopen_project_path(@project), :data => {:confirm => l(:text_project_reopen_confirmation, @project.to_s)}, :method => :post, :class => 'icon icon-unlock' %> <% end %> <% end %> <% if @project.deletable? %> diff --git a/config/locales/de.yml b/config/locales/de.yml index 3a8ab0b7e..fb6f9dccf 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1108,6 +1108,9 @@ de: text_plugin_assets_writable: Verzeichnis für Plugin-Assets beschreibbar text_project_closed: Dieses Projekt ist geschlossen und kann nicht bearbeitet werden. text_project_destroy_confirmation: Sind Sie sicher, dass Sie das Projekt löschen wollen? + text_project_close_confirmation: Sind Sie sicher, dass Sie das Projekt '%{value}' schließen wollen? + text_project_reopen_confirmation: Sind Sie sicher, dass Sie das Projekt '%{value}' wieder öffnen wollen? + text_project_archive_confirmation: Sind Sie sicher, dass Sie das Projekt '%{value}' archivieren wollen? text_project_identifier_info: 'Kleinbuchstaben (a-z), Ziffern, Binde- und Unterstriche erlaubt.
    Einmal gespeichert, kann die Kennung nicht mehr geändert werden.' text_reassign_time_entries: 'Gebuchte Aufwände diesem Ticket zuweisen:' text_regexp_info: z. B. ^[A-Z0-9]+$ diff --git a/config/locales/en.yml b/config/locales/en.yml index 62577376f..5cda61e3d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1208,6 +1208,9 @@ en: text_regexp_info: eg. ^[A-Z0-9]+$ text_project_destroy_confirmation: Are you sure you want to delete this project and related data? text_subprojects_destroy_warning: "Its subproject(s): %{value} will be also deleted." + text_project_close_confirmation: Are you sure you want to close the '%{value}' project to make it read-only? + text_project_reopen_confirmation: Are you sure you want to reopen the '%{value}' project? + text_project_archive_confirmation: Are you sure you want to archive the '%{value}' project? text_workflow_edit: Select a role and a tracker to edit the workflow text_are_you_sure: Are you sure? text_journal_changed: "%{label} changed from %{old} to %{new}"