summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorGusted <gusted@noreply.codeberg.org>2025-01-02 01:59:44 +0100
committerGusted <gusted@noreply.codeberg.org>2025-01-02 01:59:44 +0100
commitda5445ac87163b2ff90db015c7557daddb035702 (patch)
tree7345a4bf49d8d46a2d35fb164053323f5a560ead /templates
parentMerge pull request 'Make new table modal work when editing a issue' (#6431) f... (diff)
parentImprove code (diff)
downloadforgejo-da5445ac87163b2ff90db015c7557daddb035702.tar.xz
forgejo-da5445ac87163b2ff90db015c7557daddb035702.zip
Merge pull request 'Permit to download patch and diff file between tags and branches' (#5385) from mirkoperillo/forgejo:issue-3728 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5385 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/diff/options_dropdown.tmpl3
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/repo/diff/options_dropdown.tmpl b/templates/repo/diff/options_dropdown.tmpl
index 09b7b80e41..97dc3ba940 100644
--- a/templates/repo/diff/options_dropdown.tmpl
+++ b/templates/repo/diff/options_dropdown.tmpl
@@ -11,6 +11,9 @@
{{else if .Commit.ID.String}}
<a class="item" href="{{$.RepoLink}}/commit/{{PathEscape .Commit.ID.String}}.patch" download="{{ShortSha .Commit.ID.String}}.patch">{{ctx.Locale.Tr "repo.diff.download_patch"}}</a>
<a class="item" href="{{$.RepoLink}}/commit/{{PathEscape .Commit.ID.String}}.diff" download="{{ShortSha .Commit.ID.String}}.diff">{{ctx.Locale.Tr "repo.diff.download_diff"}}</a>
+ {{else if .Diff}}
+ <a class="item" href="{{$.RepoLink}}/compare/{{.Comparing}}.patch" download="{{.Comparing}}.patch">{{ctx.Locale.Tr "repo.diff.download_patch"}}</a>
+ <a class="item" href="{{$.RepoLink}}/compare/{{.Comparing}}.diff" download="{{.Comparing}}.diff">{{ctx.Locale.Tr "repo.diff.download_diff"}}</a>
{{end}}
<a id="expand-files-btn" class="item">{{ctx.Locale.Tr "repo.pulls.expand_files"}}</a>
<a id="collapse-files-btn" class="item">{{ctx.Locale.Tr "repo.pulls.collapse_files"}}</a>