Skip to content

Commit 4aa3cac

Browse files
n194lunnylafriks
authored
Add edit button to wiki sidebar and footer (#16719)
* Add edit button to wiki sidebar and footer * Make edit button transparent Co-authored-by: Lunny Xiao <[email protected]> Co-authored-by: Lauris BH <[email protected]>
1 parent 9f0c8f9 commit 4aa3cac

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

templates/repo/wiki/view.tmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,19 @@
6767
{{if .sidebarPresent}}
6868
<div class="column" style="padding-top: 0;">
6969
<div class="ui segment">
70+
{{if and .CanWriteWiki (not .Repository.IsMirror)}}
71+
<a class="ui right floated muted" href="{{.RepoLink}}/wiki/_Sidebar/_edit" aria-label="{{.i18n.Tr "repo.wiki.edit_page_button"}}">{{svg "octicon-pencil"}}</a>
72+
{{end}}
7073
{{.sidebarContent | Str2html}}
7174
</div>
7275
</div>
7376
{{end}}
7477
</div>
7578
{{if .footerPresent}}
7679
<div class="ui segment">
80+
{{if and .CanWriteWiki (not .Repository.IsMirror)}}
81+
<a class="ui right floated muted" href="{{.RepoLink}}/wiki/_Footer/_edit" aria-label="{{.i18n.Tr "repo.wiki.edit_page_button"}}">{{svg "octicon-pencil"}}</a>
82+
{{end}}
7783
{{.footerContent | Str2html}}
7884
</div>
7985
{{end}}

0 commit comments

Comments
 (0)