diff options
author | gdeverlant <e.bekrek@yandex.com> | 2019-01-06 23:37:30 +0100 |
---|---|---|
committer | techknowlogick <hello@techknowlogick.com> | 2019-01-06 17:37:30 -0500 |
commit | d3dc07f282936849897f861346777b47c8c388d3 (patch) | |
tree | 2da810fc1d6671bf8659f9bf868e184698f0fc7c /templates/repo | |
parent | dd006db5a719b33aef7887faab48718e4b0f2786 (diff) | |
download | gitea-d3dc07f282936849897f861346777b47c8c388d3.tar.gz gitea-d3dc07f282936849897f861346777b47c8c388d3.zip |
Added URL mapping for Release attachments like on github.com (#1707)
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/release/list.tmpl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index 7ee58c6b10..9df2f6cb81 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -14,7 +14,7 @@ {{end}} </h2> <ul id="release-list"> - {{range .Releases}} + {{range $release := .Releases}} <li class="ui grid"> <div class="ui four wide column meta"> {{if .IsTag}} @@ -75,14 +75,14 @@ </li> {{end}} {{if .Attachments}} - {{range .Attachments}} - <li> - <a target="_blank" rel="noopener noreferrer" href="{{AppSubUrl}}/attachments/{{.UUID}}"> - <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}} + {{range $attachment := .Attachments}} + <li> + <a target="_blank" rel="noopener noreferrer" href="{{$.RepoLink}}/releases/download/{{$release.TagName}}/{{$attachment.Name}}"> + <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> + </li> + {{end}} {{end}} </ul> </div> |