Project

General

Profile

Download (1.36 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/**
3
 * @file
4
 * Taxon 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
  /**
18
 * @todo document this function.
19
 */
20
function theme_cdm_taxon_list_thumbnails($variables) {
21

    
22
  $taxon = $variables['taxon'];
23
  $out = '';
24
  $gallery_settings = getGallerySettings(CDM_DATAPORTAL_SEARCH_GALLERY_NAME);
25
  $showCaption = $gallery_settings['cdm_dataportal_show_thumbnail_captions'];
26
  if ($showCaption) {
27
    $captionElements = array(
28
      'title',
29
      'rights',
30
    );
31
  } else {
32
    $captionElements = array();
33
  }
34

    
35
  $gallery_name = $taxon->uuid;
36

    
37
  $mediaList = _load_media_for_taxon($taxon);
38

    
39
  $galleryLinkUri = path_to_taxon($taxon->uuid, 'images');
40

    
41
  $out .= compose_cdm_media_gallerie(array(
42
    'mediaList' => $mediaList,
43
    'galleryName' => $gallery_name,
44
    'maxExtend' => $gallery_settings['cdm_dataportal_media_maxextend'],
45
    'cols' => $gallery_settings['cdm_dataportal_media_cols'],
46
    'maxRows' => $gallery_settings['cdm_dataportal_media_maxRows'],
47
    'captionElements' => $captionElements,
48
    'mediaLinkType' => 'LIGHTBOX',
49
    'alternativeMediaUri' => NULL,
50
    'galleryLinkUri' => $galleryLinkUri,
51
     ));
52

    
53
  return $out;
54
}
(8-8/9)