summaryrefslogtreecommitdiffstats
path: root/templates/repo/wiki/view.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/wiki/view.tmpl')
-rw-r--r--templates/repo/wiki/view.tmpl25
1 files changed, 16 insertions, 9 deletions
diff --git a/templates/repo/wiki/view.tmpl b/templates/repo/wiki/view.tmpl
index b71c950e17..db0ce14878 100644
--- a/templates/repo/wiki/view.tmpl
+++ b/templates/repo/wiki/view.tmpl
@@ -45,6 +45,10 @@
</div>
</div>
<div class="eight wide right aligned column">
+ {{if .EscapeStatus.Escaped}}
+ <a class="ui small button unescape-button" style="display: none;">{{.i18n.Tr "repo.unescape_control_characters"}}</a>
+ <a class="ui small button escape-button">{{.i18n.Tr "repo.escape_control_characters"}}</a>
+ {{end}}
{{if and .CanWriteWiki (not .Repository.IsMirror)}}
<div class="ui right">
<a class="ui small button" href="{{.RepoLink}}/wiki/{{.PageURL}}?action=_edit">{{.i18n.Tr "repo.wiki.edit_page_button"}}</a>
@@ -61,26 +65,29 @@
</div>
{{end}}
<div class="ui {{if .sidebarPresent}}grid equal width{{end}}" style="margin-top: 1rem;">
- <div class="ui {{if .sidebarPresent}}eleven wide column{{end}} segment markup">
- {{.content | Str2html}}
+ <div class="ui {{if .sidebarPresent}}eleven wide column{{end}} segment markup wiki-content-main">
+ {{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
+ {{.content | Safe}}
</div>
{{if .sidebarPresent}}
<div class="column" style="padding-top: 0;">
- <div class="ui segment">
+ <div class="ui segment wiki-content-sidebar">
{{if and .CanWriteWiki (not .Repository.IsMirror)}}
<a class="ui right floated muted" href="{{.RepoLink}}/wiki/_Sidebar?action=_edit" aria-label="{{.i18n.Tr "repo.wiki.edit_page_button"}}">{{svg "octicon-pencil"}}</a>
{{end}}
- {{.sidebarContent | Str2html}}
+ {{template "repo/unicode_escape_prompt" dict "EscapeStatus" .sidebarEscapeStatus "root" $}}
+ {{.sidebarContent | Safe}}
</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?action=_edit" aria-label="{{.i18n.Tr "repo.wiki.edit_page_button"}}">{{svg "octicon-pencil"}}</a>
- {{end}}
- {{.footerContent | Str2html}}
+ <div class="ui segment wiki-content-footer">
+ {{if and .CanWriteWiki (not .Repository.IsMirror)}}
+ <a class="ui right floated muted" href="{{.RepoLink}}/wiki/_Footer?action=_edit" aria-label="{{.i18n.Tr "repo.wiki.edit_page_button"}}">{{svg "octicon-pencil"}}</a>
+ {{end}}
+ {{template "repo/unicode_escape_prompt" dict "footerEscapeStatus" .sidebarEscapeStatus "root" $}}
+ {{.footerContent | Safe}}
</div>
{{end}}
</div>