Browse Source

Fixes for issues found from Islandora conference. QA TRIAL BY FIRE

7.x-2.x
Daniel Lamb 10 years ago
parent
commit
ee3fc9e968
  1. 4
      islandora/include/rdf_mapping.inc
  2. 9
      islandora_basic_image/islandora_basic_image.module

4
islandora/include/rdf_mapping.inc

@ -20,10 +20,6 @@ function islandora_get_default_rdf_mapping($bundle, array $rdf_types) {
$default_rdf_types = array( $default_rdf_types = array(
'ldp:RDFSource', 'ldp:RDFSource',
'ldp:Container', 'ldp:Container',
'nt:hierarchyNode',
'nt:folder',
'nt:base',
'mix:referenceable',
'fedora:Resource', 'fedora:Resource',
'fedora:Container', 'fedora:Container',
); );

9
islandora_basic_image/islandora_basic_image.module

@ -42,24 +42,23 @@ function islandora_basic_image_form_islandora_basic_image_node_form_alter(&$form
); );
// Add a collection picker if node is new (e.g. this is an insert form). // Add a collection picker if node is new (e.g. this is an insert form).
$node = $form_state['node'];
if (!isset($node->nid) || isset($node->is_new)) { if (!isset($node->nid) || isset($node->is_new)) {
// Construct list of options from db and a default. // Construct list of options from db and a default.
$default = array('' => t('None'));
$from_db = db_select('node', 'n') $from_db = db_select('node', 'n')
->fields('n', array('uuid', 'title')) ->fields('n', array('uuid', 'title'))
->condition('n.type', ISLANDORA_COLLECTION_CONTENT_TYPE) ->condition('n.type', ISLANDORA_COLLECTION_CONTENT_TYPE)
->execute() ->execute()
->fetchAllKeyed(); ->fetchAllKeyed();
$options = $default + $from_db;
// Add the select to the form. // Add the select to the form.
$form['parent_collection'] = array( $form['parent_collection'] = array(
'#type' => 'select', '#type' => 'select',
'#title' => t('Parent Collection'), '#title' => t('Parent Collection'),
'#description' => t('Select the parent collection to add this to. Select "Fedora Root" if you want it to be a top-level collection'), '#description' => t('Select the parent collection to add this to.'),
'#options' => $options, '#options' => $from_db,
'#default_value' => '',
'#weight' => -4, '#weight' => -4,
'#required' => TRUE,
); );
// Keep title on top. // Keep title on top.

Loading…
Cancel
Save