Browse Source

added content model to overview

pull/653/head
ajstanley 8 years ago
parent
commit
0002070060
  1. 20
      islandora.module

20
islandora.module

@ -2170,3 +2170,23 @@ function islandora_islandora_get_breadcrumb_query_predicates(AbstractObject $obj
'fedora-rels-ext:isMemberOf',
);
}
/**
* Implements hook_islandora_overview_object().
*/
function islandora_islandora_overview_object(AbstractObject $object) {
$cmodels = $object->models;
$rows = array();
foreach ($cmodels as $cmodel) {
if ($cmodel != 'fedora-system:FedoraObject-3.0') {
$object = islandora_object_load($cmodel);
$rows[] = array(l($object->label, "islandora/object/{$object->id}"));
}
}
$header = count($rows) > 1 ? t('Content Models') : t('Content Model');
$table = theme('table', array(
'header' => array($header),
'rows' => $rows,
'empty' => t('No content model associated woith this object.')));
return array('cmodels' => $table);
}

Loading…
Cancel
Save