aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-02-26 05:19:54 +0800
committerGitHub <noreply@github.com>2022-02-25 16:19:54 -0500
commit36d31d521d6343cc3616e03d481094952c8deab4 (patch)
tree000b5b21b10aa86d95821b41fd92df4839a6ab9c /templates
parent65689f6b37d463f369e1b006c5b4f306dacb016c (diff)
downloadgitea-36d31d521d6343cc3616e03d481094952c8deab4.tar.gz
gitea-36d31d521d6343cc3616e03d481094952c8deab4.zip
Fix team management UI (#18886)
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'templates')
-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 a064ee9b4f..c976aa8965 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 2dec681b4c..c0ca459f67 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">