diff options
author | jladbrook <jhladbrook@gmail.com> | 2023-04-25 15:08:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-25 22:08:29 +0800 |
commit | 56d4893b2a996da6388801c9c8ff16b9b588ad55 (patch) | |
tree | a9d18045562cb8c6f370cc07c6ba57e6cbe93afb /templates/repo/branch | |
parent | f16b66898091b3f375cbd3e2796fd87d9c5ca10b (diff) | |
download | gitea-56d4893b2a996da6388801c9c8ff16b9b588ad55.tar.gz gitea-56d4893b2a996da6388801c9c8ff16b9b588ad55.zip |
Add RSS Feeds for branches and files (#22719)
Fix #22228 adding RSS feeds for branches and files.
RSS feeds are accessed through:
* [gitea]/src/branch/{branch}.rss
* [gitea]/src/branch/{branch}/{file_name}.rss
No changes have been made to the UI to expose the feed urls for branches
and files.
Diffstat (limited to 'templates/repo/branch')
-rw-r--r-- | templates/repo/branch/list.tmpl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index b027c175a4..596d9ae78b 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -26,6 +26,11 @@ {{svg "octicon-git-branch"}} </button> {{end}} + {{if .EnableFeed}} + <a role="button" class="ui basic button icon" href="{{$.FeedURL}}/rss/branch/{{PathEscapeSegments .DefaultBranch}}"> + {{svg "octicon-rss"}} + </a> + {{end}} {{if not $.DisableDownloadSourceArchives}} <button class="ui basic jump dropdown icon button" data-tooltip-content="{{$.locale.Tr "repo.branch.download" ($.DefaultBranch)}}"> {{svg "octicon-download"}} @@ -113,6 +118,11 @@ {{svg "octicon-git-branch"}} </button> {{end}} + {{if $.EnableFeed}} + <a role="button" class="ui basic button icon" href="{{$.FeedURL}}/rss/branch/{{PathEscapeSegments .Name}}"> + {{svg "octicon-rss"}} + </a> + {{end}} {{if and (not .IsDeleted) (not $.DisableDownloadSourceArchives)}} <button class="ui basic jump dropdown icon button" data-tooltip-content="{{$.locale.Tr "repo.branch.download" (.Name)}}"> {{svg "octicon-download"}} |