diff --git a/src/Controller/OrganisationController.php b/src/Controller/OrganisationController.php index 3e5023e..8df5d9e 100644 --- a/src/Controller/OrganisationController.php +++ b/src/Controller/OrganisationController.php @@ -1114,17 +1114,8 @@ class OrganisationController extends SimpleController throw new ForbiddenException(); } - $tableColumns = [ 'description' ]; + $tableColumns = [ 'description', 'join' ]; - if ( - ( - $currentUser->organisations(true)->count() == 0 - || !$config['organisation']['membership']['single_membership'] - ) - && !$config['organisation']['combine_action_buttons'] - ) { - $tableColumns[] = 'join'; - } if ($currentUser->organisations(true)->wherePivot('flag_admin', true) || $authorizer->checkAccess($currentUser, 'delete_organisation') @@ -1136,6 +1127,11 @@ class OrganisationController extends SimpleController $tableColumns[] = 'actions'; } + if ($currentUser->organisations(true)->wherePivot('flag_admin', true)) { + $tableColumns[] = 'status'; + $tableColumns[] = 'actions'; + } + return $this->ci->view->render( $response, 'pages/organisations.html.twig',