-
Notifications
You must be signed in to change notification settings - Fork 4
/
interedition.module
45 lines (39 loc) · 1.31 KB
/
interedition.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
function interedition_menu() {
$items = array();
$items['harvest/rdf'] = array(
'title' => 'Harvest RDF',
'description' => 'Produce RDF from TEI',
'file' => 'rdf_harvest.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array('tei_input_form'),
'access callback' => 'user_access',
'access arguments' => array('view content'), // Use something fedora specific.
'type' => MENU_NORMAL_ITEM,
);
$items['show/rdf'] = array(
'title' => 'Transformed TEI',
'description' => 'RDF produced from incoming TEI',
'file' => 'rdf_harvest.inc',
'page callback' => 'show_transformed_xml',
'access arguments' => array('view content'), // Use something fedora specific.
'type' => MENU_NORMAL_ITEM,
);
$items['islandora/collection/rdf'] = array(
'title' => t('Create RDF'),
'page callback' => 'get_collection_rdf_form',
'type' => MENU_CALLBACK,
'access arguments' => array('manage collections'),
);
return $items;
}
function interedition_islandora_collection_mangement($pid) {
global $user;
if (user_access('harvest OAI')) {
return l('Create RDF', "islandora/collection/rdf/$pid");
}
}
function get_collection_rdf_form($pid) {
module_load_include('inc', 'interedition', "rdf_harvest");
return drupal_get_form('tei_input_form', $pid);
}