summaryrefslogtreecommitdiffstats
path: root/templates/repo/wiki/view.tmpl
diff options
context:
space:
mode:
authorn <67550725+n194@users.noreply.github.com>2021-08-19 03:14:08 +0900
committerGitHub <noreply@github.com>2021-08-18 14:14:08 -0400
commit4aa3cacc4f5a8041d6a1857293f54cc68f550845 (patch)
tree962193bc2640687159f42e8636c0a2b2e67efde5 /templates/repo/wiki/view.tmpl
parent9f0c8f90af671018116450100f0d3a61cfc69e7a (diff)
downloadgitea-4aa3cacc4f5a8041d6a1857293f54cc68f550845.tar.gz
gitea-4aa3cacc4f5a8041d6a1857293f54cc68f550845.zip
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 <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'templates/repo/wiki/view.tmpl')
-rw-r--r--templates/repo/wiki/view.tmpl6
1 files changed, 6 insertions, 0 deletions
diff --git a/templates/repo/wiki/view.tmpl b/templates/repo/wiki/view.tmpl
index fbb97db4ad..a393fb20a1 100644
--- a/templates/repo/wiki/view.tmpl
+++ b/templates/repo/wiki/view.tmpl
@@ -67,6 +67,9 @@
{{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>
@@ -74,6 +77,9 @@
</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}}