summaryrefslogtreecommitdiffstats
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb10
1 files changed, 10 insertions, 0 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)