Revision 0a288588
Added by Andreas Kohlbecker about 7 years ago
modules/cdm_dataportal/theme/cdm_dataportal.page.theme | ||
---|---|---|
396 | 396 |
|
397 | 397 |
$field_order = array( |
398 | 398 |
"title", |
399 |
// "titleCache", |
|
399 |
"abbrevTitle", |
|
400 |
// "titleCache" abbrevTitleCache |
|
400 | 401 |
// "citation", |
401 | 402 |
"authorship", |
402 | 403 |
"editor", |
... | ... | |
418 | 419 |
"previousVersion", |
419 | 420 |
"isbn",// Class Book. |
420 | 421 |
"issn",// Class Journal. |
421 |
"uri", |
|
422 |
"doi", |
|
423 |
"uri" |
|
422 | 424 |
); |
423 | 425 |
|
424 |
$header = array( |
|
425 |
t('Field'), |
|
426 |
t('Value'), |
|
427 |
); |
|
428 | 426 |
$table_rows = array(); |
429 | 427 |
|
430 | 428 |
if (!isset($reference->authorship)) { |
... | ... | |
448 | 446 |
$datePublished = timePeriodToString($period); |
449 | 447 |
if (isset($datePublished) && $datePublished != '') { |
450 | 448 |
$table_rows[] = array( |
451 |
t(ucfirst(strtolower($fieldname))),
|
|
449 |
t("Date published"),
|
|
452 | 450 |
$datePublished, |
453 | 451 |
); |
454 | 452 |
} |
455 | 453 |
// $datePublished = array(t(ucfirst(strtolower($fieldname))), |
456 | 454 |
// $datePublished); |
457 | 455 |
} |
456 |
elseif ($fieldname == "doi" && is_object($reference->doi)) { |
|
457 |
$table_rows[] = array( |
|
458 |
t(ucfirst(strtolower($fieldname))), |
|
459 |
cdm_doi($reference->doi, false) |
|
460 |
); |
|
461 |
} |
|
462 |
elseif ($fieldname == "uri" && isset($reference->uri) && $reference->uri) { |
|
463 |
$table_rows[] = array( |
|
464 |
t(ucfirst(strtolower($fieldname))), |
|
465 |
cdm_external_uri($reference->uri, false) |
|
466 |
); |
|
467 |
} |
|
458 | 468 |
elseif (is_object($reference->$fieldname)) { |
459 | 469 |
if ($fieldname == "authorship") { |
460 | 470 |
$dump = $reference->$fieldname; |
... | ... | |
498 | 508 |
else { |
499 | 509 |
$value = $reference->$fieldname->titleCache; |
500 | 510 |
} |
511 |
|
|
512 |
|
|
501 | 513 |
if (isset($value) && $value != '') { |
502 | 514 |
$table_rows[] = array( |
503 | 515 |
t(ucfirst(strtolower($fieldname))), |
504 | 516 |
$value, |
505 | 517 |
); |
506 | 518 |
} |
519 |
|
|
507 | 520 |
} |
508 | 521 |
else { |
509 | 522 |
if (isset($reference->$fieldname) && $reference->$fieldname != '') { |
... | ... | |
519 | 532 |
$out = theme_table(array( |
520 | 533 |
'header' => array(), |
521 | 534 |
'rows' => $table_rows, |
522 |
'attributes' => array(), |
|
535 |
'attributes' => array( |
|
536 |
'class' => html_class_attribute_ref($reference) |
|
537 |
), |
|
523 | 538 |
'caption' => NULL, |
524 | 539 |
'colgroups' => NULL, |
525 | 540 |
'sticky' => NULL, |
526 |
'empty' => NULL, |
|
541 |
'empty' => NULL,
|
|
527 | 542 |
)); |
528 | 543 |
|
544 |
if($reference->referenceAbstract){ |
|
545 |
$out .= '<div class="abstract">' . $reference->referenceAbstract . '</div>'; |
|
546 |
} |
|
547 |
|
|
529 | 548 |
// Annotations below the table. |
530 | 549 |
$annotations = cdm_ws_getAnnotationsFor($reference); |
531 | 550 |
$out .= theme("cdm_annotations", array('annotations' => $annotations)); |
Also available in: Unified diff
#5723 fixing several problems with the reference page