提交 55feb120 编写于 作者: M Michael Hendricks 提交者: Junio C Hamano

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: NMichael Hendricks <michael@ndrix.org>
Acked-by: NJakub Narebski <jnareb@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 baa79ca4
......@@ -71,6 +71,9 @@ BEGIN
# 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'}") || "";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册