1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-02 15:48:35 +00:00

Backport 1.23 (#32868)

Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
wxiaoguang
2024-12-17 11:58:27 +08:00
committed by GitHub
parent 22c4599542
commit e98dd6ee5b
16 changed files with 208 additions and 7 deletions

View File

@@ -36,9 +36,10 @@
</thead>
<tbody>
{{range .PackageDescriptor.Metadata.Manifests}}
{{/* "unknown/unknown" is attestation-manifest, so we should skip it */}}
{{if ne .Platform "unknown/unknown"}}
<tr>
<td><a href="{{$.PackageDescriptor.PackageWebLink}}/{{PathEscape .Digest}}">{{StringUtils.TrimPrefix .Digest "sha256:" | ShortSha}}</a></td>
<td><a class="tw-font-mono" href="{{$.PackageDescriptor.PackageWebLink}}/{{PathEscape .Digest}}">{{StringUtils.TrimPrefix .Digest "sha256:" | ShortSha}}</a></td>
<td>{{.Platform}}</td>
<td>{{FileSize .Size}}</td>
</tr>

View File

@@ -68,11 +68,13 @@
<p id="cherry-pick-content" class="branch-dropdown"></p>
<form method="get">
{{/*FIXME: CurrentRefShortName seems not making sense here (old code),
because the "commit page" has no "$.BranchName" info, so only using DefaultBranch should be enough */}}
{{template "repo/branch_dropdown" dict
"Repository" .Repository
"ShowTabBranches" true
"CurrentRefType" "branch"
"CurrentRefShortName" (Iif $.BranchName $.Repository.DefaultBranch)
"CurrentRefShortName" (or $.BranchName $.Repository.DefaultBranch)
"RefFormActionTemplate" (print "{RepoLink}/_cherrypick/" .CommitID "/{RefShortName}")
}}
<input type="hidden" id="cherry-pick-type" name="cherry-pick-type"><br>

View File

@@ -23,6 +23,9 @@
<div class="divider"></div>
<a class="item label-filter-query-default" href="{{QueryBuild $queryLink "labels" NIL}}">{{ctx.Locale.Tr "repo.issues.filter_label_no_select"}}</a>
<a class="item label-filter-query-not-set" href="{{QueryBuild $queryLink "labels" 0}}">{{ctx.Locale.Tr "repo.issues.filter_label_select_no_label"}}</a>
{{/* The logic here is not the same as the label selector in the issue sidebar.
The one in the issue sidebar renders "repo labels | divider | org labels".
Maybe the logic should be updated to be consistent.*/}}
{{$previousExclusiveScope := "_no_scope"}}
{{range .Labels}}
{{$exclusiveScope := .ExclusiveScope}}

View File

@@ -48,6 +48,7 @@
</div>
</form>
{{end}}{{/*if .EnablePasswordSignInForm*/}}
{{/* "oauth_container" contains not only "oauth2" methods, but also "OIDC" and "SSPI" methods */}}
{{$showOAuth2Methods := or .OAuth2Providers .EnableOpenIDSignIn .EnableSSPI}}
{{if and $showOAuth2Methods .EnablePasswordSignInForm}}
<div class="divider divider-text">{{ctx.Locale.Tr "sign_in_or"}}</div>

View File

@@ -47,6 +47,8 @@
</button>
</div>
{{end}}
{{/* "oauth_container" contains not only "oauth2" methods, but also "OIDC" and "SSPI" methods */}}
{{/* TODO: it seems that "EnableSSPI" is only set in "sign-in" handlers, but it should use the same logic to control its display */}}
{{$showOAuth2Methods := or .OAuth2Providers .EnableOpenIDSignIn .EnableSSPI}}
{{if $showOAuth2Methods}}
<div class="divider divider-text">{{ctx.Locale.Tr "sign_in_or"}}</div>

View File

@@ -61,6 +61,7 @@
{{template "repo/issue/filter_item_label" dict "Labels" .Labels "QueryLink" $queryLinkWithFilter "SupportArchivedLabel" true}}
{{end}}
{{/* at the moment there is no easy way to get poster candidates on this page, so only show a username input, search for what the end user enters */}}
{{if ne $.ViewType "created_by"}}
{{template "repo/issue/filter_item_user_fetch" dict
"QueryParamKey" "poster"
@@ -70,6 +71,7 @@
}}
{{end}}
{{/* at the moment there is no easy way to get assignee candidates on this page, so only show a username input, search for what the end user enters */}}
{{if ne $.ViewType "assigned"}}
{{template "repo/issue/filter_item_user_fetch" dict
"QueryParamKey" "assignee"