summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a446d6b)
raw | patch | inline | side by side (parent: a446d6b)
author | Jakub Narebski <jnareb@gmail.com> | |
Mon, 14 Aug 2006 00:08:27 +0000 (02:08 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 15 Aug 2006 00:02:42 +0000 (17:02 -0700) |
Separate printing of perhaps shortened title (subject) in
git_shortlog_body and git_tags_body into format_subject_html.
While at it, remove presentation element <b>...</b> used to format
title (subject) and move formatting to CSS.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git_shortlog_body and git_tags_body into format_subject_html.
While at it, remove presentation element <b>...</b> used to format
title (subject) and move formatting to CSS.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.css | patch | blob | history | |
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css
index 47c1ade87edbe4727c088435385dd66ecfe13fec..f58a418fab20d3a274f0e3fd74118c848ae62b89 100644 (file)
--- a/gitweb/gitweb.css
+++ b/gitweb/gitweb.css
a.list {
text-decoration: none;
+ font-weight: bold;
color: #000000;
}
+table.tags a.list {
+ font-weight: normal;
+}
+
a.list:hover {
text-decoration: underline;
color: #880000;
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 0c4ec928943fcaa60d237df8db26bb35a689b0e5..c4d6eab77917249e003b0cb6ad208adaf0734de5 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
}
}
+# format, perhaps shortened and with markers, title line
+sub format_subject_html {
+ my ($long, $short, $query, $extra) = @_;
+ $extra = '' unless defined($extra);
+
+ if (length($short) < length($long)) {
+ return $cgi->a({-href => "$my_uri?" . esc_param($query),
+ -class => "list", -title => $long},
+ esc_html($short) . $extra);
+ } else {
+ return $cgi->a({-href => "$my_uri?" . esc_param($query),
+ -class => "list"},
+ esc_html($long) . $extra);
+ }
+}
+
## ----------------------------------------------------------------------
## git utility subroutines, invoking git commands
print "<td title=\"$co{'age_string_age'}\"><i>$co{'age_string_date'}</i></td>\n" .
"<td><i>" . esc_html(chop_str($co{'author_name'}, 10)) . "</i></td>\n" .
"<td>";
- if (length($co{'title_short'}) < length($co{'title'})) {
- print $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commit;h=$commit"),
- -class => "list", -title => "$co{'title'}"},
- "<b>" . esc_html($co{'title_short'}) . "$ref</b>");
- } else {
- print $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commit;h=$commit"),
- -class => "list"},
- "<b>" . esc_html($co{'title'}) . "$ref</b>");
- }
+ print format_subject_html($co{'title'}, $co{'title_short'}, "p=$project;a=commit;h=$commit", $ref);
print "</td>\n" .
"<td class=\"link\">" .
$cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commit;h=$commit")}, "commit") . " | " .
"</td>\n" .
"<td>";
if (defined $comment) {
- if (length($comment_short) < length($comment)) {
- print $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=tag;h=$tag{'id'}"),
- -class => "list", -title => $comment}, $comment_short);
- } else {
- print $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=tag;h=$tag{'id'}"),
- -class => "list"}, $comment);
- }
+ print format_subject_html($comment, $comment_short, "p=$project;a=tag;h=$tag{'id'}");
}
print "</td>\n" .
"<td class=\"selflink\">";