|
|
@ -61,22 +61,28 @@ function islandora_basic_collection_menu() { |
|
|
|
return $items; |
|
|
|
return $items; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function islandora_basic_collection_init() { |
|
|
|
|
|
|
|
if (path_is_admin(current_path())) { |
|
|
|
|
|
|
|
drupal_add_css(drupal_get_path('module', 'islandora_basic_collection') . '/css/islandora_basic_collection.admin.css'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Implements hook_menu_local_tasks_alter(). |
|
|
|
* Implements hook_menu_local_tasks_alter(). |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
function islandora_basic_collection_menu_local_tasks_alter(&$data, $router_item, $root_path) { |
|
|
|
function islandora_basic_collection_menu_local_tasks_alter(&$data, $router_item, $root_path) { |
|
|
|
// Add action link |
|
|
|
// Add action link |
|
|
|
if ($root_path == 'islandora/object/%/manage/collection') { |
|
|
|
if ($root_path == 'islandora/object/%/manage/collection') { |
|
|
|
$object_id = $router_item['page_arguments'][0]; |
|
|
|
$object_id = $router_item['page_arguments'][0]; |
|
|
|
$item = menu_get_item("islandora/ingest/$object_id"); |
|
|
|
$item = menu_get_item("islandora/ingest/$object_id"); |
|
|
|
$item['title'] = 'Add a repository item'; |
|
|
|
$item['title'] = 'Add a repository item'; |
|
|
|
if ($item['access']) { |
|
|
|
if ($item['access']) { |
|
|
|
$data['actions']['output'][] = array( |
|
|
|
$data['actions']['output'][] = array( |
|
|
|
'#theme' => 'menu_local_action', |
|
|
|
'#theme' => 'menu_local_action', |
|
|
|
'#link' => $item, |
|
|
|
'#link' => $item, |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|