diff options
author | Unknwon <u@gogs.io> | 2015-08-11 17:54:00 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-11 17:54:00 +0800 |
commit | 89c2bd4a0dd85261f72565ba8395644da8129fea (patch) | |
tree | cbd75644b3a7d83df8353fd93538564b8afa16fd /templates | |
parent | 17f3e840ec7e7dbff5d3d6e6da4e8347844f6817 (diff) | |
download | gitea-89c2bd4a0dd85261f72565ba8395644da8129fea.tar.gz gitea-89c2bd4a0dd85261f72565ba8395644da8129fea.zip |
finish create issue attachment UI
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base/head.tmpl | 9 | ||||
-rw-r--r-- | templates/repo/issue/new_form.tmpl | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 2c41782681..3fce362dc5 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -31,13 +31,18 @@ <script src="{{AppSubUrl}}/js/gogs.js?v={{AppVer}}"></script> <!-- Third-party libraries --> - {{if .PageIsLabels}} + {{if .RequireMinicolors}} <link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.minicolors.css?v={{AppVer}}"> <script src="{{AppSubUrl}}/js/libs/jquery.minicolors.min.js?v={{AppVer}}"></script> - {{else if .PageIsMilestones}} + {{end}} + {{if .RequireDatetimepicker}} <link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.datetimepicker.css?v={{AppVer}}"> <script src="{{AppSubUrl}}/js/libs/jquery.datetimepicker.js?v={{AppVer}}"></script> {{end}} + {{if .RequireDropzone}} + <link rel="stylesheet" href="{{AppSubUrl}}/css/dropzone.css?v={{AppVer}}"> + <script src="{{AppSubUrl}}/js/libs/dropzone.js?v={{AppVer}}"></script> + {{end}} <title>{{if .Title}}{{.Title}} - {{end}}{{AppName}}</title> </head> diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl index 2d7a3edee8..1818e330ff 100644 --- a/templates/repo/issue/new_form.tmpl +++ b/templates/repo/issue/new_form.tmpl @@ -27,6 +27,9 @@ {{.i18n.Tr "repo.release.loading"}} </div> </div> + {{if .IsAttachmentEnabled}} + <div class="ui basic button dropzone" id="dropzone" data-upload-url="/attachments" data-accepts="{{.AttachmentAllowedTypes}}" data-max-size="1" 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 class="text right"> <button class="ui green button"> {{.i18n.Tr "repo.issues.create"}} |