Skip to content

Commit

Permalink
gitweb: Add link to "project_index" view to "project_list" page
Browse files Browse the repository at this point in the history
Add link to "project_index" view as [TXT] beside link to "opml" view,
(which is marked by [OPML]) to "project_list" page.

While at it add alternate links for "opml" and "project_list" to HTML
header for "project_list" view.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Jakub Narebski authored and Junio C Hamano committed Sep 16, 2006
1 parent a1565c4 commit 9d0734a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -1255,6 +1255,13 @@ sub git_header_html {
printf('<link rel="alternate" title="%s log" '.
'href="%s" type="application/rss+xml"/>'."\n",
esc_param($project), href(action=>"rss"));
} else {
printf('<link rel="alternate" title="%s projects list" '.
'href="%s" type="text/plain; charset=utf-8"/>'."\n",
$site_name, href(project=>undef, action=>"project_index"));
printf('<link rel="alternate" title="%s projects logs" '.
'href="%s" type="text/x-opml"/>'."\n",
$site_name, href(project=>undef, action=>"opml"));
}
if (defined $favicon) {
print qq(<link rel="shortcut icon" href="$favicon" type="image/png"/>\n);
Expand Down Expand Up @@ -1309,7 +1316,9 @@ sub git_footer_html {
-class => "rss_logo"}, "RSS") . "\n";
} else {
print $cgi->a({-href => href(project=>undef, action=>"opml"),
-class => "rss_logo"}, "OPML") . "\n";
-class => "rss_logo"}, "OPML") . " ";
print $cgi->a({-href => href(project=>undef, action=>"project_index"),
-class => "rss_logo"}, "TXT") . "\n";
}
print "</div>\n" .
"</body>\n" .
Expand Down

0 comments on commit 9d0734a

Please sign in to comment.