From af7dcde7aac5995941fdace26103c48ea498d0f0 Mon Sep 17 00:00:00 2001 From: Finn Date: Fri, 8 Dec 2017 12:30:49 +0000 Subject: [PATCH] esta added to schema and updated admin interface --- CHANGELOG.md | 3 +++ .../LocalLoop/Controller/Admin/Organisations.pm | 3 +++ .../LocalLoop/Schema/Result/EntityAssociation.pm | 5 +++++ templates/admin/organisations/valid_read.html.ep | 13 +++++++++++-- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a38acbb..2e8616d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ # Next Release +* **Admin Feature** Improved links in relevant places to automatically open in + a new tab + # v0.9.7 * **Admin Fix**: Fix error in Importing under Postgres diff --git a/lib/Pear/LocalLoop/Controller/Admin/Organisations.pm b/lib/Pear/LocalLoop/Controller/Admin/Organisations.pm index 0382bc4..7a42d10 100644 --- a/lib/Pear/LocalLoop/Controller/Admin/Organisations.pm +++ b/lib/Pear/LocalLoop/Controller/Admin/Organisations.pm @@ -88,6 +88,7 @@ sub valid_read { my $associations = $valid_org->entity->associations; my $assoc = { lis => defined $associations ? $associations->lis : 0, + esta => defined $associations ? $associations->esta : 0, }; $c->stash( @@ -109,6 +110,7 @@ sub valid_edit { $validation->optional('pending'); $validation->optional('is_local'); $validation->optional('is_lis'); + $validation->optional('is_esta'); if ( $validation->has_error ) { $c->flash( error => 'The validation has failed' ); @@ -130,6 +132,7 @@ sub valid_edit { }); $valid_org->entity->update_or_create_related( 'associations', { lis => $validation->param('is_lis'), + esta => $validation->param('is_esta') }); } ); } finally { diff --git a/lib/Pear/LocalLoop/Schema/Result/EntityAssociation.pm b/lib/Pear/LocalLoop/Schema/Result/EntityAssociation.pm index 442adb5..f4c0744 100644 --- a/lib/Pear/LocalLoop/Schema/Result/EntityAssociation.pm +++ b/lib/Pear/LocalLoop/Schema/Result/EntityAssociation.pm @@ -23,6 +23,11 @@ __PACKAGE__->add_columns( default => undef, is_nullable => 1, }, + "esta" => { + data_type => 'boolean', + default => undef, + is_nullable => 1, + }, ); __PACKAGE__->set_primary_key("id"); diff --git a/templates/admin/organisations/valid_read.html.ep b/templates/admin/organisations/valid_read.html.ep index 5b6d934..5341659 100644 --- a/templates/admin/organisations/valid_read.html.ep +++ b/templates/admin/organisations/valid_read.html.ep @@ -103,8 +103,17 @@ function initMap() {
+
+ +
+ +
+