From: Michael Hendricks <michael@ndrix.org>
To: git@vger.kernel.org
Cc: Michael Hendricks <michael@ndrix.org>
Subject: [PATCH] gitweb: configurable width for the projects list Description column
Date: Wed, 4 Jul 2007 18:36:48 -0600 [thread overview]
Message-ID: <11835958082458-git-send-email-michael@ndrix.org> (raw)
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>
---
gitweb/gitweb.perl | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index dbfb044..29d058c 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";
@@ -3163,7 +3166,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'} = get_file_owner("$projectroot/$pr->{'path'}") || "";
--
1.5.3.rc0.14.gebe8f
next reply other threads:[~2007-07-05 0:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-05 0:36 Michael Hendricks [this message]
2007-07-11 18:28 ` [PATCH] gitweb: configurable width for the projects list Description column Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11835958082458-git-send-email-michael@ndrix.org \
--to=michael@ndrix.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).