Skip to content

Commit

Permalink
fix confirm strings for redmine 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermeindl committed Nov 17, 2023
1 parent ea46c2b commit a009f37
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/views/projects/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,26 @@
= 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?
= link_to l(:button_unarchive),
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?
Expand Down

0 comments on commit a009f37

Please sign in to comment.