]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: configurable width for the projects list Description column
authorMichael Hendricks <redacted>
Thu, 5 Jul 2007 00:36:48 +0000 (18:36 -0600)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:11 +0000 (00:07 -0400)
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 <redacted>
Acked-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index d18bf5d621575a8692749d52df47c4b81d321742f59c118c570d2f07d5615583..1a330835fb9a658982cf41ea82abbdb9dc18c9ffb2fb4cb56af61d69982ab98a 100755 (executable)
@@ -72,6 +72,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";
@@ -3183,7 +3186,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'}") || "";
This page took 0.24332 seconds and 4 git commands to generate.