diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-27 15:43:44 +0300 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-27 15:43:44 +0300 |
| commit | 246989bcca07e71bcec37886d0303a22e4da8420 (patch) | |
| tree | d513615820ab83cbb46a7ec4c740842a0f6742bf | |
| parent | 8ab44f688f58f1a4fa07fb715f5a4958bcaf4ad4 (diff) | |
| download | gitlab-ce-246989bcca07e71bcec37886d0303a22e4da8420.tar.gz | |
more descriptive confirmation messages
| -rw-r--r-- | app/helpers/tree_helper.rb | 4 | ||||
| -rw-r--r-- | app/views/deploy_keys/_deploy_key.html.haml | 2 | ||||
| -rw-r--r-- | app/views/edit_tree/show.html.haml | 4 | ||||
| -rw-r--r-- | app/views/groups/edit.html.haml | 2 | ||||
| -rw-r--r-- | app/views/protected_branches/index.html.haml | 2 | ||||
| -rw-r--r-- | app/views/snippets/_form.html.haml | 2 |
6 files changed, 10 insertions, 6 deletions
diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb index 1f764ea1038..a8491dfe3ba 100644 --- a/app/helpers/tree_helper.rb +++ b/app/helpers/tree_helper.rb @@ -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 diff --git a/app/views/deploy_keys/_deploy_key.html.haml b/app/views/deploy_keys/_deploy_key.html.haml index b2c59c1406b..45f80ecd556 100644 --- a/app/views/deploy_keys/_deploy_key.html.haml +++ b/app/views/deploy_keys/_deploy_key.html.haml @@ -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 diff --git a/app/views/edit_tree/show.html.haml b/app/views/edit_tree/show.html.haml index 94a577d8e41..17d813ce75e 100644 --- a/app/views/edit_tree/show.html.haml +++ b/app/views/edit_tree/show.html.haml @@ -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") diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml index eb4f324b358..d6a828feed7 100644 --- a/app/views/groups/edit.html.haml +++ b/app/views/groups/edit.html.haml @@ -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 diff --git a/app/views/protected_branches/index.html.haml b/app/views/protected_branches/index.html.haml index 15644de552f..a338344c52d 100644 --- a/app/views/protected_branches/index.html.haml +++ b/app/views/protected_branches/index.html.haml @@ -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" diff --git a/app/views/snippets/_form.html.haml b/app/views/snippets/_form.html.haml index 77162cdcde3..993a20058c6 100644 --- a/app/views/snippets/_form.html.haml +++ b/app/views/snippets/_form.html.haml @@ -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 |
