Patch by Yuichi HARADA. git-svn-id: http://svn.redmine.org/redmine/trunk@18136 e93f8b46-1217-0410-a6f0-8f06a7374b81tags/4.1.0
</p> | </p> | ||||
<p class="buttons"> | <p class="buttons"> | ||||
<%= 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) %> | <%= l(:label_months_from) %> | ||||
<%= select_month(@gantt.month_from, :prefix => "month", :discard_type => true) %> | <%= select_month(@gantt.month_from, :prefix => "month", :discard_type => true) %> | ||||
<%= select_year(@gantt.year_from, :prefix => "year", :discard_type => true) %> | <%= select_year(@gantt.year_from, :prefix => "year", :discard_type => true) %> |
<p><%= setting_text_field :issues_export_limit, :size => 6 %></p> | <p><%= setting_text_field :issues_export_limit, :size => 6 %></p> | ||||
<p><%= setting_text_field :gantt_items_limit, :size => 6 %></p> | <p><%= setting_text_field :gantt_items_limit, :size => 6 %></p> | ||||
<p><%= setting_text_field :gantt_months_limit, :size => 6 %></p> | |||||
</div> | </div> | ||||
<fieldset class="box"> | <fieldset class="box"> |
setting_commit_logtime_enabled: Enable time logging | setting_commit_logtime_enabled: Enable time logging | ||||
setting_commit_logtime_activity_id: Activity for logged time | setting_commit_logtime_activity_id: Activity for logged time | ||||
setting_gantt_items_limit: Maximum number of items displayed on the gantt chart | setting_gantt_items_limit: Maximum number of items displayed on the gantt chart | ||||
setting_gantt_months_limit: Maximum number of months displayed on the gantt chart | |||||
setting_issue_group_assignment: Allow issue assignment to groups | setting_issue_group_assignment: Allow issue assignment to groups | ||||
setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | ||||
setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed | setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed |
gantt_items_limit: | gantt_items_limit: | ||||
format: int | format: int | ||||
default: 500 | default: 500 | ||||
gantt_months_limit: | |||||
format: int | |||||
default: 24 | |||||
# Maximum size of files that can be displayed | # Maximum size of files that can be displayed | ||||
# inline through the file viewer (in KB) | # inline through the file viewer (in KB) | ||||
file_max_size_displayed: | file_max_size_displayed: |
zoom = (options[:zoom] || User.current.pref[:gantt_zoom]).to_i | zoom = (options[:zoom] || User.current.pref[:gantt_zoom]).to_i | ||||
@zoom = (zoom > 0 && zoom < 5) ? zoom : 2 | @zoom = (zoom > 0 && zoom < 5) ? zoom : 2 | ||||
months = (options[:months] || User.current.pref[:gantt_months]).to_i | months = (options[:months] || User.current.pref[:gantt_months]).to_i | ||||
@months = (months > 0 && months < 25) ? months : 6 | |||||
@months = (months > 0 && months < Setting.gantt_months_limit.to_i + 1) ? months : 6 | |||||
# Save gantt parameters as user preference (zoom and months count) | # Save gantt parameters as user preference (zoom and months count) | ||||
if (User.current.logged? && (@zoom != User.current.pref[:gantt_zoom] || | if (User.current.logged? && (@zoom != User.current.pref[:gantt_zoom] || | ||||
@months != User.current.pref[:gantt_months])) | @months != User.current.pref[:gantt_months])) |