diff options
author | Michael Hendricks <michael@ndrix.org> | 2007-07-04 18:36:48 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-07-11 12:58:32 -0700 |
commit | 55feb1200f0e1a7f6cb8670de0dee97f09d8cb9f (patch) | |
tree | dc7b4768b053ada45ecb785f6203dc9f661b0e97 /gitweb | |
parent | baa79ca42d0ba5e93e4bb021706ec9a65cca6dda (diff) | |
download | git-55feb1200f0e1a7f6cb8670de0dee97f09d8cb9f.tar.gz git-55feb1200f0e1a7f6cb8670de0dee97f09d8cb9f.tar.xz |
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>
Diffstat (limited to 'gitweb')
-rwxr-xr-x | gitweb/gitweb.perl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index dc609f4f8..27580b567 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -71,6 +71,9 @@ our $logo_label = "git homepage"; # source of projects list our $projects_list = "++GITWEB_LIST++"; +# the width (in characters) of the projects list "Description" column +our $projects_list_description_width = 25; + # default order of projects list # valid values are none, project, descr, owner, and age our $default_projects_order = "project"; @@ -3182,7 +3185,7 @@ sub git_project_list_body { if (!defined $pr->{'descr'}) { my $descr = git_get_project_description($pr->{'path'}) || ""; $pr->{'descr_long'} = to_utf8($descr); - $pr->{'descr'} = chop_str($descr, 25, 5); + $pr->{'descr'} = chop_str($descr, $projects_list_description_width, 5); } if (!defined $pr->{'owner'}) { $pr->{'owner'} = git_get_project_owner("$pr->{'path'}") || ""; |