From ed8607fd35231173f5c51366659fa2633de309ee Mon Sep 17 00:00:00 2001 From: Tom Bloor Date: Mon, 23 Oct 2017 17:44:38 +0100 Subject: [PATCH] Combine organisation lists into one with badges for warnings --- .../Controller/Admin/Organisations.pm | 6 ++-- templates/admin/organisations/list.html.ep | 34 +++++-------------- 2 files changed, 11 insertions(+), 29 deletions(-) diff --git a/lib/Pear/LocalLoop/Controller/Admin/Organisations.pm b/lib/Pear/LocalLoop/Controller/Admin/Organisations.pm index 4fefec3..31f92b2 100644 --- a/lib/Pear/LocalLoop/Controller/Admin/Organisations.pm +++ b/lib/Pear/LocalLoop/Controller/Admin/Organisations.pm @@ -6,12 +6,10 @@ use Try::Tiny; sub list { my $c = shift; - my $valid_orgs_rs = $c->schema->resultset('Organisation')->search({ pending => 0 }); - my $pending_orgs_rs = $c->schema->resultset('Organisation')->search({ pending => 1 }); + my $orgs_rs = $c->schema->resultset('Organisation'); $c->stash( - valid_orgs_rs => $valid_orgs_rs, - pending_orgs_rs => $pending_orgs_rs, + orgs_rs => $orgs_rs, ); } diff --git a/templates/admin/organisations/list.html.ep b/templates/admin/organisations/list.html.ep index 4db8974..de43a90 100644 --- a/templates/admin/organisations/list.html.ep +++ b/templates/admin/organisations/list.html.ep @@ -15,39 +15,23 @@
-
-
-

- Pending Organisations -

-
- % if ( $pending_orgs_rs->count == 0 ) { -
- No Pending Organisations! -
- % } else { - % for my $pending_org ($pending_orgs_rs->all) { - -
- %= $pending_org->name -
-
- % }} -
-
-