diff options
author | 6543 <6543@obermui.de> | 2019-12-29 00:33:13 +0100 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-12-28 23:33:13 +0000 |
commit | 261c3a56a20659a11017ba03e627bf4c789c6899 (patch) | |
tree | 074fd8bb258b07f124a16bd02938508fdfd42c5e /templates/repo/release/list.tmpl | |
parent | 599c0ee75ffea3ad5f0049ac7d275081370eb149 (diff) | |
download | gitea-261c3a56a20659a11017ba03e627bf4c789c6899.tar.gz gitea-261c3a56a20659a11017ba03e627bf4c789c6899.zip |
[Fix] Release attachment should use DownloadURL() not Name (#9529)
* Handle if two or more attachments have the same name
* previously only the first could be downloaded - now each is downloadable
* dos also take care of #6506 (fix was: #6512)
* use func DownloadURL() at issue attatchments too
Diffstat (limited to 'templates/repo/release/list.tmpl')
-rw-r--r-- | templates/repo/release/list.tmpl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index 777d3a2b05..90a45b9b67 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -82,11 +82,11 @@ </li> {{end}} {{if .Attachments}} - {{range $attachment := .Attachments}} + {{range .Attachments}} <li> - <a target="_blank" rel="noopener noreferrer" href="{{$.RepoLink}}/releases/download/{{$release.TagName | PathEscape}}/{{$attachment.Name | PathEscape}}"> - <strong><span class="ui image octicon octicon-package" title='{{$attachment.Name}}'></span> {{$attachment.Name}}</strong> - <span class="ui text grey right">{{$attachment.Size | FileSize}}</span> + <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}"> + <strong><span class="ui image octicon octicon-package" title='{{.Name}}'></span> {{.Name}}</strong> + <span class="ui text grey right">{{.Size | FileSize}}</span> </a> </li> {{end}} |