Project

General

Profile

Revision 7212f0bc

ID7212f0bc72696c2077b6a17cb886e70d541d5067
Parent f8283d8a
Child 26b8a1bc

Added by Andreas Kohlbecker almost 2 years ago

moving methods regarding registrations to name.inc

View differences:

modules/cdm_dataportal/includes/common.inc
587 587
  return $extensions_render_array;
588 588
}
589 589

  
590
function render_registration($registration){
591
  $markup = '';
592 590

  
593
  if(isset($registration->identifier) && $registration->status == 'PUBLISHED'){
594
    $office_class_attribute = '';
595
    if(isset($registration->institution->titleCache)){
596
      $office_class_attribute = 'registration-' . strtolower(preg_replace('/[^a-zA-Z0-9]/', '-', $registration->institution->titleCache));
597
    }
598
    $markup = "<span class=\"registration $office_class_attribute\">" . l($registration->identifier, $registration->identifier) . ', '
599
      .  preg_replace('/^([^T]*)(.*)$/', '${1}', $registration->registrationDate)
600
    . '</span>';
601
  }
602
  return $markup;
603
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)