From 9705c7f03f1eba1d1530e6defa4a2762c9c8ea61 Mon Sep 17 00:00:00 2001 From: Jeff Davis Date: Tue, 17 Dec 2019 16:06:19 -0800 Subject: [PATCH] LP#1847800 / LP#1834687: secondary admin pages: config_field attribute in IDL Signed-off-by: Jeff Davis Signed-off-by: Bill Erickson Signed-off-by: Chris Sharp --- Open-ILS/examples/fm_IDL.xml | 2 +- Open-ILS/examples/fm_IDL.xsd | 1 + .../src/eg2/src/app/staff/share/admin-page/admin-page.component.ts | 5 +++++ Open-ILS/xsl/fm_IDL2js.xsl | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 4dbbcbb123..c414118d95 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -1232,7 +1232,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - + diff --git a/Open-ILS/examples/fm_IDL.xsd b/Open-ILS/examples/fm_IDL.xsd index 7ebbd51fb1..82cf1ecdda 100644 --- a/Open-ILS/examples/fm_IDL.xsd +++ b/Open-ILS/examples/fm_IDL.xsd @@ -61,6 +61,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + diff --git a/Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.ts b/Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.ts index cb52da7f1d..6dd763259a 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/admin-page/admin-page.component.ts @@ -96,6 +96,7 @@ export class AdminPageComponent implements OnInit { idlClassDef: any; pkeyField: string; + configFields: string[]; // True if any columns on the object support translations translateRowIdx: number; @@ -122,6 +123,7 @@ export class AdminPageComponent implements OnInit { public toast: ToastService ) { this.translatableFields = []; + this.configFields = []; } applyOrgValues(orgId?: number) { @@ -163,6 +165,9 @@ export class AdminPageComponent implements OnInit { this.idlClassDef.table; } + this.configFields = + this.idlClassDef.fields.filter(f => f.config_field); + // gridFilters are a JSON encoded string const filters = this.route.snapshot.queryParamMap.get('gridFilters'); if (filters) { diff --git a/Open-ILS/xsl/fm_IDL2js.xsl b/Open-ILS/xsl/fm_IDL2js.xsl index aeb4573f48..cf7b7450a5 100644 --- a/Open-ILS/xsl/fm_IDL2js.xsl +++ b/Open-ILS/xsl/fm_IDL2js.xsl @@ -47,7 +47,7 @@ for (var c in _preload_fieldmapper_IDL) { -{name:"",label:"",primitive:true,selector:"",virtual:true,required:true,i18n:true,datatype:""} +{name:"",label:"",primitive:true,selector:"",virtual:true,required:true,i18n:true,config_field:true,datatype:""} perms:['',] -- 2.11.0