Browse Source

Merge pull request #596 from knjackson30974/Kylea

Kylea
pull/598/merge
Jordan Dukart 10 years ago
parent
commit
70cb5de4ce
  1. 2
      includes/add_datastream.form.inc
  2. 2
      includes/admin.form.inc
  3. 8
      includes/utilities.inc
  4. 50
      islandora.api.php
  5. 8
      islandora.module

2
includes/add_datastream.form.inc

@ -43,7 +43,7 @@ function islandora_add_datastream_form(array $form, array &$form_state, Abstract
'#collapsed' => FALSE,
'dsid' => array(
'#title' => 'Datastream ID',
'#description' => t("An ID for this stream that is unique to this object. Must start with a letter and contain only alphanumeric characters, dashes and underscores. The following datastreams are defined by this content model but don't currently exist: <b>@unused_dsids</b>.", array('@unused_dsids' => $unused_datastreams)),
'#description' => t("An ID for this stream that is unique to this object. Must start with a letter and contain only alphanumeric characters, dashes and underscores. The following datastreams are defined by this content model but don't currently exist: <strong>@unused_dsids</strong>.", array('@unused_dsids' => $unused_datastreams)),
'#type' => 'textfield',
'#size' => 64,
'#maxlength' => 64,

2
includes/admin.form.inc

@ -93,7 +93,7 @@ function islandora_repository_admin(array $form, array &$form_state) {
'islandora_pids_allowed' => array(
'#type' => 'textarea',
'#title' => t('PID namespaces allowed in this Drupal install'),
'#description' => t('A list of PID namespaces, separated by spaces, that users are permitted to access from this Drupal installation. <br /> This could be more than a simple namespace, e.g. <b>demo:mydemos</b>. <br /> The namespace <b>islandora:</b> is reserved, and is always allowed.'),
'#description' => t('A list of PID namespaces, separated by spaces, that users are permitted to access from this Drupal installation. <br /> This could be more than a simple namespace, e.g. <strong>demo:mydemos</strong>. <br /> The namespace <strong>islandora:</strong> is reserved, and is always allowed.'),
'#default_value' => variable_get('islandora_pids_allowed', 'default: demo: changeme: ilives: islandora-book: books: newspapers: '),
'#states' => array(
'invisible' => array(

8
includes/utilities.inc

@ -86,16 +86,16 @@ function islandora_temp_file_entry($file_uri, $mime = NULL) {
function islandora_control_group_to_human_readable($control_group) {
switch ($control_group) {
case 'M':
return '<b>M</b>anaged';
return '<strong>M</strong>anaged';
case 'X':
return 'Inline <b>X</b>ML';
return 'Inline <strong>X</strong>ML';
case 'R':
return '<b>R</b>edirect';
return '<strong>R</strong>edirect';
case 'E':
return '<b>E</b>xternally Referenced';
return '<strong>E</strong>xternally Referenced';
default:
return $control_group;

50
islandora.api.php

@ -1,10 +1,8 @@
<?php
/**
* @file
* This file documents all available hook functions to manipulate data.
*/
/**
* Generate a repository objects view.
*
@ -28,15 +26,14 @@ function hook_islandora_view_object($object, $user, $page_number, $page_size) {
'title' => $object->label,
'path' => $resource_url,
);
// Theme the image seperatly.
$variables['islandora_img'] = theme('image', $params);
$output = theme('islandora_default_print', array(
'islandora_content' => $variables['islandora_img']));
}
return $output;
}
/**
* Generate a print friendly page for the given object.
*
@ -44,7 +41,9 @@ function hook_islandora_view_object($object, $user, $page_number, $page_size) {
* The object form to print.
*/
function hook_islandora_view_print_object($object) {
}
/**
* Generate an object's display for the given content model.
*
@ -58,8 +57,8 @@ function hook_islandora_view_print_object($object) {
* An array whose values are markup.
*/
function hook_cmodel_pid_islandora_view_object($object) {
}
}
/**
* Alter display output after it has been generated.
@ -70,6 +69,7 @@ function hook_cmodel_pid_islandora_view_object($object) {
* The array of rendered views.
*/
function hook_islandora_view_object_alter(&$object, &$rendered) {
}
/**
@ -83,6 +83,7 @@ function hook_islandora_view_object_alter(&$object, &$rendered) {
* The array of rendered views.
*/
function hook_cmodel_pid_islandora_view_object_alter(&$object, &$rendered) {
}
/**
@ -95,6 +96,7 @@ function hook_cmodel_pid_islandora_view_object_alter(&$object, &$rendered) {
* An array whose values are markup.
*/
function hook_islandora_edit_object($object) {
}
/**
@ -110,6 +112,7 @@ function hook_islandora_edit_object($object) {
* An array whose values are markup.
*/
function hook_cmodel_pid_islandora_edit_object($object) {
}
/**
@ -121,6 +124,7 @@ function hook_cmodel_pid_islandora_edit_object($object) {
* an arr of rendered views
*/
function hook_islandora_edit_object_alter(&$object, &$rendered) {
}
/**
@ -153,6 +157,7 @@ function hook_islandora_edit_object_alter(&$object, &$rendered) {
* @see FedoraApiM::modifyObject()
*/
function hook_islandora_object_alter(AbstractObject $object, array &$context) {
}
/**
@ -161,6 +166,7 @@ function hook_islandora_object_alter(AbstractObject $object, array &$context) {
* @see hook_islandora_object_alter()
*/
function hook_cmodel_pid_islandora_object_alter(AbstractObject $object, array &$context) {
}
/**
@ -202,6 +208,7 @@ function hook_cmodel_pid_islandora_object_alter(AbstractObject $object, array &$
* @see FedoraApiM::modifyDatastream()
*/
function hook_islandora_datastream_alter(AbstractObject $object, AbstractDatastream $datastream, array &$context) {
}
/**
@ -210,6 +217,7 @@ function hook_islandora_datastream_alter(AbstractObject $object, AbstractDatastr
* @see hook_islandora_datastream_alter()
*/
function hook_cmodel_pid_dsid_islandora_datastream_alter(AbstractObject $object, AbstractDatastream $datastream, array &$context) {
}
/**
@ -226,6 +234,7 @@ function hook_cmodel_pid_dsid_islandora_datastream_alter(AbstractObject $object,
* The object that was ingested.
*/
function hook_islandora_object_ingested(AbstractObject $object) {
}
/**
@ -234,6 +243,7 @@ function hook_islandora_object_ingested(AbstractObject $object) {
* @see hook_islandora_object_ingested()
*/
function hook_cmodel_pid_islandora_object_ingested(AbstractObject $object) {
}
/**
@ -251,6 +261,7 @@ function hook_cmodel_pid_islandora_object_ingested(AbstractObject $object) {
* parameter.
*/
function hook_islandora_object_modified(AbstractObject $object) {
}
/**
@ -259,6 +270,7 @@ function hook_islandora_object_modified(AbstractObject $object) {
* @see hook_islandora_object_modified()
*/
function hook_cmodel_pid_islandora_object_modified(AbstractObject $object) {
}
/**
@ -271,6 +283,7 @@ function hook_cmodel_pid_islandora_object_modified(AbstractObject $object) {
* The ID of the object that was purged/deleted.
*/
function hook_islandora_object_purged($pid) {
}
/**
@ -279,6 +292,7 @@ function hook_islandora_object_purged($pid) {
* @see hook_islandora_object_purged()
*/
function hook_cmodel_pid_islandora_object_purged($pid) {
}
/**
@ -296,6 +310,7 @@ function hook_cmodel_pid_islandora_object_purged($pid) {
* The ingested datastream.
*/
function hook_islandora_datastream_ingested(AbstractObject $object, AbstractDatastream $datastream) {
}
/**
@ -304,6 +319,7 @@ function hook_islandora_datastream_ingested(AbstractObject $object, AbstractData
* @see hook_islandora_object_ingested()
*/
function hook_cmodel_pid_dsid_islandora_datastream_ingested(AbstractObject $object, AbstractDatastream $datastream) {
}
/**
@ -323,6 +339,7 @@ function hook_cmodel_pid_dsid_islandora_datastream_ingested(AbstractObject $obje
* parameter.
*/
function hook_islandora_datastream_modified(AbstractObject $object, AbstractDatastream $datastream) {
}
/**
@ -331,6 +348,7 @@ function hook_islandora_datastream_modified(AbstractObject $object, AbstractData
* @see hook_islandora_datastream_modified()
*/
function hook_cmodel_pid_islandora_datastream_modified(AbstractObject $object, AbstractDatastream $datastream) {
}
/**
@ -345,6 +363,7 @@ function hook_cmodel_pid_islandora_datastream_modified(AbstractObject $object, A
* The ID of the datastream that was purged/deleted.
*/
function hook_islandora_datastream_purged(AbstractObject $object, $dsid) {
}
/**
@ -353,6 +372,7 @@ function hook_islandora_datastream_purged(AbstractObject $object, $dsid) {
* @see hook_islandora_datastream_purged()
*/
function hook_cmodel_pid_islandora_datastream_purged(AbstractObject $object, $dsid) {
}
/**
@ -370,12 +390,10 @@ function hook_cmodel_pid_islandora_datastream_purged(AbstractObject $object, $ds
*/
function hook_islandora_edit_datastream_registry($object, $dsid) {
$routes = array();
$routes[] = array(
'name' => t('My Awesome Edit Route'),
'url' => "go/edit/here/{$object->id}/{$dsid}",
);
return $routes;
}
@ -391,6 +409,7 @@ function hook_islandora_edit_datastream_registry($object, $dsid) {
* @example islandora_islandora_required_objects()
*/
function hook_islandora_required_objects() {
}
/**
@ -403,6 +422,7 @@ function hook_islandora_required_objects() {
* @see islandora_get_viewer_callback()
*/
function hook_islandora_viewer_info() {
}
/**
@ -490,6 +510,7 @@ function hook_islandora_ingest_steps(array $form_state) {
* An array containing the Drupal form_state.
*/
function hook_islandora_ingest_steps_alter(array &$steps, array &$form_state) {
}
/**
@ -503,6 +524,7 @@ function hook_islandora_ingest_steps_alter(array &$steps, array &$form_state) {
* @see hook_islandora_ingest_steps()
*/
function hook_cmodel_pid_islandora_ingest_steps(array $form_state) {
}
/**
@ -515,6 +537,7 @@ function hook_cmodel_pid_islandora_ingest_steps(array $form_state) {
* An array containing the Drupal form_state.
*/
function hook_cmodel_pid_islandora_ingest_steps_alter(array &$steps, array &$form_state) {
}
/**
@ -538,13 +561,10 @@ function hook_islandora_object_access($op, $object, $user) {
switch ($op) {
case 'create stuff':
return TRUE;
case 'break stuff':
return FALSE;
case 'do a barrel roll!':
return NULL;
}
}
@ -554,6 +574,7 @@ function hook_islandora_object_access($op, $object, $user) {
* @see hook_islandora_object_access()
*/
function hook_cmodel_pid_islandora_object_access($op, $object, $user) {
}
/**
@ -577,13 +598,10 @@ function hook_islandora_datastream_access($op, $object, $user) {
switch ($op) {
case 'create stuff':
return TRUE;
case 'break stuff':
return FALSE;
case 'do a barrel roll!':
return NULL;
}
}
@ -593,6 +611,7 @@ function hook_islandora_datastream_access($op, $object, $user) {
* @see hook_islandora_datastream_access()
*/
function hook_cmodel_pid_islandora_datastream_access($op, $object, $user) {
}
/**
@ -610,6 +629,7 @@ function hook_islandora_overview_object(AbstractObject $object) {
function hook_cmodel_pid_islandora_overview_object(AbstractObject $object) {
return drupal_render(drupal_get_form('some_form', $object));
}
/**
* Lets one alter the overview tab in object management.
*/
@ -669,7 +689,6 @@ function hook_cmodel_pid_islandora_overview_object_alter(AbstractObject &$object
* is being called from.
*/
function hook_islandora_derivative(AbstractObject $object = NULL) {
$derivatives[] = array(
'source_dsid' => 'OBJ',
'destination_dsid' => 'DERIV',
@ -689,7 +708,6 @@ function hook_islandora_derivative(AbstractObject $object = NULL) {
),
);
}
$derivatives[] = array(
'source_dsid' => NULL,
'destination_dsid' => 'NOSOURCE',
@ -698,7 +716,6 @@ function hook_islandora_derivative(AbstractObject $object = NULL) {
'islandora_derivatives_test_create_nosource_datastream',
),
);
return $derivatives;
}
@ -725,6 +742,7 @@ function hook_islandora_update_related_objects_properties(AbstractObject $object
}
return $pids_to_return;
}
/**
* Alters breadcrumbs used on Solr search results and within Islandora views.
*

8
islandora.module

@ -1844,14 +1844,14 @@ function islandora_form_simpletest_test_form_alter(array &$form) {
$filter_status = is_writable($filter_path);
if ($filter_status) {
$filter_status_message = theme_image(array('path' => 'misc/watchdog-ok.png', 'attributes' => array())) . " ";
$filter_status_message .= t("Drupal filter at <b>!filter_path</b> is writable by the server.", array(
'!filter_path' => $filter_path,
$filter_status_message .= t("Drupal filter at <strong>@filter_path</strong> is writable by the server.", array(
'@filter_path' => $filter_path,
));
}
else {
$filter_status_message = theme_image(array('path' => 'misc/watchdog-error.png', 'attributes' => array())) . " ";
$filter_status_message .= t("Drupal filter at <b>!filter_path</b> is not writable by the server. Please make sure your webserver has permission to write to the Drupal filter. If the path given is incorrect, you will need to change it in your server's test config file, located in the Islandora module's 'tests' folder as test_config.ini or default.test_config.ini.", array(
'!filter_path' => $filter_path,
$filter_status_message .= t("Drupal filter at <strong>@filter_path</strong> is not writable by the server. Please make sure your webserver has permission to write to the Drupal filter. If the path given is incorrect, you will need to change it in your server's test config file, located in the Islandora module's 'tests' folder as test_config.ini or default.test_config.ini.", array(
'@filter_path' => $filter_path,
));
}

Loading…
Cancel
Save