From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.3. Signed-off-by: Daniel Baumann --- templates/repo/wiki/new.tmpl | 48 +++++++++++++++ templates/repo/wiki/pages.tmpl | 30 +++++++++ templates/repo/wiki/revision.tmpl | 40 ++++++++++++ templates/repo/wiki/search.tmpl | 12 ++++ templates/repo/wiki/start.tmpl | 15 +++++ templates/repo/wiki/view.tmpl | 124 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 269 insertions(+) create mode 100644 templates/repo/wiki/new.tmpl create mode 100644 templates/repo/wiki/pages.tmpl create mode 100644 templates/repo/wiki/revision.tmpl create mode 100644 templates/repo/wiki/search.tmpl create mode 100644 templates/repo/wiki/start.tmpl create mode 100644 templates/repo/wiki/view.tmpl (limited to 'templates/repo/wiki') diff --git a/templates/repo/wiki/new.tmpl b/templates/repo/wiki/new.tmpl new file mode 100644 index 0000000..81433db --- /dev/null +++ b/templates/repo/wiki/new.tmpl @@ -0,0 +1,48 @@ +{{template "base/head" .}} +
+ {{template "repo/header" .}} +
+ {{template "base/alert" .}} +
+ {{ctx.Locale.Tr "repo.wiki.new_page"}} + {{if .PageIsWikiEdit}} + {{ctx.Locale.Tr "repo.wiki.new_page_button"}} + {{end}} +
+
+ {{.CsrfTokenHtml}} +
+ +
+
+ {{ctx.Locale.Tr "repo.wiki.page_name_desc"}} +
+ + {{$content := .content}} + {{if not .PageIsWikiEdit}} + {{$content = ctx.Locale.Tr "repo.wiki.welcome"}} + {{end}} + {{template "shared/combomarkdowneditor" (dict + "MarkdownPreviewUrl" (print .Repository.Link "/markup") + "MarkdownPreviewContext" .RepoLink + "TextareaName" "content" + "TextareaPlaceholder" (ctx.Locale.Tr "repo.wiki.page_content") + "TextareaAriaLabel" (ctx.Locale.Tr "repo.wiki.page_content") + "TextareaContent" $content + "EasyMDE" true + )}} + +
+ +
+
+
+ + {{ctx.Locale.Tr "repo.wiki.cancel"}} +
+
+
+
+{{template "base/footer" .}} diff --git a/templates/repo/wiki/pages.tmpl b/templates/repo/wiki/pages.tmpl new file mode 100644 index 0000000..42c36a9 --- /dev/null +++ b/templates/repo/wiki/pages.tmpl @@ -0,0 +1,30 @@ +{{template "base/head" .}} +
+ {{template "repo/header" .}} +
+

+ {{ctx.Locale.Tr "repo.wiki.pages"}} + + {{if and .CanWriteWiki (not .Repository.IsMirror)}} + {{ctx.Locale.Tr "repo.wiki.new_page_button"}} + {{end}} + +

+ + + {{range .Pages}} + + + {{$timeSince := TimeSinceUnix .UpdatedUnix ctx.Locale}} + + + {{end}} + +
+ {{svg "octicon-file"}} + {{.Name}} + {{svg "octicon-chevron-right"}} + {{ctx.Locale.Tr "repo.wiki.last_updated" $timeSince}}
+
+
+{{template "base/footer" .}} diff --git a/templates/repo/wiki/revision.tmpl b/templates/repo/wiki/revision.tmpl new file mode 100644 index 0000000..7fca703 --- /dev/null +++ b/templates/repo/wiki/revision.tmpl @@ -0,0 +1,40 @@ +{{template "base/head" .}} +
+ {{template "repo/header" .}} + {{$title := .title}} +
+
+
+
+ {{.revision}} {{svg "octicon-home"}} + {{$title}} +
+ {{$timeSince := TimeSince .Author.When ctx.Locale}} + {{ctx.Locale.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince}} +
+
+
+
+
+ {{template "repo/clone_buttons" .}} + {{template "repo/clone_script" .}} +
+
+
+

{{ctx.Locale.Tr "repo.wiki.wiki_page_revisions"}}

+
+

+
+
+ {{.CommitCount}} {{ctx.Locale.Tr "repo.commits.commits"}} +
+
+

+ {{if and .Commits (gt .CommitCount 0)}} + {{template "repo/commits_list" .}} + {{end}} + {{template "base/paginate" .}} +
+
+
+{{template "base/footer" .}} diff --git a/templates/repo/wiki/search.tmpl b/templates/repo/wiki/search.tmpl new file mode 100644 index 0000000..7f4cb9c --- /dev/null +++ b/templates/repo/wiki/search.tmpl @@ -0,0 +1,12 @@ +{{if .Results}} + {{range .Results}} + + {{.Title}} + {{range .LineCodes}} +

{{.}}

+ {{end}} +
+ {{end}} +{{else}} +
{{ctx.Locale.Tr "repo.wiki.no_search_results"}}
+{{end}} diff --git a/templates/repo/wiki/start.tmpl b/templates/repo/wiki/start.tmpl new file mode 100644 index 0000000..1b3c3d5 --- /dev/null +++ b/templates/repo/wiki/start.tmpl @@ -0,0 +1,15 @@ +{{template "base/head" .}} +
+ {{template "repo/header" .}} +
+
+ {{svg "octicon-book" 48}} +

{{ctx.Locale.Tr "repo.wiki.welcome"}}

+

{{ctx.Locale.Tr "repo.wiki.welcome_desc"}}

+ {{if and .CanWriteWiki (not .Repository.IsMirror)}} + {{ctx.Locale.Tr "repo.wiki.create_first_page"}} + {{end}} +
+
+
+{{template "base/footer" .}} diff --git a/templates/repo/wiki/view.tmpl b/templates/repo/wiki/view.tmpl new file mode 100644 index 0000000..40af307 --- /dev/null +++ b/templates/repo/wiki/view.tmpl @@ -0,0 +1,124 @@ +{{template "base/head" .}} +
+ {{template "repo/header" .}} + {{$title := .title}} +
+
+
+ +
+
+ {{template "repo/clone_buttons" .}} + {{template "repo/clone_script" .}} +
+ +
+
+
+
+ {{.CommitCount}} {{svg "octicon-history"}} + {{$title}} +
+ {{$timeSince := TimeSince .Author.When ctx.Locale}} + {{ctx.Locale.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince}} +
+
+ +
+
+ {{if .FormatWarning}} +
+

{{.FormatWarning}}

+
+ {{end}} + +
+ {{if .sidebarTocContent}} + + {{end}} + +
+ {{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}} + {{.content | SafeHTML}} +
+ + {{if .sidebarPresent}} + + {{end}} + +
+ + {{if .footerPresent}} + + {{end}} +
+
+
+ + + +{{template "base/footer" .}} -- cgit v1.2.3