aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLunny Xiao2022-02-26 04:51:22 +0800
committerGitHub2022-02-25 21:51:22 +0100
commiteb43e7378574a9542af13454b1b959159b582c57 (patch)
tree804b8a03aeaabbe253b1386c587b6c1639c8d6ed
parentc077a0361ab2a2799e51aa54216fa4348f5d166f (diff)
Fix team management UI (#18887)
-rw-r--r--templates/org/team/members.tmpl2
-rw-r--r--templates/org/team/sidebar.tmpl4
2 files changed, 3 insertions, 3 deletions
diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl
index a064ee9b4..c976aa896 100644
--- a/templates/org/team/members.tmpl
+++ b/templates/org/team/members.tmpl
@@ -26,7 +26,7 @@
<div class="ui bottom attached table segment members">
{{range .Team.Members}}
<div class="item">
- {{if and $.IsOrganizationOwner (not (eq $.SignedUser.ID .ID))}}
+ {{if and $.IsOrganizationOwner (not (and ($.Team.IsOwnerTeam) (eq (len $.Team.Members) 1)))}}
<form>
<button class="ui red button delete-button right" data-modal-id="remove-team-member"
data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove" data-datauid="{{.ID}}"
diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl
index 2dec681b4..c0ca459f6 100644
--- a/templates/org/team/sidebar.tmpl
+++ b/templates/org/team/sidebar.tmpl
@@ -74,8 +74,8 @@
</tbody>
</table>
{{end}}
- {{end}}
- </div>
+ </div>
+ {{end}}
</div>
{{if .IsOrganizationOwner}}
<div class="ui bottom attached segment">