summaryrefslogtreecommitdiffstats
path: root/templates/org/team/teams.tmpl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-10-11 10:27:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-10-11 10:27:00 +0000
commit65aa53fc52ff15efe54df4147564828d535837f8 (patch)
tree31c51dad04fdcca80e6d3043c8bd49d2f1a51f83 /templates/org/team/teams.tmpl
parentInitial commit. (diff)
downloadforgejo-debian.tar.xz
forgejo-debian.zip
Adding upstream version 8.0.3.HEADupstream/8.0.3upstreamdebian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'templates/org/team/teams.tmpl')
-rw-r--r--templates/org/team/teams.tmpl56
1 files changed, 56 insertions, 0 deletions
diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl
new file mode 100644
index 00000000..53c909ee
--- /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" .}}