]> source.dussan.org Git - gitea.git/commitdiff
Fix team management UI (#18886)
authorLunny Xiao <xiaolunwen@gmail.com>
Fri, 25 Feb 2022 21:19:54 +0000 (05:19 +0800)
committerGitHub <noreply@github.com>
Fri, 25 Feb 2022 21:19:54 +0000 (16:19 -0500)
Co-authored-by: 6543 <6543@obermui.de>
templates/org/team/members.tmpl
templates/org/team/sidebar.tmpl

index a064ee9b4f7be499dd24280143407e0d43f29261..c976aa8965e5974f0e8417a827f06a4474f06ab7 100644 (file)
@@ -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}}"
index 2dec681b4c6336bf1139317c8dc34261bb8c2315..c0ca459f67fe05e2535a8f77cc3e540e81c7942b 100644 (file)
@@ -74,8 +74,8 @@
                                                </tbody>
                                        </table>
                                {{end}}
-                       {{end}}
-               </div>
+                       </div>
+               {{end}}
        </div>
        {{if .IsOrganizationOwner}}
                <div class="ui bottom attached segment">