Revision 3d526ffb
Added by Andreas Kohlbecker over 12 years ago
5.x/themes/palmweb_2/template.php | ||
---|---|---|
83 | 83 |
} |
84 | 84 |
|
85 | 85 |
|
86 |
/** |
|
87 |
* |
|
88 |
* Enter description here ... |
|
89 |
* @param unknown_type $reference |
|
90 |
* @param unknown_type $microReference |
|
91 |
* @param unknown_type $doLink |
|
92 |
* @param unknown_type $referenceStyle |
|
93 |
*/ |
|
94 |
function palmweb_2_cdm_reference($reference, $microReference = null, $doLink = FALSE, $referenceStyle = NULL ){ |
|
95 |
|
|
96 |
$author_team = cdm_ws_get(CDM_WS_REFERENCE_AUTHORTEAM, $reference->uuid); |
|
97 |
|
|
98 |
$year = partialToYear($reference->datePublished->start); |
|
99 |
$citation = _short_form_of_author_team ($author_team->titleCache) . ($year ? '. '.$year : ''); |
|
100 |
$citation = str_replace('..', '.', $citation); |
|
101 |
|
|
102 |
if($doLink){ |
|
103 |
$out = l('<span class="reference">'.$citation.'</span>' |
|
104 |
, path_to_reference($reference->uuid) |
|
105 |
, array("class"=>"reference") |
|
106 |
, NULL, NULL, FALSE ,TRUE); |
|
107 |
} else { |
|
108 |
$out = '<span class="reference">'.$citation.'</span>'; |
|
109 |
} |
|
110 |
//FIXME use microreference webservice instead |
|
111 |
if(!empty($descriptionElementSource->citationMicroReference)){ |
|
112 |
$out .= ': '. $descriptionElementSource->citationMicroReference; |
|
113 |
} |
|
114 |
|
|
115 |
return $out; |
|
116 |
} |
|
117 |
|
|
118 |
|
|
86 | 119 |
/** |
87 | 120 |
* Sets the body-tag class attribute. |
88 | 121 |
* |
Also available in: Unified diff
fixing #2679 (Improve Concept Relationships for Dataportal)