summaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorgdeverlant <e.bekrek@yandex.com>2019-01-06 23:37:30 +0100
committertechknowlogick <hello@techknowlogick.com>2019-01-06 17:37:30 -0500
commitd3dc07f282936849897f861346777b47c8c388d3 (patch)
tree2da810fc1d6671bf8659f9bf868e184698f0fc7c /templates/repo
parentdd006db5a719b33aef7887faab48718e4b0f2786 (diff)
downloadgitea-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.tmpl18
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>