Project

General

Profile

« Previous | Next » 

Revision 907cc9b4

Added by Patrick Plitzner almost 7 years ago

ref #6816 Enhance layout and specimen title

View differences:

modules/cdm_dataportal/cdm_dataportal.module
1610 1610
 * @return array|string
1611 1611
 */
1612 1612
function cdm_dataportal_specimen_view($uuid) {
1613
    $specimen = cdm_ws_get(CDM_WS_OCCURRENCE, $uuid);
1613
    $specimen = cdm_ws_get(CDM_WS_PORTAL_OCCURRENCE, $uuid);
1614 1614
    if (empty($specimen)) {
1615 1615
        drupal_set_title(t('Specimen does not exist'), PASS_THROUGH);
1616 1616
        return FALSE;
modules/cdm_dataportal/includes/occurrences.inc
42 42
    }
43 43
    if($specimen->preferredStableUri){
44 44
        $stableIdentifierLink  = l($specimen->preferredStableUri, $specimen->preferredStableUri, array('attributes' => array('target' => '_blank')));
45
        $detail_html .= "<br>".create_label("Preferred stable URI") . $stableIdentifierLink . "<br>";
45
        $detail_html .= create_label("Preferred stable URI") . $stableIdentifierLink . "<br>";
46 46
    }
47 47
    if($is_specimen_page){
48 48
        // associated taxa
......
62 62
    $types = "";
63 63
    if (isset($specimen->types)) {
64 64
        //typed taxa
65
        if(sizeof($specimen->types)>1){
66
            $detail_html .= "<br>";
67
        }
68 65
        foreach ($specimen->types as $typeStatus => $typedTaxa) {
69 66
            if($is_specimen_page){
70 67
                if($specimen->types){
modules/cdm_dataportal/theme/cdm_dataportal.page.theme
55 55
    $referenceUri = '';
56 56
    $out = '';
57 57

  
58
    $title = "";
58

  
59
    if($specimen->collection->code){
60
      $collection = $specimen->collection->code;
61
    }
62
    elseif($specimen->collection->name){
63
      $collection = $specimen->collection->name;
64
    }
59 65
    if($specimen->accessionNumber){
60
        $title = $specimen->accessionNumber;
66
        $specimenID = $specimen->accessionNumber;
61 67
    }
62 68
    elseif($specimen->barcode){
63
        $title = $specimen->barcode;
69
      $specimenID = $specimen->barcode;
64 70
    }
65 71
    elseif($specimen->catalogNumber) {
66
        $title = $specimen->catalogNumber;
72
      $specimenID = $specimen->catalogNumber;
67 73
    }
74
    if(!isset($specimenID) and !isset($collection)){
75
      $specimenID = $specimen->uuid;
76
    }
77

  
68 78

  
79
  $out .= "Specimen ";
80
  if($collection){
81
    $out .= $collection." ";
82
  }
83
  $out .= $specimenID;
69 84

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

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

Also available in: Unified diff