Revision 7f7649e0
Added by Andreas Müller about 3 years ago
modules/cdm_dataportal/includes/descriptions.inc | ||
---|---|---|
787 | 787 |
if(variable_get(DISTRIBUTION_CONDENSED) && isset($descriptionElements['DistributionInfoDTO']->condensedDistribution)){ |
788 | 788 |
$condensed_distribution_markup = '<p class="condensed_distribution">'; |
789 | 789 |
|
790 |
$isFirst = true; |
|
791 |
if(isset($descriptionElements['DistributionInfoDTO']->condensedDistribution->indigenous[0])){ |
|
792 |
foreach($descriptionElements['DistributionInfoDTO']->condensedDistribution->indigenous as $cdItem){ |
|
793 |
if(!$isFirst){ |
|
794 |
$condensed_distribution_markup .= ' '; |
|
795 |
} |
|
796 |
$condensed_distribution_markup .= '<span class="status_' . $cdItem->status->idInVocabulary . '">' |
|
797 |
. $cdItem->areaStatusLabel . '</span>'; |
|
798 |
$isFirst = false; |
|
799 |
} |
|
800 |
} |
|
801 |
|
|
802 |
if(isset($descriptionElements['DistributionInfoDTO']->condensedDistribution->foreign[0])) { |
|
803 |
if(!$isFirst){ |
|
804 |
$condensed_distribution_markup .= ' '; |
|
805 |
} |
|
806 |
$isFirst = TRUE; |
|
807 |
$condensed_distribution_markup .= '['; |
|
808 |
foreach ($descriptionElements['DistributionInfoDTO']->condensedDistribution->foreign as $cdItem) { |
|
809 |
if (!$isFirst) { |
|
810 |
$condensed_distribution_markup .= ' '; |
|
811 |
} |
|
812 |
$condensed_distribution_markup .= '<span class="status_' . $cdItem->status->representation_L10n . '">' |
|
813 |
. $cdItem->areaStatusLabel . '</span>'; |
|
814 |
$isFirst = false; |
|
815 |
} |
|
816 |
$condensed_distribution_markup .= ']'; |
|
817 |
} |
|
818 |
|
|
790 |
if(isset($descriptionElements['DistributionInfoDTO']->condensedDistribution->htmlString)){ |
|
791 |
$condensed_distribution_markup .= $descriptionElements['DistributionInfoDTO']->condensedDistribution->htmlString; |
|
792 |
} |
|
793 |
|
|
819 | 794 |
$condensed_distribution_markup .= ' ' . l( |
820 | 795 |
font_awesome_icon_markup( |
821 | 796 |
'fa-info-circle', |
Also available in: Unified diff
ref #8297 adapt dataportal code to new condensed distribution string handling