Browse Source

fix issue #497

pull/729/head
zhoupzh 3 years ago
parent
commit
c1be811954
1 changed files with 15 additions and 0 deletions
  1. +15
    -0
      templates/repo/view_file.tmpl

+ 15
- 0
templates/repo/view_file.tmpl View File

@@ -34,6 +34,21 @@
</div>
{{end}}
</div>

{{if .ReadmeInList}}
<div class="file-header-right">
<div class="ui right file-actions">
{{if .Repository.CanEnableEditor}}
{{if .CanEditFile}}
<a href="{{.RepoLink}}/_edit/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><span class="btn-octicon poping up" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil" 16}}</span></a>
{{else}}
<span class="btn-octicon poping up disabled" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted">{{svg "octicon-pencil" 16}}</span>
{{end}}
{{end}}
</div>
</div>
{{end}}
{{if not .ReadmeInList}}
<div class="file-header-right">
<div class="ui right file-actions">


Loading…
Cancel
Save