Project

General

Profile

« Previous | Next » 

Revision 14076b88

Added by Andreas Kohlbecker almost 5 years ago

fix #8351 showing type designations and map in name page

View differences:

modules/cdm_dataportal/theme/cdm_dataportal.name.theme
68 68
 */
69 69
function theme_cdm_typedesignations($variables) {
70 70
  $type_designations = $variables['typeDesignations'];
71
  $enclosing_tag = $variables['enclosing_tag'];
72
  $element_tag = $variables['element_tag'];
71 73

  
72 74
  // need to add element to render path since type designations
73 75
  // need other name render template
74 76
  RenderHints::pushToRenderStack('typedesignations');
75 77

  
76
  $out = '<ul class="typeDesignations">';
78
  $out = '<' . $enclosing_tag .' class="typeDesignations">';
77 79
  $typeDesignation_footnotes = FALSE;
78 80
  $is_lectotype = FALSE;
79 81
  $specimen_type_designations = array();
......
90 92
      }
91 93
      // It's a NameTypeDesignation.
92 94
      if ($type_designation->notDesignated) {
93
        $out .= '<li class="' . html_class_attribute_ref($type_designation) . '"><span class="status">' . ($is_lectotype ? 'Lectotype' : 'Type') . '</span>: ' . t('not designated') . '</li>';
95
        $out .= '<'. $element_tag .' class="' . html_class_attribute_ref($type_designation) . '"><span class="status">' . ($is_lectotype ? 'Lectotype' : 'Type') . '</span>: ' . t('not designated') . '</'. $element_tag .'>';
94 96
      }
95 97
      elseif ($type_designation->typeName) {
96 98
        $link_to_name_page = url(path_to_name($type_designation->typeName->uuid));
97
        $out .= '<li class="' . html_class_attribute_ref($type_designation) . '"><span class="status">' . ($is_lectotype ? 'Lectotype' : 'Type') . '</span>';
99
        $out .= '<'. $element_tag .' class="' . html_class_attribute_ref($type_designation) . '"><span class="status">' . ($is_lectotype ? 'Lectotype' : 'Type') . '</span>';
98 100

  
99 101
        if ($type_designation->citation) {
100 102
          $out .= type_designation_citation_layout($type_designation, $separator);
......
162 164

  
163 165
      $derivedUnitFacadeInstance = null;
164 166

  
165
      $out .= '<li class="' . html_class_attribute_ref($type_designation) . '">';
167
      $out .= '<'. $element_tag .' class="' . html_class_attribute_ref($type_designation) . '">';
166 168
      $out .= '<span class="status">'
167 169
        . ((isset($type_designation->typeStatus->representation_L10n)) ? $type_designation->typeStatus->representation_L10n : t('Type'))
168 170
        . $typeReference
......
184 186
        (isset($derivedUnitFacadeInstance->collection->titleCache) ? $derivedUnitFacadeInstance->collection->titleCache : FALSE)
185 187
      );
186 188
      $out .= theme('cdm_footnote_key', array('footnoteKey' => $_fkey, 'separator' => $separator));
187
      $out .= '</li>';
189
      $out .= '</'. $element_tag .'>';
188 190

  
189 191
    }
190 192
  }
191 193

  
192
  $out .= '</ul>';
194
  $out .= '</' . $enclosing_tag .'>';
193 195

  
194 196
  RenderHints::popFromRenderStack();
195 197

  
......
324 326
  $type_designations = type_designations_for_synonymy_group($synonymList);
325 327
  $accepted_name_type_designations = cdm_ws_get(CDM_WS_PORTAL_NAME_TYPEDESIGNATIONS, $accepted_taxon_name_uuid);
326 328
  if($accepted_name_type_designations  && count($accepted_name_type_designations) > 0){
327
    $type_designations = array_merge($accepted_name_type_designations, $type_designations);
329
    $type_designations = array_merge($accepted_name_type_designations, $type_designations); 
328 330
  }
329 331

  
330 332
  if (count($type_designations) > 0 || is_array($prependedSynonyms) || is_array($synonymList)) {

Also available in: Unified diff