From f52a8086c07dd9ce26cdd09a679b70407e1f74f0 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 2 Nov 2021 14:33:21 -0400 Subject: [PATCH] Afform - Display the extension in which an Afform is packaged Expose the base_module field to the Afform admin UI as a column. --- ext/afform/admin/ang/afAdmin.js | 2 +- ext/afform/admin/ang/afAdmin/afAdminList.controller.js | 2 +- ext/afform/admin/ang/afAdmin/afAdminList.html | 10 +++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ext/afform/admin/ang/afAdmin.js b/ext/afform/admin/ang/afAdmin.js index e118f5c8d3..cf77161755 100644 --- a/ext/afform/admin/ang/afAdmin.js +++ b/ext/afform/admin/ang/afAdmin.js @@ -11,7 +11,7 @@ // Load data for lists afforms: function(crmApi4) { return crmApi4('Afform', 'get', { - select: ['name', 'title', 'type', 'server_route', 'is_public', 'has_local', 'has_base', 'is_dashlet', 'contact_summary:label'] + select: ['name', 'title', 'type', 'server_route', 'is_public', 'has_local', 'has_base', 'base_module', 'base_module:label', 'is_dashlet', 'contact_summary:label'] }); } } diff --git a/ext/afform/admin/ang/afAdmin/afAdminList.controller.js b/ext/afform/admin/ang/afAdmin/afAdminList.controller.js index abf0064c2e..f7a0070102 100644 --- a/ext/afform/admin/ang/afAdmin/afAdminList.controller.js +++ b/ext/afform/admin/ang/afAdmin/afAdminList.controller.js @@ -126,7 +126,7 @@ if (afform.has_base) { apiOps.push(['Afform', 'get', { where: [['name', '=', afform.name]], - select: ['name', 'title', 'type', 'is_public', 'server_route', 'has_local', 'has_base'] + select: ['name', 'title', 'type', 'is_public', 'server_route', 'has_local', 'has_base', 'base_module', 'base_module:label'] }, 0]); } var apiCall = crmStatus( diff --git a/ext/afform/admin/ang/afAdmin/afAdminList.html b/ext/afform/admin/ang/afAdmin/afAdminList.html index b6459ccb27..29f35eb452 100644 --- a/ext/afform/admin/ang/afAdmin/afAdminList.html +++ b/ext/afform/admin/ang/afAdmin/afAdminList.html @@ -57,6 +57,11 @@ {{:: ts('Placement') }} + + + + {{:: ts('Package') }} + @@ -73,10 +78,13 @@ {{:: afform.placement.join(', ') }} + + {{:: afform['base_module:label'] }} + {{:: ts('Edit') }} {{:: ts('Clone') }} - + {{ afform.has_base ? ts('Revert') : ts('Delete') }} -- 2.25.1