Project

General

Profile

Revision 3de12c0d

ID3de12c0df5eec7dca4fa1e1c2d7b4b5f7da82f27
Parent 4bfe18f9
Child a171c75f, b635e0fe

Added by Andreas Kohlbecker over 5 years ago

#5793 using new settings field status_glue to allow flexible configuration of the ditribution hierachy

View differences:

modules/cdm_dataportal/includes/descriptions.inc
1616 1616
   * @param $descriptionElement
1617 1617
   * @return array
1618 1618
   */
1619
  function distribution_status_label_and_markup($descriptionElement) {
1619
  function distribution_status_label_and_markup($descriptionElement, $status_glue = '‒ ') {
1620 1620
    $status_markup = '';
1621 1621
    $status_label = '';
1622 1622

  
1623 1623
    if (isset($descriptionElement->status)) {
1624 1624
      $status_label = $descriptionElement->status->representation_L10n;
1625
      $status_markup =  '<span class="distributionStatus distributionStatus-' . $descriptionElement->status->idInVocabulary . '"> '
1626
        . $status_label . '</span>';
1625
      $status_markup =  '<span class="distributionStatus"> '
1626
        . $status_glue
1627
        . '<span class="distributionStatus-' . $descriptionElement->status->idInVocabulary . '">'
1628
        . $status_label
1629
        . '</span></span>';
1627 1630

  
1628 1631
    };
1629 1632
    return array($status_label, $status_markup);
......
1821 1824
          UUID_DISTRIBUTION
1822 1825
        );
1823 1826

  
1824
        list($status_label, $status_markup) = distribution_status_label_and_markup($distribution);
1827
        list($status_label, $status_markup) = distribution_status_label_and_markup($distribution, $level_style['status_glue']);
1825 1828
      }
1826 1829

  
1827 1830
      $per_node_markup[$node_index] .= '<' . $enclosingTag . ' class="descriptionElement'
modules/cdm_dataportal/settings.php
416 416
define('DISTRIBUTION_HIERARCHY_STYLE_DEFAULT', serialize(array(
417 417
  "level_0" => array(
418 418
    'label_suffix' => ':',
419
    'status_glue' => '',
419 420
    'item_glue' => ' ',
420 421
    'item_group_prefix' => '',
421 422
    'item_group_postfix' => ''
422 423
  ),
423 424
  "level_1" => array(
424
    'label_suffix' => ' ‒', // ' &#8210;'
425
    'label_suffix' => '',
426
    'status_glue' => '‒ ', // '&#8210; '
425 427
    'item_glue' => '; ',
426 428
    'item_group_prefix' => ', ',
427 429
    'item_group_postfix' => ''
428 430
  ),
429 431
  "level_2" => array(
430
    'label_suffix' => ' ‒', // ' &#8210;'
432
    'label_suffix' => '',
433
    'status_glue' => '‒ ', // '&#8210; '
431 434
    'item_glue' => ', ',
432 435
    'item_group_prefix' => ' (',
433 436
    'item_group_postfix' => ')'

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)