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/pulls/commits.tmpl | 10 +++++ templates/repo/pulls/files.tmpl | 14 ++++++ templates/repo/pulls/fork.tmpl | 90 ++++++++++++++++++++++++++++++++++++++ templates/repo/pulls/status.tmpl | 59 +++++++++++++++++++++++++ templates/repo/pulls/tab_menu.tmpl | 28 ++++++++++++ 5 files changed, 201 insertions(+) create mode 100644 templates/repo/pulls/commits.tmpl create mode 100644 templates/repo/pulls/files.tmpl create mode 100644 templates/repo/pulls/fork.tmpl create mode 100644 templates/repo/pulls/status.tmpl create mode 100644 templates/repo/pulls/tab_menu.tmpl (limited to 'templates/repo/pulls') diff --git a/templates/repo/pulls/commits.tmpl b/templates/repo/pulls/commits.tmpl new file mode 100644 index 0000000..bf6e812 --- /dev/null +++ b/templates/repo/pulls/commits.tmpl @@ -0,0 +1,10 @@ +{{template "base/head" .}} +
+ {{template "repo/header" .}} +
+ {{template "repo/issue/view_title" .}} + {{template "repo/pulls/tab_menu" .}} + {{template "repo/commits_table" .}} +
+
+{{template "base/footer" .}} diff --git a/templates/repo/pulls/files.tmpl b/templates/repo/pulls/files.tmpl new file mode 100644 index 0000000..402bec8 --- /dev/null +++ b/templates/repo/pulls/files.tmpl @@ -0,0 +1,14 @@ +{{template "base/head" .}} + + + + +
+ {{template "repo/header" .}} +
+ {{template "repo/issue/view_title" .}} + {{template "repo/pulls/tab_menu" .}} + {{template "repo/diff/box" .}} +
+
+{{template "base/footer" .}} diff --git a/templates/repo/pulls/fork.tmpl b/templates/repo/pulls/fork.tmpl new file mode 100644 index 0000000..2cf0a85 --- /dev/null +++ b/templates/repo/pulls/fork.tmpl @@ -0,0 +1,90 @@ +{{template "base/head" .}} +
+
+
+
+ {{.CsrfTokenHtml}} +

+ {{ctx.Locale.Tr "new_fork"}} +

+
+ {{template "base/alert" .}} +
+ + +
+ +
+ + {{.ForkRepo.FullName}} +
+
+ + +
+
+ +
+ + +
+ {{ctx.Locale.Tr "repo.fork_visibility_helper"}} +
+
+ + +
+
+ + +
+ +
+ + +
+
+
+
+
+
+{{template "base/footer" .}} diff --git a/templates/repo/pulls/status.tmpl b/templates/repo/pulls/status.tmpl new file mode 100644 index 0000000..e8636ba --- /dev/null +++ b/templates/repo/pulls/status.tmpl @@ -0,0 +1,59 @@ +{{/* +Template Attributes: +* CommitStatus: summary of all commit status state +* CommitStatuses: all commit status elements +* MissingRequiredChecks: commit check contexts that are required by branch protection but not present +* ShowHideChecks: whether use a button to show/hide the checks +* is_context_required: Used in pull request commit status check table +*/}} + +{{if .CommitStatus}} +
+
+ {{if or (eq .CommitStatus.State "pending") (.MissingRequiredChecks)}} + {{ctx.Locale.Tr "repo.pulls.status_checking"}} + {{else if eq .CommitStatus.State "success"}} + {{ctx.Locale.Tr "repo.pulls.status_checks_success"}} + {{else if eq .CommitStatus.State "warning"}} + {{ctx.Locale.Tr "repo.pulls.status_checks_warning"}} + {{else if eq .CommitStatus.State "failure"}} + {{ctx.Locale.Tr "repo.pulls.status_checks_failure"}} + {{else if eq .CommitStatus.State "error"}} + {{ctx.Locale.Tr "repo.pulls.status_checks_error"}} + {{else}} + {{ctx.Locale.Tr "repo.pulls.status_checking"}} + {{end}} + + {{if .ShowHideChecks}} +
+ +
+ {{end}} +
+ +
+ {{range .CommitStatuses}} +
+ {{template "repo/commit_status" .}} +
{{.Context}} {{.Description}}
+
+ {{if $.is_context_required}} + {{if (call $.is_context_required .Context)}}
{{ctx.Locale.Tr "repo.pulls.status_checks_requested"}}
{{end}} + {{end}} + {{if .TargetURL}}{{ctx.Locale.Tr "repo.pulls.status_checks_details"}}{{end}} +
+
+ {{end}} + {{range .MissingRequiredChecks}} +
+ {{svg "octicon-dot-fill" 18 "commit-status icon text yellow"}} +
{{.}}
+
{{ctx.Locale.Tr "repo.pulls.status_checks_requested"}}
+
+ {{end}} +
+
+{{end}} diff --git a/templates/repo/pulls/tab_menu.tmpl b/templates/repo/pulls/tab_menu.tmpl new file mode 100644 index 0000000..d5a8d6e --- /dev/null +++ b/templates/repo/pulls/tab_menu.tmpl @@ -0,0 +1,28 @@ + -- cgit v1.2.3