Project

General

Profile

« Previous | Next » 

Revision c8b3ae89

Added by Andreas Kohlbecker over 12 years ago

fixing #1933 (DescriptionElementBases do not show annotation footnotes in flora malesiana)

View differences:

modules/cdm_dataportal/cdm_dataportal.module
1438 1438
  return $outArrayOfMedia;
1439 1439
}
1440 1440

  
1441
function cdm_annotations_as_footnotekeys($cdmBase, $footnote_list_key = array()){
1441
function cdm_annotations_as_footnotekeys($cdmBase, $footnote_list_key = null){
1442 1442
  $footNoteKeys = array();
1443 1443
  //is argument cdmBase an array?
1444 1444
  if (!is_array($cdmBase)){
......
1448 1448
    $cdmBase_array = $cdmBase;
1449 1449
  }
1450 1450
  //getting the key for the footnotemanager
1451
  if((bool) $footnote_list_key){
1451
  if( $footnote_list_key ){
1452 1452
    $footnoteListKey = $footnote_list_key;
1453 1453
  }else{
1454 1454
    $footnoteListKey = RenderHints::getFootnoteListKey() . '-annotations';
modules/cdm_dataportal/theme/cdm_dataportal.common.theme
154 154
 *	TaxonNode
155 155
 *  WorkingSet
156 156
 *
157
 * TODO it should be configurable which objects can be annotated as this might differ in dataportals
158
 *
159 157
 */
160
function theme_cdm_annotations_as_footnotekeys($cdmBase, $footnote_list_key = array()){
158
function theme_cdm_annotations_as_footnotekeys($cdmBase, $footnote_list_key = null){
161 159
  if (variable_get('cdm_dataportal_annotations_footnotes', CDM_DATAPORTAL_ALL_FOOTNOTES)){
162 160
    return '';
163 161
  }
modules/cdm_dataportal/theme/cdm_dataportal.descriptions.theme
105 105
      if($node->feature->uuid != UUID_IMAGE) {
106 106

  
107 107
        $block->delta = generalizeString($featureRepresentation);
108
        $block->subject = theme('cdm_feature_name', $featureRepresentation);
108
        $block->subject = '<span class="uuid-'.$node->feature->uuid.'">' . theme('cdm_feature_name', $featureRepresentation) . '</span>';
109 109
        $block->module = "cdm_dataportal-feature";
110 110
        $block->content = '';
111 111

  
......
320 320
        if ($name_used_in_source_link_to_show && ($description || $sourceRefs)){
321 321
          $out .= ': ';
322 322
        }
323
        $out .= $description . $sourceRefs . theme('cdm_annotations_as_footnotekeys', $element) . '</li>';
323
        $out .= $description . $sourceRefs . theme('cdm_annotations_as_footnotekeys', $element, $feature_uuid) . '</li>';
324 324
      }else{
325 325
        if ($name_used_in_source_link_to_show){
326 326
          $name_used_in_source_link_to_show = ' (name in source: '. $name_used_in_source_link_to_show . ')';
......
333 333
  if(!isset($out)) {
334 334
    $out = $description;
335 335
  }
336
  //printing annotations footnotes
337
  //$out .= theme('cdm_annotations_as_footnotekeys', $element);
338
  // add annotations as footnote key
339
  //$out .= theme('cdm_annotations_as_footnotekeys', $element); move above
336

  
340 337
  return $out;
341 338
}
342 339

  
themes/garland_cichorieae/template.php
132 132
				if ($name_used_in_source_link_to_show && ($description || $sourceRefs)){
133 133
					$out .= ': ';
134 134
				}
135
				$out .= $description . $sourceRefs . theme('cdm_annotations_as_footnotekeys', $element) . '</li>';
135
				$out .= $description . $sourceRefs .theme('cdm_annotations_as_footnotekeys', $element, $feature_uuid) . '</li>';
136 136
			}else if ($asListElement){
137 137
				$out = '<li class="descriptionText">' . $name_used_in_source_link_to_show;
138 138
				//adding ":" if necesary
139 139
				if ($name_used_in_source_link_to_show && ($description || $sourceRefs)){
140 140
					$out .= ': ';
141 141
				}
142
				$out .= $description . $sourceRefs . theme('cdm_annotations_as_footnotekeys', $element) . '</li>';
142
				$out .= $description . $sourceRefs . theme('cdm_annotations_as_footnotekeys', $element, $feature_uuid) . '</li>';
143 143
			//special handling for flora malesiana TODO: possible better way to implement this case?
144 144
			}else{
145 145
				if ($name_used_in_source_link_to_show){
......
155 155
      $out = $description;
156 156
    }
157 157
    //printing annotations footnotes
158
    $out .= theme('cdm_annotations_as_footnotekeys', $element);
158
    $out .=  theme('cdm_annotations_as_footnotekeys', $element, $feature_uuid);
159 159
/*
160 160
	if ($feature_uuid == UUID_NAME_USAGE){
161 161
		foreach($element->sources as $source){

Also available in: Unified diff