From 36703a86a998c7c395f110f94b3b3feebc2a3a80 Mon Sep 17 00:00:00 2001 From: Bernd Blessmann Date: Wed, 7 Mar 2012 11:57:19 +0100 Subject: [PATCH] Warengruppen-Filter f. CVars bei Waren MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit cherry-pick aus Kundenprojekt und Anpassungen an unstable (hauptsächlich Umstellung auf Controller) Conflicts: SL/CVar.pm SL/DB/CustomVariableConfig.pm bin/mozilla/amcvar.pl bin/mozilla/io.pl templates/webpages/amcvar/display_cvar_config_form.html templates/webpages/amcvar/render_inputs_block.html --- SL/CVar.pm | 17 +++++++-- SL/Controller/CustomVariableConfig.pm | 15 ++++++++ SL/DB/CustomVariableConfig.pm | 7 ++++ SL/DB/CustomVariableConfigPartsgroup.pm | 13 +++++++ SL/DB/Helper/ALL.pm | 1 + SL/DB/Helper/Mappings.pm | 1 + .../Manager/CustomVariableConfigPartsgroup.pm | 15 ++++++++ .../CustomVariableConfigPartsgroup.pm | 35 +++++++++++++++++++ SL/DB/PartsGroup.pm | 7 ++++ SL/PE.pm | 9 +++++ bin/mozilla/ic.pl | 4 ++- bin/mozilla/io.pl | 17 ++++++++- locale/de/all | 3 ++ locale/en/all | 3 ++ .../custom_variable_partsgroups.sql | 20 +++++++++++ .../webpages/amcvar/render_checkboxes.html | 4 +++ templates/webpages/amcvar/render_inputs.html | 2 +- .../webpages/amcvar/render_inputs_block.html | 2 +- .../webpages/custom_variable_config/form.html | 28 +++++++++++++++ .../webpages/custom_variable_config/list.html | 21 +++++++---- templates/webpages/ic/form_footer.html | 4 ++- templates/webpages/oe/sales_order.html | 2 +- 22 files changed, 214 insertions(+), 16 deletions(-) create mode 100644 SL/DB/CustomVariableConfigPartsgroup.pm create mode 100644 SL/DB/Manager/CustomVariableConfigPartsgroup.pm create mode 100644 SL/DB/MetaSetup/CustomVariableConfigPartsgroup.pm create mode 100644 sql/Pg-upgrade2/custom_variable_partsgroups.sql diff --git a/SL/CVar.pm b/SL/CVar.pm index 99e46726b..0264d8ab0 100644 --- a/SL/CVar.pm +++ b/SL/CVar.pm @@ -55,6 +55,10 @@ SQL } $self->_unpack_flags($config); + + my $cvar_config = SL::DB::CustomVariableConfig->new(id => $config->{id})->load; + @{$config->{'partsgroups'}} = map {$_->id} @{$cvar_config->partsgroups}; + } $::form->{CVAR_CONFIGS}->{$params{module}} = $configs; } @@ -279,13 +283,20 @@ sub render_inputs { my $myconfig = \%main::myconfig; my $form = $main::form; - my %options = ( name_prefix => "$params{name_prefix}", - name_postfix => "$params{name_postfix}", - hide_non_editable => $params{hide_non_editable}, + my %options = ( name_prefix => "$params{name_prefix}", + name_postfix => "$params{name_postfix}", + hide_non_editable => $params{hide_non_editable}, show_disabled_message => $params{show_disabled_message}, ); + # should this cvar be filtered by partsgroups? foreach my $var (@{ $params{variables} }) { + if ($var->{flag_partsgroup_filter}) { + if (!$params{partsgroup_id} || (!grep {$params{partsgroup_id} == $_} @{ $var->{partsgroups} })) { + $var->{partsgroup_filtered} = 1; + } + } + $var->{HTML_CODE} = $form->parse_html_template('amcvar/render_inputs', { var => $var, %options }); $var->{VALID_BOX} = $form->parse_html_template('amcvar/render_checkboxes', { var => $var, %options }); } diff --git a/SL/Controller/CustomVariableConfig.pm b/SL/Controller/CustomVariableConfig.pm index 744d58aca..ed7e844c1 100644 --- a/SL/Controller/CustomVariableConfig.pm +++ b/SL/Controller/CustomVariableConfig.pm @@ -8,6 +8,7 @@ use List::Util qw(first); use SL::DB::CustomVariableConfig; use SL::DB::CustomVariableValidity; +use SL::DB::PartsGroup; use SL::Helper::Flash; use SL::Locale::String; use Data::Dumper; @@ -66,6 +67,9 @@ sub show_form { split m/:/, ($self->config->flags || '') }); + $params{all_partsgroups} = SL::DB::Manager::PartsGroup->get_all(); + + $::request->layout->use_javascript("${_}.js") for qw(jquery.selectboxes jquery.multiselect2side); $self->render('custom_variable_config/form', %params); } @@ -90,6 +94,9 @@ sub action_update { sub action_destroy { my ($self) = @_; + # delete relationship to partsgroups (for filter) before cvar can be deleted + $self->config->update_attributes(partsgroups => []); + if (eval { $self->config->delete; 1; }) { flash_later('info', t8('The custom variable has been deleted.')); } else { @@ -166,6 +173,14 @@ sub create_or_update { my $params = delete($::form->{config}) || { }; delete $params->{id}; + if ($self->module eq 'IC') { + $params->{partsgroups} = [] if !$params->{flag_partsgroup_filter}; + } else { + delete $params->{flag_partsgroup_filter}; + $params->{partsgroups} = []; + } + + $params->{partsgroups} ||= []; # The list is empty, if control is not send by the browser. $params->{default_value} = $::form->parse_amount(\%::myconfig, $params->{default_value}) if $params->{type} eq 'number'; $params->{included_by_default} = 0 if !$params->{includeable}; $params->{flags} = join ':', map { m/^flag_(.*)/; "${1}=" . delete($params->{$_}) } grep { m/^flag_/ } keys %{ $params }; diff --git a/SL/DB/CustomVariableConfig.pm b/SL/DB/CustomVariableConfig.pm index 2cc4e6a90..5404ebff8 100644 --- a/SL/DB/CustomVariableConfig.pm +++ b/SL/DB/CustomVariableConfig.pm @@ -11,6 +11,13 @@ use SL::DB::MetaSetup::CustomVariableConfig; use SL::DB::Manager::CustomVariableConfig; use SL::DB::Helper::ActsAsList; +__PACKAGE__->meta->add_relationship( + partsgroups => { + type => 'many to many', + map_class => 'SL::DB::CustomVariableConfigPartsgroup', + }, +); + __PACKAGE__->meta->initialize; __PACKAGE__->configure_acts_as_list(group_by => [qw(module)]); diff --git a/SL/DB/CustomVariableConfigPartsgroup.pm b/SL/DB/CustomVariableConfigPartsgroup.pm new file mode 100644 index 000000000..167d09c43 --- /dev/null +++ b/SL/DB/CustomVariableConfigPartsgroup.pm @@ -0,0 +1,13 @@ +# This file has been auto-generated only because it didn't exist. +# Feel free to modify it at will; it will not be overwritten automatically. + +package SL::DB::CustomVariableConfigPartsgroup; + +use strict; + +use SL::DB::MetaSetup::CustomVariableConfigPartsgroup; +use SL::DB::Manager::CustomVariableConfigPartsgroup; + +__PACKAGE__->meta->initialize; + +1; diff --git a/SL/DB/Helper/ALL.pm b/SL/DB/Helper/ALL.pm index 76c4af708..d0cb1cb8b 100644 --- a/SL/DB/Helper/ALL.pm +++ b/SL/DB/Helper/ALL.pm @@ -28,6 +28,7 @@ use SL::DB::CsvImportReportStatus; use SL::DB::Currency; use SL::DB::CustomVariable; use SL::DB::CustomVariableConfig; +use SL::DB::CustomVariableConfigPartsgroup; use SL::DB::CustomVariableValidity; use SL::DB::Customer; use SL::DB::Datev; diff --git a/SL/DB/Helper/Mappings.pm b/SL/DB/Helper/Mappings.pm index 6f2eba731..5acc1c7f4 100644 --- a/SL/DB/Helper/Mappings.pm +++ b/SL/DB/Helper/Mappings.pm @@ -111,6 +111,7 @@ my %kivitendo_package_names = ( csv_import_report_rows => 'csv_import_report_row', csv_import_report_status => 'csv_import_report_status', currencies => 'currency', + custom_variable_config_partsgroups => 'custom_variable_config_partsgroup', custom_variable_configs => 'custom_variable_config', custom_variables => 'custom_variable', custom_variables_validity => 'custom_variable_validity', diff --git a/SL/DB/Manager/CustomVariableConfigPartsgroup.pm b/SL/DB/Manager/CustomVariableConfigPartsgroup.pm new file mode 100644 index 000000000..7031a1bc7 --- /dev/null +++ b/SL/DB/Manager/CustomVariableConfigPartsgroup.pm @@ -0,0 +1,15 @@ +# This file has been auto-generated only because it didn't exist. +# Feel free to modify it at will; it will not be overwritten automatically. + +package SL::DB::Manager::CustomVariableConfigPartsgroup; + +use strict; + +use SL::DB::Helper::Manager; +use base qw(SL::DB::Helper::Manager); + +sub object_class { 'SL::DB::CustomVariableConfigPartsgroup' } + +__PACKAGE__->make_manager_methods; + +1; diff --git a/SL/DB/MetaSetup/CustomVariableConfigPartsgroup.pm b/SL/DB/MetaSetup/CustomVariableConfigPartsgroup.pm new file mode 100644 index 000000000..95222d9c1 --- /dev/null +++ b/SL/DB/MetaSetup/CustomVariableConfigPartsgroup.pm @@ -0,0 +1,35 @@ +# This file has been auto-generated. Do not modify it; it will be overwritten +# by rose_auto_create_model.pl automatically. +package SL::DB::CustomVariableConfigPartsgroup; + +use strict; + +use base qw(SL::DB::Object); + +__PACKAGE__->meta->table('custom_variable_config_partsgroups'); + +__PACKAGE__->meta->columns( + custom_variable_config_id => { type => 'integer', not_null => 1 }, + itime => { type => 'timestamp', default => 'now()' }, + mtime => { type => 'timestamp' }, + partsgroup_id => { type => 'integer', not_null => 1 }, +); + +__PACKAGE__->meta->primary_key_columns([ 'custom_variable_config_id', 'partsgroup_id' ]); + +__PACKAGE__->meta->allow_inline_column_values(1); + +__PACKAGE__->meta->foreign_keys( + custom_variable_config => { + class => 'SL::DB::CustomVariableConfig', + key_columns => { custom_variable_config_id => 'id' }, + }, + + partsgroup => { + class => 'SL::DB::PartsGroup', + key_columns => { partsgroup_id => 'id' }, + }, +); + +1; +; diff --git a/SL/DB/PartsGroup.pm b/SL/DB/PartsGroup.pm index f81e977a1..cc4508bde 100644 --- a/SL/DB/PartsGroup.pm +++ b/SL/DB/PartsGroup.pm @@ -7,6 +7,13 @@ use strict; use SL::DB::MetaSetup::PartsGroup; +__PACKAGE__->meta->add_relationship( + custom_variable_configs => { + type => 'many to many', + map_class => 'SL::DB::CustomVariableConfigPartsgroup', + }, +); + __PACKAGE__->meta->initialize; # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. diff --git a/SL/PE.pm b/SL/PE.pm index 28f3ba5c1..4d7176dd2 100644 --- a/SL/PE.pm +++ b/SL/PE.pm @@ -59,6 +59,9 @@ sub partsgroups { $where .= qq| AND id NOT IN | . qq| (SELECT DISTINCT partsgroup_id FROM parts | . + qq| WHERE NOT partsgroup_id ISNULL | . + qq| UNION | . + qq| SELECT DISTINCT partsgroup_id FROM custom_variable_config_partsgroups | . qq| WHERE NOT partsgroup_id ISNULL) |; } @@ -129,6 +132,12 @@ sub get_partsgroup { $dbh->disconnect; + # also not orphaned if partsgroup is selected for a cvar filter + if ($form->{orphaned}) { + my $cvar_count = scalar( @{ SL::DB::PartsGroup->new(id => $form->{id})->custom_variable_configs } ); + $form->{orphaned} = !$cvar_count; + } + $main::lxdebug->leave_sub(); } diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index 3a97c8ecf..c9317ab87 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -1628,7 +1628,9 @@ sub form_header { $form->{CUSTOM_VARIABLES} = CVar->get_custom_variables('module' => 'IC', 'trans_id' => $form->{id}); - CVar->render_inputs('variables' => $form->{CUSTOM_VARIABLES}, show_disabled_message => 1) + my ($null, $partsgroup_id) = split /--/, $form->{partsgroup}; + + CVar->render_inputs('variables' => $form->{CUSTOM_VARIABLES}, show_disabled_message => 1, partsgroup_id => $partsgroup_id) if (scalar @{ $form->{CUSTOM_VARIABLES} }); $::request->layout->use_javascript("${_}.js") for qw(ckeditor/ckeditor ckeditor/adapters/jquery); diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 3c6c087da..f3f194528 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -1861,13 +1861,27 @@ sub _render_custom_variables_inputs { my $valid = CVar->custom_variables_validity_by_trans_id(trans_id => $params{part_id}); + # get partsgroup_id from part + my $partsgroup_id; + if ($params{part_id}) { + $partsgroup_id = SL::DB::Part->new(id => $params{part_id})->load->partsgroup_id; + } + my $num_visible_cvars = 0; foreach my $cvar (@{ $form->{CVAR_CONFIGS}->{IC} }) { $cvar->{valid} = $params{part_id} && $valid->($cvar->{id}); + # set partsgroup filter + my $partsgroup_filtered = 0; + if ($cvar->{flag_partsgroup_filter}) { + if (!$partsgroup_id || (!grep {$partsgroup_id == $_} @{ $cvar->{partsgroups} })) { + $partsgroup_filtered = 1; + } + } + my $show = 0; my $description = ''; - if ($cvar->{flag_editable} && $cvar->{valid}) { + if (($cvar->{flag_editable} && $cvar->{valid}) && !$partsgroup_filtered) { $num_visible_cvars++; $description = $cvar->{description} . ' '; $show = 1; @@ -1886,6 +1900,7 @@ sub _render_custom_variables_inputs { name_postfix => "_$params{row}", valid => $cvar->{valid}, value => CVar->parse($::form->{$form_key}, $cvar), + partsgroup_filtered => $partsgroup_filtered, } }; } diff --git a/locale/de/all b/locale/de/all index e17a78ceb..8a1994ac0 100755 --- a/locale/de/all +++ b/locale/de/all @@ -200,6 +200,7 @@ $self->{texts} = { 'All general ledger entries' => 'Alle Hauptbucheinträge', 'All groups' => 'Alle Gruppen', 'All of the exports you have selected were already closed.' => 'Alle von Ihnen ausgewählten Exporte sind bereits abgeschlossen.', + 'All partsgroups' => 'Alle Warengruppen', 'All reports' => 'Alle Berichte (Kontenübersicht, Summen- u. Saldenliste, GuV, BWA, Bilanz, Projektbuchungen)', 'All the other clients will start with an empty set of WebDAV folders.' => 'Alle anderen Mandanten werden mit einem leeren Satz von WebDAV-Ordnern ausgestattet.', 'All the selected exports have already been closed, or all of their items have already been executed.' => 'Alle ausgewählten Exporte sind als abgeschlossen markiert, oder für alle Einträge wurden bereits Zahlungen verbucht.', @@ -1084,6 +1085,7 @@ $self->{texts} = { 'File' => 'Datei', 'File name' => 'Dateiname', 'Filter' => 'Filter', + 'Filter by Partsgroups' => 'Nach Warengruppen filtern', 'Filter date by' => 'Datum filtern nach', 'Filter for customer variables' => 'Filter für benutzerdefinierte Kundenvariablen', 'Filter for item variables' => 'Filter für benutzerdefinierte Artikelvariablen', @@ -1702,6 +1704,7 @@ $self->{texts} = { 'Partsedit' => 'Wareneditor', 'Partsgroup (database ID)' => 'Warengruppe (Datenbank-ID)', 'Partsgroup (name)' => 'Warengruppe (Name)', + 'Partsgroups where variables are shown' => 'Warengruppen, bei denen Variablen angezeigt werden', 'Password' => 'Passwort', 'Paste' => 'Einfügen', 'Paste template' => 'Vorlage einfügen', diff --git a/locale/en/all b/locale/en/all index 70e8314d3..5af64d8de 100644 --- a/locale/en/all +++ b/locale/en/all @@ -184,6 +184,7 @@ $self->{texts} = { 'All general ledger entries' => '', 'All groups' => '', 'All of the exports you have selected were already closed.' => '', + 'All partsgroups' => '', 'All reports' => '', 'All the other clients will start with an empty set of WebDAV folders.' => '', 'All the selected exports have already been closed, or all of their items have already been executed.' => '', @@ -961,6 +962,7 @@ $self->{texts} = { 'File' => '', 'File name' => '', 'Filter' => '', + 'Filter by Partsgroups' => '', 'Filter date by' => '', 'Filter for customer variables' => '', 'Filter for item variables' => '', @@ -1508,6 +1510,7 @@ $self->{texts} = { 'Parts, services and assemblies' => '', 'Partsgroup (database ID)' => '', 'Partsgroup (name)' => '', + 'Partsgroups where variables are shown' => '', 'Password' => '', 'Payables' => '', 'Payment' => '', diff --git a/sql/Pg-upgrade2/custom_variable_partsgroups.sql b/sql/Pg-upgrade2/custom_variable_partsgroups.sql new file mode 100644 index 000000000..6ba705242 --- /dev/null +++ b/sql/Pg-upgrade2/custom_variable_partsgroups.sql @@ -0,0 +1,20 @@ +-- @tag: custom_variable_partsgroups +-- @description: Beziehung zwischen cvar configs und partsgroups für Filter nach Warengruppen +-- @depends: release_3_1_0 +-- @charset: utf-8 + +CREATE TABLE custom_variable_config_partsgroups ( + custom_variable_config_id integer NOT NULL, + partsgroup_id integer NOT NULL, + + itime timestamp DEFAULT now(), + mtime timestamp, + + FOREIGN KEY (custom_variable_config_id) REFERENCES custom_variable_configs(id), + FOREIGN KEY (partsgroup_id) REFERENCES partsgroup(id), + + PRIMARY KEY(custom_variable_config_id, partsgroup_id) +); + +CREATE TRIGGER mtime_custom_variable_config_partsgroups BEFORE UPDATE ON custom_variable_config_partsgroups + FOR EACH ROW EXECUTE PROCEDURE set_mtime(); diff --git a/templates/webpages/amcvar/render_checkboxes.html b/templates/webpages/amcvar/render_checkboxes.html index 3a703d8c3..4633dbad9 100644 --- a/templates/webpages/amcvar/render_checkboxes.html +++ b/templates/webpages/amcvar/render_checkboxes.html @@ -1,3 +1,7 @@ [%- USE HTML %] [%- SET var_valid = HTML.escape(name_prefix) _ "cvar_" _ HTML.escape(var.name) _ HTML.escape(name_postfix) _ '_valid' -%] +[%- IF var.partsgroup_filtered %] + +[%- ELSE %] +[%- END %] diff --git a/templates/webpages/amcvar/render_inputs.html b/templates/webpages/amcvar/render_inputs.html index dc9c09fe8..d8d2ac96d 100644 --- a/templates/webpages/amcvar/render_inputs.html +++ b/templates/webpages/amcvar/render_inputs.html @@ -4,7 +4,7 @@ [%- SET var_name = HTML.escape(name_prefix) _ "cvar_" _ HTML.escape(var.name) _ HTML.escape(name_postfix) -%] -[%- IF hide_non_editable && !var.flag_editable %] +[%- IF (hide_non_editable && !var.flag_editable) || var.partsgroup_filtered %] [%- ELSIF !var.valid %] diff --git a/templates/webpages/amcvar/render_inputs_block.html b/templates/webpages/amcvar/render_inputs_block.html index 1117c1f7e..eaeed6d76 100644 --- a/templates/webpages/amcvar/render_inputs_block.html +++ b/templates/webpages/amcvar/render_inputs_block.html @@ -10,7 +10,7 @@ SET render_cvar_tag_options.no_id = 1; END; %] -[%- IF cvar.hide_non_editable && !cvar.var.flag_editable %] +[%- IF (cvar.hide_non_editable && !cvar.var.flag_editable) || cvar.partsgroup_filtered %] [%- L.hidden_tag(cvar_tag_name, cvar.var.value, render_cvar_tag_options) %] [%- ELSIF !cvar.valid %] [%- IF show_disabled_message %] diff --git a/templates/webpages/custom_variable_config/form.html b/templates/webpages/custom_variable_config/form.html index a34dd5da1..eb6aee740 100644 --- a/templates/webpages/custom_variable_config/form.html +++ b/templates/webpages/custom_variable_config/form.html @@ -74,6 +74,29 @@ [% L.radio_button_tag('config.flag_defaults_to_invalid', value='0', id='config.flag_defaults_to_invalid_0', label=LxERP.t8('No'), checked=(SELF.flags.defaults_to_invalid ? '' : 1)) %] + + [% 'Filter by Partsgroups' | $T8 %] + + [% L.radio_button_tag('config.flag_partsgroup_filter', value='1', id='config_flag_partsgroup_filter_1', label=LxERP.t8('Yes'), checked=(SELF.flags.partsgroup_filter ? 1 : ''), onclick='update_pg_filter_row()') %] + [% L.radio_button_tag('config.flag_partsgroup_filter', value='0', id='config_flag_partsgroup_filter_0', label=LxERP.t8('No'), checked=(SELF.flags.partsgroup_filter ? '' : 1), onclick='update_pg_filter_row()') %] + + + + + + [% L.select_tag('config.partsgroups[]', + all_partsgroups, + id => "partsgroups", + value_key => "id", + title_key => "partsgroup", + default => SELF.config.partsgroups, + default_value_key => "id", + multiple => 1) %] + [% L.multiselect2side("partsgroups", + labelsx => LxERP.t8("All partsgroups"), + labeldx => LxERP.t8("Partsgroups where variables are shown")) %] + +

@@ -149,6 +172,11 @@ function update_included_by_default() { function update_ic_rows() { $('[data-show-for="IC"]').toggle($('#module').val() === "IC"); + $('[data-show-for="IC+PGFILTER"]').toggle($('#module').val() === "IC" && $('#config_flag_partsgroup_filter_1').prop('checked')); +} + +function update_pg_filter_row() { + $('[data-show-for="IC+PGFILTER"]').toggle($('#module').val() === "IC" && $('#config_flag_partsgroup_filter_1').prop('checked')); } function check_prerequisites() { diff --git a/templates/webpages/custom_variable_config/list.html b/templates/webpages/custom_variable_config/list.html index 349674b17..b8b9e44b1 100644 --- a/templates/webpages/custom_variable_config/list.html +++ b/templates/webpages/custom_variable_config/list.html @@ -7,19 +7,25 @@ [%- L.select_tag('module', SELF.modules, value_key='module', title_key='description', default=SELF.module, onchange='show_module_list()') %]

+[%- IF SELF.module == 'IC' %] + [%- SET W="12.5%" %] +[%- ELSE %] + [%- SET W="20%" %] +[%- END %]

- - - - - + + + + + [%- IF SELF.module == 'IC' %] - - + + + [%- END %] @@ -41,6 +47,7 @@ [%- IF SELF.module == 'IC' %] + [%- END %] [%- END %] diff --git a/templates/webpages/ic/form_footer.html b/templates/webpages/ic/form_footer.html index 51a6d665b..9440b678d 100644 --- a/templates/webpages/ic/form_footer.html +++ b/templates/webpages/ic/form_footer.html @@ -46,7 +46,9 @@ [%- FOREACH var = CUSTOM_VARIABLES %] - + [%- IF !var.partsgroup_filtered %] + + [%- END %] [%- END %] diff --git a/templates/webpages/oe/sales_order.html b/templates/webpages/oe/sales_order.html index 6c131c742..f0fecb6f3 100644 --- a/templates/webpages/oe/sales_order.html +++ b/templates/webpages/oe/sales_order.html @@ -45,7 +45,7 @@
[%- LxERP.t8('reorder item') %][% 'Name' | $T8 %][% 'Description' | $T8 %][% 'Type' | $T8 %][% 'Searchable' | $T8 %][% 'Includeable in reports' | $T8 %][% 'Name' | $T8 %][% 'Description' | $T8 %][% 'Type' | $T8 %][% 'Searchable' | $T8 %][% 'Includeable in reports' | $T8 %][% 'Editable' | $T8 %][% 'Deactivate by default' | $T8 %][% 'Editable' | $T8 %][% 'Deactivate by default' | $T8 %][% 'Filter by Partsgroups' | $T8 %]
[%- IF cfg.flags.match('editable=1') %][% 'Yes' | $T8 %][%- ELSE %][% 'No' | $T8 %][%- END %] [%- IF cfg.flags.match('defaults_to_invalid=1') %][% 'Yes' | $T8 %][%- ELSE %][% 'No' | $T8 %][%- END %][%- IF cfg.flags.match('partsgroup_filter=1') %][% 'Yes' | $T8 %][%- ELSE %][% 'No' | $T8 %][%- END %]
[% var.VALID_BOX %][% HTML.escape(var.description) %][% HTML.escape(var.description) %][% var.HTML_CODE %]
[%- FOREACH row2 = row.ROW2 %] - [%- IF row2.cvar && row2.render_options.valid %] + [%- IF row2.cvar && row2.render_options.valid && !row2.render_options.partsgroup_filtered %] [%- IF row2.line_break %] [%- END %] -- 2.20.1