Project

General

Profile

Download (20.2 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/**
3
 * @file
4
 * Page theming functions.
5
 *
6
 * @copyright
7
 *   (C) 2007-2012 EDIT
8
 *   European Distributed Institute of Taxonomy
9
 *   http://www.e-taxonomy.eu
10
 *
11
 *   The contents of this module are subject to the Mozilla
12
 *   Public License Version 1.1.
13
 * @see http://www.mozilla.org/MPL/MPL-1.1.html
14
 */
15

    
16
/**
17
 * Returns HTML for the default title of a taxon page.
18
 *  * The returned title is a formatted taxon name.
19
 *
20
 * @param array $variables
21
 *   An associative array containing:
22
 *   - taxon: The taxon name being formatted for the title.
23
 *   - uuid: UUID for the taxon.
24
 *
25
 * @ingroup themeable
26
 */
27
function theme_cdm_taxon_page_title($variables) {
28
  $taxon = $variables['taxon'];
29
  RenderHints::pushToRenderStack('taxon_page_title');
30
  $referenceUri = '';
31
  $out = '';
32
  if (isset($taxon->name->nomenclaturalReference)) {
33
    $referenceUri = url(path_to_reference($taxon->name->nomenclaturalReference->uuid));
34
  }
35

    
36
  $out .= render_taxon_or_name($taxon, NULL, $referenceUri, FALSE);
37
  RenderHints::popFromRenderStack();
38

    
39
  return '<span class="' . $taxon->class . '">' . $out . '</span>';
40
}
41

    
42
/**
43
 * Returns HTML for the default title of a specimen page.
44
 *  * The returned title is a the identifier of the specimen.
45
 *
46
 * @param array $variables
47
 *   An associative array containing:
48
 *   - specimen: The specimen being formatted for the title.
49
 *
50
 * @ingroup themeable
51
 */
52
function theme_cdm_specimen_page_title($variables) {
53
    $specimen = $variables['specimen'];
54
    RenderHints::pushToRenderStack('specimen_page_title');
55
    $referenceUri = '';
56
    $out = '';
57

    
58
    $title = "";
59
    if($specimen->accessionNumber){
60
        $title = $specimen->accessionNumber;
61
    }
62
    elseif($specimen->barcode){
63
        $title = $specimen->barcode;
64
    }
65
    elseif($specimen->catalogNumber) {
66
        $title = $specimen->catalogNumber;
67
    }
68

    
69

    
70
  $out .= $title;
71
  RenderHints::popFromRenderStack();
72

    
73
  return '<span class="' . $specimen->class . '">' . $out . '</span>';
74
}
75

    
76
/**
77
 * Returns HTML for the default title for a name page.
78
 *
79
 * The returned title is a formatted name.
80
 *
81
 * @param array $variables
82
 *   An associative array containing:
83
 *   - taxon_name: The taxon name object.
84
 *
85
 * @ingroup themeable
86
 */
87
function theme_cdm_name_page_title($variables) {
88
  $taxon_name = $variables['taxon_name'];
89
  RenderHints::pushToRenderStack('taxon_page_title');
90

    
91
  $referenceUri = NULL;
92
  if (isset($taxon_name->nomenclaturalReference)) {
93
    $referenceUri = url(path_to_reference($taxon_name->nomenclaturalReference->uuid));
94
  }
95

    
96
  $out = '<span class="' . $taxon_name->class . '">'
97
    . render_taxon_or_name($taxon_name, NULL, $referenceUri, FALSE)
98
    . '</span>';
99
  RenderHints::popFromRenderStack();
100
  return $out;
101
}
102

    
103

    
104

    
105

    
106

    
107
/**
108
 * Returns HTML containing the synonymy for the accepted taxon.
109
 *
110
 * Shows the whole synonymy for the accepted taxon.
111
 * The synonymy list is headed by the complete scientific name
112
 * of the accepted taxon with nomenclatural reference.
113
 *
114
 * @param array $variables
115
 *   An associative array containing:
116
 *   - taxon
117
 *   - addAcceptedTaxon
118
 *
119
 * @ingroup themeable
120
 */
121
function theme_cdm_taxon_page_synonymy($variables) {
122
  $taxon = $variables['taxon'];
123
  $addAcceptedTaxon = $variables['addAcceptedTaxon'];
124

    
125
  RenderHints::pushToRenderStack('taxon_page_synonymy');
126

    
127
  // footnote key for the homotypic group and accepted taxon,
128
  // both should have the same footnote key
129
  RenderHints::setFootnoteListKey(RenderHints::getRenderPath());
130

    
131
  $synomymie = cdm_ws_get(CDM_WS_PORTAL_TAXON_SYNONYMY, $taxon->uuid);
132
  $skip = array(
133
    UUID_NAMERELATIONSHIPTYPE_BASIONYM,
134
  );
135
  $out = '';
136

    
137
  // Render accepted taxon.
138
  //
139
  // foonotes of the accepted taxon will be rendered in the homotypic group section
140
  // even if there are not synonyms in the homotypic group
141
  // homotypic group and accepted taxon should have the same footnote key
142
  $referenceUri = '';
143
  if ($addAcceptedTaxon) {
144
    // remember the last part of the render path
145
    $synonymy_render_path = RenderHints::getRenderPath();
146
    // set new render path for the accepted taxon so
147
    // it can be styled differently via the name render part definitions
148
    RenderHints::pushToRenderStack('accepted_taxon');
149
    if (isset($taxon->name->nomenclaturalReference)) {
150
      $referenceUri = url(path_to_reference($taxon->name->nomenclaturalReference->uuid));
151
    }
152

    
153
    $accepted_name = '<div class="accepted-name">';
154
    $accepted_name .= render_taxon_or_name($taxon, NULL, $referenceUri);
155

    
156
    $name_relationships = cdm_name_relationships_of($taxon);
157
    // Render relationships of accepted name.
158
    if($name_relationships){
159

    
160
      $accepted_name .= ' <span class="name_relationships">' . $name_relationships . '</span>';
161
    }
162

    
163
      // handle annotations of the name and taxon
164
    $special_annotations_array = array();
165
    $special_annotations_array[] = $taxon->name;
166
    $special_annotations_array[] = $taxon;
167
    $accepted_name .= theme('cdm_annotations_as_footnotekeys', array(
168
        'cdmBase_list' => $special_annotations_array,
169
        'footnote_list_key' => $synonymy_render_path . '-annotations')
170
      );
171
    $accepted_name .= '</div>';
172
    RenderHints::popFromRenderStack();
173
  }
174

    
175
  // --- Render homotypic synonymy group
176
  if (!empty($accepted_name)) {
177
    $out .= $accepted_name;
178
  }
179

    
180
  // Render the homotypicSynonymyGroup including the type information.
181
  $out .= theme(
182
      'cdm_homotypicSynonymyGroup',
183
      array(
184
          'synonymList' => $synomymie->homotypicSynonymsByHomotypicGroup,
185
          'accepted_taxon_name_uuid' => $taxon->name->uuid
186
      )
187
    );
188

    
189

    
190
  // Render accepted taxon heterotypic synonymy groups.
191
  if ($synomymie->heterotypicSynonymyGroups) {
192
    foreach ($synomymie->heterotypicSynonymyGroups as $homotypicalGroup) {
193
      $out .= theme('cdm_heterotypicSynonymyGroup', array('homotypicalGroup' => $homotypicalGroup));
194
    }
195
  }
196
  // Render taxon relationships.
197
  if (variable_get(CDM_DATAPORTAL_DISPLAY_TAXON_RELATIONSHIPS, CDM_DATAPORTAL_DISPLAY_TAXON_RELATIONSHIPS_DEFAULT)) {
198
    $taxonRelationships = cdm_ws_get(CDM_WS_PORTAL_TAXON_RELATIONS, $taxon->uuid);
199
    $out .= cdm_taxonRelationships($taxonRelationships, $taxon);
200
  }
201

    
202
  RenderHints::popFromRenderStack();
203

    
204
  return $out;
205
}
206

    
207

    
208
/**
209
 * Returns HTML for the given result page including a pager.
210
 *
211
 * @param array $variables
212
 *   An associative array containing:
213
 *   - pager: The cdmlib pager object containing the result set of cdm base
214
 *     objects (currently this function can only handle taxon instances =>
215
 *     TODO)
216
 *   - path: The target path for the pager links, this will usually point to
217
 *     'cdm_dataportal/search/results/taxon'
218
 *
219
 * @ingroup themeable
220
 */
221
function theme_cdm_search_results($variables)
222
{
223
  $pager = $variables['pager'];
224
  $path = $variables['path'];
225

    
226
  $freetextSearchResults = array();
227

    
228
  // If the pager contains records of SearchResults, extract the taxa and use
229
  // them as records instead.
230
  if (isset($pager->records[0]) && $pager->records[0]->class == "SearchResult") {
231
    $freetextSearchResults = $pager->records;
232
    $taxa = array();
233
    // $highlightedFragments = array();
234
    foreach ($pager->records as $searchResult) {
235
      $taxa[] = &$searchResult->entity;
236
      /*
237
       if(!isset($searchResult->fieldHighlightMap)){
238
      $searchResult->fieldHighlightMap = NULL;
239
      }
240
      $fragmentHighlighting[] = $searchResult->fieldHighlightMap;
241
      */
242
    }
243
    $pager->records = $taxa;
244
  }
245

    
246

    
247
  // Add thumbnails checkbox and refine search link.
248
  $out = '<div class="page_options">';
249
  if (isset($_REQUEST['ws'])) {
250
    if (cdm_dataportal_search_form_path_for_ws($_REQUEST['ws'])) {
251
      $out .= '<div id="backButton">' . l(t('Modify search'), cdm_dataportal_search_form_path_for_ws($_REQUEST['ws'])) . '</div>';
252
    }
253
  }
254
  if (variable_get(SEARCH_RESULTS_SHOW_THUMBNAIL_CHECKBOX, SEARCH_RESULTS_SHOW_THUMBNAIL_CHECKBOX_DEFAULT)) {
255
    $out .= '<form name="pageoptions"><div id="showThumbnails"><input class="showThumbnails" type="checkbox" name="showThumbnails" ' . (do_showThumbnails() == 1 ? 'checked="checked"' : '') . '> ' . t('Display Image Thumbnails') . '</div></form>';
256
  }
257
  $out .= '</div>';
258

    
259
  $classification = cdm_dataportal_searched_in_classification();
260

    
261

    
262
  if (  count(cdm_ws_fetch_all(CDM_WS_PORTAL_TAXONOMY)) > 1 ) { // FIXME use a count REST method for this!!!
263
    $out .= '<div id="search-summary">' . t('results for') . ' ';
264
    if ($classification != NULL) {
265
      $out .=  $classification->titleCache ;
266
    } else {
267
     $out .= t('any classification');
268
    }
269
    $out .= ':</div>';
270
  }
271

    
272
  // List results.
273
  if (isset($pager->records) && count($pager->records) > 0) {
274
    $out .= '<div id="search_results">';
275
    $out .= drupal_render(compose_list_of_taxa($pager->records, $freetextSearchResults, $classification === NULL));
276
    $out .= '</div>';
277
    $out .= theme('cdm_pager', array(
278
        'pager' => $pager,
279
        'path' => $path,
280
        'parameters' => $_REQUEST,
281
    ));
282
  } else {
283
    $out .= '<h4 class="error">Sorry, no matching entries found.</h4>';
284
  }
285
  return $out;
286
}
287

    
288

    
289
/**
290
 * TODO Implementation of Hook taxon_image_gallery()
291
 *
292
 * @param unknown_type $taxon
293
 * @param unknown_type $media
294
 *
295
 * @return unknown_type
296
 */
297
function taxon_image_gallery_default($taxon, $media) {
298
  $hasImages = isset($media[0]);
299

    
300
  if ($hasImages) {
301

    
302
    $maxExtend = 150;
303
    $cols = 3;
304
    $maxRows = FALSE;
305
    $alternativeMediaUri = NULL;
306
    /* Comment @WA: was in D5:
307
    $captionElements = array(
308
      'title',
309
      'rights',
310
      '#uri' => t('open Image'),
311
    );
312
    */
313
    $captionElements = array(
314
      'title',
315
      'description',
316
      'artist',
317
      'location',
318
      'rights',
319
      '#uri' => t('open Image'),
320
    );
321
    $gallery_name = $taxon->uuid;
322
    $mediaLinkType = 'LIGHTBOX';
323

    
324
    // $gallery_settings = getGallerySettings(CDM_DATAPORTAL_MEDIA_GALLERY_NAME);
325

    
326
    $gallery_settings = getGallerySettings(CDM_DATAPORTAL_TAXON_MEDIA_GALLERY_NAME_TAB);
327

    
328
    $out = '<div class="image-gallerie">';
329
    $out .= theme('cdm_media_gallerie', array(
330
      'mediaList' => $media,
331
      'galleryName' => $gallery_name,
332
      'maxExtend' => $gallery_settings['cdm_dataportal_media_maxextend'],
333
      'cols' => $gallery_settings['cdm_dataportal_media_cols'],
334
      'maxRows' => 0, // Ignore maxrows settings.
335
      'captionElements' => $captionElements,
336
      'mediaLinkType' => $mediaLinkType,
337
      'alternativeMediaUri' => NULL,
338
      'galleryLinkUri' => NULL,
339
      'showCaption' => $gallery_settings['cdm_dataportal_show_thumbnail_captions'],
340
    ));
341
    $out .= '</div>';
342
  }
343
  else {
344
    $out = 'No images available.';
345
  }
346
  return $out;
347
}
348

    
349
/**
350
 * TODO Implementation of Hook taxon_image_gallery()
351
 *
352
 * @param unknown_type $taxon
353
 * @param unknown_type $media
354
 *
355
 * @return unknown_type
356
 */
357
function taxon_image_gallery_fsi($taxon, $media) {
358
  $flashLink = isset($media[0]);
359

    
360
  if ($flashLink) {
361

    
362
    if (module_exists("fsi_gallery")) {
363
      $out = theme("fsi_gallery", array('taxon' => $taxon, 'media' => $media));
364
    }
365
    else {
366
      $message = t('In order to use the FSI gallery you must enable the according ') . l(t("module"), "admin/modules");
367
      drupal_set_message($message, "error");
368
      $out = '<h3>' . $message . '</h3>';
369
    }
370
  }
371
  else {
372
    $out = 'No images available.';
373
  }
374
  return $out;
375
}
376

    
377
/**
378
 * Returns HTML for a single reference page.
379
 *
380
 * Renders a page with all data on a single reference.
381
 *
382
 * @param array $variables
383
 *   An associative array containing:
384
 *   - reference: Object.
385
 *
386
 * @ingroup themeable
387
 */
388
function theme_cdm_reference_page($variables) {
389
  $reference = $variables['reference'];
390

    
391
  $out = '';
392

    
393
  if (isset($reference->titleCache)) {
394
    drupal_set_title($reference->titleCache, PASS_THROUGH);
395
  }
396

    
397
  $field_order = array(
398
    "title",
399
    "abbrevTitle",
400
    // "titleCache" abbrevTitleCache
401
    // "citation",
402
    "authorship",
403
    "editor",
404
    "publisher",
405
    "placePublished",
406
    "datePublished",
407
    "year",
408
    "edition",// Class Book.
409
    "volume",// Class Article.
410
    "seriesPart",
411
    "inReference",
412
    "nomRefBase", // Class BookSection, Book, Article.
413
    "pages",// Class Article.
414
    "series",// Class Article, PrintSeries.
415
    "school",// Class Thesis.
416
    "institution",// Class Report.
417
    "organization",// Class Proceedings.
418
    "nextVersion",
419
    "previousVersion",
420
    "isbn",// Class Book.
421
    "issn",// Class Journal.
422
    "doi",
423
    "uri"
424
  );
425

    
426
  $table_rows = array();
427

    
428
  if (!isset($reference->authorship)) {
429
    $authorship = cdm_ws_get(CDM_WS_REFERENCE_AUTHORTEAM, $reference->uuid);
430
    $reference->authorship = isset($authorship->titleCache) ? $authorship->titleCache : '';
431
  }
432

    
433
  if (!isset($reference->inReference)) {
434
    $reference->inReference = cdm_ws_get(CDM_WS_REFERENCE, array(
435
      $reference->uuid,
436
      "inReference",
437
    ));
438
  }
439

    
440
  foreach ($field_order as $fieldname) {
441

    
442
    if (isset($reference->$fieldname)) {
443

    
444
      if ($fieldname == "datePublished") {
445
        $period = $reference->$fieldname;
446
        $datePublished = timePeriodToString($period);
447
        if (isset($datePublished) && $datePublished != '') {
448
          $table_rows[] = array(
449
            t("Date published"),
450
            $datePublished,
451
          );
452
        }
453
        // $datePublished = array(t(ucfirst(strtolower($fieldname))),
454
        // $datePublished);
455
      }
456
      elseif ($fieldname == "doi" && is_object($reference->doi)) {
457
        $table_rows[] = array(
458
          t(ucfirst(strtolower($fieldname))),
459
          cdm_doi($reference->doi, false)
460
        );
461
      }
462
      elseif ($fieldname == "uri" && isset($reference->uri) && $reference->uri) {
463
        $table_rows[] = array(
464
          t(ucfirst(strtolower($fieldname))),
465
          cdm_external_uri($reference->uri, false)
466
        );
467
      }
468
      elseif (is_object($reference->$fieldname)) {
469
        if ($fieldname == "authorship") {
470
          $dump = $reference->$fieldname;
471
          $teammembers = "teamMembers";
472
          $team = $dump->$teammembers;
473
          $nameArray = array();
474

    
475
          foreach ($team as $member) {
476
            if (strlen($member->lastname) > 0) {
477
              $nname = $member->lastname;
478
              $name = $nname;
479
              if (strlen($member->firstname) > 0) {
480
                $vname = $member->firstname;
481
                $name = $vname . " " . $nname;
482
              }
483
              $nameArray[] = $name;
484
            }
485
            else {
486
              if (strlen($member->titleCache) > 0) {
487
                $nameArray[] = $member->titleCache;
488
              }
489
            }
490
          }
491
          $value = join($nameArray, ", ");
492
        }
493
        elseif ($fieldname == "inReference") {
494
          $type = $reference->$fieldname->type;
495
          $value = l($reference->$fieldname->titleCache, path_to_reference($reference->$fieldname->uuid));
496
          switch ($type) {
497
            case "Book":
498
              $fieldname = "in book";
499
              break;
500
            case "Journal":
501
              $fieldname = "in journal";
502
              break;
503
            case "Proceedings":
504
              $fieldname = "in proceedings";
505
              break;
506
          }
507
        }
508
        else {
509
          $value = $reference->$fieldname->titleCache;
510
        }
511

    
512

    
513
        if (isset($value) && $value != '') {
514
          $table_rows[] = array(
515
            t(ucfirst(strtolower($fieldname))),
516
            $value,
517
          );
518
        }
519

    
520
      }
521
      else {
522
        if (isset($reference->$fieldname) && $reference->$fieldname != '') {
523
          $table_rows[] = array(
524
            t(ucfirst(strtolower($fieldname))),
525
            $reference->$fieldname,
526
          );
527
        }
528
      }
529
    }
530
  }
531

    
532
  $out = theme_table(array(
533
      'header' => array(),
534
      'rows' => $table_rows,
535
      'attributes' => array(
536
        'class' => html_class_attribute_ref($reference)
537
      ),
538
      'caption' => NULL,
539
      'colgroups' => NULL,
540
      'sticky' => NULL,
541
      'empty' => NULL,
542
  ));
543

    
544
  if($reference->referenceAbstract){
545
    $out .= '<h2 class="block-title">Abstract</h2><div class="abstract">' . $reference->referenceAbstract . '</div>';
546
  }
547

    
548
  // Annotations below the table.
549
  $annotations = cdm_ws_getAnnotationsFor($reference);
550
  $out .= theme("cdm_annotations", array('annotations' => $annotations));
551

    
552
  return $out;
553
}
554

    
555
/**
556
 * @todo Please document this function.
557
 * @see http://drupal.org/node/1354
558
 */
559
function theme_cdm_media_page($variables) {
560
  $media = $variables['media'];
561
  $mediarepresentation_uuid = $variables['mediarepresentation_uuid'];
562
  $partId = $variables['partId'];
563
  $out = '';
564
  // Determine which representation and which part to show.
565
  $representationIdx = 0;
566
  if ($mediarepresentation_uuid) {
567
    $i = 0;
568
    foreach ($media->representations as $representation) {
569
      if ($representation->uuid == $mediarepresentation_uuid) {
570
        $representationIdx = $i;
571
      }
572
      $i++;
573
    }
574
  }
575
  else {
576
    $mediarepresentation_uuid = $media->representations[0]->uuid;
577
  }
578

    
579
  $partIdx = 0;
580
  if (!is_numeric($partId)) {
581
    // Assuming it is an uuid.
582
    $i = 0;
583
    foreach ($media->representations[$representationIdx]->parts as $part) {
584
      if ($part->uuid == $partId) {
585
        $partIdx = $i;
586
      }
587
      $i++;
588
    }
589
  }
590
  else {
591
    // Assuming it is an index.
592
    $partIdx = $partId;
593
  }
594

    
595
  $media_metadata = read_media_metadata($media);
596
  // $title = $media->titleCache;
597
  $title = $media_metadata['title'];
598

    
599
  $imageMaxExtend = variable_get('image-page-maxextend', 400);
600

    
601
  if (!$title) {
602
    $title = 'Media ' . $media->uuid . '';
603
  }
604

    
605
  drupal_set_title($title, PASS_THROUGH);
606

    
607
  $out .= '<div class="media cdm_media_viewer_image">';
608

    
609
  $out .= theme('cdm_back_to_image_gallery_button', array());
610
  $out .= '<div class="viewer">';
611
  $out .= theme('cdm_openlayers_image', array('mediaRepresentationPart' => $media->representations[$representationIdx]->parts[$partIdx], 'maxExtend' => $imageMaxExtend));
612
  $out .= '</div>';
613

    
614
  // General media metadata.
615
  /*
616
  $media_metadata = cdm_ws_get(CDM_WS_MEDIA_METADATA, array($media->uuid));
617
  vardump("PRINTING MEDIA METADATA");
618
  vardump($media_metadata);
619
  vardump("PRINTING MEDIA");
620
  vardump($media);
621
  */
622
  $metadataToPrint = theme('cdm_media_caption', array('media' => $media));
623
  $out .= $metadataToPrint;
624

    
625
  // Tabs for the different representations.
626
  // ul.secondary
627
  $out .= '<ul class="primary">';
628
  foreach ($media->representations as $representation) {
629
    $out .= '<li>' . l($media->representations[$representationIdx]->mimeType, path_to_media($media->uuid, $mediarepresentation_uuid, $partIdx)) . '</li>';
630
  }
631
  $out .= '</ul>';
632

    
633
  // Representation(-part) specific metadata.
634
  $thumbnailMaxExtend = 100;
635
  $out .= '<table>';
636
  $i = 0;
637
  foreach ($media->representations[$representationIdx]->parts as $part) {
638
    $out .= '<tr><th>' . t('Part') . ' ' . ($i + 1) . '</th><td>';
639
    switch ($part->class) {
640
      case 'ImageFile':
641
        $out .= $part->width . ' x ' . $part->height . ' - ' . $part->size . 'k';
642
        break;
643
      case 'AudioFile':
644
      case 'MovieFile':
645
        $out .= t('Duration') . ': ' . $part->duration . 's - ' . $part->size . 'k';
646
        break;
647
      default:
648
        $out .= $part->size . 'k';
649
    }
650

    
651
    $out .= '</td><td><a href="' . url(path_to_media($media->uuid, $mediarepresentation_uuid, $i)) . '">' . theme('cdm_media_gallerie_image', array('mediaRepresentationPart' => $part, 'maxExtend' => $thumbnailMaxExtend, 'addPassePartout' => TRUE));
652
    $i++;
653
  }
654
  $out .= '</table>';
655
  $out .= '</div>';
656

    
657
  return $out;
658
}
659

    
660
/**
661
 * @todo Please document this function.
662
 * @see http://drupal.org/node/1354
663
 */
664
function theme_cdm_polytomousKey_page($variables) {
665
  $polytomousKey = $variables['polytomousKey'];
666
  drupal_set_title($polytomousKey->titleCache, PASS_THROUGH);
667

    
668
  $out = theme("cdm_IdentificationKey", array(
669
    'identificationKey' => $polytomousKey,
670
    'doLinkToKeyPage' => FALSE,
671
    'showIdentificationKeyTitle' => FALSE,
672
    ));
673

    
674
  // Key nodes in linked style.
675
  $out .= theme('cdm_polytomousKey', array('polytomousKey' => $polytomousKey));
676
  /*
677
   * FIXME implement node type for keys !!!
678
   * (wrapping the content in the cdm_dataportal.node becomes obsolete then).
679
   */
680
  return '<div id="identificationKey">' . $out . '</div>';
681
}
682

    
683
/**
684
 * Returns HTML for taxon page tabs.
685
 *
686
 * Allows theming of the taxon page tabs.
687
 *
688
 * @param array $variables
689
 *   An associative array containing:
690
 *   - tabname
691
 *
692
 * @ingroup themeable
693
 */
694
function theme_cdm_taxonpage_tab($variables) {
695
  $tabname = $variables['tabname'];
696
  // TODO replace by using translations or theme the menue tabs itself instead?
697
  switch ($tabname) {
698
    default:
699
      return t($tabname);
700
  }
701
}
(6-6/9)