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/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