Project

General

Profile

Revision 358e0b7f

ID358e0b7f5b0da107bb32c37f444469c0c767d253
Parent dfd71699
Child 834f548a

Added by Andreas Kohlbecker 7 months ago

ref #8759 conditionally supressing state 'present' in description table

View differences:

modules/cdm_dataportal/includes/descriptions.inc
2406 2406
          case 'CategoricalData':
2407 2407
            default:
2408 2408
            if (!empty($element->stateData)) {
2409
              $supress_state_display = count($element->stateData) == 1 & $element->stateData[0]->state->representation_L10n == 'present' && is_array($root_node->childNodes);
2410
              if(!$supress_state_display){
2411
                $state_cell = render_state_data($element);
2412
              } else {
2413
                $state_cell = "<span> </span>";
2414
              }
2409 2415
              $row_items[] = [
2410 2416
                'data' => [
2411 2417
                  [
2412 2418
                    'data' => markup_to_render_array($level_indent . $element->feature->representation_L10n),
2413 2419
                    'class' => ['level_' . $level]
2414 2420
                  ],
2415
                  render_state_data($element),
2421
                  $state_cell,
2416 2422
                ],
2417 2423
                'class' => ['level_' . $level, 'has_state', $element->feature->class]
2418 2424
              ];

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)