diff --git a/templates/devtest/gitea-ui.tmpl b/templates/devtest/gitea-ui.tmpl index 8b31957f2e..9e15e3c1bc 100644 --- a/templates/devtest/gitea-ui.tmpl +++ b/templates/devtest/gitea-ui.tmpl @@ -253,5 +253,63 @@ {{template "shared/combomarkdowneditor" .}} + +
+

Flex List

+
+
+
+ {{svg "octicon-info" 32}} +
+
+
+ Flex Item + + with label + +
+
+ consists of leading/main/trailing part +
+
+ main part contains title and (multiple) body lines +
+
+
+ + +
+
+
+
+ {{svg "octicon-repo" 32}} +
+
+ +
+ when inside header, the trailing part will wrap below the title +
+
+
+
+
{{template "base/footer" .}} diff --git a/templates/explore/organizations.tmpl b/templates/explore/organizations.tmpl index ecf7f21bdd..ea788b149b 100644 --- a/templates/explore/organizations.tmpl +++ b/templates/explore/organizations.tmpl @@ -1,38 +1 @@ -{{template "base/head" .}} -
- {{template "explore/navbar" .}} -
- {{template "explore/search" .}} - -
- {{range .Users}} -
- {{avatar $.Context .}} -
- - {{.Name}} {{.FullName}} - {{if .Visibility.IsPrivate}} - {{$.locale.Tr "repo.desc.private"}} - {{end}} - -
- {{if .Location}} - {{svg "octicon-location"}} {{.Location}} - {{end}} - {{if and .Website}} - {{svg "octicon-link"}} - {{.Website}} - {{end}} - {{svg "octicon-calendar"}} {{$.locale.Tr "user.joined_on" (DateTime "short" .CreatedUnix) | Safe}} -
-
-
- {{else}} -
{{$.locale.Tr "explore.org_no_results"}}
- {{end}} -
- - {{template "base/paginate" .}} -
-
-{{template "base/footer" .}} +{{template "explore/users" .}} diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl index 47e9921332..44f7900327 100644 --- a/templates/explore/repo_list.tmpl +++ b/templates/explore/repo_list.tmpl @@ -1,66 +1,72 @@ -
+
{{range .Repos}} -
-
-
- {{$avatar := (repoAvatar . 32 "gt-mr-3")}} - {{if $avatar}} - {{$avatar}} - {{end}} - - {{if or $.PageIsExplore $.PageIsProfileStarList}}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}} - -
- {{if .IsArchived}} - {{$.locale.Tr "repo.desc.archived"}} - {{end}} - {{if .IsTemplate}} - {{if .IsPrivate}} - {{$.locale.Tr "repo.desc.private_template"}} +
+
+ {{$avatar := (repoAvatar . 32)}} + {{if $avatar}} + {{$avatar}} + {{else}} + {{template "repo/icon" .}} + {{end}} +
+
+
+
+ + {{if or $.PageIsExplore $.PageIsProfileStarList}}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}} + + + {{if .IsArchived}} + {{$.locale.Tr "repo.desc.archived"}} + {{end}} + {{if .IsTemplate}} + {{if .IsPrivate}} + {{$.locale.Tr "repo.desc.private_template"}} + {{else}} + {{if .Owner.Visibility.IsPrivate}} + {{$.locale.Tr "repo.desc.internal_template"}} + {{end}} + {{end}} {{else}} - {{if .Owner.Visibility.IsPrivate}} - {{$.locale.Tr "repo.desc.internal_template"}} + {{if .IsPrivate}} + {{$.locale.Tr "repo.desc.private"}} + {{else}} + {{if .Owner.Visibility.IsPrivate}} + {{$.locale.Tr "repo.desc.internal"}} + {{end}} {{end}} {{end}} - {{else}} - {{if .IsPrivate}} - {{$.locale.Tr "repo.desc.private"}} - {{else}} - {{if .Owner.Visibility.IsPrivate}} - {{$.locale.Tr "repo.desc.internal"}} - {{end}} - {{end}} - {{end}} + {{if .IsFork}} - {{svg "octicon-repo-forked"}} + {{svg "octicon-repo-forked"}} {{else if .IsMirror}} - {{svg "octicon-mirror"}} + {{svg "octicon-mirror"}} {{end}}
+
+ {{if .PrimaryLanguage}} + + {{.PrimaryLanguage.Language}} + + {{end}} + {{if not $.DisableStars}} + {{svg "octicon-star" 16}}{{.NumStars}} + {{end}} + {{svg "octicon-git-branch" 16}}{{.NumForks}} +
- -
-
{{$description := .DescriptionHTML $.Context}} - {{if $description}}

{{$description}}

{{end}} + {{if $description}} +
{{$description}}
+ {{end}} {{if .Topics}} -
+
{{range .Topics}} {{if ne . ""}}{{.}}{{end}} {{end}}
{{end}} -

{{$.locale.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.locale}}

+
{{$.locale.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.locale}}
{{else}} diff --git a/templates/explore/users.tmpl b/templates/explore/users.tmpl index e3318479bb..5e150f692f 100644 --- a/templates/explore/users.tmpl +++ b/templates/explore/users.tmpl @@ -4,26 +4,35 @@
{{template "explore/search" .}} -
+
{{range .Users}} -
- {{avatar $.Context .}} -
- {{.Name}} {{.FullName}} -
+
+
+ {{avatar $.Context . 48}} +
+
+
+ {{template "shared/user/name" .}} + {{if .Visibility.IsPrivate}} + {{$.locale.Tr "repo.desc.private"}} + {{end}} +
+
{{if .Location}} - {{svg "octicon-location"}} {{.Location}} + {{svg "octicon-location"}}{{.Location}} {{end}} {{if and $.ShowUserEmail .Email $.IsSigned (not .KeepEmailPrivate)}} - {{svg "octicon-mail"}} - {{.Email}} + + {{svg "octicon-mail"}} + {{.Email}} + {{end}} - {{svg "octicon-calendar"}} {{$.locale.Tr "user.joined_on" (DateTime "short" .CreatedUnix) | Safe}} + {{svg "octicon-calendar"}}{{$.locale.Tr "user.joined_on" (DateTime "short" .CreatedUnix) | Safe}}
{{else}} -
{{$.locale.Tr "explore.user_no_results"}}
+
{{$.locale.Tr "explore.user_no_results"}}
{{end}}
diff --git a/templates/org/member/members.tmpl b/templates/org/member/members.tmpl index 3d5b3beebd..13b7d964f7 100644 --- a/templates/org/member/members.tmpl +++ b/templates/org/member/members.tmpl @@ -1,49 +1,31 @@ {{template "base/head" .}} -
+
{{template "org/header" .}}
{{template "base/alert" .}} -
+
{{range .Members}} -
-
+ {{$isPublic := index $.MembersIsPublicMember .ID}} +
+
{{avatar $.Context . 48}} -
- -
{{.FullName}}
-
-
-
- {{$.locale.Tr "org.members.membership_visibility"}} -
-
- {{$isPublic := index $.MembersIsPublicMember .ID}} - {{if $isPublic}} - {{$.locale.Tr "org.members.public"}} - {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}({{$.locale.Tr "org.members.public_helper"}}){{end}} - {{else}} - {{$.locale.Tr "org.members.private"}} - {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}({{$.locale.Tr "org.members.private_helper"}}){{end}} +
+
+ {{template "shared/user/name" .}} + {{if not $isPublic}} + {{$.locale.Tr "org.members.private"}} {{end}}
-
- {{if not $.PublicOnly}} -
-
+ {{if not $.PublicOnly}} +
{{$.locale.Tr "org.members.member_role"}} + {{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{$.locale.Tr "org.members.owner"}}{{else}}{{$.locale.Tr "org.members.member"}}{{end}}
-
- {{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{$.locale.Tr "org.members.owner"}}{{else}}{{$.locale.Tr "org.members.member"}}{{end}} -
-
-
{{if $.IsOrganizationOwner}} -
+
{{$.locale.Tr "admin.users.2fa"}} -
-
{{if index $.MembersTwoFaStatus .ID}} {{svg "octicon-check"}} @@ -53,26 +35,31 @@
{{end}} -
- {{end}} -
-
- {{if eq $.SignedUser.ID .ID}} -
- -
- {{else if $.IsOrganizationOwner}} -
- -
+ {{end}} +
+
+ {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}} + {{if $isPublic}} + {{svg "octicon-eye-closed" 12 "icon"}}{{$.locale.Tr "org.members.public_helper"}} + {{else}} + {{svg "octicon-eye" 12 "icon"}}{{$.locale.Tr "org.members.private_helper"}} {{end}} -
+ {{end}} + {{if eq $.SignedUser.ID .ID}} +
+ +
+ {{else if $.IsOrganizationOwner}} +
+ +
+ {{end}}
{{end}} diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl index 6bd258955d..4a97763d9a 100644 --- a/templates/org/team/members.tmpl +++ b/templates/org/team/members.tmpl @@ -21,27 +21,35 @@
{{end}} -
- {{range .Team.Members}} -
- {{avatar $.Context . 48 "gt-mr-3 gt-mb-0"}} - - {{.DisplayName}} - - {{if and $.IsOrganizationOwner (not (and ($.Team.IsOwnerTeam) (eq (len $.Team.Members) 1)))}} -
- -
- {{end}} -
- {{else}} -
- {{$.locale.Tr "org.teams.members.none"}} -
- {{end}} +
+
+ {{range .Team.Members}} +
+ +
+
+ {{template "shared/user/name" .}} +
+
+
+ {{if and $.IsOrganizationOwner (not (and ($.Team.IsOwnerTeam) (eq (len $.Team.Members) 1)))}} +
+ +
+ {{end}} +
+
+ {{else}} +
+ {{$.locale.Tr "org.teams.members.none"}} +
+ {{end}} +
{{if and .Invites $.IsOrganizationOwner}}

{{$.locale.Tr "org.teams.invite_team_member.list"}}

diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl index 83e238016a..698b0a91ba 100644 --- a/templates/org/team/repositories.tmpl +++ b/templates/org/team/repositories.tmpl @@ -25,33 +25,38 @@
{{end}} -
- {{range .Team.Repos}} -
- {{if .IsPrivate}} - {{svg "octicon-lock" 16 "gt-mr-3"}} - {{else if .IsFork}} - {{svg "octicon-repo-forked" 16 "gt-mr-3"}} - {{else if .IsMirror}} - {{svg "octicon-mirror" 16 "gt-mr-3"}} - {{else}} - {{svg "octicon-repo" 16 "gt-mr-3"}} - {{end}} - - {{$.Org.Name}}/{{.Name}} - - {{if $canAddRemove}} -
- {{$.CsrfTokenHtml}} - -
- {{end}} -
- {{else}} -
- {{$.locale.Tr "org.teams.repos.none"}} -
- {{end}} +
+
+ {{range .Team.Repos}} +
+
+ {{$avatar := (repoAvatar . 32)}} + {{if $avatar}} + {{$avatar}} + {{else}} + {{template "repo/icon" .}} + {{end}} +
+ +
+ {{if $canAddRemove}} +
+ {{$.CsrfTokenHtml}} + +
+ {{end}} +
+
+ {{else}} +
+ {{$.locale.Tr "org.teams.repos.none"}} +
+ {{end}} +
diff --git a/templates/package/shared/cleanup_rules/list.tmpl b/templates/package/shared/cleanup_rules/list.tmpl index 485bff562e..e2af344817 100644 --- a/templates/package/shared/cleanup_rules/list.tmpl +++ b/templates/package/shared/cleanup_rules/list.tmpl @@ -5,10 +5,41 @@
-
+
{{range .CleanupRules}} -
-
+
+
+ {{svg .Type.SVGName 32}} +
+
+ +
+ {{if .Enabled}}{{$.locale.Tr "enabled"}}{{else}}{{$.locale.Tr "disabled"}}{{end}} +
+ {{if .KeepCount}} +
+ {{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count"}}: {{if eq .KeepCount 1}}{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count.1"}}{{else}}{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count.n" .KeepCount}}{{end}} +
+ {{end}} + {{if .KeepPattern}} +
+ {{$.locale.Tr "packages.owner.settings.cleanuprules.keep.pattern"}}: {{StringUtils.EllipsisString .KeepPattern 100}} +
+ {{end}} + {{if .RemoveDays}} +
+ {{$.locale.Tr "packages.owner.settings.cleanuprules.remove.days"}}: {{$.locale.Tr "tool.days" .RemoveDays}} +
+ {{end}} + {{if .RemovePattern}} +
+ {{$.locale.Tr "packages.owner.settings.cleanuprules.remove.pattern"}}: {{StringUtils.EllipsisString .RemovePattern 100}} +
+ {{end}} +
+
- {{svg .Type.SVGName 36}} -
- {{.Type.Name}} -
{{if .Enabled}}{{$.locale.Tr "enabled"}}{{else}}{{$.locale.Tr "disabled"}}{{end}}
- {{if .KeepCount}}
{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count"}}: {{if eq .KeepCount 1}}{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count.1"}}{{else}}{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.count.n" .KeepCount}}{{end}}
{{end}} - {{if .KeepPattern}}
{{$.locale.Tr "packages.owner.settings.cleanuprules.keep.pattern"}}: {{StringUtils.EllipsisString .KeepPattern 100}}
{{end}} - {{if .RemoveDays}}
{{$.locale.Tr "packages.owner.settings.cleanuprules.remove.days"}}: {{$.locale.Tr "tool.days" .RemoveDays}}
{{end}} - {{if .RemovePattern}}
{{$.locale.Tr "packages.owner.settings.cleanuprules.remove.pattern"}}: {{StringUtils.EllipsisString .RemovePattern 100}}
{{end}} -
{{else}}
{{.locale.Tr "packages.owner.settings.cleanuprules.none"}}
diff --git a/templates/package/shared/list.tmpl b/templates/package/shared/list.tmpl index 79a2d885fb..d2370b1208 100644 --- a/templates/package/shared/list.tmpl +++ b/templates/package/shared/list.tmpl @@ -12,15 +12,15 @@
-
+
{{range .PackageDescriptors}} -
  • -
    -
    - {{.Package.Name}} +
    +
    +
    + {{.Package.Name}} {{svg .Package.Type.SVGName 16}} {{.Package.Type.Name}}
    -
    +
    {{$timeStr := TimeSinceUnix .Version.CreatedUnix $.locale}} {{$hasRepositoryAccess := false}} {{if .Repository}} @@ -33,10 +33,10 @@ {{end}}
    -
  • +
    {{else}} {{if not .HasPackages}} -
    +
    {{svg "octicon-package" 48}}

    {{.locale.Tr "packages.empty"}}

    {{if and .Repository .CanWritePackages}} diff --git a/templates/package/shared/versionlist.tmpl b/templates/package/shared/versionlist.tmpl index feba8ef145..897f4d716a 100644 --- a/templates/package/shared/versionlist.tmpl +++ b/templates/package/shared/versionlist.tmpl @@ -18,18 +18,16 @@
    -
    +
    {{range .PackageDescriptors}} -
  • -
    - -
    +
    +
    + {{.Version.LowerVersion}} +
    {{$.locale.Tr "packages.published_by" (TimeSinceUnix .Version.CreatedUnix $.locale) .Creator.HomeLink (.Creator.GetDisplayName | Escape) | Safe}}
    -
  • +
    {{else}}

    {{.locale.Tr "packages.filter.no_result"}}

    {{end}} diff --git a/templates/repo/actions/runs_list.tmpl b/templates/repo/actions/runs_list.tmpl index 87b5ed69de..1a45733b77 100644 --- a/templates/repo/actions/runs_list.tmpl +++ b/templates/repo/actions/runs_list.tmpl @@ -1,4 +1,4 @@ -
    +
    {{if eq (len .Runs) 0}}
    {{svg "octicon-no-entry" 48}} @@ -6,17 +6,15 @@
    {{end}} {{range .Runs}} -
  • -
    +
    +
    {{template "repo/actions/status" (dict "status" .Status.String "locale" $.locale)}}
    -
    - -
    +
    + + {{- .Title -}} + +
    {{if not $.CurWorkflow}}{{.WorkflowID}} {{end}}#{{.Index}} : {{$.locale.Tr "actions.runs.commit"}} {{ShortSha .CommitSHA}} @@ -24,18 +22,18 @@ {{.TriggerUser.GetDisplayName}}
    -
    +
    {{if .RefLink}} {{.PrettyRef}} {{else}} {{.PrettyRef}} {{end}}
    -
    -
    {{svg "octicon-calendar" 16}}{{TimeSinceUnix .Updated $.locale}}
    -
    {{svg "octicon-stopwatch" 16}}{{.Duration}}
    +
    +
    {{svg "octicon-calendar" 16}}{{TimeSinceUnix .Updated $.locale}}
    +
    {{svg "octicon-stopwatch" 16}}{{.Duration}}
    -
  • +
    {{end}}
    {{template "base/paginate" .}} diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index b119c31948..865f3ba4a7 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -8,7 +8,9 @@ {{if $avatar}} {{$avatar}} {{else}} - {{template "repo/icon" .}} +
    + {{template "repo/icon" .}} +
    {{end}} {{.Owner.Name}}
    /
    diff --git a/templates/repo/icon.tmpl b/templates/repo/icon.tmpl index e956745153..a37197d42a 100644 --- a/templates/repo/icon.tmpl +++ b/templates/repo/icon.tmpl @@ -1,4 +1,4 @@ -
    +
    {{if $.IsTemplate}} {{svg "octicon-repo-template" 32}} {{else}} diff --git a/templates/repo/settings/branches.tmpl b/templates/repo/settings/branches.tmpl index f8a0270db3..fcc3615ced 100644 --- a/templates/repo/settings/branches.tmpl +++ b/templates/repo/settings/branches.tmpl @@ -38,26 +38,27 @@
    -
    -
    -
    - - - {{range .ProtectedBranches}} - - - - - {{else}} - - {{end}} - -
    {{.RuleName}}
    - {{$.locale.Tr "repo.settings.edit_protected_branch"}} - -
    {{.locale.Tr "repo.settings.no_protected_branch"}}
    -
    +
    +
    + {{range .ProtectedBranches}} +
    +
    +
    +
    {{.RuleName}}
    +
    +
    +
    + {{$.locale.Tr "repo.settings.edit_protected_branch"}} + +
    +
    + {{else}} +
    + {{.locale.Tr "repo.settings.no_protected_branch"}} +
    + {{end}}
    {{end}} diff --git a/templates/repo/settings/collaboration.tmpl b/templates/repo/settings/collaboration.tmpl index 84f23ee0bd..0716489291 100644 --- a/templates/repo/settings/collaboration.tmpl +++ b/templates/repo/settings/collaboration.tmpl @@ -4,34 +4,38 @@ {{.locale.Tr "repo.settings.collaboration"}} {{if .Collaborators}} -
    - {{range .Collaborators}} -
    - -
    - {{svg "octicon-shield-lock"}} -