|
|
|
@ -27,8 +27,9 @@ function islandora_manage_policies_form($form, &$form_state, $collection_object)
|
|
|
|
|
$item = $repository->getObject($content_model); |
|
|
|
|
$cm_name = $item->Label; |
|
|
|
|
$cm_options[$content_model] = $cm_name; |
|
|
|
|
} catch (RepositoryException $e) { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
catch(RepositoryException $e) {} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -71,6 +72,7 @@ function islandora_manage_policies_form($form, &$form_state, $collection_object)
|
|
|
|
|
'#title' => t("Manage collection policy for @collection_title", array('@collection_title' => $collection_object->label)), |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
if (count($new_content_models) > 0) { |
|
|
|
|
$form ['manage_collection_policy']['add']['content_model_to_add'] = array( |
|
|
|
|
'#title' => "Choose content model", |
|
|
|
|
'#type' => 'select', |
|
|
|
@ -101,6 +103,12 @@ function islandora_manage_policies_form($form, &$form_state, $collection_object)
|
|
|
|
|
'#value' => t('Add content model to collection policy'), |
|
|
|
|
'#id' => 'add_cm' |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
$form['manage_collection_policy']['no_content_models'] = array( |
|
|
|
|
'#markup' => t('No content models available to add!'), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (count($current_models_in_policy) > 0) { |
|
|
|
|
$form['manage_collection_policy']['remove'] = array( |
|
|
|
|