summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-01-14 05:19:31 +0000
committerGo MAEDA <maeda@farend.jp>2019-01-14 05:19:31 +0000
commitc9f460bb7dee4afd7d71f0c4535bb5dec650c9e6 (patch)
treeacb0c580d58adc1b6f856bdb8df50713c6a49285 /app/helpers
parentfdf468cdf7f36efd99af8930d4266a420fbe352b (diff)
downloadredmine-c9f460bb7dee4afd7d71f0c4535bb5dec650c9e6.tar.gz
redmine-c9f460bb7dee4afd7d71f0c4535bb5dec650c9e6.zip
Add "nwday" class to non-working days in calendar (#27096).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17798 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/calendars_helper.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/helpers/calendars_helper.rb b/app/helpers/calendars_helper.rb
index a807ec426..fe3796c7f 100644
--- a/app/helpers/calendars_helper.rb
+++ b/app/helpers/calendars_helper.rb
@@ -18,6 +18,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
module CalendarsHelper
+ include Redmine::Utils::DateCalculation
+
def link_to_previous_month(year, month, options={})
target_year, target_month = if month == 1
[year - 1, 12]
@@ -59,6 +61,7 @@ module CalendarsHelper
def calendar_day_css_classes(calendar, day)
css = day.month==calendar.month ? 'even' : 'odd'
css << " today" if User.current.today == day
+ css << " nwday" if non_working_week_days.include?(day.cwday)
css
end
end