Skip to content

Commit 9d0734a

Browse files
jnarebJunio C Hamano
authored andcommitted
gitweb: Add link to "project_index" view to "project_list" page
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>
1 parent a1565c4 commit 9d0734a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

gitweb/gitweb.perl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1255,6 +1255,13 @@ sub git_header_html {
12551255
printf('<link rel="alternate" title="%s log" '.
12561256
'href="%s" type="application/rss+xml"/>'."\n",
12571257
esc_param($project), href(action=>"rss"));
1258+
} else {
1259+
printf('<link rel="alternate" title="%s projects list" '.
1260+
'href="%s" type="text/plain; charset=utf-8"/>'."\n",
1261+
$site_name, href(project=>undef, action=>"project_index"));
1262+
printf('<link rel="alternate" title="%s projects logs" '.
1263+
'href="%s" type="text/x-opml"/>'."\n",
1264+
$site_name, href(project=>undef, action=>"opml"));
12581265
}
12591266
if (defined $favicon) {
12601267
print qq(<link rel="shortcut icon" href="$favicon" type="image/png"/>\n);
@@ -1309,7 +1316,9 @@ sub git_footer_html {
13091316
-class => "rss_logo"}, "RSS") . "\n";
13101317
} else {
13111318
print $cgi->a({-href => href(project=>undef, action=>"opml"),
1312-
-class => "rss_logo"}, "OPML") . "\n";
1319+
-class => "rss_logo"}, "OPML") . " ";
1320+
print $cgi->a({-href => href(project=>undef, action=>"project_index"),
1321+
-class => "rss_logo"}, "TXT") . "\n";
13131322
}
13141323
print "</div>\n" .
13151324
"</body>\n" .

0 commit comments

Comments
 (0)