diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-12-07 15:21:40 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-12-07 15:21:40 +0000 |
commit | fec86a9ce100dec444872993c792fa99cc489b96 (patch) | |
tree | c0455d3f83558cdea85dd621a20c6f6910d4d7f0 /app | |
parent | 02acc7fc28dc868757ccb48b224b8bee3429bff7 (diff) | |
download | redmine-fec86a9ce100dec444872993c792fa99cc489b96.tar.gz redmine-fec86a9ce100dec444872993c792fa99cc489b96.zip |
Adds a setting to limit the number of diff lines that should be displayed (default to 1500).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2112 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/views/common/_diff.rhtml | 5 | ||||
-rw-r--r-- | app/views/settings/_general.rhtml | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/app/views/common/_diff.rhtml b/app/views/common/_diff.rhtml index 07bd4745f..104845b4d 100644 --- a/app/views/common/_diff.rhtml +++ b/app/views/common/_diff.rhtml @@ -1,4 +1,5 @@ -<% Redmine::UnifiedDiff.new(diff, :type => diff_type).each do |table_file| -%> +<% diff = Redmine::UnifiedDiff.new(diff, :type => diff_type, :max_lines => Setting.diff_max_lines_displayed.to_i) -%> +<% diff.each do |table_file| -%> <div class="autoscroll"> <% if diff_type == 'sbs' -%> <table class="filecontent CodeRay"> @@ -62,3 +63,5 @@ </div> <% end -%> + +<%= l(:text_diff_truncated) if diff.truncated? %> diff --git a/app/views/settings/_general.rhtml b/app/views/settings/_general.rhtml index 06db77b22..9889702a2 100644 --- a/app/views/settings/_general.rhtml +++ b/app/views/settings/_general.rhtml @@ -48,6 +48,9 @@ <p><label><%= l(:setting_feeds_limit) %></label> <%= text_field_tag 'settings[feeds_limit]', Setting.feeds_limit, :size => 6 %></p> +<p><label><%= l(:setting_diff_max_lines_displayed) %></label> +<%= text_field_tag 'settings[diff_max_lines_displayed]', Setting.diff_max_lines_displayed, :size => 6 %></p> + <p><label><%= l(:setting_gravatar_enabled) %></label> <%= check_box_tag 'settings[gravatar_enabled]', 1, Setting.gravatar_enabled? %><%= hidden_field_tag 'settings[gravatar_enabled]', 0 %></p> </div> |