summaryrefslogtreecommitdiffstats
path: root/templates/user/overview
diff options
context:
space:
mode:
authorTim-Nicas Oelschläger <72873130+zokkis@users.noreply.github.com>2024-02-23 01:24:57 +0100
committerGitHub <noreply@github.com>2024-02-23 01:24:57 +0100
commit532e422027c88a4a3dc0c2968857f8d5f94d861f (patch)
treedbea8ccb30a7e10713bf16653f3d6aaee3ca3d23 /templates/user/overview
parente0445042410da1fb3e5b44edebd0f5d2b7ae06b2 (diff)
downloadgitea-532e422027c88a4a3dc0c2968857f8d5f94d861f.tar.gz
gitea-532e422027c88a4a3dc0c2968857f8d5f94d861f.zip
Unify organizations header (#29248)
Unify organizations header before: ![image](https://github.com/go-gitea/gitea/assets/72873130/74474e0d-33c3-4bbf-9324-d130ea2c62f8) after: ![image](https://github.com/go-gitea/gitea/assets/72873130/1c65de0d-fa0f-4b17-ab8d-067de8c7113b) --------- Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'templates/user/overview')
-rw-r--r--templates/user/overview/header.tmpl55
-rw-r--r--templates/user/overview/package_versions.tmpl7
-rw-r--r--templates/user/overview/packages.tmpl7
3 files changed, 21 insertions, 48 deletions
diff --git a/templates/user/overview/header.tmpl b/templates/user/overview/header.tmpl
index c0cbe2561c..4fdaa70d87 100644
--- a/templates/user/overview/header.tmpl
+++ b/templates/user/overview/header.tmpl
@@ -10,7 +10,7 @@
<div class="ui small label">{{.RepoCount}}</div>
{{end}}
</a>
- {{if or .ContextUser.IsIndividual (and .ContextUser.IsOrganization .CanReadProjects)}}
+ {{if or .ContextUser.IsIndividual .CanReadProjects}}
<a href="{{.ContextUser.HomeLink}}/-/projects" class="{{if .PageIsViewProjects}}active {{end}}item">
{{svg "octicon-project-symlink"}} {{ctx.Locale.Tr "user.projects"}}
{{if .ProjectCount}}
@@ -18,55 +18,30 @@
{{end}}
</a>
{{end}}
- {{if and .IsPackageEnabled (or .ContextUser.IsIndividual (and .ContextUser.IsOrganization .CanReadPackages))}}
+ {{if and .IsPackageEnabled (or .ContextUser.IsIndividual .CanReadPackages)}}
<a href="{{.ContextUser.HomeLink}}/-/packages" class="{{if .IsPackagesPage}}active {{end}}item">
{{svg "octicon-package"}} {{ctx.Locale.Tr "packages.title"}}
</a>
{{end}}
- {{if and .IsRepoIndexerEnabled (or .ContextUser.IsIndividual (and .ContextUser.IsOrganization .CanReadCode))}}
+ {{if and .IsRepoIndexerEnabled (or .ContextUser.IsIndividual .CanReadCode)}}
<a href="{{.ContextUser.HomeLink}}/-/code" class="{{if .IsCodePage}}active {{end}}item">
{{svg "octicon-code"}} {{ctx.Locale.Tr "user.code"}}
</a>
{{end}}
- {{if .ContextUser.IsOrganization}}
- {{if .NumMembers}}
- <a class="{{if $.PageIsOrgMembers}}active {{end}}item" href="{{$.OrgLink}}/members">
- {{svg "octicon-person"}}&nbsp;{{ctx.Locale.Tr "org.members"}}
- <div class="ui small label">{{.NumMembers}}</div>
- </a>
- {{end}}
- {{if .IsOrganizationMember}}
- <a class="{{if $.PageIsOrgTeams}}active {{end}}item" href="{{$.OrgLink}}/teams">
- {{svg "octicon-people"}}&nbsp;{{ctx.Locale.Tr "org.teams"}}
- {{if .NumTeams}}
- <div class="ui small label">{{.NumTeams}}</div>
- {{end}}
- </a>
- {{end}}
-
- {{if .IsOrganizationOwner}}
- <div class="right menu">
- <a class="item" href="{{.OrgLink}}/settings">
- {{svg "octicon-tools"}} {{ctx.Locale.Tr "repo.settings"}}
- </a>
- </div>
- {{end}}
+ <a class="{{if eq .TabName "activity"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=activity">
+ {{svg "octicon-rss"}} {{ctx.Locale.Tr "user.activity"}}
+ </a>
+ {{if not .DisableStars}}
+ <a class="{{if eq .TabName "stars"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=stars">
+ {{svg "octicon-star"}} {{ctx.Locale.Tr "user.starred"}}
+ {{if .ContextUser.NumStars}}
+ <div class="ui small label">{{.ContextUser.NumStars}}</div>
+ {{end}}
+ </a>
{{else}}
- <a class="{{if eq .TabName "activity"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=activity">
- {{svg "octicon-rss"}} {{ctx.Locale.Tr "user.activity"}}
+ <a class="{{if eq .TabName "watching"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=watching">
+ {{svg "octicon-eye"}} {{ctx.Locale.Tr "user.watched"}}
</a>
- {{if not .DisableStars}}
- <a class="{{if eq .TabName "stars"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=stars">
- {{svg "octicon-star"}} {{ctx.Locale.Tr "user.starred"}}
- {{if .ContextUser.NumStars}}
- <div class="ui small label">{{.ContextUser.NumStars}}</div>
- {{end}}
- </a>
- {{else}}
- <a class="{{if eq .TabName "watching"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=watching">
- {{svg "octicon-eye"}} {{ctx.Locale.Tr "user.watched"}}
- </a>
- {{end}}
{{end}}
</div>
diff --git a/templates/user/overview/package_versions.tmpl b/templates/user/overview/package_versions.tmpl
index 6f740e0e7c..f6f963aecb 100644
--- a/templates/user/overview/package_versions.tmpl
+++ b/templates/user/overview/package_versions.tmpl
@@ -1,10 +1,9 @@
{{template "base/head" .}}
{{if .ContextUser.IsOrganization}}
- <div role="main" aria-label="{{.Title}}" class="page-content repository packages">
- {{template "shared/user/org_profile_avatar" .}}
+ <div role="main" aria-label="{{.Title}}" class="page-content organization packages">
+ {{template "org/header" .}}
<div class="ui container">
- {{template "user/overview/header" .}}
- {{template "package/shared/versionlist" .}}
+ {{template "package/shared/versionlist" .}}
</div>
</div>
{{else}}
diff --git a/templates/user/overview/packages.tmpl b/templates/user/overview/packages.tmpl
index 4fd17696d1..30ff871cb2 100644
--- a/templates/user/overview/packages.tmpl
+++ b/templates/user/overview/packages.tmpl
@@ -1,10 +1,9 @@
{{template "base/head" .}}
{{if .ContextUser.IsOrganization}}
- <div role="main" aria-label="{{.Title}}" class="page-content repository packages">
- {{template "shared/user/org_profile_avatar" .}}
+ <div role="main" aria-label="{{.Title}}" class="page-content organization packages">
+ {{template "org/header" .}}
<div class="ui container">
- {{template "user/overview/header" .}}
- {{template "package/shared/list" .}}
+ {{template "package/shared/list" .}}
</div>
</div>
{{else}}