--
You received this message because you are subscribed to the Google Groups "islandora-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora-de...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
$items[ 'islandora/object/%islandora_object/editMODS'] = array(
'title' => t('Edit MODS'),
'type' => MENU_LOCAL_TASK,
'weight' => '10',
'access callback' => yourmodule_islandora_mods_datastream_access, // you need a way of discriminating if you can or not show this tab. Because you don't have datastream argument that can be loaded by drupal via islandora_datastream_load directly, you need a wrapper function around islandora_datastream_access, in other terms a function that calls islandora_datastream_access with the full arguments you don't have here...
'access arguments' => array(ISLANDORA_METADATA_EDIT, 2)// , you pass this as argument, as said before, you pass this time the whole object because you don't have the datastream. Inside the wrapper function you check if that object has a MODS datastream, if 'yes' get that datastream and call islandora_datastream_access with that object plus ISLANDORA_METADATA_EDIT returning the same islandora_datastream_access returns. If the object does not have a MODS datastream, return FALSE without calling islandora_datastream_access.
'page callback' => ' yourmodule_islandora_mods_datastream_edittab', //This is also a wrapper function, you don't have the MODS datastream, so you call your own function with the object as argument. (keep reading!)
'page arguments' => array(2),
'load arguments' => array(2),
),
}
function yourmodule_islandora_mods_datastream_edittab(abstractObject $object) {
// So here we are. There are multiple ways of doing this. But a simple way is just to use a drupal_goto() that "redirects" to the actual menu_callback from islandora.
//basicly get your object->id and build and url. Just make sure you add some checks, etc, or relay only on what function islandora_edit_datastream gives as result when called if you wan't so.
drupal_goto("islandora/object/{$object->id}/datastream/MODS/edit");
//You can also add a fragment to drupal_goto() to open the redirection as an overlay as an additional $options array.
} 'islandora/object/%islandora_object/editMODS' => array(
'title' => t('Edit MODS'),
'type' => MENU_LOCAL_TASK,
'weight' => '10',
'access callback' => 'fcija_editMODStab_check',
'access arguments' => array(ISLANDORA_METADATA_EDIT,2),
'page callback' => 'fcija_editMODStab',
'page arguments' => array(2),
),
function fcija_editMODStab(abstractObject $object){
drupal_goto("islandora/object/{$object->id}/datastream/MODS/edit");
}
function fcija_editMODStab_check($permission, abstractObject $object){
if(isset($object['MODS'])) return islandora_datastream_access($permission, $object['MODS']);
else return false;
}
'islandora/object/%islandora_object/editMODS' => array(
'title' => t('Edit MODS'),
'type' => MENU_LOCAL_TASK,
'weight' => '10',
'access callback' => 'fcija_editMODStab_check',
'access arguments' => array(ISLANDORA_METADATA_EDIT,2),
'page callback' => 'fcija_editMODStab',
'page arguments' => array(2),
),
function fcija_editMODStab(abstractObject $object){
drupal_goto("islandora/object/{$object->id}/datastream/MODS/edit");
}
function fcija_editMODStab_check($permission, abstractObject $object){
if(isset($object['MODS'])) return islandora_datastream_access($permission, $object['MODS']);
else return false;
}
+1 for a UI Solution Pack
Hi Melissa,
I would be very interested in participating in this Interest Group; at the moment though I am not sure can serve as convener.
Unless the definition of "temporary" is very flexible, though, I respectfully cannot say with any certainty that discussion of user interface issues is a temporary issue. The UI for curators and administrators represents far more than a typical website with simple conversion goals; rather it is a rich web application which probably could be compared with an Oracle- or SAP-based application (this is my assumption; if anyone has worked on such applications, please let me know if you think I'm wrong). The UI already suffers from inconsistencies which we at UConn have spent some time documenting and training around--and I've spent a lot of time scratching my head for ways to improve its consistency and clarity, particularly for occasional and volunteer users. As Content Types are added and metadata needs expand, the richness and complexity of this application seems likely to do so as well.
But I am very happy to see this discussion and would like to do what I can to help. :)
Dave
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Dave Bretthauer
Librarian
Content Presentation/User Experience
University Archives, Digital Scholarship and Data Curation
University of Connecticut Libraries
369 Fairfield Way U-1005M
Storrs, CT 06269-1005
Voice (860) 486-6494
Fax: (860) 486-6100
--
To unsubscribe from this group and stop receiving emails from it, send an email to islandora-dev+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora-de...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "islandora-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora-de...@googlegroups.com.