summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-07 14:36:49 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-07 14:36:49 +0000
commit7b40767428ac5c04ba80d95c7c90b049c73c7f36 (patch)
tree641733a4a56afead53aba5da5faba801d84c2c13 /app
parent56666a41b82d98a773d93dd8fa903a4d702b07ec (diff)
downloadredmine-7b40767428ac5c04ba80d95c7c90b049c73c7f36.tar.gz
redmine-7b40767428ac5c04ba80d95c7c90b049c73c7f36.zip
Deprecated :confirm => 'Text' option.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9937 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/helpers/application_helper.rb10
-rw-r--r--app/views/admin/projects.html.erb2
-rw-r--r--app/views/attachments/_links.html.erb2
-rw-r--r--app/views/auth_sources/index.html.erb6
-rw-r--r--app/views/context_menus/issues.html.erb2
-rw-r--r--app/views/context_menus/time_entries.html.erb2
-rw-r--r--app/views/custom_fields/_index.html.erb5
-rw-r--r--app/views/documents/show.html.erb2
-rw-r--r--app/views/enumerations/index.html.erb5
-rw-r--r--app/views/files/index.html.erb2
-rw-r--r--app/views/groups/index.html.erb2
-rw-r--r--app/views/issue_statuses/index.html.erb7
-rw-r--r--app/views/issues/_action_menu.html.erb2
-rw-r--r--app/views/issues/_relations.html.erb2
-rw-r--r--app/views/issues/index.html.erb3
-rw-r--r--app/views/messages/show.html.erb4
-rw-r--r--app/views/my/blocks/_timelog.html.erb2
-rw-r--r--app/views/news/show.html.erb8
-rw-r--r--app/views/projects/settings/_activities.html.erb2
-rw-r--r--app/views/projects/settings/_boards.html.erb2
-rw-r--r--app/views/projects/settings/_issue_categories.html.erb2
-rw-r--r--app/views/projects/settings/_members.html.erb2
-rw-r--r--app/views/projects/settings/_repositories.html.erb5
-rw-r--r--app/views/projects/settings/_versions.html.erb2
-rw-r--r--app/views/queries/index.html.erb2
-rw-r--r--app/views/repositories/_related_issues.html.erb2
-rw-r--r--app/views/roles/index.html.erb5
-rw-r--r--app/views/timelog/_list.html.erb2
-rw-r--r--app/views/trackers/index.html.erb5
-rw-r--r--app/views/users/edit.html.erb2
-rw-r--r--app/views/users/index.html.erb2
-rw-r--r--app/views/versions/show.html.erb3
-rw-r--r--app/views/wiki/show.html.erb2
33 files changed, 45 insertions, 63 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 9963408fb..d118e04d6 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -985,6 +985,16 @@ module ApplicationHelper
html.html_safe
end
+ def delete_link(url, options={})
+ options = {
+ :method => :delete,
+ :data => {:confirm => l(:text_are_you_sure)},
+ :class => 'icon icon-del'
+ }.merge(options)
+
+ link_to l(:button_delete), url, options
+ end
+
def back_url_hidden_field_tag
back_url = params[:back_url] || request.env['HTTP_REFERER']
back_url = CGI.unescape(back_url.to_s)
diff --git a/app/views/admin/projects.html.erb b/app/views/admin/projects.html.erb
index 1d8bcc002..c2da70cbe 100644
--- a/app/views/admin/projects.html.erb
+++ b/app/views/admin/projects.html.erb
@@ -31,7 +31,7 @@
<td align="center"><%= checked_image project.is_public? %></td>
<td align="center"><%= format_date(project.created_on) %></td>
<td class="buttons">
- <%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project, :status => params[:status] }, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-lock') unless project.archived? %>
+ <%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project, :status => params[:status] }, :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock') unless project.archived? %>
<%= link_to(l(:button_unarchive), { :controller => 'projects', :action => 'unarchive', :id => project, :status => params[:status] }, :method => :post, :class => 'icon icon-unlock') if project.archived? && (project.parent.nil? || !project.parent.archived?) %>
<%= link_to(l(:button_copy), { :controller => 'projects', :action => 'copy', :id => project }, :class => 'icon icon-copy') %>
<%= link_to(l(:button_delete), project_path(project), :method => :delete, :class => 'icon icon-del') %>
diff --git a/app/views/attachments/_links.html.erb b/app/views/attachments/_links.html.erb
index f77cfb1eb..d2ab22ced 100644
--- a/app/views/attachments/_links.html.erb
+++ b/app/views/attachments/_links.html.erb
@@ -10,7 +10,7 @@
<span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
<% if options[:deletable] %>
<%= link_to image_tag('delete.png'), attachment_path(attachment),
- :confirm => l(:text_are_you_sure),
+ :data => {:confirm => l(:text_are_you_sure)},
:method => :delete,
:class => 'delete',
:title => l(:button_delete) %>
diff --git a/app/views/auth_sources/index.html.erb b/app/views/auth_sources/index.html.erb
index 3ce5c090c..045207a28 100644
--- a/app/views/auth_sources/index.html.erb
+++ b/app/views/auth_sources/index.html.erb
@@ -21,11 +21,7 @@
<td align="center"><%= h source.users.count %></td>
<td class="buttons">
<%= link_to l(:button_test), {:action => 'test_connection', :id => source}, :class => 'icon icon-test' %>
- <%= link_to l(:button_delete), { :action => 'destroy', :id => source },
- :method => :delete,
- :confirm => l(:text_are_you_sure),
- :class => 'icon icon-del',
- :disabled => source.users.any? %>
+ <%= delete_link auth_source_path(source) %>
</td>
</tr>
<% end %>
diff --git a/app/views/context_menus/issues.html.erb b/app/views/context_menus/issues.html.erb
index 75b0a7652..f90cbf0e5 100644
--- a/app/views/context_menus/issues.html.erb
+++ b/app/views/context_menus/issues.html.erb
@@ -136,7 +136,7 @@
:class => 'icon-copy', :disabled => !@can[:move] %></li>
<% end %>
<li><%= context_menu_link l(:button_delete), issues_path(:ids => @issues.collect(&:id), :back_url => @back),
- :method => :delete, :confirm => issues_destroy_confirmation_message(@issues), :class => 'icon-del', :disabled => !@can[:delete] %></li>
+ :method => :delete, :data => {:confirm => issues_destroy_confirmation_message(@issues)}, :class => 'icon-del', :disabled => !@can[:delete] %></li>
<%= call_hook(:view_issues_context_menu_end, {:issues => @issues, :can => @can, :back => @back }) %>
</ul>
diff --git a/app/views/context_menus/time_entries.html.erb b/app/views/context_menus/time_entries.html.erb
index 43e31145e..10dbcafd2 100644
--- a/app/views/context_menus/time_entries.html.erb
+++ b/app/views/context_menus/time_entries.html.erb
@@ -28,6 +28,6 @@
<li>
<%= context_menu_link l(:button_delete),
{:controller => 'timelog', :action => 'destroy', :ids => @time_entries.collect(&:id), :back_url => @back},
- :method => :delete, :confirm => l(:text_time_entries_destroy_confirmation), :class => 'icon-del', :disabled => !@can[:delete] %>
+ :method => :delete, :data => {:confirm => l(:text_time_entries_destroy_confirmation)}, :class => 'icon-del', :disabled => !@can[:delete] %>
</li>
</ul>
diff --git a/app/views/custom_fields/_index.html.erb b/app/views/custom_fields/_index.html.erb
index 3740987ca..79fc09ae5 100644
--- a/app/views/custom_fields/_index.html.erb
+++ b/app/views/custom_fields/_index.html.erb
@@ -22,10 +22,7 @@
<% end %>
<td align="center" style="width:15%;"><%= reorder_links('custom_field', {:action => 'update', :id => custom_field}, :put) %></td>
<td class="buttons">
- <%= link_to(l(:button_delete), custom_field_path(custom_field),
- :method => :delete,
- :confirm => l(:text_are_you_sure),
- :class => 'icon icon-del') %>
+ <%= delete_link custom_field_path(custom_field) %>
</td>
</tr>
<% end; reset_cycle %>
diff --git a/app/views/documents/show.html.erb b/app/views/documents/show.html.erb
index f65d5ae88..2a430040d 100644
--- a/app/views/documents/show.html.erb
+++ b/app/views/documents/show.html.erb
@@ -1,7 +1,7 @@
<div class="contextual">
<% if User.current.allowed_to?(:manage_documents, @project) %>
<%= link_to l(:button_edit), edit_document_path(@document), :class => 'icon icon-edit', :accesskey => accesskey(:edit) %>
-<%= link_to l(:button_delete), document_path(@document), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
+<%= delete_link document_path(@document) %>
<% end %>
</div>
diff --git a/app/views/enumerations/index.html.erb b/app/views/enumerations/index.html.erb
index d7522bc93..153c8b5e3 100644
--- a/app/views/enumerations/index.html.erb
+++ b/app/views/enumerations/index.html.erb
@@ -20,10 +20,7 @@
<td class="center" style="width:15%;"><%= checked_image enumeration.active? %></td>
<td style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}, :put) %></td>
<td class="buttons">
- <%= link_to l(:button_delete), enumeration_path(enumeration),
- :method => :delete,
- :confirm => l(:text_are_you_sure),
- :class => 'icon icon-del' %>
+ <%= delete_link enumeration_path(enumeration) %>
</td>
</tr>
<% end %>
diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb
index 397ca5c65..5077dbd8f 100644
--- a/app/views/files/index.html.erb
+++ b/app/views/files/index.html.erb
@@ -34,7 +34,7 @@
<td class="digest"><%= file.digest %></td>
<td align="center">
<%= link_to(image_tag('delete.png'), attachment_path(file),
- :confirm => l(:text_are_you_sure), :method => :delete) if delete_allowed %>
+ :data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %>
</td>
</tr>
<% end
diff --git a/app/views/groups/index.html.erb b/app/views/groups/index.html.erb
index 418563abd..aee3a092b 100644
--- a/app/views/groups/index.html.erb
+++ b/app/views/groups/index.html.erb
@@ -16,7 +16,7 @@
<tr class="<%= cycle 'odd', 'even' %>">
<td><%= link_to h(group), edit_group_path(group) %></td>
<td align="center"><%= group.users.size %></td>
- <td class="buttons"><%= link_to l(:button_delete), group, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %></td>
+ <td class="buttons"><%= delete_link group %></td>
</tr>
<% end %>
</table>
diff --git a/app/views/issue_statuses/index.html.erb b/app/views/issue_statuses/index.html.erb
index 430e873f2..dea9fb3cb 100644
--- a/app/views/issue_statuses/index.html.erb
+++ b/app/views/issue_statuses/index.html.erb
@@ -1,6 +1,6 @@
<div class="contextual">
<%= link_to l(:label_issue_status_new), new_issue_status_path, :class => 'icon icon-add' %>
-<%= link_to(l(:label_update_issue_done_ratios), update_issue_done_ratio_issue_statuses_path, :class => 'icon icon-multiple', :method => 'post', :confirm => l(:text_are_you_sure)) if Issue.use_status_for_done_ratio? %>
+<%= link_to(l(:label_update_issue_done_ratios), update_issue_done_ratio_issue_statuses_path, :class => 'icon icon-multiple', :method => 'post', :data => {:confirm => l(:text_are_you_sure)}) if Issue.use_status_for_done_ratio? %>
</div>
<h2><%=l(:label_issue_status_plural)%></h2>
@@ -27,10 +27,7 @@
<td align="center"><%= checked_image status.is_closed? %></td>
<td align="center" style="width:15%;"><%= reorder_links('issue_status', {:action => 'update', :id => status}, :put) %></td>
<td class="buttons">
- <%= link_to(l(:button_delete), issue_status_path(status),
- :method => :delete,
- :confirm => l(:text_are_you_sure),
- :class => 'icon icon-del') %>
+ <%= delete_link issue_status_path(status) %>
</td>
</tr>
<% end %>
diff --git a/app/views/issues/_action_menu.html.erb b/app/views/issues/_action_menu.html.erb
index 4d0503117..f532fb292 100644
--- a/app/views/issues/_action_menu.html.erb
+++ b/app/views/issues/_action_menu.html.erb
@@ -3,5 +3,5 @@
<%= link_to l(:button_log_time), new_issue_time_entry_path(@issue), :class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project) %>
<%= watcher_tag(@issue, User.current) %>
<%= link_to_if_authorized l(:button_copy), {:controller => 'issues', :action => 'new', :project_id => @project, :copy_from => @issue}, :class => 'icon icon-copy' %>
-<%= link_to l(:button_delete), issue_path(@issue), :confirm => issues_destroy_confirmation_message(@issue), :method => :delete, :class => 'icon icon-del' if User.current.allowed_to?(:delete_issues, @project) %>
+<%= link_to l(:button_delete), issue_path(@issue), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'icon icon-del' if User.current.allowed_to?(:delete_issues, @project) %>
</div>
diff --git a/app/views/issues/_relations.html.erb b/app/views/issues/_relations.html.erb
index 0b503fc6c..350c00cfb 100644
--- a/app/views/issues/_relations.html.erb
+++ b/app/views/issues/_relations.html.erb
@@ -23,7 +23,7 @@
image_tag('link_break.png'),
{ :url => {:controller => 'issue_relations', :action => 'destroy', :id => relation},
:method => :delete,
- :confirm => l(:text_are_you_sure) },
+ :data => {:confirm => l(:text_are_you_sure)} },
:title => l(:label_relation_delete)
) if authorize_for('issue_relations', 'destroy') %></td>
</tr>
diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb
index ac9da57dc..8e9b81fdc 100644
--- a/app/views/issues/index.html.erb
+++ b/app/views/issues/index.html.erb
@@ -1,8 +1,7 @@
<div class="contextual">
<% if !@query.new_record? && @query.editable_by?(User.current) %>
<%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
- <%= link_to l(:button_delete), query_path(@query), :confirm => l(:text_are_you_sure),
- :method => :delete, :class => 'icon icon-del' %>
+ <%= delete_link query_path(@query) %>
<% end %>
</div>
diff --git a/app/views/messages/show.html.erb b/app/views/messages/show.html.erb
index d0857cf46..639dc2e7c 100644
--- a/app/views/messages/show.html.erb
+++ b/app/views/messages/show.html.erb
@@ -17,7 +17,7 @@
l(:button_delete),
{:action => 'destroy', :id => @topic},
:method => :post,
- :confirm => l(:text_are_you_sure),
+ :data => {:confirm => l(:text_are_you_sure)},
:class => 'icon icon-del'
) if @message.destroyable_by?(User.current) %>
</div>
@@ -52,7 +52,7 @@
image_tag('delete.png'),
{:action => 'destroy', :id => message},
:method => :post,
- :confirm => l(:text_are_you_sure),
+ :data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete)
) if message.destroyable_by?(User.current) %>
</div>
diff --git a/app/views/my/blocks/_timelog.html.erb b/app/views/my/blocks/_timelog.html.erb
index 12a88ac02..a1fe39b15 100644
--- a/app/views/my/blocks/_timelog.html.erb
+++ b/app/views/my/blocks/_timelog.html.erb
@@ -39,7 +39,7 @@ entries_by_day = entries.group_by(&:spent_on)
<%= link_to image_tag('edit.png'), {:controller => 'timelog', :action => 'edit', :id => entry},
:title => l(:button_edit) %>
<%= link_to image_tag('delete.png'), {:controller => 'timelog', :action => 'destroy', :id => entry},
- :confirm => l(:text_are_you_sure),
+ :data => {:confirm => l(:text_are_you_sure)},
:method => :delete,
:title => l(:button_delete) %>
<% end -%>
diff --git a/app/views/news/show.html.erb b/app/views/news/show.html.erb
index cb332f88c..fba61835d 100644
--- a/app/views/news/show.html.erb
+++ b/app/views/news/show.html.erb
@@ -5,11 +5,7 @@
:class => 'icon icon-edit',
:accesskey => accesskey(:edit),
:onclick => 'Element.show("edit-news"); return false;') if User.current.allowed_to?(:manage_news, @project) %>
-<%= link_to(l(:button_delete),
- news_path(@news),
- :confirm => l(:text_are_you_sure),
- :method => :delete,
- :class => 'icon icon-del') if User.current.allowed_to?(:manage_news, @project) %>
+<%= delete_link news_path(@news) if User.current.allowed_to?(:manage_news, @project) %>
</div>
<h2><%= avatar(@news.author, :size => "24") %><%=h @news.title %></h2>
@@ -46,7 +42,7 @@
<% next if comment.new_record? %>
<div class="contextual">
<%= link_to_if_authorized image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},
- :confirm => l(:text_are_you_sure), :method => :delete, :title => l(:button_delete) %>
+ :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %>
</div>
<h4><%= avatar(comment.author, :size => "24") %><%= authoring comment.created_on, comment.author %></h4>
<%= textilizable(comment.comments) %>
diff --git a/app/views/projects/settings/_activities.html.erb b/app/views/projects/settings/_activities.html.erb
index 0331cc8ac..8c9a6121c 100644
--- a/app/views/projects/settings/_activities.html.erb
+++ b/app/views/projects/settings/_activities.html.erb
@@ -34,7 +34,7 @@
<div class="contextual">
<%= link_to(l(:button_reset), project_enumerations_path(@project),
:method => :delete,
- :confirm => l(:text_are_you_sure),
+ :data => {:confirm => l(:text_are_you_sure)},
:class => 'icon icon-del') %>
</div>
diff --git a/app/views/projects/settings/_boards.html.erb b/app/views/projects/settings/_boards.html.erb
index 66a838a4e..c4b84ab99 100644
--- a/app/views/projects/settings/_boards.html.erb
+++ b/app/views/projects/settings/_boards.html.erb
@@ -20,7 +20,7 @@
<td class="buttons">
<% if User.current.allowed_to?(:manage_boards, @project) %>
<%= link_to l(:button_edit), edit_project_board_path(@project, board), :class => 'icon icon-edit' %>
- <%= link_to l(:button_delete), project_board_path(@project, board), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
+ <%= delete_link project_board_path(@project, board) %>
<% end %>
</td>
</tr>
diff --git a/app/views/projects/settings/_issue_categories.html.erb b/app/views/projects/settings/_issue_categories.html.erb
index f5ea6d0db..e88a85d50 100644
--- a/app/views/projects/settings/_issue_categories.html.erb
+++ b/app/views/projects/settings/_issue_categories.html.erb
@@ -14,7 +14,7 @@
<td class="buttons">
<% if User.current.allowed_to?(:manage_categories, @project) %>
<%= link_to l(:button_edit), edit_issue_category_path(category), :class => 'icon icon-edit' %>
- <%= link_to l(:button_delete), issue_category_path(category), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
+ <%= delete_link issue_category_path(category) %>
<% end %>
</td>
</tr>
diff --git a/app/views/projects/settings/_members.html.erb b/app/views/projects/settings/_members.html.erb
index 6bb07c69a..8ce9cf3de 100644
--- a/app/views/projects/settings/_members.html.erb
+++ b/app/views/projects/settings/_members.html.erb
@@ -41,7 +41,7 @@
l(:button_delete),
{ :url => membership_path(member),
:method => :delete,
- :confirm => (!User.current.admin? && member.include?(User.current) ? l(:text_own_membership_delete_confirmation) : nil) },
+ :data => {:confirm => (!User.current.admin? && member.include?(User.current) ? l(:text_own_membership_delete_confirmation) : nil)} },
:title => l(:button_delete),
:class => 'icon icon-del'
) if member.deletable? %>
diff --git a/app/views/projects/settings/_repositories.html.erb b/app/views/projects/settings/_repositories.html.erb
index c2581b38c..d72c9edad 100644
--- a/app/views/projects/settings/_repositories.html.erb
+++ b/app/views/projects/settings/_repositories.html.erb
@@ -22,10 +22,7 @@
:class => 'icon icon-user') %>
<%= link_to(l(:button_edit), edit_repository_path(repository),
:class => 'icon icon-edit') %>
- <%= link_to(l(:button_delete), repository_path(repository),
- :confirm => l(:text_are_you_sure),
- :method => :delete,
- :class => 'icon icon-del') %>
+ <%= delete_link repository_path(repository) %>
<% end %>
</td>
</tr>
diff --git a/app/views/projects/settings/_versions.html.erb b/app/views/projects/settings/_versions.html.erb
index 306670587..778803bf3 100644
--- a/app/views/projects/settings/_versions.html.erb
+++ b/app/views/projects/settings/_versions.html.erb
@@ -21,7 +21,7 @@
<td class="buttons">
<% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %>
<%= link_to l(:button_edit), edit_version_path(version), :class => 'icon icon-edit' %>
- <%= link_to l(:button_delete), version_path(version), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
+ <%= delete_link version_path(version) %>
<% end %>
</td>
</tr>
diff --git a/app/views/queries/index.html.erb b/app/views/queries/index.html.erb
index b03ac6216..41051758e 100644
--- a/app/views/queries/index.html.erb
+++ b/app/views/queries/index.html.erb
@@ -17,7 +17,7 @@
<small>
<% if query.editable_by?(User.current) %>
<%= link_to l(:button_edit), edit_query_path(query), :class => 'icon icon-edit' %>
- <%= link_to l(:button_delete), query_path(query), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
+ <%= delete_link query_path(query) %>
</small>
<% end %>
</td>
diff --git a/app/views/repositories/_related_issues.html.erb b/app/views/repositories/_related_issues.html.erb
index a7aee5d39..d5e57cb72 100644
--- a/app/views/repositories/_related_issues.html.erb
+++ b/app/views/repositories/_related_issues.html.erb
@@ -16,7 +16,7 @@
:id => @project, :repository_id => @repository.identifier_param,
:rev => @changeset.identifier, :issue_id => issue},
:method => :delete,
- :confirm => l(:text_are_you_sure),
+ :data => {:confirm => l(:text_are_you_sure)},
}, :title => l(:label_relation_delete)) if manage_allowed %>
</li>
diff --git a/app/views/roles/index.html.erb b/app/views/roles/index.html.erb
index 9d3c46c14..30cef5330 100644
--- a/app/views/roles/index.html.erb
+++ b/app/views/roles/index.html.erb
@@ -20,10 +20,7 @@
<% end %>
</td>
<td class="buttons">
- <%= link_to(l(:button_delete), role_path(role),
- :method => :delete,
- :confirm => l(:text_are_you_sure),
- :class => 'icon icon-del') unless role.builtin? %>
+ <%= delete_link role_path(role) unless role.builtin? %>
</td>
</tr>
<% end %>
diff --git a/app/views/timelog/_list.html.erb b/app/views/timelog/_list.html.erb
index e916756c9..ccbf7369e 100644
--- a/app/views/timelog/_list.html.erb
+++ b/app/views/timelog/_list.html.erb
@@ -40,7 +40,7 @@
<%= link_to image_tag('edit.png'), {:controller => 'timelog', :action => 'edit', :id => entry, :project_id => nil},
:title => l(:button_edit) %>
<%= link_to image_tag('delete.png'), {:controller => 'timelog', :action => 'destroy', :id => entry, :project_id => nil},
- :confirm => l(:text_are_you_sure),
+ :data => {:confirm => l(:text_are_you_sure)},
:method => :delete,
:title => l(:button_delete) %>
<% end -%>
diff --git a/app/views/trackers/index.html.erb b/app/views/trackers/index.html.erb
index ef48bdc9e..0515ae335 100644
--- a/app/views/trackers/index.html.erb
+++ b/app/views/trackers/index.html.erb
@@ -18,10 +18,7 @@
<td align="center"><% unless tracker.workflows.count > 0 %><span class="icon icon-warning"><%= l(:text_tracker_no_workflow) %> (<%= link_to l(:button_edit), {:controller => 'workflows', :action => 'edit', :tracker_id => tracker} %>)</span><% end %></td>
<td align="center" style="width:15%;"><%= reorder_links('tracker', {:action => 'update', :id => tracker}, :put) %></td>
<td class="buttons">
- <%= link_to(l(:button_delete), tracker_path(tracker),
- :method => :delete,
- :confirm => l(:text_are_you_sure),
- :class => 'icon icon-del') %>
+ <%= delete_link tracker_path(tracker) %>
</td>
</tr>
<% end %>
diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb
index b56f12c27..fa4f38a64 100644
--- a/app/views/users/edit.html.erb
+++ b/app/views/users/edit.html.erb
@@ -1,7 +1,7 @@
<div class="contextual">
<%= link_to l(:label_profile), user_path(@user), :class => 'icon icon-user' %>
<%= change_status_link(@user) %>
-<%= link_to(l(:button_delete), @user, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del') if User.current != @user %>
+<%= delete_link user_path(@user) if User.current != @user %>
</div>
<h2><%= link_to l(:label_user_plural), users_path %> &#187; <%=h @user.login %></h2>
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb
index d59617941..a477a5c90 100644
--- a/app/views/users/index.html.erb
+++ b/app/views/users/index.html.erb
@@ -46,7 +46,7 @@
<td class="last_login_on" align="center"><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td>
<td class="buttons">
<%= change_status_link(user) %>
- <%= link_to(l(:button_delete), user_path(user), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del') unless User.current == user %>
+ <%= delete_link user_path(user) unless User.current == user %>
</td>
</tr>
<% end -%>
diff --git a/app/views/versions/show.html.erb b/app/views/versions/show.html.erb
index f44e3f272..2e104bd39 100644
--- a/app/views/versions/show.html.erb
+++ b/app/views/versions/show.html.erb
@@ -1,8 +1,7 @@
<div class="contextual">
<%= link_to(l(:button_edit), edit_version_path(@version), :class => 'icon icon-edit') if User.current.allowed_to?(:manage_versions, @version.project) %>
<%= link_to_if_authorized(l(:button_edit_associated_wikipage, :page_title => @version.wiki_page_title), {:controller => 'wiki', :action => 'edit', :project_id => @version.project, :id => Wiki.titleize(@version.wiki_page_title)}, :class => 'icon icon-edit') unless @version.wiki_page_title.blank? || @version.project.wiki.nil? %>
-<%= link_to(l(:button_delete), version_path(@version, :back_url => url_for(:controller => 'versions', :action => 'index', :project_id => @version.project)),
- :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del') if User.current.allowed_to?(:manage_versions, @version.project) %>
+<%= delete_link version_path(@version, :back_url => url_for(:controller => 'versions', :action => 'index', :project_id => @version.project)) if User.current.allowed_to?(:manage_versions, @version.project) %>
<%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
</div>
diff --git a/app/views/wiki/show.html.erb b/app/views/wiki/show.html.erb
index 0ef8fc869..08763a335 100644
--- a/app/views/wiki/show.html.erb
+++ b/app/views/wiki/show.html.erb
@@ -5,7 +5,7 @@
<%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %>
<%= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %>
<%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') if @content.current_version? %>
-<%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :id => @page.title}, :method => :delete, :confirm => l(:text_are_you_sure), :class => 'icon icon-del') %>
+<%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :id => @page.title}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :class => 'icon icon-del') %>
<%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') unless @content.current_version? %>
<% end %>
<%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>