Commit bfacf1366842055d7338df0ad5f705d5f819a60b
1 parent
72f2be86
Exists in
master
and in
4 other branches
Fixed all the confirm: deprecation warnings
Showing
27 changed files
with
30 additions
and
30 deletions
Show diff stats
app/views/admin/groups/index.html.haml
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | .clearfix | 18 | .clearfix |
19 | .pull-right.prepend-top-10 | 19 | .pull-right.prepend-top-10 |
20 | = link_to 'Edit', edit_admin_group_path(group), id: "edit_#{dom_id(group)}", class: "btn btn-small" | 20 | = link_to 'Edit', edit_admin_group_path(group), id: "edit_#{dom_id(group)}", class: "btn btn-small" |
21 | - = link_to 'Destroy', [:admin, group], confirm: "REMOVE #{group.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove" | 21 | + = link_to 'Destroy', [:admin, group], data: {confirm: "REMOVE #{group.name}? Are you sure?"}, method: :delete, class: "btn btn-small btn-remove" |
22 | 22 | ||
23 | %h4 | 23 | %h4 |
24 | = link_to [:admin, group] do | 24 | = link_to [:admin, group] do |
app/views/admin/groups/show.html.haml
@@ -74,5 +74,5 @@ | @@ -74,5 +74,5 @@ | ||
74 | = link_to user.name, admin_user_path(user) | 74 | = link_to user.name, admin_user_path(user) |
75 | %span.pull-right.light | 75 | %span.pull-right.light |
76 | = member.human_access | 76 | = member.human_access |
77 | - = link_to group_users_group_path(@group, member), confirm: remove_user_from_group_message(@group, user), method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do | 77 | + = link_to group_users_group_path(@group, member), data: { confirm: remove_user_from_group_message(@group, user) }, method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do |
78 | %i.icon-minus.icon-white | 78 | %i.icon-minus.icon-white |
app/views/admin/hooks/index.html.haml
@@ -39,4 +39,4 @@ | @@ -39,4 +39,4 @@ | ||
39 | = link_to 'Test Hook', admin_hook_test_path(hook), class: "btn btn-small pull-right" | 39 | = link_to 'Test Hook', admin_hook_test_path(hook), class: "btn btn-small pull-right" |
40 | %td POST | 40 | %td POST |
41 | %td | 41 | %td |
42 | - = link_to 'Remove', admin_hook_path(hook), confirm: 'Are you sure?', method: :delete, class: "btn btn-remove btn-small pull-right" | 42 | + = link_to 'Remove', admin_hook_path(hook), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-remove btn-small pull-right" |
app/views/admin/projects/index.html.haml
@@ -53,7 +53,7 @@ | @@ -53,7 +53,7 @@ | ||
53 | %span.label.label-gray | 53 | %span.label.label-gray |
54 | = repository_size(project) | 54 | = repository_size(project) |
55 | = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small" | 55 | = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small" |
56 | - = link_to 'Destroy', [project], confirm: remove_project_message(project), method: :delete, class: "btn btn-small btn-remove" | 56 | + = link_to 'Destroy', [project], data: { confirm: remove_project_message(project) }, method: :delete, class: "btn btn-small btn-remove" |
57 | - if @projects.blank? | 57 | - if @projects.blank? |
58 | %p.nothing_here_message 0 projects matches | 58 | %p.nothing_here_message 0 projects matches |
59 | = paginate @projects, theme: "gitlab" | 59 | = paginate @projects, theme: "gitlab" |
app/views/admin/projects/show.html.haml
@@ -117,5 +117,5 @@ | @@ -117,5 +117,5 @@ | ||
117 | %span.light Owner | 117 | %span.light Owner |
118 | - else | 118 | - else |
119 | %span.light= users_project.human_access | 119 | %span.light= users_project.human_access |
120 | - = link_to project_team_member_path(@project, user), confirm: remove_from_project_team_message(@project, user), method: :delete, remote: true, class: "btn btn-small btn-remove" do | 120 | + = link_to project_team_member_path(@project, user), data: { confirm: remove_from_project_team_message(@project, user)}, method: :delete, remote: true, class: "btn btn-small btn-remove" do |
121 | %i.icon-remove | 121 | %i.icon-remove |
app/views/admin/users/_form.html.haml
@@ -68,7 +68,7 @@ | @@ -68,7 +68,7 @@ | ||
68 | = link_to 'Unblock User', unblock_admin_user_path(@user), method: :put, class: "btn btn-small" | 68 | = link_to 'Unblock User', unblock_admin_user_path(@user), method: :put, class: "btn btn-small" |
69 | - else | 69 | - else |
70 | %p Blocked users will be removed from all projects & will not be able to login to GitLab. | 70 | %p Blocked users will be removed from all projects & will not be able to login to GitLab. |
71 | - = link_to 'Block User', block_admin_user_path(@user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn btn-small btn-remove" | 71 | + = link_to 'Block User', block_admin_user_path(@user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-small btn-remove" |
72 | %fieldset | 72 | %fieldset |
73 | %legend Profile | 73 | %legend Profile |
74 | .control-group | 74 | .control-group |
app/views/admin/users/index.html.haml
@@ -53,6 +53,6 @@ | @@ -53,6 +53,6 @@ | ||
53 | - if user.blocked? | 53 | - if user.blocked? |
54 | = link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: "btn btn-small success" | 54 | = link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: "btn btn-small success" |
55 | - else | 55 | - else |
56 | - = link_to 'Block', block_admin_user_path(user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn btn-small btn-remove" | ||
57 | - = link_to 'Destroy', [:admin, user], confirm: "USER #{user.name} WILL BE REMOVED! All tickets linked to this user will also be removed! Maybe block the user instead? Are you sure?", method: :delete, class: "btn btn-small btn-remove" | 56 | + = link_to 'Block', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-small btn-remove" |
57 | + = link_to 'Destroy', [:admin, user], data: { confirm: "USER #{user.name} WILL BE REMOVED! All tickets linked to this user will also be removed! Maybe block the user instead? Are you sure?" }, method: :delete, class: "btn btn-small btn-remove" | ||
58 | = paginate @users, theme: "gitlab" | 58 | = paginate @users, theme: "gitlab" |
app/views/dashboard/projects.html.haml
@@ -71,7 +71,7 @@ | @@ -71,7 +71,7 @@ | ||
71 | 71 | ||
72 | - if current_user.can_leave_project?(project) | 72 | - if current_user.can_leave_project?(project) |
73 | .pull-right | 73 | .pull-right |
74 | - = link_to leave_project_team_members_path(project), confirm: "Leave project?", method: :delete, remote: true, class: "btn-tiny btn remove-row", title: 'Leave project' do | 74 | + = link_to leave_project_team_members_path(project), data: { confirm: "Leave project?"}, method: :delete, remote: true, class: "btn-tiny btn remove-row", title: 'Leave project' do |
75 | %i.icon-signout | 75 | %i.icon-signout |
76 | Leave | 76 | Leave |
77 | 77 |
app/views/devise/registrations/edit.html.erb
@@ -23,6 +23,6 @@ | @@ -23,6 +23,6 @@ | ||
23 | 23 | ||
24 | <h3>Cancel my account</h3> | 24 | <h3>Cancel my account</h3> |
25 | 25 | ||
26 | -<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), confirm: "Are you sure?", method: :delete %>.</p> | 26 | +<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %>.</p> |
27 | 27 | ||
28 | <%= link_to "Back", :back %> | 28 | <%= link_to "Back", :back %> |
app/views/groups/edit.html.haml
@@ -56,7 +56,7 @@ | @@ -56,7 +56,7 @@ | ||
56 | .pull-right | 56 | .pull-right |
57 | = link_to 'Members', project_team_index_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small" | 57 | = link_to 'Members', project_team_index_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small" |
58 | = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small" | 58 | = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small" |
59 | - = link_to 'Remove', project, confirm: remove_project_message(project), method: :delete, class: "btn btn-small btn-remove" | 59 | + = link_to 'Remove', project, data: { confirm: remove_project_message(project)}, method: :delete, class: "btn btn-small btn-remove" |
60 | - if @group.projects.blank? | 60 | - if @group.projects.blank? |
61 | %p.nothing_here_message This group has no projects yet | 61 | %p.nothing_here_message This group has no projects yet |
62 | 62 | ||
@@ -69,4 +69,4 @@ | @@ -69,4 +69,4 @@ | ||
69 | %p | 69 | %p |
70 | %strong Removed group can not be restored! | 70 | %strong Removed group can not be restored! |
71 | 71 | ||
72 | - = link_to 'Remove Group', @group, confirm: 'Removed group can not be restored! Are you sure?', method: :delete, class: "btn btn-remove" | 72 | + = link_to 'Remove Group', @group, data: {confirm: 'Removed group can not be restored! Are you sure?'}, method: :delete, class: "btn btn-remove" |
app/views/profiles/groups/index.html.haml
@@ -22,7 +22,7 @@ | @@ -22,7 +22,7 @@ | ||
22 | %i.icon-cogs | 22 | %i.icon-cogs |
23 | Settings | 23 | Settings |
24 | 24 | ||
25 | - = link_to leave_profile_group_path(group), confirm: "Are you sure you want to leave #{group.name} group?", method: :delete, class: "btn-small btn grouped", title: 'Remove user from group' do | 25 | + = link_to leave_profile_group_path(group), data: { confirm: "Are you sure you want to leave #{group.name} group?"}, method: :delete, class: "btn-small btn grouped", title: 'Remove user from group' do |
26 | %i.icon-signout | 26 | %i.icon-signout |
27 | Leave | 27 | Leave |
28 | 28 |
app/views/profiles/keys/_key.html.haml
@@ -8,4 +8,4 @@ | @@ -8,4 +8,4 @@ | ||
8 | = time_ago_in_words(key.created_at) | 8 | = time_ago_in_words(key.created_at) |
9 | ago | 9 | ago |
10 | 10 | ||
11 | - = link_to 'Remove', profile_key_path(key), confirm: 'Are you sure?', method: :delete, class: "btn btn-small btn-remove delete-key pull-right" | 11 | + = link_to 'Remove', profile_key_path(key), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-small btn-remove delete-key pull-right" |
app/views/profiles/keys/show.html.haml
@@ -19,4 +19,4 @@ | @@ -19,4 +19,4 @@ | ||
19 | = @key.key | 19 | = @key.key |
20 | 20 | ||
21 | .pull-right | 21 | .pull-right |
22 | - = link_to 'Remove', profile_key_path(@key), confirm: 'Are you sure?', method: :delete, class: "btn btn-remove delete-key" | 22 | + = link_to 'Remove', profile_key_path(@key), data: {confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove delete-key" |
app/views/profiles/show.html.haml
@@ -77,7 +77,7 @@ | @@ -77,7 +77,7 @@ | ||
77 | .light The maximum file size allowed is 100KB. | 77 | .light The maximum file size allowed is 100KB. |
78 | - if @user.avatar? | 78 | - if @user.avatar? |
79 | %hr | 79 | %hr |
80 | - = link_to 'Remove avatar', profile_avatar_path, confirm: "Avatar will be removed. Are you sure?", method: :delete, class: "btn btn-remove btn-small remove-avatar" | 80 | + = link_to 'Remove avatar', profile_avatar_path, data: { confirm: "Avatar will be removed. Are you sure?"}, method: :delete, class: "btn btn-remove btn-small remove-avatar" |
81 | 81 | ||
82 | .form-actions | 82 | .form-actions |
83 | = f.submit 'Save changes', class: "btn btn-save" | 83 | = f.submit 'Save changes', class: "btn btn-save" |
app/views/projects/deploy_keys/_deploy_key.html.haml
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | %i.icon-off | 10 | %i.icon-off |
11 | Disable | 11 | Disable |
12 | - else | 12 | - else |
13 | - = 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" | 13 | + = link_to 'Remove', project_deploy_key_path(@project, deploy_key), data: { confirm: 'You are going to remove deploy key. Are you sure?'}, method: :delete, class: "btn btn-remove delete-key btn-small pull-right" |
14 | 14 | ||
15 | 15 | ||
16 | = link_to project_deploy_key_path(deploy_key.projects.include?(@project) ? @project : deploy_key.projects.first, deploy_key) do | 16 | = link_to project_deploy_key_path(deploy_key.projects.include?(@project) ? @project : deploy_key.projects.first, deploy_key) do |
app/views/projects/deploy_keys/show.html.haml
@@ -10,4 +10,4 @@ | @@ -10,4 +10,4 @@ | ||
10 | %hr | 10 | %hr |
11 | %pre= @key.key | 11 | %pre= @key.key |
12 | .pull-right | 12 | .pull-right |
13 | - = link_to 'Remove', project_deploy_key_path(@project, @key), confirm: 'Are you sure?', method: :delete, class: "btn-remove btn delete-key" | 13 | + = link_to 'Remove', project_deploy_key_path(@project, @key), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn-remove btn delete-key" |
app/views/projects/edit.html.haml
@@ -147,7 +147,7 @@ | @@ -147,7 +147,7 @@ | ||
147 | %br | 147 | %br |
148 | %strong Removed projects cannot be restored! | 148 | %strong Removed projects cannot be restored! |
149 | 149 | ||
150 | - = link_to 'Remove project', @project, confirm: remove_project_message(@project), method: :delete, class: "btn btn-remove" | 150 | + = link_to 'Remove project', @project, data: { confirm: remove_project_message(@project) }, method: :delete, class: "btn btn-remove" |
151 | - else | 151 | - else |
152 | %p.nothing_here_message Only project owner can remove a project | 152 | %p.nothing_here_message Only project owner can remove a project |
153 | 153 |
app/views/projects/edit_tree/show.html.haml
@@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
11 | %strong= @ref | 11 | %strong= @ref |
12 | %span.options | 12 | %span.options |
13 | .btn-group.tree-btn-group | 13 | .btn-group.tree-btn-group |
14 | - = link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-tiny btn-cancel", confirm: leave_edit_message | 14 | + = link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-tiny btn-cancel", data: { confirm: leave_edit_message } |
15 | .file-content.code | 15 | .file-content.code |
16 | %pre#editor= @blob.data | 16 | %pre#editor= @blob.data |
17 | 17 | ||
@@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
28 | .message | 28 | .message |
29 | to branch | 29 | to branch |
30 | %strong= @ref | 30 | %strong= @ref |
31 | - = link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-cancel", confirm: leave_edit_message | 31 | + = link_to "Cancel", project_blob_path(@project, @id), class: "btn btn-cancel", data: { confirm: leave_edit_message} |
32 | 32 | ||
33 | :javascript | 33 | :javascript |
34 | ace.config.set("modePath", gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}/ace-src-noconflict") | 34 | ace.config.set("modePath", gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}/ace-src-noconflict") |
app/views/projects/empty.html.haml
@@ -44,4 +44,4 @@ | @@ -44,4 +44,4 @@ | ||
44 | 44 | ||
45 | - if can? current_user, :remove_project, @project | 45 | - if can? current_user, :remove_project, @project |
46 | .prepend-top-20 | 46 | .prepend-top-20 |
47 | - = link_to 'Remove project', @project, confirm: remove_project_message(@project), method: :delete, class: "btn btn-remove pull-right" | 47 | + = link_to 'Remove project', @project, data: { confirm: remove_project_message(@project)}, method: :delete, class: "btn btn-remove pull-right" |
app/views/projects/hooks/index.html.haml
@@ -53,7 +53,7 @@ | @@ -53,7 +53,7 @@ | ||
53 | %li | 53 | %li |
54 | .pull-right | 54 | .pull-right |
55 | = link_to 'Test Hook', test_project_hook_path(@project, hook), class: "btn btn-small grouped" | 55 | = link_to 'Test Hook', test_project_hook_path(@project, hook), class: "btn btn-small grouped" |
56 | - = link_to 'Remove', project_hook_path(@project, hook), confirm: 'Are you sure?', method: :delete, class: "btn btn-remove btn-small grouped" | 56 | + = link_to 'Remove', project_hook_path(@project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-small grouped" |
57 | .clearfix | 57 | .clearfix |
58 | %span.monospace= hook.url | 58 | %span.monospace= hook.url |
59 | %p | 59 | %p |
app/views/projects/new_tree/show.html.haml
@@ -33,7 +33,7 @@ | @@ -33,7 +33,7 @@ | ||
33 | .message | 33 | .message |
34 | to branch | 34 | to branch |
35 | %strong= @ref | 35 | %strong= @ref |
36 | - = link_to "Cancel", project_tree_path(@project, @id), class: "btn btn-cancel", confirm: leave_edit_message | 36 | + = link_to "Cancel", project_tree_path(@project, @id), class: "btn btn-cancel", data: { confirm: leave_edit_message} |
37 | 37 | ||
38 | :javascript | 38 | :javascript |
39 | ace.config.set("modePath", gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}/ace-src-noconflict") | 39 | ace.config.set("modePath", gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}/ace-src-noconflict") |
app/views/projects/protected_branches/index.html.haml
@@ -39,7 +39,7 @@ | @@ -39,7 +39,7 @@ | ||
39 | %i.icon-lock | 39 | %i.icon-lock |
40 | .pull-right | 40 | .pull-right |
41 | - if can? current_user, :admin_project, @project | 41 | - if can? current_user, :admin_project, @project |
42 | - = link_to 'Unprotect', [@project, branch], confirm: 'Branch will be writable for developers. Are you sure?', method: :delete, class: "btn btn-remove btn-small" | 42 | + = link_to 'Unprotect', [@project, branch], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: "btn btn-remove btn-small" |
43 | 43 | ||
44 | - if commit = branch.commit | 44 | - if commit = branch.commit |
45 | = link_to project_commit_path(@project, commit.id), class: 'commit_short_id' do | 45 | = link_to project_commit_path(@project, commit.id), class: 'commit_short_id' do |
app/views/projects/snippets/_form.html.haml
@@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
34 | = link_to "Cancel", project_snippets_path(@project), class: "btn btn-cancel" | 34 | = link_to "Cancel", project_snippets_path(@project), class: "btn btn-cancel" |
35 | 35 | ||
36 | - unless @snippet.new_record? | 36 | - unless @snippet.new_record? |
37 | - = link_to 'Remove snippet', project_snippet_path(@project, @snippet), confirm: 'Are you sure?', method: :delete, class: "btn pull-right btn-remove delete-snippet prepend-left-10", id: "destroy_snippet_#{@snippet.id}" | 37 | + = link_to 'Remove snippet', project_snippet_path(@project, @snippet), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn pull-right btn-remove delete-snippet prepend-left-10", id: "destroy_snippet_#{@snippet.id}" |
38 | 38 | ||
39 | :javascript | 39 | :javascript |
40 | var editor = ace.edit("editor"); | 40 | var editor = ace.edit("editor"); |
app/views/projects/team_members/_team_member.html.haml
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | = form_for(member, as: :team_member, url: project_team_member_path(@project, member.user)) do |f| | 7 | = form_for(member, as: :team_member, url: project_team_member_path(@project, member.user)) do |f| |
8 | = f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, class: "medium project-access-select span2 trigger-submit" | 8 | = f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, class: "medium project-access-select span2 trigger-submit" |
9 | | 9 | |
10 | - = link_to project_team_member_path(@project, user), confirm: remove_from_project_team_message(@project, user), method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from team' do | 10 | + = link_to project_team_member_path(@project, user), data: { confirm: remove_from_project_team_message(@project, user)}, method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from team' do |
11 | %i.icon-minus.icon-white | 11 | %i.icon-minus.icon-white |
12 | = image_tag avatar_icon(user.email, 32), class: "avatar s32" | 12 | = image_tag avatar_icon(user.email, 32), class: "avatar s32" |
13 | %p | 13 | %p |
app/views/projects/wikis/edit.html.haml
@@ -6,5 +6,5 @@ | @@ -6,5 +6,5 @@ | ||
6 | 6 | ||
7 | .pull-right | 7 | .pull-right |
8 | - if @wiki.persisted? && can?(current_user, :admin_wiki, @project) | 8 | - if @wiki.persisted? && can?(current_user, :admin_wiki, @project) |
9 | - = link_to project_wiki_path(@project, @wiki), confirm: "Are you sure you want to delete this page?", method: :delete, class: "btn btn-small btn-remove" do | 9 | + = link_to project_wiki_path(@project, @wiki), data: { confirm: "Are you sure you want to delete this page?"}, method: :delete, class: "btn btn-small btn-remove" do |
10 | Delete this page | 10 | Delete this page |
app/views/snippets/_blob.html.haml
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | .btn-group.tree-btn-group.pull-right | 6 | .btn-group.tree-btn-group.pull-right |
7 | - if @snippet.author == current_user | 7 | - if @snippet.author == current_user |
8 | = link_to "Edit", edit_snippet_path(@snippet), class: "btn btn-tiny", title: 'Edit Snippet' | 8 | = link_to "Edit", edit_snippet_path(@snippet), class: "btn btn-tiny", title: 'Edit Snippet' |
9 | - = link_to "Delete", snippet_path(@snippet), method: :delete, confirm: "Are you sure?", class: "btn btn-tiny", title: 'Delete Snippet' | 9 | + = link_to "Delete", snippet_path(@snippet), method: :delete, data: { confirm: "Are you sure?" }, class: "btn btn-tiny", title: 'Delete Snippet' |
10 | = link_to "Raw", raw_snippet_path(@snippet), class: "btn btn-tiny", target: "_blank" | 10 | = link_to "Raw", raw_snippet_path(@snippet), class: "btn btn-tiny", target: "_blank" |
11 | - unless @snippet.content.empty? | 11 | - unless @snippet.content.empty? |
12 | - if gitlab_markdown?(@snippet.file_name) | 12 | - if gitlab_markdown?(@snippet.file_name) |
app/views/snippets/_form.html.haml
@@ -46,7 +46,7 @@ | @@ -46,7 +46,7 @@ | ||
46 | 46 | ||
47 | - unless @snippet.new_record? | 47 | - unless @snippet.new_record? |
48 | .pull-right.prepend-left-20 | 48 | .pull-right.prepend-left-20 |
49 | - = link_to 'Remove', snippet_path(@snippet), confirm: 'Removed snippet cannot be restored! Are you sure?', method: :delete, class: "btn btn-remove delete-snippet", id: "destroy_snippet_#{@snippet.id}" | 49 | + = link_to 'Remove', snippet_path(@snippet), data: { confirm: 'Removed snippet cannot be restored! Are you sure?'}, method: :delete, class: "btn btn-remove delete-snippet", id: "destroy_snippet_#{@snippet.id}" |
50 | = link_to "Cancel", snippets_path(@project), class: "btn btn-cancel" | 50 | = link_to "Cancel", snippets_path(@project), class: "btn btn-cancel" |
51 | 51 | ||
52 | 52 |