Project

General

Profile

« Previous | Next » 

Revision 80b26cb9

Added by Andreas Kohlbecker over 12 years ago

themechanges for complete test of palmweb taxon profile

View differences:

modules/cdm_dataportal/theme/cdm_dataportal.descriptions.theme
315 315
      }
316 316

  
317 317
      if ($asListElement){
318
        $out = '<li class="descriptionText">' . $name_used_in_source_link_to_show;
318
        $out = '<li class="descriptionText DescriptionElement">' . $name_used_in_source_link_to_show;
319 319
        //adding ":" if necesary
320 320
        if ($name_used_in_source_link_to_show && ($description || $sourceRefs)){
321 321
          $out .= ': ';
......
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 . ')';
327 327
        }
328
        $out = $description . $sourceRefs . $name_used_in_source_link_to_show;
328
        $out = '<span class="DescriptionElement DescriptionElement-' . $element->class .'">' . $description . $sourceRefs . $name_used_in_source_link_to_show . '</span>';
329 329
      }
330 330
    }
331 331
  }
themes/palmweb_2/template.php
31 31
}
32 32

  
33 33

  
34
function palmweb_2_cdm_descriptionElementDistribution($descriptionElements) {
34
function palmweb_2_cdm_descriptionElementDistribution($descriptionElements, $enclosingTag = "span") {
35 35

  
36 36
  $out = '';
37 37
  $separator = ', ';
38 38

  
39
    RenderHints::pushToRenderStack('descriptionElementDistribution');
40
    RenderHints::setFootnoteListKey(UUID_DISTRIBUTION);
41
    foreach($descriptionElements as $descriptionElement){
39
  RenderHints::pushToRenderStack('descriptionElementDistribution');
40
  RenderHints::setFootnoteListKey(UUID_DISTRIBUTION);
41

  
42
  $itemCnt = 0;
43
  foreach($descriptionElements as $descriptionElement){
42 44
        // annotations as footnotes
43 45
//        $annotationFootnoteKeys = theme('cdm_annotations_as_footnotekeys', $descriptionElement);
44 46
//        // source references as footnotes
......
50 52
//        if($annotationFootnoteKeys && $sourcesFootnoteKeyList){
51 53
//            $annotationFootnoteKeys .= $separator;
52 54
//        }
53
        $out .= $descriptionElement->area->representation_L10n . $annotationFootnoteKeys . $sourcesFootnoteKeyList . $separator;
54
    }
55

  
55
        $out .= '<' . $enclosingTag . ' class="DescriptionElement DescriptionElement-' . $descriptionElement->class .'">';
56
        $out .= $descriptionElement->area->representation_L10n . $annotationFootnoteKeys . $sourcesFootnoteKeyList;
57
        if(++$itemCnt < count($descriptionElements)){
58
          $out .=  $separator;
59
        }
60
        $out .= "</" . $enclosingTag . ">";
61
  }
56 62
  $taxonTrees =  cdm_ws_get(CDM_WS_PORTAL_TAXONOMY);
57 63
  foreach($taxonTrees as $taxonTree){
58 64
    if ($taxonTree->uuid == variable_get('cdm_taxonomictree_uuid', FALSE)){
......
60 66
      break;
61 67
    }
62 68
  }
63
  $out = substr($out, 0, strlen($out)-strlen($separator) );
64 69

  
65 70
  $referenceCitation = '('.l('<span class="reference">World Checklist of Monocotyledons</span>', path_to_reference($reference->uuid), array("class"=>"reference"), NULL, NULL, FALSE ,TRUE).')';
66 71

  
......
72 77
    $sourceRefs = '<span class="sources">' . $sourceRefs . '</span>';
73 78
  }
74 79

  
75
    RenderHints::popFromRenderStack();
80
  RenderHints::popFromRenderStack();
76 81
  return $out. $sourceRefs ;
77 82

  
78 83
}

Also available in: Unified diff