diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/issue/view_content/attachments.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/release/list.tmpl | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/templates/repo/issue/view_content/attachments.tmpl b/templates/repo/issue/view_content/attachments.tmpl index e2d7d1b9de..a97f5d85da 100644 --- a/templates/repo/issue/view_content/attachments.tmpl +++ b/templates/repo/issue/view_content/attachments.tmpl @@ -1,9 +1,9 @@ {{range .Attachments}} - <a target="_blank" rel="noopener noreferrer" href="{{AppSubUrl}}/attachments/{{.UUID}}"> + <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}"> {{if FilenameIsImage .Name}} - <img class="ui image" src="{{AppSubUrl}}/attachments/{{.UUID}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'> + <img class="ui image" src="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'> {{else}} <span class="ui image octicon octicon-desktop-download" title='{{$.ctx.i18n.Tr "repo.issues.attachment.download" .Name}}'></span> {{end}} </a> -{{end}}
\ No newline at end of file +{{end}} 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}} |