From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
To: git@vger.kernel.org
Cc: Jakub Narebski <jnareb@gmail.com>, Petr Baudis <pasky@ucw.cz>,
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Subject: [PATCH] gitweb: ref markers link to named shortlogs
Date: Sat, 2 Aug 2008 17:39:14 +0200 [thread overview]
Message-ID: <1217691554-10407-1-git-send-email-giuseppe.bilotta@gmail.com> (raw)
This patch turns ref markers for tags and heads into links to
shortlog/refname. Appropriate changes are made in the CSS to prevent ref
markers to be annoyingly blue and underlined.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
---
gitweb/gitweb.css | 5 +++++
gitweb/gitweb.perl | 5 ++++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css
index aa0eeca..2b43eea 100644
--- a/gitweb/gitweb.css
+++ b/gitweb/gitweb.css
@@ -481,6 +481,11 @@ span.refs span {
border-color: #ffccff #ff00ee #ff00ee #ffccff;
}
+span.refs span a {
+ text-decoration: none;
+ color: inherit;
+}
+
span.refs span.ref {
background-color: #aaaaff;
border-color: #ccccff #0033cc #0033cc #ccccff;
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 90cd99b..7f391fa 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1093,6 +1093,7 @@ sub format_log_line_html {
sub format_ref_marker {
my ($refs, $id) = @_;
my $markers = '';
+ my $htmltext;
if (defined $refs->{$id}) {
foreach my $ref (@{$refs->{$id}}) {
@@ -1101,13 +1102,15 @@ sub format_ref_marker {
if ($ref =~ m!^(.*?)s?/(.*)$!) {
$type = $1;
$name = $2;
+ $htmltext = $cgi->a({-href => href(action=>"shortlog", hash=>$name)}, $name);
} else {
$type = "ref";
$name = $ref;
+ $htmltext = esc_html($name);
}
$markers .= " <span class=\"$type\" title=\"$ref\">" .
- esc_html($name) . "</span>";
+ $htmltext . "</span>";
}
}
--
1.5.6.3
next reply other threads:[~2008-08-02 15:40 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-02 15:39 Giuseppe Bilotta [this message]
2008-08-03 12:03 ` [PATCH] gitweb: ref markers link to named shortlogs Petr Baudis
2008-08-03 13:14 ` Giuseppe Bilotta
2008-08-03 13:20 ` Petr Baudis
2008-08-03 20:48 ` [PATCHv2] " Giuseppe Bilotta
-- strict thread matches above, loose matches on Subject: below --
2008-08-21 18:04 [PATCH] " Giuseppe Bilotta
2008-08-21 21:32 ` Jakub Narebski
2008-08-22 7:21 ` Giuseppe Bilotta
2008-08-22 8:49 ` Jakub Narebski
[not found] ` <cb7bb73a0808220231w37d2341eic56cabb595399f68@mail.gmail.com>
2008-08-22 10:56 ` Jakub Narebski
2008-08-22 12:34 ` Giuseppe Bilotta
2008-08-24 19:30 ` Lea Wiemann
2008-08-24 19:41 ` Giuseppe Bilotta
2008-08-24 20:37 ` Jakub Narebski
2008-08-25 23:28 ` Giuseppe Bilotta
2008-08-26 8:15 ` Jakub Narebski
2008-08-26 10:58 ` Giuseppe Bilotta
2008-08-26 11:49 ` Jakub Narebski
2008-08-26 12:29 ` Giuseppe Bilotta
2008-08-27 18:36 ` Giuseppe Bilotta
2008-08-28 1:43 ` Lea Wiemann
2008-08-28 6:26 ` Giuseppe Bilotta
2008-08-28 6:48 ` 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=1217691554-10407-1-git-send-email-giuseppe.bilotta@gmail.com \
--to=giuseppe.bilotta@gmail.com \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=pasky@ucw.cz \
/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).