From 575c695e7d06a08bc3c2c242dca39a635bde0876 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Mon, 27 Aug 2012 18:32:35 +0000 Subject: [PATCH] [tolerance-time] Moving method to ApplicationHelper --- app/helpers/application_helper.rb | 16 ++++++++++++++++ app/helpers/content_viewer_helper.rb | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9a7482c..4c59096 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1365,4 +1365,20 @@ module ApplicationHelper :style => 'margin-top: 1em' ) end + + def expirable_content_reference(content, action, text, url, options = {}) + reason = @plugins.dispatch("content_expire_#{action.to_s}", content).first + options[:title] = reason + expirable_link_to reason.present?, text, url, options + end + + def expirable_button(content, action, text, url, options = {}) + options[:class] = "button with-text icon-#{action.to_s}" + expirable_content_reference content, action, text, url, options + end + + def expirable_comment_link(content, action, text, url, options = {}) + options[:class] = "comment-footer comment-footer-link comment-footer-hide" + expirable_content_reference content, action, text, url, options + end end diff --git a/app/helpers/content_viewer_helper.rb b/app/helpers/content_viewer_helper.rb index c03aef2..524aa53 100644 --- a/app/helpers/content_viewer_helper.rb +++ b/app/helpers/content_viewer_helper.rb @@ -68,20 +68,4 @@ module ContentViewerHelper end end - def expirable_content_reference(content, action, text, url, options = {}) - reason = @plugins.dispatch("content_expire_#{action.to_s}", content).first - options[:title] = reason - expirable_link_to reason.present?, text, url, options - end - - def expirable_button(content, action, text, url, options = {}) - options[:class] = "button with-text icon-#{action.to_s}" - expirable_content_reference content, action, text, url, options - end - - def expirable_comment_link(content, action, text, url, options = {}) - options[:class] = "comment-footer comment-footer-link comment-footer-hide" - expirable_content_reference content, action, text, url, options - end - end -- libgit2 0.21.2