diff --git a/routers/web/org/teams.go b/routers/web/org/teams.go index 10803c9fbf5fb..731247829905e 100644 --- a/routers/web/org/teams.go +++ b/routers/web/org/teams.go @@ -609,6 +609,8 @@ func DeleteTeam(ctx *context.Context) { // TeamInvite renders the team invite page func TeamInvite(ctx *context.Context) { invite, org, team, inviter, err := getTeamInviteFromContext(ctx) + // TODO: to quickly debug the UI, can uncomment this (don't worry, it won't pass CI lint) + // invite, org, team, inviter, err = &org_model.TeamInvite{}, &org_model.Organization{}, &org_model.Team{}, ctx.Doer, nil if err != nil { if org_model.IsErrTeamInviteNotFound(err) { ctx.NotFound(err) diff --git a/templates/org/header.tmpl b/templates/org/header.tmpl index 83ae95a1ae790..4f9e54b610924 100644 --- a/templates/org/header.tmpl +++ b/templates/org/header.tmpl @@ -1,13 +1,13 @@ -
- {{ctx.AvatarUtils.Avatar .Org 100 "org-avatar"}} -
-
- {{.Org.DisplayName}} - +
+
{{ctx.AvatarUtils.Avatar .Org 100}}
+
+
+
+ {{.Org.DisplayName}} {{if .Org.Visibility.IsLimited}}{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}{{end}} {{if .Org.Visibility.IsPrivate}}{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}{{end}} - - +
+
- {{if .RenderedDescription}}
{{.RenderedDescription}}
{{end}} -
- {{if .Org.Location}}
{{svg "octicon-location"}} {{.Org.Location}}
{{end}} - {{if .Org.Website}}
{{end}} - {{if .IsSigned}} - {{if .Org.Email}}
{{svg "octicon-mail"}} {{.Org.Email}}
{{end}} + {{if .RenderedDescription}} +
{{.RenderedDescription}}
+ {{end}} +
+ {{if .Org.Location}} +
{{svg "octicon-location"}} {{.Org.Location}}
+ {{end}} + {{if .Org.Website}} +
{{svg "octicon-link"}} {{.Org.Website}}
+ {{end}} + {{if and .IsSigned .Org.Email}} +
{{svg "octicon-mail"}} {{.Org.Email}}
{{end}}
diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl index 7132743d0c889..12b41c3e94267 100644 --- a/templates/org/home.tmpl +++ b/templates/org/home.tmpl @@ -55,11 +55,12 @@ {{end}} {{if .NumMembers}} -

- {{ctx.Locale.Tr "org.members"}} +

+ {{ctx.Locale.Tr "org.members"}} {{.NumMembers}} {{svg "octicon-chevron-right"}}

-
+ {{/* gap 8px below is specifically chosen to make sure a full line of avatars can exactly fit the segment width */}} +
{{range $memberUser := .OrgOverviewMembers}} {{if or $.IsOrganizationMember (call $.IsPublicMember $memberUser.ID)}} {{template "shared/user/avatarlink" dict "user" $memberUser "size" 32 "tooltip" true}} @@ -68,20 +69,22 @@
{{end}} {{if .IsOrganizationMember}} -
- {{ctx.Locale.Tr "org.teams"}} +
+ {{ctx.Locale.Tr "org.teams"}} {{.Org.NumTeams}} {{svg "octicon-chevron-right"}}
-
+
+ {{if .IsOrganizationOwner}}
diff --git a/templates/org/team/invite.tmpl b/templates/org/team/invite.tmpl index 14a97ae659d0d..d591414efc7d0 100644 --- a/templates/org/team/invite.tmpl +++ b/templates/org/team/invite.tmpl @@ -1,18 +1,14 @@ {{template "base/head" .}} -
+
{{template "base/alert" .}} -
-
- {{ctx.AvatarUtils.Avatar .Organization 140}} -
-
-
{{ctx.Locale.Tr "org.teams.invite.title" .Team.Name .Organization.Name}}
-
{{ctx.Locale.Tr "org.teams.invite.by" .Inviter.Name}}
-
{{ctx.Locale.Tr "org.teams.invite.description"}}
-
-
-
+
+
+
{{ctx.AvatarUtils.Avatar .Organization 140}}
+
{{ctx.Locale.Tr "org.teams.invite.title" .Team.Name .Organization.Name}}
+
{{ctx.Locale.Tr "org.teams.invite.by" .Inviter.Name}}
+
{{ctx.Locale.Tr "org.teams.invite.description"}}
+
diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl index 1487c280dee68..1036e886da77a 100644 --- a/templates/org/team/sidebar.tmpl +++ b/templates/org/team/sidebar.tmpl @@ -15,21 +15,21 @@ {{end}}
-
-
+ +
{{if .Team.Description}} {{.Team.Description}} {{else}} {{ctx.Locale.Tr "org.teams.no_desc"}} {{end}}
- {{if eq .Team.LowerName "owners"}} -
+ +
+ {{/* TODO: old indent is kept to make diff changes minimal, can be reformatted in the future */}} + {{if eq .Team.LowerName "owners"}}

{{ctx.Locale.Tr "org.teams.owners_permission_desc"}}

{{ctx.Locale.Tr "org.teams.owners_permission_suggestion"}}

-
- {{else}} -
+ {{else}}

{{ctx.Locale.Tr "org.team_access_desc"}}

    {{if .Team.IncludesAllRepositories}} @@ -75,9 +75,9 @@ {{end}} -
- {{end}} -
+ {{end}} +
+ {{if .IsOrganizationOwner}}
{{svg "octicon-gear"}} {{ctx.Locale.Tr "org.teams.settings"}} diff --git a/web_src/css/index.css b/web_src/css/index.css index c23e3e1c19ff8..d7f57e324b097 100644 --- a/web_src/css/index.css +++ b/web_src/css/index.css @@ -37,7 +37,6 @@ @import "./shared/flex-list.css"; @import "./shared/milestone.css"; -@import "./shared/repoorg.css"; @import "./shared/settings.css"; @import "./features/dropzone.css"; diff --git a/web_src/css/org.css b/web_src/css/org.css index b54a21ac6e1e0..6de9ebd51e7a3 100644 --- a/web_src/css/org.css +++ b/web_src/css/org.css @@ -1,23 +1,3 @@ -.organization .head .ui.header .ui.right { - margin-top: 5px; -} - -.page-content.organization .org-avatar { - margin-right: 15px; -} - -.page-content.organization #org-info .ui.header { - display: flex; - align-items: center; - font-size: 36px; - margin-bottom: 0; -} - -.page-content.organization #org-info .desc { - font-size: 16px; - margin-bottom: 10px; -} - .page-content.organization .team-item-box > .team-item-header { min-height: 50px; /* the header sometimes contains a mini button, sometimes not, so we set a min-height to make sure the layout is consistent */ } @@ -30,20 +10,3 @@ white-space: nowrap; color: var(--color-text-light-3); } - -.organization.invite .ui.avatar { - width: 100%; - height: 100%; -} - -.organization.teams .detail .item { - padding: 10px 15px; -} - -.organization.teams .detail .item:not(:last-child) { - border-bottom: 1px solid var(--color-secondary); -} - -.org-team-navbar .active.item { - background: var(--color-box-body) !important; -} diff --git a/web_src/css/shared/repoorg.css b/web_src/css/shared/repoorg.css deleted file mode 100644 index 5573ae47b81ec..0000000000000 --- a/web_src/css/shared/repoorg.css +++ /dev/null @@ -1,18 +0,0 @@ -.repository .head .ui.header .text, -.organization .head .ui.header .text { - vertical-align: middle; - font-size: 1.6rem; - margin-left: 15px; -} - -.repository .ui.tabs.container, -.organization .ui.tabs.container { - margin-top: 14px; - margin-bottom: 0; -} - -.repository .head .ui.header .org-visibility .label, -.organization .head .ui.header .org-visibility .label { - margin-left: 5px; - margin-top: 5px; -}