From dd136858f1ea40ad3c94191d647487fa4f31926c 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.0. Signed-off-by: Daniel Baumann --- templates/shared/actions/runner_edit.tmpl | 96 +++++++++++++++ templates/shared/actions/runner_list.tmpl | 95 +++++++++++++++ templates/shared/blocked_users_list.tmpl | 28 +++++ templates/shared/combomarkdowneditor.tmpl | 64 ++++++++++ templates/shared/issueicon.tmpl | 25 ++++ templates/shared/issuelist.tmpl | 163 ++++++++++++++++++++++++++ templates/shared/label_filter.tmpl | 50 ++++++++ templates/shared/repo_search.tmpl | 69 +++++++++++ templates/shared/search/button.tmpl | 3 + templates/shared/search/code/results.tmpl | 44 +++++++ templates/shared/search/code/search.tmpl | 28 +++++ templates/shared/search/combo.tmpl | 8 ++ templates/shared/search/combo_fuzzy.tmpl | 15 +++ templates/shared/search/fuzzy.tmpl | 21 ++++ templates/shared/search/input.tmpl | 4 + templates/shared/searchbottom.tmpl | 14 +++ templates/shared/searchfile.tmpl | 25 ++++ templates/shared/secrets/add_list.tmpl | 81 +++++++++++++ templates/shared/user/authorlink.tmpl | 1 + templates/shared/user/avatarlink.tmpl | 1 + templates/shared/user/blocked_users.tmpl | 83 +++++++++++++ templates/shared/user/name.tmpl | 1 + templates/shared/user/namelink.tmpl | 1 + templates/shared/user/org_profile_avatar.tmpl | 16 +++ templates/shared/user/profile_big_avatar.tmpl | 129 ++++++++++++++++++++ templates/shared/variables/variable_list.tmpl | 92 +++++++++++++++ templates/shared/webhook/icon.tmpl | 29 +++++ 27 files changed, 1186 insertions(+) create mode 100644 templates/shared/actions/runner_edit.tmpl create mode 100644 templates/shared/actions/runner_list.tmpl create mode 100644 templates/shared/blocked_users_list.tmpl create mode 100644 templates/shared/combomarkdowneditor.tmpl create mode 100644 templates/shared/issueicon.tmpl create mode 100644 templates/shared/issuelist.tmpl create mode 100644 templates/shared/label_filter.tmpl create mode 100644 templates/shared/repo_search.tmpl create mode 100644 templates/shared/search/button.tmpl create mode 100644 templates/shared/search/code/results.tmpl create mode 100644 templates/shared/search/code/search.tmpl create mode 100644 templates/shared/search/combo.tmpl create mode 100644 templates/shared/search/combo_fuzzy.tmpl create mode 100644 templates/shared/search/fuzzy.tmpl create mode 100644 templates/shared/search/input.tmpl create mode 100644 templates/shared/searchbottom.tmpl create mode 100644 templates/shared/searchfile.tmpl create mode 100644 templates/shared/secrets/add_list.tmpl create mode 100644 templates/shared/user/authorlink.tmpl create mode 100644 templates/shared/user/avatarlink.tmpl create mode 100644 templates/shared/user/blocked_users.tmpl create mode 100644 templates/shared/user/name.tmpl create mode 100644 templates/shared/user/namelink.tmpl create mode 100644 templates/shared/user/org_profile_avatar.tmpl create mode 100644 templates/shared/user/profile_big_avatar.tmpl create mode 100644 templates/shared/variables/variable_list.tmpl create mode 100644 templates/shared/webhook/icon.tmpl (limited to 'templates/shared') diff --git a/templates/shared/actions/runner_edit.tmpl b/templates/shared/actions/runner_edit.tmpl new file mode 100644 index 0000000..d60f10b --- /dev/null +++ b/templates/shared/actions/runner_edit.tmpl @@ -0,0 +1,96 @@ +
+

+ {{ctx.Locale.Tr "actions.runners.runner_title"}} {{.Runner.ID}} {{.Runner.Name}} +

+
+
+ {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} +
+
+ + {{.Runner.StatusLocaleName ctx.Locale}} +
+
+ + {{if .Runner.LastOnline}}{{TimeSinceUnix .Runner.LastOnline ctx.Locale}}{{else}}{{ctx.Locale.Tr "never"}}{{end}} +
+
+ + + {{range .Runner.AgentLabels}} + {{.}} + {{end}} + +
+
+ + {{.Runner.BelongsToOwnerType.LocaleString ctx.Locale}} +
+
+ +
+ +
+ + +
+ +
+ +
+ + +
+
+
+ +

+ {{ctx.Locale.Tr "actions.runners.task_list"}} +

+
+ + + + + + + + + + + + {{range .Tasks}} + + + + + + + + {{end}} + {{if not .Tasks}} + + + + {{end}} + +
{{ctx.Locale.Tr "actions.runners.task_list.run"}}{{ctx.Locale.Tr "actions.runners.task_list.status"}}{{ctx.Locale.Tr "actions.runners.task_list.repository"}}{{ctx.Locale.Tr "actions.runners.task_list.commit"}}{{ctx.Locale.Tr "actions.runners.task_list.done_at"}}
{{.ID}}{{.Status.LocaleString ctx.Locale}}{{.GetRepoName}} + {{ShortSha .CommitSHA}} + {{if .IsStopped}} + {{TimeSinceUnix .Stopped ctx.Locale}} + {{else}}-{{end}}
{{ctx.Locale.Tr "actions.runners.task_list.no_tasks"}}
+ {{template "base/paginate" .}} +
+ +
diff --git a/templates/shared/actions/runner_list.tmpl b/templates/shared/actions/runner_list.tmpl new file mode 100644 index 0000000..abbf220 --- /dev/null +++ b/templates/shared/actions/runner_list.tmpl @@ -0,0 +1,95 @@ +
+ +

+ {{ctx.Locale.Tr "actions.runners.runner_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}}) +
+ + +
+

+
+
+ {{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.runner_kind")}} +
+
+
+ + + + + + + + + + + + + + + {{if .Runners}} + {{range .Runners}} + + + + + + + + + + + {{end}} + {{else}} + + + + {{end}} + +
+ {{ctx.Locale.Tr "actions.runners.status"}} + {{SortArrow "online" "offline" .SortType false}} + + {{ctx.Locale.Tr "actions.runners.id"}} + {{SortArrow "oldest" "newest" .SortType false}} + + {{ctx.Locale.Tr "actions.runners.name"}} + {{SortArrow "alphabetically" "reversealphabetically" .SortType false}} + {{ctx.Locale.Tr "actions.runners.version"}}{{ctx.Locale.Tr "actions.runners.owner_type"}}{{ctx.Locale.Tr "actions.runners.labels"}}{{ctx.Locale.Tr "actions.runners.last_online"}}{{ctx.Locale.Tr "edit"}}
+ {{.StatusLocaleName ctx.Locale}} + {{.ID}}

{{.Name}}

{{if .Version}}{{.Version}}{{else}}{{ctx.Locale.Tr "unknown"}}{{end}}{{.BelongsToOwnerType.LocaleString ctx.Locale}} + {{range .AgentLabels}}{{.}}{{end}} + {{if .LastOnline}}{{TimeSinceUnix .LastOnline ctx.Locale}}{{else}}{{ctx.Locale.Tr "never"}}{{end}} + {{if .Editable $.RunnerOwnerID $.RunnerRepoID}} + {{svg "octicon-pencil"}} + {{end}} +
{{ctx.Locale.Tr "actions.runners.none"}}
+
+ + {{template "base/paginate" .}} + +
diff --git a/templates/shared/blocked_users_list.tmpl b/templates/shared/blocked_users_list.tmpl new file mode 100644 index 0000000..409b7f4 --- /dev/null +++ b/templates/shared/blocked_users_list.tmpl @@ -0,0 +1,28 @@ +
+ {{range .BlockedUsers}} +
+
+ {{ctx.AvatarUtils.Avatar . 48}} +
+
+
+ {{template "shared/user/name" .}} +
+
+ {{ctx.Locale.Tr "settings.blocked_since" (DateTime "short" .CreatedUnix)}} +
+
+
+
+ {{$.CsrfTokenHtml}} + + +
+
+
+ {{else}} +
+ {{ctx.Locale.Tr "settings.blocked_users_none"}} +
+ {{end}} +
diff --git a/templates/shared/combomarkdowneditor.tmpl b/templates/shared/combomarkdowneditor.tmpl new file mode 100644 index 0000000..48f72b6 --- /dev/null +++ b/templates/shared/combomarkdowneditor.tmpl @@ -0,0 +1,64 @@ +{{/* +Template Attributes: +* ContainerId: id attribute for the container element +* ContainerClasses: additional classes for the container element +* MarkdownPreviewUrl: preview url for the preview tab +* MarkdownPreviewContext: preview context for the preview tab +* TextareaName: name attribute for the textarea +* TextareaContent: content for the textarea +* TextareaPlaceholder: placeholder attribute for the textarea +* TextareaAriaLabel: aria-label attribute for the textarea +* DropzoneParentContainer: container for file upload (leave it empty if no upload) +* DisableAutosize: whether to disable automatic height resizing +* EasyMDE: whether to display button for switching to legacy editor +*/}} +
+ {{if .MarkdownPreviewUrl}} + + {{end}} +
+ +
+ {{svg "octicon-heading"}} + {{svg "octicon-bold"}} + {{svg "octicon-italic"}} +
+
+ {{svg "octicon-quote"}} + {{svg "octicon-code"}} + {{svg "octicon-link"}} +
+
+ {{svg "octicon-list-unordered"}} + {{svg "octicon-list-ordered"}} + {{svg "octicon-tasklist"}} + + +
+
+ {{svg "octicon-mention"}} + {{svg "octicon-cross-reference"}} +
+
+ + {{if .EasyMDE}} + + {{end}} +
+
+ + + + +
+
+ {{ctx.Locale.Tr "loading"}} +
+
diff --git a/templates/shared/issueicon.tmpl b/templates/shared/issueicon.tmpl new file mode 100644 index 0000000..d7c4414 --- /dev/null +++ b/templates/shared/issueicon.tmpl @@ -0,0 +1,25 @@ +{{if .IsPull}} + {{if not .PullRequest}} + No PullRequest + {{else}} + {{if .IsClosed}} + {{if .PullRequest.HasMerged}} + {{svg "octicon-git-merge" 16 "text purple"}} + {{else}} + {{svg "octicon-git-pull-request-closed" 16 "text red"}} + {{end}} + {{else}} + {{if .PullRequest.IsWorkInProgress ctx}} + {{svg "octicon-git-pull-request-draft" 16 "text grey"}} + {{else}} + {{svg "octicon-git-pull-request" 16 "text green"}} + {{end}} + {{end}} + {{end}} +{{else}} + {{if .IsClosed}} + {{svg "octicon-issue-closed" 16 "text red"}} + {{else}} + {{svg "octicon-issue-opened" 16 "text green"}} + {{end}} +{{end}} diff --git a/templates/shared/issuelist.tmpl b/templates/shared/issuelist.tmpl new file mode 100644 index 0000000..f96c182 --- /dev/null +++ b/templates/shared/issuelist.tmpl @@ -0,0 +1,163 @@ +
+ {{$approvalCounts := .ApprovalCounts}} + {{range .Issues}} +
+ +
+ {{if $.CanWriteIssuesOrPulls}} + + {{end}} + {{template "shared/issueicon" .}} +
+ +
+
+
+ {{RenderEmoji $.Context .Title | RenderCodeBlock}} + {{if .IsPull}} + {{if (index $.CommitStatuses .PullRequest.ID)}} + {{template "repo/commit_statuses" dict "Status" (index $.CommitLastStatus .PullRequest.ID) "Statuses" (index $.CommitStatuses .PullRequest.ID)}} + {{end}} + {{end}} + + {{range .Labels}} + {{RenderLabel $.Context ctx.Locale .}} + {{end}} + +
+ {{if or .TotalTrackedTime .Assignees .NumComments}} +
+ {{if .TotalTrackedTime}} +
+ {{svg "octicon-clock" 16}} + {{.TotalTrackedTime | Sec2Time}} +
+ {{end}} + {{if .Assignees}} +
+ {{range .Assignees}} + + {{ctx.AvatarUtils.Avatar . 20}} + + {{end}} +
+ {{end}} + {{if .NumComments}} + + {{end}} +
+ {{end}} +
+
+ + {{if eq $.listType "dashboard"}} + {{.Repo.FullName}}#{{.Index}} + {{else}} + #{{.Index}} + {{end}} + + {{$timeStr := TimeSinceUnix .GetLastEventTimestamp ctx.Locale}} + {{if .OriginalAuthor}} + {{ctx.Locale.Tr .GetLastEventLabelFake $timeStr .OriginalAuthor}} + {{else if gt .Poster.ID 0}} + {{ctx.Locale.Tr .GetLastEventLabel $timeStr .Poster.HomeLink .Poster.GetDisplayName}} + {{else}} + {{ctx.Locale.Tr .GetLastEventLabelFake $timeStr .Poster.GetDisplayName}} + {{end}} + {{if .IsPull}} + + {{end}} + {{if and .Milestone (ne $.listType "milestone")}} + + {{svg "octicon-milestone" 14}} + {{.Milestone.Name}} + + {{end}} + {{if .Project}} + + {{svg .Project.IconName 14}} + {{.Project.Title}} + + {{end}} + {{if .Ref}} + + {{svg "octicon-git-branch" 14}} + {{index $.IssueRefEndNames .ID}} + + {{end}} + {{$tasks := .GetTasks}} + {{if gt $tasks 0}} + {{$tasksDone := .GetTasksDone}} + + {{svg "octicon-checklist" 14}}{{$tasksDone}} / {{$tasks}} + + + {{end}} + {{if ne .DeadlineUnix 0}} + + + {{svg "octicon-calendar" 14}} + {{DateTime "short" (.DeadlineUnix.FormatDate)}} + + + {{end}} + {{if .IsPull}} + {{$approveOfficial := call $approvalCounts .ID "approve"}} + {{$rejectOfficial := call $approvalCounts .ID "reject"}} + {{$waitingOfficial := call $approvalCounts .ID "waiting"}} + {{if gt $approveOfficial 0}} + + {{svg "octicon-check" 14}} + {{ctx.Locale.TrN $approveOfficial "repo.pulls.approve_count_1" "repo.pulls.approve_count_n" $approveOfficial}} + + {{end}} + {{if gt $rejectOfficial 0}} + + {{svg "octicon-diff" 14}} + {{ctx.Locale.TrN $rejectOfficial "repo.pulls.reject_count_1" "repo.pulls.reject_count_n" $rejectOfficial}} + + {{end}} + {{if gt $waitingOfficial 0}} + + {{svg "octicon-eye" 14}} + {{ctx.Locale.TrN $waitingOfficial "repo.pulls.waiting_count_1" "repo.pulls.waiting_count_n" $waitingOfficial}} + + {{end}} + {{if and (not .PullRequest.HasMerged) .PullRequest.ConflictedFiles}} + + {{svg "octicon-x" 14}} + {{ctx.Locale.TrN (len .PullRequest.ConflictedFiles) "repo.pulls.num_conflicting_files_1" "repo.pulls.num_conflicting_files_n" (len .PullRequest.ConflictedFiles)}} + + {{end}} + {{end}} +
+
+
+ {{end}} + {{if .IssueIndexerUnavailable}} +
+

{{ctx.Locale.Tr "search.keyword_search_unavailable"}}

+
+ {{end}} +
+{{template "base/paginate" .}} diff --git a/templates/shared/label_filter.tmpl b/templates/shared/label_filter.tmpl new file mode 100644 index 0000000..2269271 --- /dev/null +++ b/templates/shared/label_filter.tmpl @@ -0,0 +1,50 @@ + + diff --git a/templates/shared/repo_search.tmpl b/templates/shared/repo_search.tmpl new file mode 100644 index 0000000..d08d601 --- /dev/null +++ b/templates/shared/repo_search.tmpl @@ -0,0 +1,69 @@ + +{{if and .PageIsExploreRepositories .OnlyShowRelevant}} +
+ {{ctx.Locale.Tr "explore.relevant_repositories" (printf "?only_show_relevant=0&sort=%s&q=%s&language=%s" $.SortType (QueryEscape $.Keyword) (QueryEscape $.Language))}} +
+{{end}} +
diff --git a/templates/shared/search/button.tmpl b/templates/shared/search/button.tmpl new file mode 100644 index 0000000..7bb1662 --- /dev/null +++ b/templates/shared/search/button.tmpl @@ -0,0 +1,3 @@ +{{/* Disable (optional) - if search button has to be disabled */}} +{{/* Tooltip (optional) - a tooltip to be displayed on hover */}} + diff --git a/templates/shared/search/code/results.tmpl b/templates/shared/search/code/results.tmpl new file mode 100644 index 0000000..fe37557 --- /dev/null +++ b/templates/shared/search/code/results.tmpl @@ -0,0 +1,44 @@ +
+ {{range $term := .SearchResultLanguages}} + + + {{$term.Language}} +
{{$term.Count}}
+
+ {{end}} +
+ +{{template "base/paginate" .}} diff --git a/templates/shared/search/code/search.tmpl b/templates/shared/search/code/search.tmpl new file mode 100644 index 0000000..6a52bb9 --- /dev/null +++ b/templates/shared/search/code/search.tmpl @@ -0,0 +1,28 @@ +
+ {{template "shared/search/combo_fuzzy" + dict + "Value" .Keyword + "Disabled" .CodeIndexerUnavailable + "IsFuzzy" .IsFuzzy + "Placeholder" (ctx.Locale.Tr "search.code_kind") + "CodeIndexerDisabled" $.CodeIndexerDisabled}} +
+
+
+ {{if .CodeIndexerUnavailable}} +
+

{{ctx.Locale.Tr "search.code_search_unavailable"}}

+
+ {{else}} + {{if .CodeIndexerDisabled}} +
+

{{ctx.Locale.Tr "search.code_search_by_git_grep"}}

+
+ {{end}} + {{if .SearchResults}} + {{template "shared/search/code/results" .}} + {{else if .Keyword}} +
{{ctx.Locale.Tr "search.no_results"}}
+ {{end}} + {{end}} +
diff --git a/templates/shared/search/combo.tmpl b/templates/shared/search/combo.tmpl new file mode 100644 index 0000000..788db95 --- /dev/null +++ b/templates/shared/search/combo.tmpl @@ -0,0 +1,8 @@ +{{/* Value - value of the search field (for search results page) */}} +{{/* Disabled (optional) - if search field/button has to be disabled */}} +{{/* Placeholder (optional) - placeholder text to be used */}} +{{/* Tooltip (optional) - a tooltip to be displayed on button hover */}} +
+ {{template "shared/search/input" dict "Value" .Value "Disabled" .Disabled "Placeholder" .Placeholder}} + {{template "shared/search/button" dict "Disabled" .Disabled "Tooltip" .Tooltip}} +
diff --git a/templates/shared/search/combo_fuzzy.tmpl b/templates/shared/search/combo_fuzzy.tmpl new file mode 100644 index 0000000..38189b0 --- /dev/null +++ b/templates/shared/search/combo_fuzzy.tmpl @@ -0,0 +1,15 @@ +{{/* Value - value of the search field (for search results page) */}} +{{/* Disabled (optional) - if search field/button has to be disabled */}} +{{/* Placeholder (optional) - placeholder text to be used */}} +{{/* IsFuzzy - state of the fuzzy/union search toggle */}} +{{/* CodeIndexerDisabled (optional) - if the performed search is done using git-grep */}} +{{/* Tooltip (optional) - a tooltip to be displayed on button hover */}} +
+ {{template "shared/search/input" dict "Value" .Value "Disabled" .Disabled "Placeholder" .Placeholder}} + {{template "shared/search/fuzzy" + dict + "Disabled" .Disabled + "IsFuzzy" .IsFuzzy + "CodeIndexerDisabled" .CodeIndexerDisabled}} + {{template "shared/search/button" dict "Disabled" .Disabled "Tooltip" .Tooltip}} +
diff --git a/templates/shared/search/fuzzy.tmpl b/templates/shared/search/fuzzy.tmpl new file mode 100644 index 0000000..25cfc57 --- /dev/null +++ b/templates/shared/search/fuzzy.tmpl @@ -0,0 +1,21 @@ +{{/* Disabled (optional) - if dropdown has to be disabled */}} +{{/* IsFuzzy - state of the fuzzy search toggle */}} + diff --git a/templates/shared/search/input.tmpl b/templates/shared/search/input.tmpl new file mode 100644 index 0000000..195cefc --- /dev/null +++ b/templates/shared/search/input.tmpl @@ -0,0 +1,4 @@ +{{/* Value - value of the search field (for search results page) */}} +{{/* Disabled (optional) - if search field has to be disabled */}} +{{/* Placeholder (optional) - placeholder text to be used */}} + diff --git a/templates/shared/searchbottom.tmpl b/templates/shared/searchbottom.tmpl new file mode 100644 index 0000000..bee0397 --- /dev/null +++ b/templates/shared/searchbottom.tmpl @@ -0,0 +1,14 @@ +{{if or .result.Language (not .result.UpdatedUnix.IsZero)}} +
+
+ {{if .result.Language}} + {{.result.Language}} + {{end}} +
+
+ {{if not .result.UpdatedUnix.IsZero}} + {{ctx.Locale.Tr "explore.code_last_indexed_at" (TimeSinceUnix .result.UpdatedUnix ctx.Locale)}} + {{end}} +
+
+{{end}} diff --git a/templates/shared/searchfile.tmpl b/templates/shared/searchfile.tmpl new file mode 100644 index 0000000..a051742 --- /dev/null +++ b/templates/shared/searchfile.tmpl @@ -0,0 +1,25 @@ +
+
+
    + {{/* if the expected line number does not match + the actual line number end the ordered list + and begin a new one */}} + {{$expNum := 0}} + {{range .SearchResult.Lines}} + {{if and (gt $expNum 0) (ne .Num $expNum)}} +
+
    + {{end}} +
  1. + +
    {{.FormattedContent}}
    +
  2. + {{$expNum = Eval .Num "+" 1}} + {{end}} +
+
+
diff --git a/templates/shared/secrets/add_list.tmpl b/templates/shared/secrets/add_list.tmpl new file mode 100644 index 0000000..ea59459 --- /dev/null +++ b/templates/shared/secrets/add_list.tmpl @@ -0,0 +1,81 @@ +

+ {{ctx.Locale.Tr "secrets.management"}} +
+ +
+

+
+ {{if .Secrets}} +
+ {{range .Secrets}} +
+
+ {{svg "octicon-key" 32}} +
+
+
+ {{.Name}} +
+
+ ****** +
+
+
+ + {{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix)}} + + +
+
+ {{end}} +
+ {{else}} + {{ctx.Locale.Tr "secrets.none"}} + {{end}} +
+ +{{/* Add secret dialog */}} + diff --git a/templates/shared/user/authorlink.tmpl b/templates/shared/user/authorlink.tmpl new file mode 100644 index 0000000..d57a635 --- /dev/null +++ b/templates/shared/user/authorlink.tmpl @@ -0,0 +1 @@ +{{.GetDisplayName}}{{if .IsBot}}bot{{end}} diff --git a/templates/shared/user/avatarlink.tmpl b/templates/shared/user/avatarlink.tmpl new file mode 100644 index 0000000..5e3ed7a --- /dev/null +++ b/templates/shared/user/avatarlink.tmpl @@ -0,0 +1 @@ +{{ctx.AvatarUtils.Avatar .user}} diff --git a/templates/shared/user/blocked_users.tmpl b/templates/shared/user/blocked_users.tmpl new file mode 100644 index 0000000..e83a039 --- /dev/null +++ b/templates/shared/user/blocked_users.tmpl @@ -0,0 +1,83 @@ +

+ {{ctx.Locale.Tr "user.block.title"}} +

+
+

{{ctx.Locale.Tr "user.block.info_1"}}

+
    +
  • {{ctx.Locale.Tr "user.block.info_2"}}
  • +
  • {{ctx.Locale.Tr "user.block.info_3"}}
  • +
  • {{ctx.Locale.Tr "user.block.info_4"}}
  • +
  • {{ctx.Locale.Tr "user.block.info_5"}}
  • +
  • {{ctx.Locale.Tr "user.block.info_6"}}
  • +
  • {{ctx.Locale.Tr "user.block.info_7"}}
  • +
+
+
+
+ {{.CsrfTokenHtml}} + + +
+ + +

{{ctx.Locale.Tr "user.block.note.info"}}

+
+
+
+

+ {{ctx.Locale.Tr "user.block.list"}} +

+
+
+ {{range .UserBlocks}} +
+
+ {{ctx.AvatarUtils.Avatar .Blockee}} +
+
+ + {{if .Note}} +
+ {{ctx.Locale.Tr "user.block.note"}}: {{.Note}} +
+ {{end}} +
+
+ +
+ {{$.CsrfTokenHtml}} + + + +
+
+
+ {{else}} +
{{ctx.Locale.Tr "user.block.list.none"}}
+ {{end}} +
+
+ diff --git a/templates/shared/user/name.tmpl b/templates/shared/user/name.tmpl new file mode 100644 index 0000000..896349f --- /dev/null +++ b/templates/shared/user/name.tmpl @@ -0,0 +1 @@ +{{.Name}}{{if .FullName}} ({{.FullName}}){{end}} diff --git a/templates/shared/user/namelink.tmpl b/templates/shared/user/namelink.tmpl new file mode 100644 index 0000000..a122f4f --- /dev/null +++ b/templates/shared/user/namelink.tmpl @@ -0,0 +1 @@ +{{.GetDisplayName}} diff --git a/templates/shared/user/org_profile_avatar.tmpl b/templates/shared/user/org_profile_avatar.tmpl new file mode 100644 index 0000000..c0abcab --- /dev/null +++ b/templates/shared/user/org_profile_avatar.tmpl @@ -0,0 +1,16 @@ +{{with .ContextUser}} +
+
+
+
+ {{ctx.AvatarUtils.Avatar . 100}} + {{.DisplayName}} + + {{if .Visibility.IsLimited}}
{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}
{{end}} + {{if .Visibility.IsPrivate}}
{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}
{{end}} +
+
+
+
+
+{{end}} diff --git a/templates/shared/user/profile_big_avatar.tmpl b/templates/shared/user/profile_big_avatar.tmpl new file mode 100644 index 0000000..d3033b4 --- /dev/null +++ b/templates/shared/user/profile_big_avatar.tmpl @@ -0,0 +1,129 @@ +{{if .IsHTMX}} + {{template "base/alert" .}} +{{end}} +
+ +
+ {{if .ContextUser.FullName}}{{.ContextUser.FullName}}{{end}} + {{.ContextUser.Name}}{{if .ContextUser.Pronouns}} · {{.ContextUser.Pronouns}}{{end}} {{if .IsAdmin}} + + {{svg "octicon-gear" 18}} + + {{end}} + +
+
+
    + {{if .ContextUser.Location}} +
  • + {{svg "octicon-location"}} + {{.ContextUser.Location}} + {{if .ContextUserLocationMapURL}} + + {{svg "octicon-link-external"}} + + {{end}} +
  • + {{end}} + {{if .ShowUserEmail}} +
  • + {{svg "octicon-mail"}} + {{.ContextUser.Email}} + {{if (eq .SignedUserID .ContextUser.ID)}} + + + {{svg "octicon-unlock"}} + + + {{end}} +
  • + {{end}} + {{if .ContextUser.Website}} +
  • + {{svg "octicon-link"}} + {{.ContextUser.Website}} +
  • + {{end}} + {{if $.RenderedDescription}} +
  • +
    {{$.RenderedDescription}}
    +
  • + {{end}} + {{range .OpenIDs}} + {{if .Show}} +
  • + {{svg "fontawesome-openid"}} + {{.URI}} +
  • + {{end}} + {{end}} +
  • {{svg "octicon-calendar"}} {{ctx.Locale.Tr "user.joined_on" (DateTime "short" .ContextUser.CreatedUnix)}}
  • + {{if and .Orgs .HasOrgsVisible}} +
  • +
      + {{range .Orgs}} + {{if (or .Visibility.IsPublic (and ($.SignedUser) (or .Visibility.IsLimited (and (.HasMemberWithUserID ctx $.SignedUserID) .Visibility.IsPrivate) ($.IsAdmin))))}} +
    • + + {{ctx.AvatarUtils.Avatar .}} + +
    • + {{end}} + {{end}} +
    +
  • + {{end}} + {{if .Badges}} +
  • +
      + {{range .Badges}} +
    • + {{.Description}} +
    • + {{end}} +
    +
  • + {{end}} + {{if and .IsSigned (ne .SignedUserID .ContextUser.ID)}} + +
  • + {{if $.IsBlocked}} + + {{else}} + + {{end}} +
  • + {{end}} +
+
+
diff --git a/templates/shared/variables/variable_list.tmpl b/templates/shared/variables/variable_list.tmpl new file mode 100644 index 0000000..06c71c0 --- /dev/null +++ b/templates/shared/variables/variable_list.tmpl @@ -0,0 +1,92 @@ +

+ {{ctx.Locale.Tr "actions.variables.management"}} +
+ +
+

+
+ {{if .Variables}} +
+ {{range .Variables}} +
+
+ {{svg "octicon-pencil" 32}} +
+
+
+ {{.Name}} +
+
+ {{.Data}} +
+
+
+ + {{ctx.Locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix)}} + + + +
+
+ {{end}} +
+ {{else}} + {{ctx.Locale.Tr "actions.variables.none"}} + {{end}} +
+ +{{/** Edit variable dialog */}} + + diff --git a/templates/shared/webhook/icon.tmpl b/templates/shared/webhook/icon.tmpl new file mode 100644 index 0000000..3c84f11 --- /dev/null +++ b/templates/shared/webhook/icon.tmpl @@ -0,0 +1,29 @@ +{{$size := 26}} +{{if .Size}} + {{$size = .Size}} +{{end}} +{{if eq .HookType "forgejo"}} + +{{else if eq .HookType "gitea"}} + {{svg "gitea-gitea" $size "img"}} +{{else if eq .HookType "gogs"}} + +{{else if eq .HookType "slack"}} + +{{else if eq .HookType "discord"}} + +{{else if eq .HookType "dingtalk"}} + +{{else if eq .HookType "telegram"}} + +{{else if eq .HookType "msteams"}} + +{{else if eq .HookType "feishu"}} + +{{else if eq .HookType "matrix"}} + {{svg "gitea-matrix" $size "img"}} +{{else if eq .HookType "wechatwork"}} + +{{else if eq .HookType "packagist"}} + +{{end}} -- cgit v1.2.3