Revision 14076b88
Added by Andreas Kohlbecker almost 5 years ago
modules/cdm_dataportal/cdm_dataportal.module | ||
---|---|---|
1388 | 1388 |
} |
1389 | 1389 |
|
1390 | 1390 |
/** |
1391 |
* Fiters the array $entity_list of CDM entities by the list |
|
1391 |
* Filters the array $entity_list of CDM entities by the list
|
|
1392 | 1392 |
* of $excludes. Any element contained in the $excludes will be removed |
1393 |
* from included int the retuned list. |
|
1393 |
* from included int the returned list.
|
|
1394 | 1394 |
* |
1395 | 1395 |
* If the $entity_list is not an array the $excludes will be returned. |
1396 | 1396 |
*/ |
... | ... | |
1646 | 1646 |
function cdm_dataportal_specimen_page_view($uuid, $specimenDTO = null) { |
1647 | 1647 |
|
1648 | 1648 |
cdm_check_valid_portal_page(); |
1649 |
//cdm_dd("START OF TAXON PAGE [" . $chapter . "] " . $uuid . ' for ' . $_GET['q']); |
|
1650 | 1649 |
|
1651 | 1650 |
// Display the page for the specimen defined by $uuid. |
1652 | 1651 |
if (isset($specimenDTO)){ |
... | ... | |
1922 | 1921 |
if(count($name_relations) > 0){ |
1923 | 1922 |
$content['name_relationships'] = compose_name_relationships_list($name_relations, $taxon_name->uuid, null); |
1924 | 1923 |
} |
1924 |
|
|
1925 |
$type_designations = cdm_ws_get(CDM_WS_PORTAL_NAME_TYPEDESIGNATIONS, $taxon_name->uuid); |
|
1926 |
if ($type_designations) { |
|
1927 |
$content['type_designations'] = markup_to_render_array( |
|
1928 |
theme('cdm_typedesignations', array('typeDesignations' => $type_designations, 'enclosing_tag' => 'p', 'element_tag' => 'div')) |
|
1929 |
); |
|
1930 |
|
|
1931 |
$points = array(); |
|
1932 |
foreach ($type_designations as $td){ |
|
1933 |
if($td->class == "SpecimenTypeDesignation"){ |
|
1934 |
$derived_unit_facade = cdm_ws_get(CDM_WS_PORTAL_DERIVEDUNIT_FACADE, array($td->typeSpecimen->uuid)); |
|
1935 |
if(isset($derived_unit_facade->exactLocation)){ |
|
1936 |
$points[] = $derived_unit_facade->exactLocation->latitude . ',' . $derived_unit_facade->exactLocation->longitude; |
|
1937 |
} |
|
1938 |
} |
|
1939 |
} |
|
1940 |
|
|
1941 |
// os=1:c/ff0000/10/noLabel&od=1:52.52079,13.57781|-43.46333333333333,172.60355&legend=0 |
|
1942 |
$occurrence_query = 'os=1:c/ff0000/10/noLabel&od=1:' . join('|', $points) . '&legend=0'; |
|
1943 |
// $occurrence_query = 'os=1:c/ff0000/10/noLabel&od=1:52.52079,13.57781|-43.46333333333333,172.60355&legend=0'; |
|
1944 |
$legend_format_query = null; |
|
1945 |
$distribution_query = NULL; |
|
1946 |
$content['map'] = compose_map('specimens', $occurrence_query, $distribution_query, $legend_format_query, array()); |
|
1947 |
} |
|
1948 |
|
|
1925 | 1949 |
// related taxa |
1926 | 1950 |
if ($taxa) { |
1927 |
$content['related_taxa_header'] = markup_to_render_array("<h4>Taxa for this name</h4>");
|
|
1951 |
$content['related_taxa_header'] = markup_to_render_array("<h2>Taxa for this name</h2>");
|
|
1928 | 1952 |
$content['related_taxa'] = compose_list_of_taxa($taxa); |
1929 | 1953 |
} |
1930 | 1954 |
else { |
Also available in: Unified diff
fix #8351 showing type designations and map in name page