summaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/issue/comment_tab.tmpl2
-rw-r--r--templates/repo/release/list.tmpl9
-rw-r--r--templates/repo/release/new.tmpl4
3 files changed, 14 insertions, 1 deletions
diff --git a/templates/repo/issue/comment_tab.tmpl b/templates/repo/issue/comment_tab.tmpl
index b009060cd1..3af3d8a041 100644
--- a/templates/repo/issue/comment_tab.tmpl
+++ b/templates/repo/issue/comment_tab.tmpl
@@ -13,5 +13,5 @@
</div>
{{if .IsAttachmentEnabled}}
<div class="files"></div>
- <div class="ui basic button dropzone" id="dropzone" data-upload-url="{{AppSubUrl}}/issues/attachments" data-accepts="{{.AttachmentAllowedTypes}}" data-max-file="{{.AttachmentMaxFiles}}" data-max-size="{{.AttachmentMaxSize}}" data-default-message="{{.i18n.Tr "dropzone.default_message"}}" data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}" data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}" data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}"></div>
+ <div class="ui basic button dropzone" id="dropzone" data-upload-url="{{AppSubUrl}}/attachments" data-accepts="{{.AttachmentAllowedTypes}}" data-max-file="{{.AttachmentMaxFiles}}" data-max-size="{{.AttachmentMaxSize}}" data-default-message="{{.i18n.Tr "dropzone.default_message"}}" data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}" data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}" data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}"></div>
{{end}}
diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl
index 4879e04811..c18bc4884d 100644
--- a/templates/repo/release/list.tmpl
+++ b/templates/repo/release/list.tmpl
@@ -59,6 +59,15 @@
<li>
<a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</a>
</li>
+ {{if .Attachments}}
+ {{range .Attachments}}
+ <li>
+ <a target="_blank" rel="noopener" href="{{AppSubUrl}}/attachments/{{.UUID}}">
+ <span class="ui image octicon octicon-desktop-download" title='{{.Name}}'></span> {{.Name}}
+ </a>
+ </li>
+ {{end}}
+ {{end}}
</ul>
</div>
{{else}}
diff --git a/templates/repo/release/new.tmpl b/templates/repo/release/new.tmpl
index 3a9e6fadd8..5f82cf2f52 100644
--- a/templates/repo/release/new.tmpl
+++ b/templates/repo/release/new.tmpl
@@ -48,6 +48,10 @@
<label>{{.i18n.Tr "repo.release.content"}}</label>
<textarea name="content">{{.content}}</textarea>
</div>
+ {{if .IsAttachmentEnabled}}
+ <div class="files"></div>
+ <div class="ui basic button dropzone" id="dropzone" data-upload-url="{{AppSubUrl}}/attachments" data-accepts="{{.AttachmentAllowedTypes}}" data-max-file="{{.AttachmentMaxFiles}}" data-max-size="{{.AttachmentMaxSize}}" data-default-message="{{.i18n.Tr "dropzone.default_message"}}" data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}" data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}" data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}"></div>
+ {{end}}
</div>
<div class="ui container">
<div class="ui divider"></div>