rename module to reflect its generic use

This commit is contained in:
Reinier Balt 2014-07-17 15:19:17 +02:00
parent e0aec34df0
commit 2305a91324
3 changed files with 4 additions and 7 deletions

View file

@ -30,14 +30,14 @@ module ApplicationHelper
# a 'traffic light' colour code # a 'traffic light' colour code
# #
def due_date(due) def due_date(due)
return DueDateHelper::DueDateView.new(due, prefs).due_date_html return DateLabelHelper::DueDateView.new(due, prefs).due_date_html
end end
# Check due date in comparison to today's date Flag up date appropriately with # Check due date in comparison to today's date Flag up date appropriately with
# a 'traffic light' colour code Modified method for mobile screen # a 'traffic light' colour code Modified method for mobile screen
# #
def due_date_mobile(due) def due_date_mobile(due)
return DueDateHelper::DueDateView.new(due, prefs).due_date_mobile_html return DateLabelHelper::DueDateView.new(due, prefs).due_date_mobile_html
end end
# Returns a count of next actions in the given context or project. The result # Returns a count of next actions in the given context or project. The result

View file

@ -1,4 +1,4 @@
module DueDateHelper module DateLabelHelper
class GenericDateView class GenericDateView
include ActionView::Context include ActionView::Context

View file

@ -349,11 +349,8 @@ module TodosHelper
end end
end end
# Check show_from date in comparison to today's date Flag up date
# appropriately with a 'traffic light' colour code
#
def show_date(date) def show_date(date)
return DueDateHelper::ShowFromDateView.new(date, prefs).show_from_date_html return DateLabelHelper::ShowFromDateView.new(date, prefs).show_from_date_html
end end
def date_field_tag(name, id, value = nil, options = {}) def date_field_tag(name, id, value = nil, options = {})