summaryrefslogtreecommitdiffstats
path: root/app/helpers/calendars_helper.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-01-14 05:16:33 +0000
committerGo MAEDA <maeda@farend.jp>2019-01-14 05:16:33 +0000
commitfdf468cdf7f36efd99af8930d4266a420fbe352b (patch)
treed829e650bd04061519a38c8d7bdac8227f73909e /app/helpers/calendars_helper.rb
parent89f65490b499733aaadb0627c03990b519ca9190 (diff)
downloadredmine-fdf468cdf7f36efd99af8930d4266a420fbe352b.tar.gz
redmine-fdf468cdf7f36efd99af8930d4266a420fbe352b.zip
Move calendar day classes to a helper (#27096).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17797 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/calendars_helper.rb')
-rw-r--r--app/helpers/calendars_helper.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/helpers/calendars_helper.rb b/app/helpers/calendars_helper.rb
index 715667c15..a807ec426 100644
--- a/app/helpers/calendars_helper.rb
+++ b/app/helpers/calendars_helper.rb
@@ -55,4 +55,10 @@ module CalendarsHelper
def link_to_month(link_name, year, month, options={})
link_to(link_name, {:params => request.query_parameters.merge(:year => year, :month => month)}, options)
end
+
+ def calendar_day_css_classes(calendar, day)
+ css = day.month==calendar.month ? 'even' : 'odd'
+ css << " today" if User.current.today == day
+ css
+ end
end