From c3ae7a26154ab809b76ec75b838d0557f8116049 Mon Sep 17 00:00:00 2001 From: Tom Bloor Date: Mon, 20 Nov 2017 13:02:07 +0000 Subject: [PATCH] Added badge on organisations showing if they are a user or not --- lib/Pear/LocalLoop/Schema/Result/Organisation.pm | 6 ++++++ templates/admin/organisations/list.html.ep | 3 +++ 2 files changed, 9 insertions(+) diff --git a/lib/Pear/LocalLoop/Schema/Result/Organisation.pm b/lib/Pear/LocalLoop/Schema/Result/Organisation.pm index 630d5fc..98b75c5 100644 --- a/lib/Pear/LocalLoop/Schema/Result/Organisation.pm +++ b/lib/Pear/LocalLoop/Schema/Result/Organisation.pm @@ -123,4 +123,10 @@ sub to_bool { } } +sub user { + my $self = shift; + + return $self->entity->user; +} + 1; diff --git a/templates/admin/organisations/list.html.ep b/templates/admin/organisations/list.html.ep index f0b53ef..6885797 100644 --- a/templates/admin/organisations/list.html.ep +++ b/templates/admin/organisations/list.html.ep @@ -28,6 +28,9 @@ % if ( $org_result->pending ) { Unvalidated % } + % if ( defined $org_result->user ) { + User + % } % if ( !defined $org_result->is_local ) { Locality Not Set % } elsif ( $org_result->is_local ) {