Project

General

Profile

« Previous | Next » 

Revision aa63dfb4

Added by Andreas Kohlbecker about 10 years ago

#3977 (allow defining the MarkerType to filter out excluded NamedAreas from distributions)

View differences:

7.x/modules/cdm_dataportal/settings.php
249 249
define('CDM_OCCURRENCE_FEATURETREE_UUID', 'cdm_occurrence_featuretree_uuid');
250 250
define('CDM_DATAPORTAL_STRUCTURED_DESCRIPTION_FEATURETREE_UUID', 'cdm_dataportal_structdesc_featuretree_uuid');
251 251

  
252
define('CDM_DISTRIBUTION_FILTER', 'cdm_distribution_filter');
253
define('CDM_DISTRIBUTION_FILTER_DEFAULT', serialize(
254
      array(
255
      'filter_rules' => array(
256
        'statusOrderPreference' => 0,
257
        'subAreaPreference' => 0,
258
      ),
259
      'hideMarkedAreas' => array()
260
     )
261
));
262

  
263

  
252 264
define('CDM_TAXON_MEDIA_FILTER', 'cdm_taxon_media_filter');
253 265
define('CDM_TAXON_MEDIA_FILTER_DEFAULT', serialize(
254 266
    array(
......
646 658
      level of the tree structure.'),
647 659
  );
648 660

  
661
  $form['distribution'] = array(
662
      '#type' => 'fieldset',
663
      '#title' => t('Distributions'),
664
      '#collapsible' => FALSE,
665
      '#description' => 'This section covers general settings regarding distributions, map related settings are found in the '
666
          . l('geo & map tab', 'admin/config/cdm_dataportal/settings/geo') .
667
          '<p>
668
          </p>',
669
  );
670

  
671
  $form['distribution'][CDM_DISTRIBUTION_FILTER] = array(
672
      '#type' => 'fieldset',
673
      '#title' => 'Distribution filter',
674
      '#collapsible' => FALSE,
675
      '#collapsed' => FALSE,
676
      '#tree' => TRUE,
677
      '#description' => 'The Distribution filter offers the following options
678
      <ul>
679
      <li><strong>Status order preference rule:</strong> In case of multiple distribution status (PresenceAbsenceTermBase) for the same area the status with the highest order is preferred, see OrderedTermBase.compareTo(OrderedTermBase).</li>
680
      <li><strong>Sub area preference rule:</strong>If there is an area with a direct sub area and both areas have the same computed status only the information on the sub area should be reported, whereas the super area should be ignored.</li>
681
      <li><strong>Marked area filter:</strong>Skip distributions where the area has a Marker with one of the specified MarkerTypes</li>
682
      </ul>'
683
  );
684

  
685
  $cdm_distribution_filter = get_array_variable_merged(CDM_DISTRIBUTION_FILTER, CDM_DISTRIBUTION_FILTER_DEFAULT);
686
  $form['distribution'][CDM_DISTRIBUTION_FILTER]['filter_rules'] = array(
687
      '#type' => 'checkboxes',
688
      '#title' => 'Filter rules',
689
      '#default_value' => $cdm_distribution_filter['filter_rules'],
690
      '#options' => array(
691
          'statusOrderPreference' => 'Status order preference rule',
692
          'subAreaPreference' => 'Sub area preference rule'
693
      ),
694
  );
695

  
696
  $marker_type_options = cdm_terms_as_options( cdm_ws_fetch_all('term', array('class' => 'MarkerType' )) );
697
  $form['distribution'][CDM_DISTRIBUTION_FILTER]['hideMarkedAreas'] = array(
698
      '#type' => 'checkboxes',
699
      '#title' => 'Hide marked area filter',
700
      '#default_value' => $cdm_distribution_filter['hideMarkedAreas'],
701
      '#options' => $marker_type_options,
702
      '#description' => 'Check one or more MarkerTypes to define the "hide marked area" filter .',
703
  );
704

  
649 705
  $form['aggregation'] = array(
650 706
      '#type' => 'fieldset',
651 707
      '#title' => t('Aggregation of data'),
652 708
      '#collapsible' => FALSE,
653
      '#description' => t("This section covers the different aspects of aggregating information.
709
      '#description' => 'This section covers the different aspects of aggregating information.
654 710
          <p>
655
          </p>"),
656

  
711
          </p>',
657 712
  );
658 713

  
659 714
  $form['aggregation'][CDM_TAXON_MEDIA_FILTER] = array(

Also available in: Unified diff