diff --git a/app/views/projects/show.html.slim b/app/views/projects/show.html.slim index a4bd858a..e652c935 100644 --- a/app/views/projects/show.html.slim +++ b/app/views/projects/show.html.slim @@ -16,13 +16,15 @@ = link_to l(:label_subproject_new), new_project_path(parent_id: @project), class: 'icon icon-add' - if User.current.allowed_to? :close_project, @project - if @project.active? + - confirm_msg = Redmine::VERSION.to_s >= '5.1' ? l(:text_project_close_confirmation, @project.to_s) : l(:text_are_you_sure) = link_to l(:button_close), close_project_path(@project), - data: { confirm: l(:text_are_you_sure) }, method: :post, class: 'icon icon-lock' + data: { confirm: - confirm_msg }, method: :post, class: 'icon icon-lock' - else + - confirm_msg = Redmine::VERSION.to_s >= '5.1' ? l(:text_project_reopen_confirmation, @project.to_s) : l(:text_are_you_sure) = link_to l(:button_reopen), reopen_project_path(@project), - data: { confirm: l(:text_are_you_sure) }, method: :post, class: 'icon icon-unlock' + data: { confirm: confirm_msg }, method: :post, class: 'icon icon-unlock' - if User.current.admin? - if @project.archived? @@ -30,9 +32,10 @@ unarchive_project_path(@project, status: params[:status]), method: :post, class: 'icon icon-unlock' - else + - confirm_msg = Redmine::VERSION.to_s >= '5.1' ? l(:text_project_archive_confirmation, @project.to_s) : l(:text_are_you_sure) = link_to l(:button_archive), archive_project_path(@project, status: params[:status]), - data: { confirm: l(:text_are_you_sure) }, method: :post, class: 'icon icon-lock' + data: { confirm: confirm_msg }, method: :post, class: 'icon icon-lock' = link_to l(:button_copy), copy_project_path(@project), class: 'icon icon-copy' = link_to l(:button_delete), project_path(@project), method: :delete, class: 'icon icon-del' - elsif @project.deletable?