summaryrefslogtreecommitdiffstats
path: root/templates/repo/view_file.tmpl
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-28 01:41:44 -0700
committerUnknwon <u@gogs.io>2016-08-28 01:41:44 -0700
commit0114fdcba40270731d59fe24e8fa6c6147d69e01 (patch)
tree3cd62e41ad1ed6172e2ba1c16a5e06df39be147d /templates/repo/view_file.tmpl
parentdad5c155202a79514e60e73ac019191218167d35 (diff)
downloadgitea-0114fdcba40270731d59fe24e8fa6c6147d69e01.tar.gz
gitea-0114fdcba40270731d59fe24e8fa6c6147d69e01.zip
Web editor: improve delete file process
Diffstat (limited to 'templates/repo/view_file.tmpl')
-rw-r--r--templates/repo/view_file.tmpl12
1 files changed, 4 insertions, 8 deletions
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl
index 3d85ad5492..5e1faf36ec 100644
--- a/templates/repo/view_file.tmpl
+++ b/templates/repo/view_file.tmpl
@@ -21,18 +21,14 @@
<a class="ui button" href="{{EscapePound .FileLink}}">{{.i18n.Tr "repo.file_raw"}}</a>
</div>
{{if .CanEditFile}}
- <a href="{{.RepoLink}}/_edit/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><i class="poping up octicon octicon-pencil btn-octicon" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i></a>
+ <a href="{{.RepoLink}}/_edit/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><i class="octicon octicon-pencil btn-octicon poping up" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i></a>
{{else}}
- <i class="octicon btn-octicon octicon-pencil poping up disabled" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i>
+ <i class="octicon octicon-pencil btn-octicon poping up disabled" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i>
{{end}}
{{if .CanDeleteFile}}
- <form id="delete-file-form" class="ui form inline-form" action="{{.RepoLink}}/_delete/{{EscapePound .BranchName}}/{{.TreePath}}" method="post">
- {{.CsrfTokenHtml}}
- <button onclick="submitDeleteForm()" class="octicon octicon-trashcan btn-octicon btn-octicon-danger poping up" type="button" data-content="{{.FileDeleteLinkTooltip}}" data-position="bottom center" data-variation="tiny inverted"></button>
- <input type="hidden" id="delete-message" name="commit_message" value="">
- </form>
+ <a href="{{.RepoLink}}/_delete/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><i class="octicon octicon-trashcan btn-octicon btn-octicon-danger poping up" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i></a>
{{else}}
- <i class="octicon btn-octicon octicon-trashcan poping up disabled" data-content="{{.FileDeleteLinkTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i>
+ <i class="octicon octicon-trashcan btn-octicon poping up disabled" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i>
{{end}}
</div>
{{end}}