summaryrefslogtreecommitdiffstats
path: root/templates/org/team
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--templates/org/team/invite.tmpl23
-rw-r--r--templates/org/team/members.tmpl88
-rw-r--r--templates/org/team/navbar.tmpl4
-rw-r--r--templates/org/team/new.tmpl148
-rw-r--r--templates/org/team/repositories.tmpl61
-rw-r--r--templates/org/team/sidebar.tmpl94
-rw-r--r--templates/org/team/teams.tmpl56
7 files changed, 474 insertions, 0 deletions
diff --git a/templates/org/team/invite.tmpl b/templates/org/team/invite.tmpl
new file mode 100644
index 0000000..1167828
--- /dev/null
+++ b/templates/org/team/invite.tmpl
@@ -0,0 +1,23 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content organization invite">
+ <div class="ui container">
+ {{template "base/alert" .}}
+ <div class="ui centered card">
+ <div class="image">
+ {{ctx.AvatarUtils.Avatar .Organization 140}}
+ </div>
+ <div class="content">
+ <div class="header">{{ctx.Locale.Tr "org.teams.invite.title" .Team.Name .Organization.Name}}</div>
+ <div class="meta">{{ctx.Locale.Tr "org.teams.invite.by" .Inviter.Name}}</div>
+ <div class="description">{{ctx.Locale.Tr "org.teams.invite.description"}}</div>
+ </div>
+ <div class="extra content">
+ <form class="ui form" action="" method="post">
+ {{.CsrfTokenHtml}}
+ <button class="fluid ui primary button">{{ctx.Locale.Tr "org.teams.join"}}</button>
+ </form>
+ </div>
+ </div>
+ </div>
+</div>
+{{template "base/footer" .}}
diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl
new file mode 100644
index 0000000..7e9a59a
--- /dev/null
+++ b/templates/org/team/members.tmpl
@@ -0,0 +1,88 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content organization teams">
+ {{template "org/header" .}}
+ <div class="ui container">
+ {{template "base/alert" .}}
+ <div class="ui stackable grid">
+ {{template "org/team/sidebar" .}}
+ <div class="ui ten wide column">
+ {{template "org/team/navbar" .}}
+ {{if .IsOrganizationOwner}}
+ <div class="ui attached segment">
+ <form class="ui form ignore-dirty tw-flex tw-flex-wrap tw-gap-2" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/add" method="post">
+ {{.CsrfTokenHtml}}
+ <input type="hidden" name="uid" value="{{.SignedUser.ID}}">
+ <div id="search-user-box" class="ui search tw-mr-2"{{if .IsEmailInviteEnabled}} data-allow-email="true" data-allow-email-description="{{ctx.Locale.Tr "org.teams.invite_team_member" $.Team.Name}}"{{end}}>
+ <div class="ui input">
+ <input class="prompt" name="uname" placeholder="{{ctx.Locale.Tr "search.user_kind"}}" autocomplete="off" required>
+ </div>
+ </div>
+ <button class="ui primary button">{{ctx.Locale.Tr "org.teams.add_team_member"}}</button>
+ </form>
+ </div>
+ {{end}}
+ <div class="ui attached segment">
+ <div class="flex-list">
+ {{range .Team.Members}}
+ <div class="flex-item tw-items-center">
+ <div class="flex-item-leading">
+ <a href="{{.HomeLink}}">{{ctx.AvatarUtils.Avatar . 32}}</a>
+ </div>
+ <div class="flex-item-main">
+ <div class="flex-item-title">
+ {{template "shared/user/name" .}}
+ </div>
+ </div>
+ <div class="flex-item-trailing">
+ {{if and $.IsOrganizationOwner (not (and ($.Team.IsOwnerTeam) (eq (len $.Team.Members) 1)))}}
+ <form>
+ <button class="ui red button delete-button" data-modal-id="remove-team-member"
+ data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove" data-datauid="{{.ID}}"
+ data-name="{{.DisplayName}}"
+ data-data-team-name="{{$.Team.Name}}">{{ctx.Locale.Tr "org.members.remove"}}</button>
+ </form>
+ {{end}}
+ </div>
+ </div>
+ {{else}}
+ <div class="flex-item">
+ <span class="text grey tw-italic">{{ctx.Locale.Tr "org.teams.members.none"}}</span>
+ </div>
+ {{end}}
+ </div>
+ </div>
+ {{if and .Invites $.IsOrganizationOwner}}
+ <h4 class="ui top attached header">{{ctx.Locale.Tr "org.teams.invite_team_member.list"}}</h4>
+ <div class="ui attached segment">
+ <div class="flex-list">
+ {{range .Invites}}
+ <div class="flex-item tw-items-center">
+ <div class="flex-item-main">
+ {{.Email}}
+ </div>
+ <div class="flex-item-trailing">
+ <form action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove_invite" method="post">
+ {{$.CsrfTokenHtml}}
+ <input type="hidden" name="iid" value="{{.ID}}">
+ <button class="ui red button">{{ctx.Locale.Tr "org.members.remove"}}</button>
+ </form>
+ </div>
+ </div>
+ {{end}}
+ </div>
+ </div>
+ {{end}}
+ </div>
+ </div>
+ </div>
+</div>
+<div class="ui g-modal-confirm delete modal" id="remove-team-member">
+ <div class="header">
+ {{ctx.Locale.Tr "org.members.remove"}}
+ </div>
+ <div class="content">
+ <p>{{ctx.Locale.Tr "org.members.remove.detail" (`<span class="name"></span>`|SafeHTML) (`<span class="dataTeamName"></span>`|SafeHTML)}}</p>
+ </div>
+ {{template "base/modal_actions_confirm" .}}
+</div>
+{{template "base/footer" .}}
diff --git a/templates/org/team/navbar.tmpl b/templates/org/team/navbar.tmpl
new file mode 100644
index 0000000..8f2571e
--- /dev/null
+++ b/templates/org/team/navbar.tmpl
@@ -0,0 +1,4 @@
+<div class="ui top attached tabular menu org-team-navbar">
+ <a class="item{{if .PageIsOrgTeamMembers}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}">{{svg "octicon-person"}} <strong>{{.Team.NumMembers}}</strong>&nbsp; {{ctx.Locale.Tr "org.lower_members"}}</a>
+ <a class="item{{if .PageIsOrgTeamRepos}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/repositories">{{svg "octicon-repo"}} <strong>{{.Team.NumRepos}}</strong>&nbsp; {{ctx.Locale.Tr "org.lower_repositories"}}</a>
+</div>
diff --git a/templates/org/team/new.tmpl b/templates/org/team/new.tmpl
new file mode 100644
index 0000000..ed9cb98
--- /dev/null
+++ b/templates/org/team/new.tmpl
@@ -0,0 +1,148 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content organization new team">
+ {{template "org/header" .}}
+ <div class="ui container">
+ <div class="ui grid">
+ <div class="column">
+ <form class="ui form" action="{{if .PageIsOrgTeamsNew}}{{.OrgLink}}/teams/new{{else}}{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/edit{{end}}" data-delete-url="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/delete" method="post">
+ {{.CsrfTokenHtml}}
+ <h3 class="ui top attached header">
+ {{if .PageIsOrgTeamsNew}}{{ctx.Locale.Tr "org.create_new_team"}}{{else}}{{ctx.Locale.Tr "org.teams.settings"}}{{end}}
+ </h3>
+ <div class="ui attached segment">
+ {{template "base/alert" .}}
+ <div class="required field {{if .Err_TeamName}}error{{end}}">
+ <label for="team_name">{{ctx.Locale.Tr "org.team_name"}}</label>
+ {{if eq .Team.LowerName "owners"}}
+ <input type="hidden" name="team_name" value="{{.Team.Name}}">
+ {{end}}
+ <input id="team_name" name="team_name" value="{{.Team.Name}}" required {{if eq .Team.LowerName "owners"}}disabled{{end}} autofocus>
+ <span class="help">{{ctx.Locale.Tr "org.team_name_helper"}}</span>
+ </div>
+ <div class="field {{if .Err_Description}}error{{end}}">
+ <label for="description">{{ctx.Locale.Tr "org.team_desc"}}</label>
+ <input id="description" name="description" value="{{.Team.Description}}">
+ <span class="help">{{ctx.Locale.Tr "org.team_desc_helper"}}</span>
+ </div>
+ {{if not (eq .Team.LowerName "owners")}}
+ <fieldset>
+ <legend>{{ctx.Locale.Tr "org.team_access_desc"}}</legend>
+ <label>
+ <input type="radio" name="repo_access" value="specific" {{if not .Team.IncludesAllRepositories}}checked{{end}}>
+ {{ctx.Locale.Tr "org.teams.specific_repositories"}}
+ <span class="help">{{ctx.Locale.Tr "org.teams.specific_repositories_helper"}}</span>
+ </label>
+ <label>
+ <input type="radio" name="repo_access" value="all" {{if .Team.IncludesAllRepositories}}checked{{end}}>
+ {{ctx.Locale.Tr "org.teams.all_repositories"}}
+ <span class="help">{{ctx.Locale.Tr "org.teams.all_repositories_helper"}}</span>
+ </label>
+
+ <label>
+ <input name="can_create_org_repo" type="checkbox" {{if .Team.CanCreateOrgRepo}}checked{{end}}>
+ {{ctx.Locale.Tr "org.teams.can_create_org_repo"}}
+ <span class="help">{{ctx.Locale.Tr "org.teams.can_create_org_repo_helper"}}</span>
+ </label>
+ </fieldset>
+ <fieldset>
+ <legend>{{ctx.Locale.Tr "org.team_permission_desc"}}</legend>
+ <label>
+ <input type="radio" name="permission" value="admin" {{if eq .Team.AccessMode 3}}checked{{end}}>
+ {{ctx.Locale.Tr "org.teams.admin_access"}}
+ <span class="help">{{ctx.Locale.Tr "org.teams.admin_access_helper"}}</span>
+ </label>
+ <label>
+ <input type="radio" name="permission" value="read" {{if or .PageIsOrgTeamsNew (eq .Team.AccessMode 1) (eq .Team.AccessMode 2)}}checked{{end}}>
+ {{ctx.Locale.Tr "org.teams.general_access"}}
+ <span class="help">{{ctx.Locale.Tr "org.teams.general_access_helper"}}</span>
+ </label>
+ <fieldset class="hide-unless-checked">
+ <legend>{{ctx.Locale.Tr "org.team_unit_desc"}}
+ <span class="help">{{ctx.Locale.Tr "org.teams.none_access_helper"}}</span>
+ </legend>
+ <table class="ui table optionmatrix">
+ <thead>
+ <tr>
+ <th>{{ctx.Locale.Tr "units.unit"}}</th>
+ <th id="access_none">{{ctx.Locale.Tr "org.teams.none_access"}}</th>
+ <th>{{ctx.Locale.Tr "org.teams.read_access"}}</th>
+ <th>{{ctx.Locale.Tr "org.teams.write_access"}}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{range $t, $unit := $.Units}}
+ {{if ge $unit.MaxPerm 2}}
+ <tr>
+ <td>
+ <label {{if $unit.Type.UnitGlobalDisabled}} data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
+ <span id="help_{{$unit.Type.Value}}_name">{{ctx.Locale.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{ctx.Locale.Tr "org.team_unit_disabled"}}{{end}}</span>
+ <span class="help" id="help_{{$unit.Type.Value}}_r">{{ctx.Locale.Tr (print "repo.permissions." $unit.Name ".read")}}</span>
+ <span class="help" id="help_{{$unit.Type.Value}}_w">{{ctx.Locale.Tr (print "repo.permissions." $unit.Name ".write")}}</span>
+ </label>
+ </td>
+ <td>
+ <label>
+ <input aria-labelledby="help_{{$unit.Type.Value}}_name access_none" type="radio" name="unit_{{$unit.Type.Value}}" value="0"{{if or ($unit.Type.UnitGlobalDisabled) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 0)}} checked{{end}}>
+ <span class="only-mobile">{{ctx.Locale.Tr "org.teams.none_access"}}</span>
+ </label>
+ </td>
+ <td>
+ <label>
+ <input aria-labelledby="help_{{$unit.Type.Value}}_name help_{{$unit.Type.Value}}_r" type="radio" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}>
+ <span class="only-mobile">{{ctx.Locale.Tr "org.teams.read_access"}}</span>
+ </label>
+ </td>
+ <td>
+ <label>
+ <input aria-labelledby="help_{{$unit.Type.Value}}_name help_{{$unit.Type.Value}}_w" type="radio" name="unit_{{$unit.Type.Value}}" value="2"{{if (ge ($.Team.UnitAccessMode $.Context $unit.Type) 2)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}>
+ <span class="only-mobile">{{ctx.Locale.Tr "org.teams.write_access"}}</span>
+ </label>
+ </td>
+ </tr>
+ {{end}}
+ {{end}}
+ </tbody>
+ </table>
+ <fieldset>
+ {{range $t, $unit := $.Units}}
+ {{if lt $unit.MaxPerm 2}}
+ <label {{if $unit.Type.UnitGlobalDisabled}}data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{end}}>
+ <input type="checkbox" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}>
+ {{ctx.Locale.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{ctx.Locale.Tr "org.team_unit_disabled"}}{{end}}
+ <span class="help">{{ctx.Locale.Tr (print "repo.permissions." $unit.Name)}}</span>
+ </label>
+ {{end}}
+ {{end}}
+ </fieldset>
+ </fieldset>
+ </fieldset>
+ {{end}}
+
+ <div class="field">
+ {{if .PageIsOrgTeamsNew}}
+ <button class="ui primary button">{{ctx.Locale.Tr "org.create_team"}}</button>
+ {{else}}
+ <button class="ui primary button">{{ctx.Locale.Tr "org.teams.update_settings"}}</button>
+ {{if not (eq .Team.LowerName "owners")}}
+ <button class="ui red button delete-button" data-url="{{.OrgLink}}/teams/{{.Team.Name | PathEscape}}/delete">{{ctx.Locale.Tr "org.teams.delete_team"}}</button>
+ {{end}}
+ {{end}}
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+</div>
+
+<div class="ui g-modal-confirm delete modal">
+ <div class="header">
+ {{svg "octicon-trash"}}
+ {{ctx.Locale.Tr "org.teams.delete_team_title"}}
+ </div>
+ <div class="content">
+ <p>{{ctx.Locale.Tr "org.teams.delete_team_desc"}}</p>
+ </div>
+ {{template "base/modal_actions_confirm" .}}
+</div>
+{{template "base/footer" .}}
diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl
new file mode 100644
index 0000000..f5d68ce
--- /dev/null
+++ b/templates/org/team/repositories.tmpl
@@ -0,0 +1,61 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content organization teams">
+ {{template "org/header" .}}
+ <div class="ui container">
+ {{template "base/alert" .}}
+ <div class="ui stackable grid">
+ {{template "org/team/sidebar" .}}
+ <div class="ui ten wide column">
+ {{template "org/team/navbar" .}}
+ {{$canAddRemove := and $.IsOrganizationOwner (not $.Team.IncludesAllRepositories)}}
+ {{if $canAddRemove}}
+ <div class="ui attached segment tw-flex tw-flex-wrap tw-gap-2">
+ <form class="ui form ignore-dirty tw-flex-1 tw-flex" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/add" method="post">
+ {{.CsrfTokenHtml}}
+ <div id="search-repo-box" data-uid="{{.Org.ID}}" class="ui search">
+ <div class="ui input">
+ <input class="prompt" name="repo_name" placeholder="{{ctx.Locale.Tr "search.repo_kind"}}" autocomplete="off" required>
+ </div>
+ </div>
+ <button class="ui primary button tw-ml-2">{{ctx.Locale.Tr "add"}}</button>
+ </form>
+ <div class="tw-inline-block">
+ <button class="ui primary button link-action" data-modal-confirm="{{ctx.Locale.Tr "org.teams.add_all_repos_desc"}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/addall">{{ctx.Locale.Tr "add_all"}}</button>
+ <button class="ui red button link-action" data-modal-confirm="{{ctx.Locale.Tr "org.teams.remove_all_repos_desc"}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/removeall">{{ctx.Locale.Tr "remove_all"}}</button>
+ </div>
+ </div>
+ {{end}}
+ <div class="ui attached segment">
+ <div class="flex-list">
+ {{range .Team.Repos}}
+ <div class="flex-item tw-items-center">
+ <div class="flex-item-leading">
+ {{template "repo/icon" .}}
+ </div>
+ <div class="flex-item-main">
+ <a class="flex-item-title text primary" href="{{$.Org.HomeLink}}/{{.Name | PathEscape}}">
+ {{$.Org.Name}}/{{.Name}}
+ </a>
+ </div>
+ <div class="flex-item-trailing">
+ {{if $canAddRemove}}
+ <form method="post" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/remove">
+ {{$.CsrfTokenHtml}}
+ <button type="submit" class="ui red small button" name="repoid" value="{{.ID}}">{{ctx.Locale.Tr "remove"}}</button>
+ </form>
+ {{end}}
+ </div>
+ </div>
+ {{else}}
+ <div class="flex-item">
+ <span class="text grey tw-italic">{{ctx.Locale.Tr "org.teams.repos.none"}}</span>
+ </div>
+ {{end}}
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+
+{{template "base/footer" .}}
diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl
new file mode 100644
index 0000000..c9f8025
--- /dev/null
+++ b/templates/org/team/sidebar.tmpl
@@ -0,0 +1,94 @@
+<div class="ui six wide column">
+ <h4 class="ui top attached header">
+ <strong>{{.Team.Name}}</strong>
+ <div class="ui right">
+ {{if .Team.IsMember ctx $.SignedUser.ID}}
+ <form>
+ <button class="ui red tiny button delete-button" data-modal-id="leave-team-sidebar"
+ data-url="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/action/leave" data-datauid="{{$.SignedUser.ID}}"
+ data-name="{{.Team.Name}}">{{ctx.Locale.Tr "org.teams.leave"}}</button>
+ </form>
+ {{else if .IsOrganizationOwner}}
+ <form method="post" action="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/action/join">
+ {{$.CsrfTokenHtml}}
+ <input type="hidden" name="page" value="team">
+ <button type="submit" class="ui primary tiny button" name="uid" value="{{$.SignedUser.ID}}">{{ctx.Locale.Tr "org.teams.join"}}</button>
+ </form>
+ {{end}}
+ </div>
+ </h4>
+ <div class="ui attached table segment detail">
+ <div class="item">
+ {{if .Team.Description}}
+ {{.Team.Description}}
+ {{else}}
+ <span class="text grey tw-italic">{{ctx.Locale.Tr "org.teams.no_desc"}}</span>
+ {{end}}
+ </div>
+ {{if eq .Team.LowerName "owners"}}
+ <div class="item">
+ {{ctx.Locale.Tr "org.teams.owners_permission_desc"}}
+ </div>
+ {{else}}
+ <div class="item">
+ <h3>{{ctx.Locale.Tr "org.team_access_desc"}}</h3>
+ <ul>
+ {{if .Team.IncludesAllRepositories}}
+ <li>{{ctx.Locale.Tr "org.teams.all_repositories"}}</li>
+ {{else}}
+ <li>{{ctx.Locale.Tr "org.teams.specific_repositories"}}</li>
+ {{end}}
+ {{if .Team.CanCreateOrgRepo}}
+ <li>{{ctx.Locale.Tr "org.teams.can_create_org_repo"}}</li>
+ {{end}}
+ </ul>
+ {{if (eq .Team.AccessMode 2)}}
+ <h3>{{ctx.Locale.Tr "org.settings.permission"}}</h3>
+ {{ctx.Locale.Tr "org.teams.write_permission_desc"}}
+ {{else if (eq .Team.AccessMode 3)}}
+ <h3>{{ctx.Locale.Tr "org.settings.permission"}}</h3>
+ {{ctx.Locale.Tr "org.teams.admin_permission_desc"}}
+ {{else}}
+ <table class="ui table">
+ <thead>
+ <tr>
+ <th>{{ctx.Locale.Tr "units.unit"}}</th>
+ <th>{{ctx.Locale.Tr "org.team_permission_desc"}}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{range $t, $unit := $.Units}}
+ {{if (not $unit.Type.UnitGlobalDisabled)}}
+ <tr>
+ <td><strong>{{ctx.Locale.Tr $unit.NameKey}}</strong></td>
+ <td>{{if eq ($.Team.UnitAccessMode $.Context $unit.Type) 0 -}}
+ {{ctx.Locale.Tr "org.teams.none_access"}}
+ {{- else if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1) -}}
+ {{ctx.Locale.Tr "org.teams.read_access"}}
+ {{- else if eq ($.Team.UnitAccessMode $.Context $unit.Type) 2 -}}
+ {{ctx.Locale.Tr "org.teams.write_access"}}
+ {{- end}}</td>
+ </tr>
+ {{end}}
+ {{end}}
+ </tbody>
+ </table>
+ {{end}}
+ </div>
+ {{end}}
+ </div>
+ {{if .IsOrganizationOwner}}
+ <div class="ui bottom attached segment">
+ <a class="ui teal small button" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/edit">{{svg "octicon-gear"}} {{ctx.Locale.Tr "org.teams.settings"}}</a>
+ </div>
+ {{end}}
+</div>
+<div class="ui g-modal-confirm delete modal" id="leave-team-sidebar">
+ <div class="header">
+ {{ctx.Locale.Tr "org.teams.leave"}}
+ </div>
+ <div class="content">
+ <p>{{ctx.Locale.Tr "org.teams.leave.detail" (`<span class="name"></span>`|SafeHTML)}}</p>
+ </div>
+ {{template "base/modal_actions_confirm" .}}
+</div>
diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl
new file mode 100644
index 0000000..53c909e
--- /dev/null
+++ b/templates/org/team/teams.tmpl
@@ -0,0 +1,56 @@
+{{template "base/head" .}}
+<div role="main" aria-label="{{.Title}}" class="page-content organization teams">
+ {{template "org/header" .}}
+ <div class="ui container">
+ {{template "base/alert" .}}
+ {{if .IsOrganizationOwner}}
+ <div class="text right">
+ <a class="ui primary button" href="{{.OrgLink}}/teams/new">{{svg "octicon-plus"}} {{ctx.Locale.Tr "org.create_new_team"}}</a>
+ </div>
+ <div class="divider"></div>
+ {{end}}
+
+ <div class="ui two column stackable grid">
+ {{range .Teams}}
+ <div class="column">
+ <div class="ui top attached header">
+ <a class="text black" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong>{{.Name}}</strong></a>
+ <div class="ui right">
+ <a class="ui primary tiny button" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}">{{ctx.Locale.Tr "view"}}</a>
+ {{if .IsMember ctx $.SignedUser.ID}}
+ <form>
+ <button class="ui red tiny button delete-button" data-modal-id="leave-team"
+ data-url="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/action/leave" data-datauid="{{$.SignedUser.ID}}"
+ data-name="{{.Name}}">{{ctx.Locale.Tr "org.teams.leave"}}</button>
+ </form>
+ {{else if $.IsOrganizationOwner}}
+ <form method="post" action="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/action/join">
+ {{$.CsrfTokenHtml}}
+ <button type="submit" class="ui primary tiny button" name="uid" value="{{$.SignedUser.ID}}">{{ctx.Locale.Tr "org.teams.join"}}</button>
+ </form>
+ {{end}}
+ </div>
+ </div>
+ <div class="ui attached segment members">
+ {{range .Members}}
+ {{template "shared/user/avatarlink" dict "user" .}}
+ {{end}}
+ </div>
+ <div class="ui bottom attached header">
+ <p class="team-meta"><a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}">{{.NumMembers}} {{ctx.Locale.Tr "org.lower_members"}}</a> ยท <a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/repositories">{{.NumRepos}} {{ctx.Locale.Tr "org.lower_repositories"}}</a></p>
+ </div>
+ </div>
+ {{end}}
+ </div>
+ </div>
+</div>
+<div class="ui g-modal-confirm delete modal" id="leave-team">
+ <div class="header">
+ {{ctx.Locale.Tr "org.teams.leave"}}
+ </div>
+ <div class="content">
+ <p>{{ctx.Locale.Tr "org.teams.leave.detail" (`<span class="name"></span>`|SafeHTML)}}</p>
+ </div>
+ {{template "base/modal_actions_confirm" .}}
+</div>
+{{template "base/footer" .}}