Commit 6036cf3b authored by edavis10's avatar edavis10
Browse files

Added a setting to configure the day that week start on (Monday or Sunday). (#4363)

git-svn-id: https://svn.redmine.org/redmine/trunk@3166 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 4caeac26
......@@ -659,8 +659,18 @@ module ApplicationHelper
unless @calendar_headers_tags_included
@calendar_headers_tags_included = true
content_for :header_tags do
start_of_week = case Setting.start_of_week.to_i
when 1
'Calendar._FD = 1;' # Monday
when 7
'Calendar._FD = 0;' # Sunday
else
'' # use language
end
javascript_include_tag('calendar/calendar') +
javascript_include_tag("calendar/lang/calendar-#{current_language.to_s.downcase}.js") +
javascript_tag(start_of_week) +
javascript_include_tag('calendar/calendar-setup') +
stylesheet_link_tag('calendar')
end
......
......@@ -7,6 +7,9 @@
<p><label><%= l(:setting_default_language) %></label>
<%= select_tag 'settings[default_language]', options_for_select( lang_options_for_select(false), Setting.default_language) %></p>
<p><label><%= l(:setting_start_of_week) %></label>
<%= select_tag 'settings[start_of_week]', options_for_select( [[l(:label_language_based), ''], [day_name(1),'1'], [day_name(7),'7']] , Setting.start_of_week) %></p>
<p><label><%= l(:setting_date_format) %></label>
<%= select_tag 'settings[date_format]', options_for_select( [[l(:label_language_based), '']] + Setting::DATE_FORMATS.collect {|f| [Date.today.strftime(f), f]}, Setting.date_format) %></p>
......
......@@ -853,3 +853,4 @@ bg:
notice_issue_done_ratios_updated: Issue done ratios updated.
error_workflow_copy_source: Please select a source tracker or role
label_update_issue_done_ratios: Update issue done ratios
setting_start_of_week: Start calendars on
......@@ -877,3 +877,4 @@ bs:
notice_issue_done_ratios_updated: Issue done ratios updated.
error_workflow_copy_source: Please select a source tracker or role
label_update_issue_done_ratios: Update issue done ratios
setting_start_of_week: Start calendars on
......@@ -856,3 +856,4 @@ ca:
notice_issue_done_ratios_updated: Issue done ratios updated.
error_workflow_copy_source: Please select a source tracker or role
label_update_issue_done_ratios: Update issue done ratios
setting_start_of_week: Start calendars on
......@@ -859,3 +859,4 @@ cs:
notice_issue_done_ratios_updated: Issue done ratios updated.
error_workflow_copy_source: Please select a source tracker or role
label_update_issue_done_ratios: Update issue done ratios
setting_start_of_week: Start calendars on
......@@ -879,3 +879,4 @@ da:
notice_issue_done_ratios_updated: Issue done ratios updated.
error_workflow_copy_source: Please select a source tracker or role
label_update_issue_done_ratios: Update issue done ratios
setting_start_of_week: Start calendars on
......@@ -879,3 +879,4 @@ de:
notice_issue_done_ratios_updated: Issue done ratios updated.
error_workflow_copy_source: Please select a source tracker or role
label_update_issue_done_ratios: Update issue done ratios
setting_start_of_week: Start calendars on
......@@ -859,3 +859,4 @@ el:
notice_issue_done_ratios_updated: Issue done ratios updated.
error_workflow_copy_source: Please select a source tracker or role
label_update_issue_done_ratios: Update issue done ratios
setting_start_of_week: Start calendars on
......@@ -322,6 +322,7 @@ en:
setting_issue_done_ratio: Calculate the issue done ratio with
setting_issue_done_ratio_issue_field: Use the issue field
setting_issue_done_ratio_issue_status: Use the issue status
setting_start_of_week: Start calendars on
permission_add_project: Create project
permission_edit_project: Edit project
......
......@@ -900,3 +900,4 @@ es:
notice_issue_done_ratios_updated: Issue done ratios updated.
error_workflow_copy_source: Please select a source tracker or role
label_update_issue_done_ratios: Update issue done ratios
setting_start_of_week: Start calendars on
......@@ -889,3 +889,4 @@ fi:
notice_issue_done_ratios_updated: Issue done ratios updated.
error_workflow_copy_source: Please select a source tracker or role
label_update_issue_done_ratios: Update issue done ratios
setting_start_of_week: Start calendars on
......@@ -882,3 +882,4 @@ fr:
field_active: Actif
enumeration_system_activity: Activité système
setting_gravatar_default: Default Gravatar image
setting_start_of_week: Start calendars on
......@@ -879,3 +879,4 @@ gl:
notice_issue_done_ratios_updated: Issue done ratios updated.
error_workflow_copy_source: Please select a source tracker or role
label_update_issue_done_ratios: Update issue done ratios
setting_start_of_week: Start calendars on
......@@ -863,3 +863,4 @@ he:
notice_issue_done_ratios_updated: Issue done ratios updated.
error_workflow_copy_source: Please select a source tracker or role
label_update_issue_done_ratios: Update issue done ratios
setting_start_of_week: Start calendars on
......@@ -884,3 +884,4 @@
notice_issue_done_ratios_updated: Issue done ratios updated.
error_workflow_copy_source: Please select a source tracker or role
label_update_issue_done_ratios: Update issue done ratios
setting_start_of_week: Start calendars on
......@@ -866,3 +866,4 @@ it:
notice_issue_done_ratios_updated: Issue done ratios updated.
error_workflow_copy_source: Please select a source tracker or role
label_update_issue_done_ratios: Update issue done ratios
setting_start_of_week: Start calendars on
......@@ -888,3 +888,4 @@ ja:
notice_issue_done_ratios_updated: Issue done ratios updated.
error_workflow_copy_source: Please select a source tracker or role
label_update_issue_done_ratios: Update issue done ratios
setting_start_of_week: Start calendars on
......@@ -919,3 +919,4 @@ ko:
notice_issue_done_ratios_updated: Issue done ratios updated.
error_workflow_copy_source: Please select a source tracker or role
label_update_issue_done_ratios: Update issue done ratios
setting_start_of_week: Start calendars on
......@@ -889,3 +889,4 @@ lt:
notice_issue_done_ratios_updated: Issue done ratios updated.
error_workflow_copy_source: Please select a source tracker or role
label_update_issue_done_ratios: Update issue done ratios
setting_start_of_week: Start calendars on
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment