Commit 246989bc authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

more descriptive confirmation messages

parent 8ab44f68
......@@ -85,4 +85,8 @@ module TreeHelper
file = File.join(tree.path, "..")
tree_join(tree.ref, file)
end
def leave_edit_message
"Leave edit mode?\nAll unsaved changes will be lost."
end
end
......@@ -10,7 +10,7 @@
%i.icon-off
Disable
- else
= link_to 'Remove', project_deploy_key_path(@project, deploy_key), confirm: 'Are you sure?', method: :delete, class: "btn btn-remove delete-key btn-small pull-right"
= link_to 'Remove', project_deploy_key_path(@project, deploy_key), confirm: 'You are going to remove deploy key. Are you sure?', method: :delete, class: "btn btn-remove delete-key btn-small pull-right"
= link_to project_deploy_key_path(deploy_key.projects.include?(@project) ? @project : deploy_key.projects.first, deploy_key) do
......
......@@ -10,7 +10,7 @@
%strong= @ref
%span.options
.btn-group.tree-btn-group
= link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-tiny btn-cancel", confirm: "Are you sure?"
= link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-tiny btn-cancel", confirm: leave_edit_message
.file_content.code
%pre#editor= @blob.data
......@@ -27,7 +27,7 @@
.message
to branch
%strong= @ref
= link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-cancel", confirm: "Are you sure?"
= link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-cancel", confirm: leave_edit_message
:javascript
ace.config.set("modePath", "#{Gitlab::Application.config.assets.prefix}/ace-src-noconflict")
......
......@@ -26,7 +26,7 @@
.pull-right
= link_to 'Team', project_team_index_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
= link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
= link_to 'Remove', project, confirm: "REMOVE #{project.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove"
= link_to 'Remove', project, remove_project_message(project), method: :delete, class: "btn btn-small btn-remove"
- if @group.projects.blank?
%p.nothing_here_message This group has no projects yet
......
......@@ -51,4 +51,4 @@
(branch was removed from repository)
%td
- if can? current_user, :admin_project, @project
= link_to 'Unprotect', [@project, branch], confirm: 'Are you sure?', method: :delete, class: "btn btn-remove btn-small"
= link_to 'Unprotect', [@project, branch], confirm: 'Branch will be writable for developers. Are you sure?', method: :delete, class: "btn btn-remove btn-small"
......@@ -30,7 +30,7 @@
= f.submit 'Save', class: "btn-save btn"
= link_to "Cancel", project_snippets_path(@project), class: " btn"
- unless @snippet.new_record?
.pull-right= link_to 'Destroy', [@project, @snippet], confirm: 'Are you sure?', method: :delete, class: "btn pull-right danger delete-snippet", id: "destroy_snippet_#{@snippet.id}"
.pull-right= link_to 'Destroy', [@project, @snippet], confirm: 'Removed snippet cannot be restored! Are you sure?', method: :delete, class: "btn pull-right danger delete-snippet", id: "destroy_snippet_#{@snippet.id}"
:javascript
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment