Browse Source

Updated fedora_repository_ingest_object and fedora_repository_edit_qdc_form to include proper breadcrumbs.

pull/2/head^2
mroy 14 years ago
parent
commit
7d70563875
  1. 11
      fedora_repository.module

11
fedora_repository.module

@ -91,6 +91,7 @@ function fedora_repository_collection_view($pid = NULL, $collection = NULL, $pag
function fedora_repository_ingest_object($collection_pid=NULL, $collection_label = NULL, $content_model = NULL) {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
module_load_include('inc', 'fedora_repository', 'ObjectHelper');
if (!user_access('ingest new fedora objects')) {
drupal_set_message(t('You do not have permission to ingest.'), 'error');
return '';
@ -112,6 +113,11 @@ function fedora_repository_ingest_object($collection_pid=NULL, $collection_label
}
$output = drupal_get_form('fedora_repository_ingest_form', $collection_pid, $collection_label, $content_model);
$breadcrumbs = array();
$objectHelper = new ObjectHelper();
$objectHelper->getBreadcrumbs($collection_pid, $breadcrumbs);
drupal_set_breadcrumb(array_reverse($breadcrumbs));
return $output;
}
@ -586,6 +592,11 @@ function fedora_repository_edit_qdc_form(&$form_state, $pid, $dsId = NULL) {
$client = $soapHelper->getSoapClient(variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl'));
// Check if there is a custom edit metadata function defined in the content model.
$breadcrumbs = array();
$objectHelper = new ObjectHelper();
$objectHelper->getBreadcrumbs($pid, $breadcrumbs);
drupal_set_breadcrumb(array_reverse($breadcrumbs));
$output = '';
if (($cm = ContentModel::loadFromObject($pid)) !== FALSE) {

Loading…
Cancel
Save