From 391a9469d1c9b72f14114a6019a4c19d499ee389 Mon Sep 17 00:00:00 2001
From: Go MAEDA
Date: Wed, 8 May 2019 08:57:31 +0000
Subject: [PATCH] Allow a bigger range for the gantt timeline (#14654).
Patch by Yuichi HARADA.
git-svn-id: http://svn.redmine.org/redmine/trunk@18136 e93f8b46-1217-0410-a6f0-8f06a7374b81
---
app/views/gantts/show.html.erb | 2 +-
app/views/settings/_issues.html.erb | 2 ++
config/locales/en.yml | 1 +
config/settings.yml | 3 +++
lib/redmine/helpers/gantt.rb | 2 +-
5 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb
index 216c10061..476c86025 100644
--- a/app/views/gantts/show.html.erb
+++ b/app/views/gantts/show.html.erb
@@ -61,7 +61,7 @@
- <%= number_field_tag 'months', @gantt.months, :min => 1, :max => 24, :autocomplete => false %>
+ <%= number_field_tag 'months', @gantt.months, :min => 1, :max => Setting.gantt_months_limit.to_i, :autocomplete => false %>
<%= l(:label_months_from) %>
<%= select_month(@gantt.month_from, :prefix => "month", :discard_type => true) %>
<%= select_year(@gantt.year_from, :prefix => "year", :discard_type => true) %>
diff --git a/app/views/settings/_issues.html.erb b/app/views/settings/_issues.html.erb
index 17e8ca99b..b4e50d8e3 100644
--- a/app/views/settings/_issues.html.erb
+++ b/app/views/settings/_issues.html.erb
@@ -22,6 +22,8 @@
<%= setting_text_field :issues_export_limit, :size => 6 %>
<%= setting_text_field :gantt_items_limit, :size => 6 %>
+
+<%= setting_text_field :gantt_months_limit, :size => 6 %>