All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Stępień" <jstepien@users.sourceforge.net>
To: git@vger.kernel.org
Cc: "Jan Stępień" <jstepien@users.sourceforge.net>
Subject: [PATCH] gitweb: The "Owner" column can be hidden
Date: Wed, 31 Mar 2010 11:06:49 +0200	[thread overview]
Message-ID: <1270026409-29543-1-git-send-email-jstepien@users.sourceforge.net> (raw)

This commit adds $show_owner_column configuration variable which allows
to hide the project list "Owner" column if desired.

Signed-off-by: Jan Stępień <jstepien@users.sourceforge.net>
---
 gitweb/gitweb.perl |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index a2d2283..95f7f06 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -160,6 +160,9 @@ our @diff_opts = ('-M'); # taken from git_commit
 # the gitweb domain.
 our $prevent_xss = 0;
 
+# presense of the projects list "Owner" column
+our $show_owner_column = 1;
+
 # information about snapshot formats that gitweb is capable of serving
 our %known_snapshot_formats = (
 	# name => {
@@ -4430,7 +4433,7 @@ sub git_project_list_body {
 		}
 		print_sort_th('project', $order, 'Project');
 		print_sort_th('descr', $order, 'Description');
-		print_sort_th('owner', $order, 'Owner');
+		print_sort_th('owner', $order, 'Owner') if $show_owner_column;
 		print_sort_th('age', $order, 'Last Change');
 		print "<th></th>\n" . # for links
 		      "</tr>\n";
@@ -4469,8 +4472,8 @@ sub git_project_list_body {
 		                        -class => "list"}, esc_html($pr->{'path'})) . "</td>\n" .
 		      "<td>" . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"summary"),
 		                        -class => "list", -title => $pr->{'descr_long'}},
-		                        esc_html($pr->{'descr'})) . "</td>\n" .
-		      "<td><i>" . chop_and_escape_str($pr->{'owner'}, 15) . "</i></td>\n";
+		                        esc_html($pr->{'descr'})) . "</td>\n";
+		print "<td><i>" . chop_and_escape_str($pr->{'owner'}, 15) .  "</i></td>\n" if $show_owner_column;
 		print "<td class=\"". age_class($pr->{'age'}) . "\">" .
 		      (defined $pr->{'age_string'} ? $pr->{'age_string'} : "No commits") . "</td>\n" .
 		      "<td class=\"link\">" .
-- 
1.7.0.3

             reply	other threads:[~2010-03-31  9:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-31  9:06 Jan Stępień [this message]
2010-03-31  9:48 ` [PATCH] gitweb: The "Owner" column can be hidden Junio C Hamano
2010-03-31 13:32   ` Jan Stępień
2010-03-31 10:28 ` Jakub Narebski
2010-03-31 13:16   ` Jan Stępień
2010-03-31 17:43     ` 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=1270026409-29543-1-git-send-email-jstepien@users.sourceforge.net \
    --to=jstepien@users.sourceforge.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.