Skip to content

Commit

Permalink
Add edit button to wiki sidebar and footer (#16719)
Browse files Browse the repository at this point in the history
* Add edit button to wiki sidebar and footer

* Make edit button transparent

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
  • Loading branch information
3 people committed Aug 18, 2021
1 parent 9f0c8f9 commit 4aa3cac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions templates/repo/wiki/view.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,19 @@
{{if .sidebarPresent}}
<div class="column" style="padding-top: 0;">
<div class="ui segment">
{{if and .CanWriteWiki (not .Repository.IsMirror)}}
<a class="ui right floated muted" href="{{.RepoLink}}/wiki/_Sidebar/_edit" aria-label="{{.i18n.Tr "repo.wiki.edit_page_button"}}">{{svg "octicon-pencil"}}</a>
{{end}}
{{.sidebarContent | Str2html}}
</div>
</div>
{{end}}
</div>
{{if .footerPresent}}
<div class="ui segment">
{{if and .CanWriteWiki (not .Repository.IsMirror)}}
<a class="ui right floated muted" href="{{.RepoLink}}/wiki/_Footer/_edit" aria-label="{{.i18n.Tr "repo.wiki.edit_page_button"}}">{{svg "octicon-pencil"}}</a>
{{end}}
{{.footerContent | Str2html}}
</div>
{{end}}
Expand Down

0 comments on commit 4aa3cac

Please sign in to comment.