summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/org/header.tmpl42
-rw-r--r--templates/org/home.tmpl33
-rw-r--r--templates/org/member/members.tmpl2
-rw-r--r--templates/org/menu.tmpl10
-rw-r--r--templates/org/projects/list.tmpl7
-rw-r--r--templates/package/settings.tmpl12
-rw-r--r--templates/user/code.tmpl5
-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
10 files changed, 70 insertions, 110 deletions
diff --git a/templates/org/header.tmpl b/templates/org/header.tmpl
index 7b912c1c56..8423fd7d3b 100644
--- a/templates/org/header.tmpl
+++ b/templates/org/header.tmpl
@@ -1,18 +1,32 @@
-{{with .Org}}
- <div class="ui container">
- <div class="ui vertically grid head">
- <div class="column">
- <div class="ui header gt-df gt-ac gt-word-break">
- {{ctx.AvatarUtils.Avatar . 100}}
- <span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span>
- <span class="org-visibility">
- {{if .Visibility.IsLimited}}<div class="ui medium basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
- {{if .Visibility.IsPrivate}}<div class="ui medium basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
- </span>
- </div>
- </div>
+<div class="ui container gt-df">
+ {{ctx.AvatarUtils.Avatar .Org 100 "org-avatar"}}
+ <div id="org-info" class="gt-df gt-fc">
+ <div class="ui header">
+ {{.Org.DisplayName}}
+ <span class="org-visibility">
+ {{if .Org.Visibility.IsLimited}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</span>{{end}}
+ {{if .Org.Visibility.IsPrivate}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</span>{{end}}
+ </span>
+ <span class="gt-df gt-ac gt-gap-2 gt-ml-auto gt-font-16 gt-whitespace-nowrap">
+ {{if .EnableFeed}}
+ <a class="ui basic label button gt-mr-0" href="{{.Org.HomeLink}}.rss" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">
+ {{svg "octicon-rss" 24}}
+ </a>
+ {{end}}
+ {{if .IsSigned}}
+ {{template "org/follow_unfollow" .}}
+ {{end}}
+ </span>
+ </div>
+ {{if .RenderedDescription}}<div class="render-content markup">{{.RenderedDescription | Str2html}}</div>{{end}}
+ <div class="text light meta gt-mt-2">
+ {{if .Org.Location}}<div class="flex-text-block">{{svg "octicon-location"}} <span>{{.Org.Location}}</span></div>{{end}}
+ {{if .Org.Website}}<div class="flex-text-block">{{svg "octicon-link"}} <a class="muted" target="_blank" rel="noopener noreferrer me" href="{{.Org.Website}}">{{.Org.Website}}</a></div>{{end}}
+ {{if .IsSigned}}
+ {{if .Org.Email}}<div class="flex-text-block">{{svg "octicon-mail"}} <a class="muted" href="mailto:{{.Org.Email}}">{{.Org.Email}}</a></div>{{end}}
+ {{end}}
</div>
</div>
-{{end}}
+</div>
{{template "org/menu" .}}
diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl
index 81a76d3b4d..4e33b1af72 100644
--- a/templates/org/home.tmpl
+++ b/templates/org/home.tmpl
@@ -1,37 +1,6 @@
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content organization profile">
- <div class="ui container gt-df">
- {{ctx.AvatarUtils.Avatar .Org 140 "org-avatar"}}
- <div id="org-info">
- <div class="ui header">
- {{.Org.DisplayName}}
- <span class="org-visibility">
- {{if .Org.Visibility.IsLimited}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</span>{{end}}
- {{if .Org.Visibility.IsPrivate}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</span>{{end}}
- </span>
- </div>
- {{if $.RenderedDescription}}<div class="render-content markup">{{$.RenderedDescription|Str2html}}</div>{{end}}
- <div class="text grey meta">
- {{if .Org.Location}}<div class="flex-text-block">{{svg "octicon-location"}} <span>{{.Org.Location}}</span></div>{{end}}
- {{if .Org.Website}}<div class="flex-text-block">{{svg "octicon-link"}} <a target="_blank" rel="noopener noreferrer me" href="{{.Org.Website}}">{{.Org.Website}}</a></div>{{end}}
- {{if $.IsSigned}}
- {{if .Org.Email}}<div class="flex-text-block">{{svg "octicon-mail"}} <a class="muted" href="mailto:{{.Org.Email}}">{{.Org.Email}}</a></div>{{end}}
- {{end}}
- </div>
- </div>
- <div class="right menu">
- {{if .EnableFeed}}
- <a class="ui basic label button gt-mr-0" href="{{$.Org.HomeLink}}.rss" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">
- {{svg "octicon-rss" 24}}
- </a>
- {{end}}
- {{if .IsSigned}}
- {{template "org/follow_unfollow" .}}
- {{end}}
- </div>
- </div>
-
- {{template "org/menu" .}}
+ {{template "org/header" .}}
<div class="ui container">
<div class="ui mobile reversed stackable grid">
diff --git a/templates/org/member/members.tmpl b/templates/org/member/members.tmpl
index 03509ec93e..64f1aaa7d2 100644
--- a/templates/org/member/members.tmpl
+++ b/templates/org/member/members.tmpl
@@ -1,5 +1,5 @@
{{template "base/head" .}}
-<div role="main" aria-label="{{.Title}}" class="page-content organization">
+<div role="main" aria-label="{{.Title}}" class="page-content organization members">
{{template "org/header" .}}
<div class="ui container">
{{template "base/alert" .}}
diff --git a/templates/org/menu.tmpl b/templates/org/menu.tmpl
index 8a97711ce2..f07b26865a 100644
--- a/templates/org/menu.tmpl
+++ b/templates/org/menu.tmpl
@@ -15,24 +15,24 @@
</a>
{{end}}
{{if and .IsPackageEnabled .CanReadPackages}}
- <a class="item" href="{{$.Org.HomeLink}}/-/packages">
+ <a class="{{if .IsPackagesPage}}active {{end}}item" href="{{$.Org.HomeLink}}/-/packages">
{{svg "octicon-package"}} {{ctx.Locale.Tr "packages.title"}}
</a>
{{end}}
{{if and .IsRepoIndexerEnabled .CanReadCode}}
- <a class="item" href="{{$.Org.HomeLink}}/-/code">
- {{svg "octicon-code"}}&nbsp;{{ctx.Locale.Tr "org.code"}}
+ <a class="{{if .IsCodePage}}active {{end}}item" href="{{$.Org.HomeLink}}/-/code">
+ {{svg "octicon-code"}} {{ctx.Locale.Tr "org.code"}}
</a>
{{end}}
{{if .NumMembers}}
<a class="{{if $.PageIsOrgMembers}}active {{end}}item" href="{{$.OrgLink}}/members">
- {{svg "octicon-person"}}&nbsp;{{ctx.Locale.Tr "org.members"}}
+ {{svg "octicon-person"}} {{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"}}
+ {{svg "octicon-people"}} {{ctx.Locale.Tr "org.teams"}}
{{if .NumTeams}}
<div class="ui small label">{{.NumTeams}}</div>
{{end}}
diff --git a/templates/org/projects/list.tmpl b/templates/org/projects/list.tmpl
index 689091e5e0..97cc6cf66c 100644
--- a/templates/org/projects/list.tmpl
+++ b/templates/org/projects/list.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 projects">
+ {{template "org/header" .}}
<div class="ui container">
- {{template "user/overview/header" .}}
- {{template "projects/list" .}}
+ {{template "projects/list" .}}
</div>
</div>
{{else}}
diff --git a/templates/package/settings.tmpl b/templates/package/settings.tmpl
index 6ef62753e2..10e26c7010 100644
--- a/templates/package/settings.tmpl
+++ b/templates/package/settings.tmpl
@@ -1,8 +1,14 @@
{{template "base/head" .}}
-<div role="main" aria-label="{{.Title}}" class="page-content repository settings options">
- {{template "shared/user/org_profile_avatar" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content repository settings options{{if .ContextUser.IsOrganization}} organization{{end}}">
+ {{if .ContextUser.IsOrganization}}
+ {{template "org/header" .}}
+ {{else}}
+ {{template "shared/user/org_profile_avatar" .}}
+ {{end}}
<div class="ui container">
- {{template "user/overview/header" .}}
+ {{if not .ContextUser.IsOrganization}}
+ {{template "user/overview/header" .}}
+ {{end}}
{{template "base/alert" .}}
<p><a href="{{.PackageDescriptor.FullWebLink}}">{{.PackageDescriptor.Package.Name}} ({{.PackageDescriptor.Version.Version}})</a> / <strong>{{ctx.Locale.Tr "repo.settings"}}</strong></p>
<h4 class="ui top attached header">
diff --git a/templates/user/code.tmpl b/templates/user/code.tmpl
index da9a3c3a24..f71f55c474 100644
--- a/templates/user/code.tmpl
+++ b/templates/user/code.tmpl
@@ -1,9 +1,8 @@
{{template "base/head" .}}
{{if .ContextUser.IsOrganization}}
- <div role="main" aria-label="{{.Title}}" class="page-content repository">
- {{template "shared/user/org_profile_avatar" .}}
+ <div role="main" aria-label="{{.Title}}" class="page-content organization code">
+ {{template "org/header" .}}
<div class="ui container">
- {{template "user/overview/header" .}}
{{template "code/searchcombo" .}}
</div>
</div>
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}}