Project

General

Profile

« Previous | Next » 

Revision 8a571837

Added by Andreas Kohlbecker over 12 years ago

fixing #2481 (Dataportal does not show modifying text for polytomous keys)

View differences:

5.x/modules/cdm_dataportal/theme/cdm_dataportal.descriptions.theme
1065 1065

  
1066 1066
     // link to a PolytomousKeyNode
1067 1067
      if($islinkToNode){
1068
        $out .= '<div class="nodeLinkToNode">' . l($child->nodeNumber, $_REQUEST["q"], null, null, $child->uuid) . '</div>';
1068
        $out .= '<div class="nodeLinkToNode">';
1069
        if(is_object($child->modifyingText)){
1070
            $out .= theme('cdm_poytomousKeyNode_modifyingText', $child->modifyingText);
1071
        }
1072
        $out .= l($child->nodeNumber, $_REQUEST["q"], null, null, $child->uuid) . '</div>';
1069 1073
      }
1070 1074

  
1071 1075
      // link to a PolytomousKeyNode
1072 1076
      if($islinkToOtherNode){
1073
        $out .= '<div class="nodeLinkToOtherNode">' . l($child->otherNode->nodeNumber, $_REQUEST["q"], null, null, $child->otherNode->uuid) . '</div>';
1077
        $out .= '<div class="nodeLinkToOtherNode">';
1078
        if(is_object($child->modifyingText)){
1079
            $out .= theme('cdm_poytomousKeyNode_modifyingText', $child->modifyingText);
1080
        }
1081
        $out .= l($child->otherNode->nodeNumber, $_REQUEST["q"], null, null, $child->otherNode->uuid) . '</div>';
1074 1082
      }
1075 1083

  
1076 1084
      // link to one or many taxa
......
1086 1094
          // TODO many taxa $child->children->taxon
1087 1095
          $out .= '<div class="nodeLinkToTaxon">';
1088 1096
          if(is_object($taxonChild->modifyingText)){
1089
            $i = 0;
1090
            foreach(get_object_vars($taxonChild->modifyingText) as $language=>$languageString){
1091
              $out .= ($i++ > 0 ? ', ' : '') . '<span class="modifyingText">'. $languageString->text . '</span> ';
1092
            }
1097
            $out .= theme('cdm_poytomousKeyNode_modifyingText', $taxonChild->modifyingText);
1093 1098
          }
1094 1099
          $out .=  theme("cdm_taxonName", $taxonChild->taxon->name, url(path_to_taxon($taxonChild->taxon->uuid)));
1095 1100
          $out .=  '</div>';
......
1117 1122
  return $out;
1118 1123
}
1119 1124

  
1125
function theme_cdm_poytomousKeyNode_modifyingText($modifyingText){
1126
  if(is_object($modifyingText)){
1127
    $i = 0;
1128
    foreach(get_object_vars($modifyingText) as $language=>$languageString){
1129
      $out .= ($i++ > 0 ? ', ' : '') . '<span class="modifyingText">'. $languageString->text . '</span> ';
1130
    }
1131
  }
1132
  return $out;
1133
}
1134

  
1120 1135
/**
1121 1136
 * Renders a list of a specific type of IdentificationKeys, the list can be restricteded by a taxon.
1122 1137
 * @param $type The simple name of the cdm class implementing the interface IIdentificationKey,

Also available in: Unified diff