Merge branch 'upstream_master'
[catagits/Gitalist.git] / root / inc / footer_feeds.tt2
1   [% IF Repository %]
2     [%-
3       has_branch = c.req.param('h').match('^(refs/heads/.*)') || c.req.param('hb').match('^(refs/heads/.*)');
4       branch     = has_branch.0 || '';
5       feed_title = 'log';
6       feed_fn    = c.req.param('f');
7       IF feed_fn;
8         title = 'history of ' _ c.req.param('filename');
9         title = title _ (branch ? ' on ' _ branch : '');
10       ELSE;
11         title = title _ (branch ? ' of ' _ branch : '');
12       END;
13
14       feed_args = { h = branch || c.req.param('h') || c.req.param('hb') || 'HEAD' };
15       IF feed_fn; feed_args.f = feed_fn; END;
16     -%]
17     <a
18       class="rss_logo"
19       title="[% feed_title %]"
20       href="[% c.uri_for_action('/repository/rss', [Repository.name]) %]">RSS</a>
21     <a
22       class="rss_logo"
23       title="[% feed_title %]"
24       href="[% c.uri_for_action('/repository/atom', [Repository.name]) %]">Atom</a>
25   [% ELSE %]
26     <a
27       class="rss_logo"
28       href="[% c.uri_for_action('/opml/opml') %]">OPML</a>
29     <a
30       class="rss_logo"
31       href="[% c.uri_for('/repository_index') %]">TXT</a>
32   [% END %]