@matheusbsbs / matheus-bagliano / commits / 55feb1200f
Fork 0

gitweb: configurable width for the projects list Description column

This allows gitweb users to set $projects_list_description_width in their gitweb.conf to determine how many characters of a project description are displayed before being truncated with an ellipsis. Signed-off-by: Michael Hendricks <michael@ndrix.org> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael Hendricks committed Jul 4, 2007 at 18:36 UTC 55feb1200f0e1a7f6cb8670de0dee97f09d8cb9f
1 file changed +4 -1
gitweb/gitweb.perl
+4 -1
@@ -71,6 +71,9 @@ our $logo_label = "git homepage";
71 # source of projects list
72 our $projects_list = "++GITWEB_LIST++";
73
74 +# the width (in characters) of the projects list "Description" column
75 +our $projects_list_description_width = 25;
76 +
77 # default order of projects list
78 # valid values are none, project, descr, owner, and age
79 our $default_projects_order = "project";
@@ -3182,7 +3185,7 @@ sub git_project_list_body {
3185 if (!defined $pr->{'descr'}) {
3186 my $descr = git_get_project_description($pr->{'path'}) || "";
3187 $pr->{'descr_long'} = to_utf8($descr);
3185 - $pr->{'descr'} = chop_str($descr, 25, 5);
3188 + $pr->{'descr'} = chop_str($descr, $projects_list_description_width, 5);
3189 }
3190 if (!defined $pr->{'owner'}) {
3191 $pr->{'owner'} = git_get_project_owner("$pr->{'path'}") || "";