Project

General

Profile

Revision c7f92453

IDc7f92453f44eb0b70a3eb77dab51916cbfdee73e
Parent c5294246
Child 3a3d658d

Added by Andreas Kohlbecker almost 4 years ago

ref #3061 using the full publication timePeriod instead of only start

View differences:

modules/cdm_dataportal/cdm_api/cdm_api.module
587 587
      return $year;
588 588
    }
589 589
  }
590
  return;
590
  return '';
591 591
}
592 592

  
593 593
/**
......
610 610
      return $month;
611 611
    }
612 612
  }
613
  return;
613
  return '';
614 614
}
615 615

  
616 616
/**
......
633 633
      return $day;
634 634
    }
635 635
  }
636
  return;
636
  return '';
637 637
}
638 638

  
639 639
/**
......
682 682
  $date = '';
683 683

  
684 684
  if ($y == '00' && $stripZeros) {
685
    return;
685
    return '';
686 686
  }
687 687
  else {
688 688
    $date = $y;
modules/cdm_dataportal/theme/cdm_dataportal.name.theme
122 122
        $author_team = cdm_ws_get(CDM_WS_REFERENCE_AUTHORTEAM, $type_designation->citation->uuid);
123 123

  
124 124
        if(isset($author_team->titleCache)){
125
          $authorteam_str = $author_team->titleCache . partialToYear($type_designation->citation->datePublished->start);
125
          $year = timePeriodToString($type_designation->citation->datePublished, true, 'YYYY');
126
          $authorteam_str = $author_team->titleCache . ($year ? ' ' : '') . $year;
126 127
          if($authorteam_str == $type_designation->citation->titleCache){
127 128
            $citation_footnote_str = '';
128 129
          }
......
148 149

  
149 150
        $typeReference .= '&nbsp;(' . t('designated by') . '&nbsp;<span class="typeReference">'. $authorteam_str . '</span>';
150 151
        if (!empty($type_designation->citationMicroReference)) {
151
          $typeReference .= ':' . $type_designation->citationMicroReference;
152
          $typeReference .= ': ' . trim($type_designation->citationMicroReference);
152 153
        }
153 154
        $typeReference .= $footnote_key_markup . ')';
154 155

  
modules/cdm_dataportal/theme/cdm_dataportal.references.theme
52 52

  
53 53
  if ($referenceStyle == "zoology") {
54 54
    $year = '';
55
    if (isset($reference->datePublished->start)) {
56
      $year = partialToYear($reference->datePublished->start);
55
    if (isset($reference->datePublished)) {
56
      $year = timePeriodToString($reference->datePublished, true, 'YYYY');
57 57
    }
58 58
    $citation = $author_team->titleCache . (!empty($year) ? '. ' . $year : '');
59 59
  }
themes/palmweb_2/template.php
261 261
  }
262 262

  
263 263
  $year = '';
264
  if (isset($reference->datePublished->start)) {
265
    $year = partialToYear($reference->datePublished->start);
264
  if (isset($reference->datePublished)) {
265
    $year = timePeriodToString($reference->datePublished, true, 'YYYY');
266 266
  }
267 267
  if(isset($author_team->titleCache)){
268 268
    $citation = _short_form_of_author_team ($author_team->titleCache) . (!empty($year) ? '. ' . $year : '');

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)