Project

General

Profile

« Previous | Next » 

Revision 0387c539

Added by Andreas Kohlbecker almost 14 years ago

footnotes for taxon names in the synonymy page #392 and replacing "senu bubbles" #391

View differences:

modules/cdm_dataportal/theme/cdm_dataportal.name.theme
123 123

  
124 124
}
125 125

  
126
function theme_cdm_nameRelations($nameRelationships, $skipTypes = false){
126
function theme_cdm_nameRelationships($nameRelationships, $skipTypes = false){
127 127

  
128
    if(!$nameRelationships){
129
        return;
130
    }
131
    
132
	RenderHints::pushToRenderStack('nameRelationships');
133
    $footnoteListKey = 'nameRelationships';
134
    RenderHints::setFootnoteListKey($footnoteListKey);
135
    
128 136
	// group by relationship type
129 137
	$relationshipGroups = array();
130 138
	foreach($nameRelationships as $nameRelationship){
......
154 162
		$block->content .= implode('; ', $relatedNames);
155 163
		$out .= theme('block', $block);
156 164
	}
165
	$out .= theme('cdm_footnotes', $footnoteListKey, 'div');
166
	
167
	RenderHints::popFromRenderStack();
157 168
	return $out;
158 169
}
159 170

  
......
169 180
function theme_cdm_heterotypicSynonymyGroup($homotypicalGroup){
170 181
	
171 182
	RenderHints::pushToRenderStack('heterotypicSynonymyGroup');
183
	
172 184
	$out = '';
173 185
	$out = '<ul class="heterotypicSynonymyGroup">';
174

  
186
    $footnoteListKey = ( isset($homotypicalGroup[0]) ? $homotypicalGroup[0]->uuid : 'NULL');
187
	RenderHints::setFootnoteListKey($footnoteListKey);
188
    
175 189
	$is_first_entry = true;
176 190
	$typeDesignations = null;
177 191
	foreach($homotypicalGroup as $synonym){
178 192
		if($is_first_entry){
179
			RenderHints::setfootnoteListKey($synonym->uuid);
180 193
			$is_first_entry = false;
181 194
			//$typeDesignations = cdm_ws_get(CDM_WS_NAME_TYPEDESIGNATIONS, $synonym->name->uuid);
182 195
			$typeDesignations = cdm_ws_get(CDM_WS_PORTAL_TAXON_NAMETYPEDESIGNATIONS, $synonym->uuid);
......
190 203
		$out .= theme('cdm_typedesignations', $typeDesignations);
191 204
	}
192 205

  
206
	$out .= theme('cdm_footnotes', $footnoteListKey, 'li');
193 207
	$out .= '</ul>';
194 208
    
195
	$out .= FootnoteManager::renderFootnoteList($firstSynonymUuid);
196 209
    
197 210
    RenderHints::popFromRenderStack();
198 211
	return $out;
......
204 217
	
205 218
	RenderHints::pushToRenderStack('homotypicSynonymyGroup');
206 219
	
207
	$firstSynonymUuid = isset($prependedSynonyms[0]) ? $prependedSynonyms[0]->uuid : (isset($synonymList[0]) ? $synonymList[0]->uuid : 'NULL');
208
	RenderHints::setfootnoteListKey($firstSynonymUuid);
220
	$footnoteListKey = isset($prependedSynonyms[0]) ? $prependedSynonyms[0]->uuid : (isset($synonymList[0]) ? $synonymList[0]->uuid : 'NULL');
221
	RenderHints::setFootnoteListKey($footnoteListKey);
209 222
	
210 223
	if(! is_array($synonymList) || count($synonymList) == 0){
211 224
		return;
......
228 241
		$out .= theme('cdm_typedesignations', $typeDesignations);
229 242
	}
230 243

  
244
	$out .= theme('cdm_footnotes', $footnoteListKey, 'li');
231 245
	$out .= '</ul>';
232
	$out .= FootnoteManager::renderFootnoteList($firstSynonymUuid);
233 246
	
234 247
	RenderHints::popFromRenderStack();
235 248
	return $out;
......
397 410
			$out .= $separator.$partHtml;
398 411
		}
399 412
	}
400

  
401
	return $out.'</span>';
413
    $out .= '</span>';
414
    
415
	// add annotations
416
	$out .= theme('cdm_annotation', $taxonName);
417
	
418
	return $out;
402 419
}
403 420

  
404 421
/**

Also available in: Unified diff