[PATCHv5 06/12] gitweb: allow extra text after action in page header
- From
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
- Date
- Sep 24, 2010, 16:02 UTC
- Message-ID
- <1285344167-8518-7-git-send-email-giuseppe.bilotta@gmail.com>
- In-Reply-To
- <1285344167-8518-1-git-send-email-giuseppe.bilotta@gmail.com>
This extra text is intended to 'specify' the action. Therefore, if it's present, the action name in the header will be turned into a link to the action itself but without specifying any parameter.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> --- gitweb/gitweb.perl | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index e70897e..76cf806 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -3514,7 +3514,15 @@ EOF if (defined $project) { print $cgi->a({-href => href(action=>"summary")}, esc_html($project)); if (defined $action) { - print " / $action"; + my $action_print = $action ; + if (defined $opts{'header_extra'}) { + $action_print = $cgi->a({-href => href(action=>$action)}, + esc_html($action)); + } + print " / $action_print"; + } + if (defined $opts{'header_extra'}) { + print " / $opts{'header_extra'}"; } print "\n"; }
-- 1.7.3.68.g6ec8