Browse Source

ISLANDORA-278 Initial pass at making the islandora code conform to the drupal coding standards.

pull/7/head^2
jonathangreen 13 years ago
parent
commit
abfc84457d
  1. 2
      CollectionClass.inc
  2. 33
      CollectionPolicy.inc
  3. 12
      ConnectionHelper.inc
  4. 30
      ContentModel.inc
  5. 8
      MimeClass.inc
  6. 38
      ObjectHelper.inc
  7. 24
      SearchClass.inc
  8. 14
      SecurityClass.inc
  9. 11
      XMLDatastream.inc
  10. 4
      api/dublin_core.inc
  11. 3
      api/fedora_collection.inc
  12. 2
      api/fedora_export.inc
  13. 15
      api/fedora_item.inc
  14. 10
      api/fedora_utils.inc
  15. 7
      api/rels-ext.inc
  16. 8
      api/tagging.inc
  17. 1
      collection_policies/COLLECTION-COLLECTION POLICY.xml
  18. 25
      collection_policies/PDF-COLLECTION POLICY.xml
  19. 1
      collection_policies/PERSONAL-COLLECTION-POLICY.xml
  20. 1
      collection_policies/book_collection_policy.xml
  21. 39
      collection_policies/qt_collection_policy.xml
  22. 1
      collection_policy.xsd
  23. 7
      collection_views/Coverflow_Collection_View.xsl
  24. 7
      collection_views/Coverflow_PRE_Collection_View.xsl
  25. 143
      collection_views/FLV-COLLECTION VIEW(2).xml
  26. 131
      collection_views/REFWORKS-COLLECTION_VIEW.xml
  27. 145
      collection_views/SIMPLE-COLLECTION_VIEW.xml
  28. 4
      collection_views/SmileyStuff-COLLECTION_VIEW.xml
  29. 4
      collection_views/Video-COLLECTION_VIEW.xml
  30. 125
      collection_views/default-sparqltoHtml.xsl
  31. 4
      collection_views/simple_list_view.xml
  32. 4
      collection_views/standard_jpeg_collection_view.xml
  33. 88
      collection_views/yui_coverflow/js/CoverFlow.js
  34. 75
      collection_views/yui_coverflow/js/test.js
  35. 1
      content_models/COLLECTIONCM.xml
  36. 1
      content_models/FAS_slideCModel.xml
  37. 33
      content_models/STANDARD_QT.xml
  38. 1
      content_models/STRICT_PDFCM.xml
  39. 15
      content_models/ilives_tei2htmlSdep-pageCModel.xml
  40. 20
      content_models/islandora_mods2htmlSdep.xml
  41. 33
      content_models/islandora_qtCModel.xml
  42. 146
      example_collection_views/MHL-sparqltoHtml.xsl
  43. 95
      example_collection_views/critter.xsl
  44. 143
      example_collection_views/flv-sparqltoHtml.xsl
  45. 139
      example_collection_views/mlp-sparqltoHtml.xsl
  46. 174
      example_collection_views/refworks.xsl
  47. 148
      example_collection_views/riri-sparqltoHtml.xsl
  48. 125
      example_collection_views/sparqltoHtml.xsl
  49. 3
      fedora_repository.install
  50. 13
      fedora_repository.module
  51. 10
      fedora_repository.solutionpacks.inc
  52. 3
      formClass.inc
  53. 50
      form_elements/includes/autocomplete.inc
  54. 5
      form_elements/includes/creative_commons.inc
  55. 14
      form_elements/includes/filechooser.inc
  56. 15
      form_elements/includes/people.inc
  57. 192
      form_elements/islandora_form_elements.module
  58. 56
      form_elements/js/copyright.js
  59. 31
      form_elements/js/jcarousellite_1.0.1.js
  60. 39
      form_elements/js/jquery.easing.1.1.js
  61. 17
      form_elements/js/jquery.loadImages.1.0.1.min.js
  62. 46
      form_elements/js/jquery.mousewheel.min.js
  63. 146
      form_elements/js/jquery.tag.editor-min.js
  64. 181
      form_elements/js/jquery.ui.datepicker.js
  65. 8
      form_elements/js/people_ahah.js
  66. 36
      form_elements/xml/gacs.xml
  67. 6
      form_elements/xml/languages.xml
  68. 2
      ilives/book.inc
  69. 3
      ilives/fedora_ilives.install
  70. 2
      ilives/fedora_ilives.module
  71. 7
      ilives/image_rotator_tagger_block.inc
  72. 6
      ilives/tests/fedora_ilives.test
  73. 3
      ilives/xml/ilives_CollectionModel.xml
  74. 15
      ilives/xml/ilives_tei2htmlSdep-pageCModel.xml
  75. 9
      ilives/xsl/MODS3-22simpleDC.xsl
  76. 163
      ilives/xsl/book_view.xsl
  77. 13
      ilives/xsl/pageResults.xsl
  78. 105
      ilives/xsl/results.xsl
  79. 1
      islandoracm.xsd
  80. 4
      js/AC_Quicktime.js
  81. 13
      js/printer_tool.js
  82. 51
      js/swfobject.js
  83. 6
      plugins/CollectionFormBuilder.inc
  84. 7
      plugins/CreateCollection.inc
  85. 9
      plugins/DarwinCore.inc
  86. 6
      plugins/DemoFormBuilder.inc
  87. 6
      plugins/DocumentConverter.inc
  88. 3
      plugins/Exiftool.inc
  89. 12
      plugins/Ffmpeg.inc
  90. 13
      plugins/Flv.inc
  91. 7
      plugins/FlvFormBuilder.inc
  92. 26
      plugins/FormBuilder.inc
  93. 5
      plugins/ImageManipulation.inc
  94. 108
      plugins/ModsFormBuilder.inc
  95. 11
      plugins/PersonalCollectionClass.inc
  96. 11
      plugins/QtFormBuilder.php
  97. 13
      plugins/Refworks.inc
  98. 6
      plugins/ShowDemoStreamsInFieldSets.inc
  99. 16
      plugins/ShowStreamsInFieldSets.inc
  100. 2
      plugins/fedoraObject.inc
  101. Some files were not shown because too many files have changed in this diff Show More

2
CollectionClass.inc

@ -1,6 +1,6 @@
<?php
// $Id$
/*
* Created on 18-Feb-08

33
CollectionPolicy.inc

@ -1,6 +1,6 @@
<?php
// $Id$
module_load_include('inc', 'fedora_repository', 'XMLDatastream');
@ -8,7 +8,6 @@ class CollectionPolicy extends XMLDatastream {
static $SCHEMA_URI = 'http://syn.lib.umanitoba.ca/collection_policy.xsd';
static $DEFAULT_DSID = 'COLLECTION_POLICY';
private $staging_area = NULL;
/**
@ -41,17 +40,16 @@ class CollectionPolicy extends XMLDatastream {
if ($preFetch) {
$fedoraItem = new Fedora_Item($pid);
$ds = $fedoraItem->get_datastream_dissemination($dsid);
} else {
$ds=null;
}
else {
$ds = NULL;
}
}
if (!empty($ds) || !$preFetch) {
$ret = new CollectionPolicy($ds, $pid, $dsid);
}
}
catch (SOAPException $e) {
} catch (SOAPException $e) {
$ret = FALSE;
}
@ -175,13 +173,11 @@ class CollectionPolicy extends XMLDatastream {
$fedoraItem->add_datastream_from_string($cp->dumpXml(), $policyDsid, $name, 'text/xml', 'X');
$ret = $cp;
}
}
return $ret;
}
/**
* Constructor
* NOTE: Use the static constructor methods whenever possible.
@ -247,7 +243,6 @@ class CollectionPolicy extends XMLDatastream {
$this->xml = DOMDocument::loadXML($newDom->saveXml());
}
/**
* Gets the name of the relationship to use
* for members of this collection.
@ -297,7 +292,8 @@ class CollectionPolicy extends XMLDatastream {
if ($stagingEl->length > 0) {
$this->staging_area = trim($stagingEl->item(0)->nodeValue);
} elseif ($recurse) {
}
elseif ($recurse) {
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$item = new Fedora_Item($this->pid);
$rels = $item->get_relationships();
@ -314,7 +310,6 @@ class CollectionPolicy extends XMLDatastream {
}
$ret = $this->staging_area;
}
return $ret;
}
@ -352,7 +347,6 @@ class CollectionPolicy extends XMLDatastream {
return $ret;
}
/**
* Gets the next available PID for the
* content model specified by the DSID
@ -399,14 +393,11 @@ class CollectionPolicy extends XMLDatastream {
if ($cm !== FALSE) {
$ret[] = $cm;
}
}
}
return $ret;
}
/**
* Gets a list of search terms from the Collection Policy. If asArray is set
* it will return an associative array with the value, field name, and the default value.
@ -424,7 +415,8 @@ class CollectionPolicy extends XMLDatastream {
if ($cache == TRUE && ($cache = cache_get('collection_policy_search_terms-' . $this->pid)) !== 0) {
$ret = $cache->data;
} else {
}
else {
if ($this->xml == NULL) {
$fedoraItem = new Fedora_Item($this->pid);
@ -460,13 +452,11 @@ class CollectionPolicy extends XMLDatastream {
}
}
cache_set('collection_policy_search_terms-' . $this->pid, $ret, 'cache', time() + 3600);
}
}
return $ret;
}
/**
* Adds a search term to the collection policy.
* Returns fase on failure.
@ -523,7 +513,6 @@ class CollectionPolicy extends XMLDatastream {
return $ret;
}
function setDefaultTerm($field) {
$ret = FALSE;
if ($this->validate()) {
@ -548,7 +537,6 @@ class CollectionPolicy extends XMLDatastream {
return $ret;
}
/**
* Removes the specified content model from the collection policy. This will only
* prevent future ingests of the removed model to the collection. $cm should be
@ -578,9 +566,6 @@ class CollectionPolicy extends XMLDatastream {
return $ret;
}
function addModel($cm, $namespace) {
$ret = FALSE;
if (self::validPid($namespace) && $this->validate() && $cm->validate()) {

12
ConnectionHelper.inc

@ -1,5 +1,6 @@
<?php
// $Id$
/*
* Created on Jan 24, 2008
@ -9,7 +10,9 @@
*/
module_load_include('inc', 'ConnectionHelper', '');
class ConnectionHelper {
function ConnectionHelper() {
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
}
@ -50,8 +53,7 @@ class ConnectionHelper {
'password' => 'anonymous',
'exceptions' => $exceptions,
));
}
catch (SoapFault $e) {
} catch (SoapFault $e) {
drupal_set_message(t("!e", array('!e' => $e->getMessage())));
return NULL;
}
@ -63,13 +65,13 @@ class ConnectionHelper {
'password' => $user->pass,
'exceptions' => TRUE,
));
}
catch (SoapFault $e) {
} catch (SoapFault $e) {
drupal_set_message(t("!e", array('!e' => $e->getMessage())));
return NULL;
}
}
return $client;
}
}

30
ContentModel.inc

@ -1,13 +1,13 @@
<?php
// $Id$
module_load_include('inc', 'fedora_repository', 'XMLDatastream');
class ContentModel extends XMLDatastream {
static $SCHEMA_URI = 'http://localhost/islandoracm.xsd';
static $DEFAULT_DSID = 'ISLANDORACM';
private $mimes = NULL;
public $pid_namespace;
public $name;
@ -73,7 +73,6 @@ class ContentModel extends XMLDatastream {
return $ret;
}
/**
* Ingests a Content Model from an existing model to the specified pid/dsid .
* Returns false on failure.
@ -103,7 +102,6 @@ class ContentModel extends XMLDatastream {
return $ret;
}
/**
* Ingests a minimum Content Model to the specified pid/dsid.
* Returns false on failure.
@ -174,7 +172,6 @@ class ContentModel extends XMLDatastream {
return $ret;
}
/**
* Constructs a ContentModel object from the PID of the model in Fedora.
* If DSID is specified it will use that datastream as the model, otherwise it will
@ -203,8 +200,7 @@ class ContentModel extends XMLDatastream {
$ret = new ContentModel($ds, $pid, $dsid, $pid_namespace, $name);
}
}
}
catch (SOAPException $e) {
} catch (SOAPException $e) {
$ret = FALSE;
}
return $ret;
@ -287,7 +283,6 @@ class ContentModel extends XMLDatastream {
$ruleEl->appendChild($methodsEl);
$ingestRulesEl->appendChild($ruleEl);
}
}
$rootEl->appendChild($ingestRulesEl);
@ -411,7 +406,6 @@ class ContentModel extends XMLDatastream {
$newDom->appendChild($rootEl);
$this->xml = DOMDocument::loadXML($newDom->saveXml());
}
/**
@ -464,7 +458,6 @@ class ContentModel extends XMLDatastream {
return $ret;
}
/**
* Gets the element corresponding to the datastream specified
* in the <datastreams> element of the schema.
@ -706,7 +699,6 @@ class ContentModel extends XMLDatastream {
return $ret;
}
/**
* Gets a list of all parameters that belong to the specified ingest form element.
*
@ -801,7 +793,6 @@ class ContentModel extends XMLDatastream {
return $ret;
}
/**
* Add an ingest form element to the model.
*
@ -991,7 +982,6 @@ class ContentModel extends XMLDatastream {
$ret = TRUE;
}
}
}
return $ret;
}
@ -1163,13 +1153,11 @@ class ContentModel extends XMLDatastream {
$metaDataForm = new formClass();
$ret = $metaDataForm->updateMetaData($form_state['values']['form_id'], $form_state['values'], $soap_client);
$form_state['redirect'] = $base_url . '/fedora/repository/' . $form_state['values']['pid'];
}
}
return $ret;
}
/**
* Gets an associative array describing the edit metadata method.
* Array has the following keys: 'file', 'class', 'method', 'handler', 'dsid'
@ -1348,7 +1336,8 @@ class ContentModel extends XMLDatastream {
self::$errors[] = 'Execute Ingest Rules: class \'' . $className . '\' does not exist.';
$ret = FALSE;
}
else $class = new $className;
else
$class = new $className;
if (!method_exists($class, $methodName)) {
self::$errors[] = 'Execute Ingest Rules: method \'' . $className . '->' . $methodName . '\' does not exist.';
$ret = FALSE;
@ -1365,7 +1354,6 @@ class ContentModel extends XMLDatastream {
}
}
}
}
return $ret;
}
@ -1531,7 +1519,6 @@ class ContentModel extends XMLDatastream {
$mimetypesEl->appendChild($newTypeEl);
$ret = TRUE;
}
}
return $ret;
}
@ -1557,7 +1544,6 @@ class ContentModel extends XMLDatastream {
$mimetypesEl->removeChild($found);
$ret = TRUE;
}
}
return $ret;
}
@ -1662,7 +1648,6 @@ class ContentModel extends XMLDatastream {
$found->setAttribute('default', 'true');
$ret = TRUE;
}
}
return $ret;
}
@ -1685,7 +1670,6 @@ class ContentModel extends XMLDatastream {
$ds->removeChild($found);
$ret = TRUE;
}
}
return $ret;
}
@ -1884,7 +1868,6 @@ class ContentModel extends XMLDatastream {
$ret = TRUE;
}
}
}
}
return $ret;
@ -1944,7 +1927,6 @@ class ContentModel extends XMLDatastream {
}
$rule['ingest_methods'][] = $method;
}
$ret[] = $rule;
@ -1961,7 +1943,6 @@ class ContentModel extends XMLDatastream {
'page' => $ingest_formEl->getAttribute('page'),
'hide_file_chooser' => strtolower($ingest_formEl->getAttribute('hide_file_chooser')) == 'true',
'redirect' => strtolower($ingest_formEl->getAttribute('redirect')) == 'false' ? FALSE : TRUE);
}
return $ret;
}
@ -2130,7 +2111,6 @@ class ContentModel extends XMLDatastream {
return FALSE;
}
/**
* Edits a form element with attribute name='$name' from the 'forms' element.
*

8
MimeClass.inc

@ -1,5 +1,6 @@
<?php
// $Id$
/**
*
@ -20,8 +21,8 @@
* http://api.drupal.org/api/function/file_default_mimetype_mapping/7
*
*/
class MimeClass {
private $private_mime_types = array(
/**
* This is a shortlist of mimetypes which should catch most
@ -190,7 +191,6 @@ class MimeClass {
// others:
'bin' => 'application/octet-stream',
);
private $private_file_extensions;
private $system_types;
private $system_exts;
@ -205,7 +205,6 @@ class MimeClass {
if (is_readable('mime.types')) {
$this->etc_mime_types = 'mime.types';
}
}
/**
@ -252,7 +251,6 @@ class MimeClass {
if (TRUE === $debug)
return array('mime_type' => 'application/octet-stream', 'method' => 'last_resort');
return 'application/octet-stream';
}
/**

38
ObjectHelper.inc

@ -1,6 +1,6 @@
<?php
// $Id$
/*
* Created on Feb 1, 2008
@ -85,7 +85,8 @@ class ObjectHelper {
if ($label == NULL) {
$label = $item->datastreams[$dsID]['label'];
}
} else {
}
else {
drupal_not_found();
exit();
}
@ -95,7 +96,8 @@ class ObjectHelper {
$fedoraUser = 'anonymous';
$fedoraPass = 'anonymous';
$contentSize = 0;
} else {
}
else {
$fedoraUser = $user->name;
$fedoraPass = $user->pass;
$dataStreamInfo = $item->get_datastream_info($dsID);
@ -135,7 +137,8 @@ class ObjectHelper {
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
fclose($fp);
} else {
}
else {
header("Content-type: $mimeType");
if ($contentSize > 0) {
@ -168,12 +171,14 @@ class ObjectHelper {
if ((isset($user) && $user->uid != 0) || $forceSoap || isset($_SERVER['HTTPS'])) {
curl_exec($ch);
} else {
}
else {
header('Location: ' . $url);
}
}
curl_close($ch);
} else {
}
else {
drupal_set_message(t('No curl support.'), 'error');
}
}
@ -267,7 +272,8 @@ class ObjectHelper {
$pid . '/' . $dataStreamValue->ID . '/' . $dataStreamValue->label . '"><img src="' . $base_url . '/' . $path .
'/images/purge.gif" alt="purge datastream" /></a>';
}
} else {
}
else {
$purgeImage = '&nbsp;';
}
$fullPath = base_path() . $path;
@ -322,7 +328,6 @@ class ObjectHelper {
if (empty($xmlstr)) {
return '';
}
try {
@ -375,13 +380,11 @@ class ObjectHelper {
$output .= '<br /><a title = "' . t('Edit Meta Data') . '" href="' . $base_url . '/fedora/repository/' . 'editmetadata/' . $pid . '/' .
$dsid . '"><img src="' . $base_url . '/' . $path . '/images/edit.gif" alt="' . t('Edit Meta Data') . '" /></a>';
}
}
return $output;
}
/**
* Gets a list of datastreams from an object using its pid
*
@ -466,8 +469,6 @@ class ObjectHelper {
return '';
}
/**
* returns a stream from a fedora object given a pid and dsid
*
@ -572,7 +573,8 @@ class ObjectHelper {
return FALSE;
}
return $user_access;
} else {
}
else {
return FALSE;
}
}
@ -633,10 +635,10 @@ class ObjectHelper {
'/images/ingest.png" alt="' . t('Add a New Object') . '" class="icon"></a>' . t(' Add to this Collection');
}
}
} else {
}
else {
$ingestObject = '&nbsp;';
}
}
$datastreams .= $ingestObject;
@ -853,7 +855,8 @@ class ObjectHelper {
if ($pid == variable_get('fedora_repository_pid', 'islandora:top')) {
$breadcrumbs[] = l(t('Digital repository'), 'fedora/repository');
$breadcrumbs[] = l(t('Home'), $base_url);
} else {
}
else {
$query_string = 'select $parentObject $title $content from <#ri>
where (<info:fedora/' . $pid . '> <dc:title> $title
and $parentObject <fedora-model:hasModel> $content
@ -878,7 +881,8 @@ class ObjectHelper {
if ($parent == variable_get('fedora_repository_pid', 'islandora:top')) {
$breadcrumbs[] = l(t('Digital repository'), 'fedora/repository');
$breadcrumbs[] = l(t('Home'), $base_url);
} elseif ($level > 0) {
}
elseif ($level > 0) {
$this->getBreadcrumbs($parent, $breadcrumbs, $level - 1);
}
}

24
SearchClass.inc

@ -1,8 +1,11 @@
<?php
// $Id$
class SearchClass {
public static $SEARCH_CLASS_ADVANCED_SEARCH_NUMBER_FIELDS = 5;
function solr_search($query, $startPage=1, $fq = NULL, $dismax = NULL) {
$solrFile = trim(variable_get('islandora_solr_search_block_handler_file', 'plugins/SolrResults.inc'));
if (strpos($solrField, '../')) { // Don't let us bust out of fedora_repository modules directory when looking for a handler
@ -19,6 +22,7 @@ class SearchClass {
}
return $implementation->$solrFunction($query, $startPage, $fq, $dismax);
}
function build_solr_search_form($repeat = NULL, $pathToSearchTerms = NULL, $query = NULL) {
$types = $this->get_search_terms_array(NULL, 'solrSearchTerms.xml');
$queryArray = NULL;
@ -114,6 +118,7 @@ class SearchClass {
);
return $form;
}
function theme_solr_search_form($form) {
if (!isset($repeat)) {
$repeat = variable_get('islandora_solr_search_block_repeat', t('3'));
@ -133,9 +138,8 @@ class SearchClass {
$output .= drupal_render($form['submit']);
$output .= drupal_render($form);
return $output;
}
function quickSearch($type, $query, $showForm = 1, $orderBy = 0, & $userArray) {
module_load_include('inc', 'fedora_repository', 'ObjectHelper');
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
@ -181,7 +185,6 @@ class SearchClass {
}
}
// gets term from a lucene index and displays them in a list
function getTerms($fieldName, $startTerm, $displayName = NULL) {
module_load_include('inc', 'fedora_repository', 'ObjectHelper');
@ -205,11 +208,8 @@ class SearchClass {
$output .= $this->applySpecifiedXSLT($resultData, $path . '/xsl/browseIndexToResultPage.xslt', $displayName);
//$output .= '<br />'.$alpha_out;
return $output;
}
function custom_search($query, $startPage=1, $xslt= '/xsl/advanced_search_results.xsl', $numberOfHistPerPage = 50) {
module_load_include('inc', 'fedora_repository', 'ObjectHelper');
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
@ -242,7 +242,6 @@ class SearchClass {
}
}
function applySpecifiedXSLT($resultData, $pathToXSLT, $displayName = NULL) {
$proc = NULL;
global $user;
@ -252,8 +251,7 @@ class SearchClass {
}
try {
$proc = new XsltProcessor();
}
catch (Exception $e) {
} catch (Exception $e) {
drupal_set_message(t('Error loading ' . $pathToXSLT . ' xslt!') . $e->getMessage());
return ' ';
}
@ -291,8 +289,8 @@ class SearchClass {
return $newdom->saveXML();
}
}
//default function for lucene results
//default function for lucene results
/**
* apply an xslt to lucene gsearch search results
@ -306,7 +304,7 @@ class SearchClass {
$path = drupal_get_path('module', 'Fedora_Repository');
$test = $xslt_file;
$isRestricted = variable_get('fedora_namespace_restriction_enforced', TRUE);
if(!isRestricted && $xslt_file == null){
if (!isRestricted && $xslt_file == NULL) {
$xslt_file = '/xsl/unfilteredresults.xsl';
}
$proc = NULL;
@ -501,7 +499,6 @@ class SearchClass {
return $form;
}
function get_search_terms_array($path = NULL, $file = NULL) {
if (!isset($path)) {
$path = drupal_get_path('module', 'Fedora_Repository');
@ -522,4 +519,5 @@ class SearchClass {
}
return $types;
}
}

14
SecurityClass.inc

@ -1,5 +1,6 @@
<?php
// $Id$
/*
* Created on 22-Oct-08
@ -9,7 +10,9 @@
*/
class SecurityClass {
public static $SECURITY_CLASS_SECURITY_STREAM = 'POLICY';
function SecurityClass() {
module_load_include('inc', 'SecurityClass', '');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
@ -54,8 +57,7 @@ class SecurityClass {
$usersAndRoles = array();
try {
$xml = new SimpleXMLElement($policyStream);
}
catch (Exception $e) {
} catch (Exception $e) {
watchdog(t("Fedora_Repository"), t("No roles found in security policy, could not parse policy stream."), NULL, WATCHDOG_ERROR);
//we may not want to send this to the screen.
drupal_set_message(t('No roles found in security policy, could not parse policy stream: !message', array('!message' => $e->getMessage())), 'error');
@ -92,8 +94,8 @@ class SecurityClass {
$usersAndRoles['users'] = $allowedUsers;
$usersAndRoles['roles'] = $allowedRoles;
return $usersAndRoles;
}
// When a user's profile is saved in drupal we will attempt to create a collection for them in Fedora
// this will be their personal space. In the IR it is editable by users with the same role in the VRE
// it probably would not be.
@ -101,8 +103,7 @@ class SecurityClass {
$doc = new DOMDocument();
try {
$doc->load(drupal_get_path('module', 'Fedora_Repository') . '/policies/noObjectEditPolicy.xml');
}
catch (exception $e) {
} catch (exception $e) {
watchdog(t("Fedora_Repository"), t("Problem loading policy file."), NULL, WATCHDOG_ERROR);
}
$conditions = $doc->getElementsByTagName('Condition');
@ -200,4 +201,5 @@ class SecurityClass {
// $this->collection_policy_stream = $dom->saveXML();
return $dom->saveXML();
}
}

11
XMLDatastream.inc

@ -1,6 +1,6 @@
<?php
// $Id$
abstract class XMLDatastream {
@ -180,7 +180,8 @@ abstract class XMLDatastream {
// a subclass.
$vars = get_class_vars(get_class($this));
$schemaLocation = $vars['SCHEMA_URI'];
} elseif ($rootEl->attributes->getNamedItem('schemaLocation') !== NULL) {
}
elseif ($rootEl->attributes->getNamedItem('schemaLocation') !== NULL) {
//figure out where the schema is located and validate.
list(, $schemaLocation) = preg_split('/\s+/', $rootEl->attributes->getNamedItem('schemaLocation')->nodeValue);
}
@ -193,10 +194,12 @@ abstract class XMLDatastream {
foreach ($errors as $err) {
self::$errors[] = 'XML Error: Line ' . $err->line . ': ' . $err->message;
}
} else {
}
else {
$this->name = $rootEl->attributes->getNamedItem('name')->nodeValue;
}
} else {
}
else {
$ret = FALSE;
self::$errors[] = 'Unable to load schema.';
}

4
api/dublin_core.inc

@ -1,5 +1,6 @@
<?php
// $Id$
/*
* Implements a simple class for working with Dublin Core data and exporting it
@ -8,6 +9,7 @@
*/
class Dublin_Core {
public $dc = array(
'dc:title' => array(),
'dc:creator' => array(),

3
api/fedora_collection.inc

@ -1,5 +1,6 @@
<?php
// $Id$
/*
* Operations that affect a Fedora repository at a collection level.

2
api/fedora_export.inc

@ -1,6 +1,6 @@
<?php
// $Id$
define('FOXML_10', 'info:fedora/fedora-system:FOXML-1.0');
define('FOXML_11', 'info:fedora/fedora-system:FOXML-1.1');

15
api/fedora_item.inc

@ -1,6 +1,6 @@
<?php
// $Id$
define('RELS_EXT_URI', 'info:fedora/fedora-system:def/relations-external#');
define("FEDORA_MODEL_URI", 'info:fedora/fedora-system:def/model#');
@ -55,7 +55,7 @@ class Fedora_Item {
return (!empty($this->objectProfile));
}
function add_datastream_from_file($datastream_file, $datastream_id, $datastream_label = NULL, $datastream_mimetype = '', $controlGroup = 'M', $logMessage = null) {
function add_datastream_from_file($datastream_file, $datastream_id, $datastream_label = NULL, $datastream_mimetype = '', $controlGroup = 'M', $logMessage = NULL) {
module_load_include('inc', 'fedora_repository', 'MimeClass');
if (empty($datastream_mimetype)) {
// Get mime type from the file extension.
@ -76,7 +76,7 @@ class Fedora_Item {
return $return_value;
}
function add_datastream_from_url($datastream_url, $datastream_id, $datastream_label = NULL, $datastream_mimetype = '', $controlGroup = 'M', $logMessage = null) {
function add_datastream_from_url($datastream_url, $datastream_id, $datastream_label = NULL, $datastream_mimetype = '', $controlGroup = 'M', $logMessage = NULL) {
if (empty($datastream_label)) {
$datastream_label = $datastream_id;
}
@ -94,15 +94,14 @@ class Fedora_Item {
'dsState' => 'A',
'checksumType' => 'DISABLED',
'checksum' => 'none',
'logMessage' => ($logMessage != null) ? $logMessage : 'Ingested object ' . $datastream_id
'logMessage' => ($logMessage != NULL) ? $logMessage : 'Ingested object ' . $datastream_id
);
return $this->soap_call('addDataStream', $params);
}
function add_datastream_from_string($str, $datastream_id, $datastream_label = NULL, $datastream_mimetype = 'text/xml', $controlGroup = 'M', $logMessage = null) {
function add_datastream_from_string($str, $datastream_id, $datastream_label = NULL, $datastream_mimetype = 'text/xml', $controlGroup = 'M', $logMessage = NULL) {
$dir = sys_get_temp_dir();
$tmpfilename = tempnam($dir, 'fedoratmp');
$tmpfile = fopen($tmpfilename, 'w');
@ -332,7 +331,7 @@ class Fedora_Item {
return $ret;
}
function get_dissemination($service_definition_pid, $method_name, $parameters = array(), $as_of_date_time = null) {
function get_dissemination($service_definition_pid, $method_name, $parameters = array(), $as_of_date_time = NULL) {
$params = array(
'pid' => $this->pid,
'serviceDefinitionPid' => $service_definition_pid,
@ -612,7 +611,7 @@ class Fedora_Item {
closedir($dir_handle);
}
function modify_object($label = '', $state = null, $ownerId = null, $logMessage = 'Modified by Islandora API', $quiet=TRUE) {
function modify_object($label = '', $state = NULL, $ownerId = NULL, $logMessage = 'Modified by Islandora API', $quiet=TRUE) {
$params = array(
'pid' => $this->pid,

10
api/fedora_utils.inc

@ -1,5 +1,5 @@
<?php
// $Id$
// @file fedora_utils.inc
// Base utilities used by the Islansora fedora module.
@ -8,7 +8,8 @@
* Functions that emulate php5.3 functionality for backwards compatiablity
*/
if (!function_exists('str_getcsv')) {
function str_getcsv($input, $delimiter=',', $enclosure='"', $escape=null, $eol=null) {
function str_getcsv($input, $delimiter=',', $enclosure='"', $escape=NULL, $eol=NULL) {
$temp = fopen("php://memory", "rw");
fwrite($temp, $input);
fseek($temp, 0);
@ -16,6 +17,7 @@ if (!function_exists('str_getcsv')) {
fclose($temp);
return $r;
}
}
/*
* Functions that emulate php5.3 functionality for backwards compatiablity
@ -25,7 +27,6 @@ if (!function_exists('str_getcsv')) {
* Static functions used by the Fedora PHP API.
*/
function do_curl($url, $return_to_variable = 1, $number_of_post_vars = 0, $post = NULL) {
global $user;
// Check if we are inside Drupal and there is a valid user.
@ -69,10 +70,8 @@ function fedora_available() {
$response = do_curl(variable_get('fedora_base_url', 'http://localhost:8080/fedora') . '/describe');
return strstr($response, 'Repository Information HTML Presentation') !== FALSE;
}
/**
* Returns a UTF-8-encoded transcripiton of the string given in $in_str.
* @param string $in_str
@ -123,6 +122,5 @@ function fixDsid($dsid) {
$new_dsid = 'item' . rand(1, 100);
return $new_dsid;
}

7
api/rels-ext.inc

@ -1,5 +1,6 @@
<?php
// $Id$
/*
* To change this template, choose Tools | Templates
@ -12,9 +13,11 @@
* @author aoneill
*/
class RelsExt {
// Instance variables
public $relsExtArray = array();
private $originalRelsExtArray = array(); // Used to determine the result of modified() funciton.
// Member functions
/**
@ -24,7 +27,6 @@ class RelsExt {
*/
function RelsExt($item) {
$relsextxml = $item->get_datastream_dissemination('RELS-EXT');
}
function modified() {
@ -39,5 +41,6 @@ class RelsExt {
function save() {
}
}

8
api/tagging.inc

@ -1,5 +1,6 @@
<?php
// $Id$
/*
* @file tagging.inc
@ -11,6 +12,7 @@
* @author aoneill
*/
class TagSet {
public $tags = array();
public $item = NULL;
public $tagsDSID = 'TAGS';
@ -59,11 +61,11 @@ class TagSet {
else {
$this->item->modify_datastream_by_value($tagdoc->saveXML(), $this->tagsDSID, 'Tags', 'text/xml', 'X');
}
}
catch (exception $e) {
} catch (exception $e) {
drupal_set_message('There was an error saving the tags datastream: !e', array('!e' => $e), 'error');
return FALSE;
}
return TRUE;
}
}

1
collection_policies/COLLECTION-COLLECTION POLICY.xml

@ -1,3 +1,4 @@
<collection_policy name="" xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd">
<content_models>
<content_model dsid="ISLANDORACM" name="Collection" namespace="islandora:collection" pid="islandora:collectionCModel"/>

25
collection_policies/PDF-COLLECTION POLICY.xml

@ -1 +1,24 @@
<?xml version="1.0" encoding="utf-8"?> <collection_policy xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="" xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd"> <content_models> <content_model name="STANDARD_PDF" dsid="ISLANDORACM" namespace="islandora:spdf" pid="islandora:standard_pdf"/> <content_model name="STRICT_PDF" dsid="ISLANDORACM" namespace="islandora:strictpdf" pid="islandora:strict_pdf"/> <content_model name="REFWORKS_BATCH" dsid="ISLANDORACM" namespace="islandora:ref" pid="islandora:refworks_cm"/> </content_models> <search_terms> <term field="dc.title">dc.title</term> <term field="dc.creator">dc.creator</term> <term field="dc.description" default="true">dc.description</term> <term field="dc.date">dc.date</term> <term field="dc.identifier">dc.identifier</term> <term field="dc.language">dc.language</term> <term field="dc.publisher">dc.publisher</term> <term field="dc.rights">dc.rights</term> <term field="dc.subject">dc.subject</term> <term field="dc.relation">dc.relation</term> <term field="dcterms.temporal">dcterms.temporal</term> <term field="dcterms.spatial">dcterms.spatial</term> <term field="fgs.DS.first.text">Full Text</term> </search_terms> <relationship>isMemberOfCollection</relationship> </collection_policy>
<?xml version="1.0" encoding="utf-8"?>
<collection_policy xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="" xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd">
<content_models>
<content_model name="STANDARD_PDF" dsid="ISLANDORACM" namespace="islandora:spdf" pid="islandora:standard_pdf"/>
<content_model name="STRICT_PDF" dsid="ISLANDORACM" namespace="islandora:strictpdf" pid="islandora:strict_pdf"/>
<content_model name="REFWORKS_BATCH" dsid="ISLANDORACM" namespace="islandora:ref" pid="islandora:refworks_cm"/>
</content_models>
<search_terms>
<term field="dc.title">dc.title</term>
<term field="dc.creator">dc.creator</term>
<term field="dc.description" default="true">dc.description</term>
<term field="dc.date">dc.date</term>
<term field="dc.identifier">dc.identifier</term>
<term field="dc.language">dc.language</term>
<term field="dc.publisher">dc.publisher</term>
<term field="dc.rights">dc.rights</term>
<term field="dc.subject">dc.subject</term>
<term field="dc.relation">dc.relation</term>
<term field="dcterms.temporal">dcterms.temporal</term>
<term field="dcterms.spatial">dcterms.spatial</term>
<term field="fgs.DS.first.text">Full Text</term>
</search_terms>
<relationship>isMemberOfCollection</relationship>
</collection_policy>

1
collection_policies/PERSONAL-COLLECTION-POLICY.xml

@ -1,3 +1,4 @@
<collection_policy>
<!---we will define allowed mimetypes and what to do with various types as part of the content model-->
<contentmodels>

1
collection_policies/book_collection_policy.xml

@ -1,3 +1,4 @@
<collection_policy>
<!---we will define allowed mimetypes and what to do with various types as part of the content model-->
<contentmodels>

39
collection_policies/qt_collection_policy.xml

@ -5,31 +5,44 @@
</content_models>
<search_terms>
<term field="dc.title">
dc.title</term>
dc.title
</term>
<term field="dc.creator">
dc.creator</term>
dc.creator
</term>
<term field="dc.description" default="true">
dc.description</term>
dc.description
</term>
<term field="dc.date">
dc.date</term>
dc.date
</term>
<term field="dc.identifier">
dc.identifier</term>
dc.identifier
</term>
<term field="dc.language">
dc.language</term>
dc.language
</term>
<term field="dc.publisher">
dc.publisher</term>
dc.publisher
</term>
<term field="dc.rights">
dc.rights</term>
dc.rights
</term>
<term field="dc.subject">
dc.subject</term>
dc.subject
</term>
<term field="dc.relation">
dc.relation</term>
dc.relation
</term>
<term field="dcterms.temporal">
dcterms.temporal</term>
dcterms.temporal
</term>
<term field="dcterms.spatial">
dcterms.spatial</term>
dcterms.spatial
</term>
</search_terms>
<relationship>
isMemberOfCollection</relationship>
isMemberOfCollection
</relationship>
</collection_policy>

1
collection_policy.xsd

@ -1,3 +1,4 @@
<xsd:schema xmlns="http://www.islandora.ca" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.islandora.ca" elementFormDefault="qualified" >
<xsd:annotation>
<xsd:documentation xml:lang="en">

7
collection_views/Coverflow_Collection_View.xsl

@ -1,3 +1,4 @@
<xsl:stylesheet exclude-result-prefixes="php" version="1.0" xmlns:php="http://php.net/xsl"
xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
@ -40,7 +41,8 @@
// YAHOO.util.Event.onDOMReady(function(){
//$(document).ready(function(){
window.onload = function(){
var images = [</xsl:text>
var images = [
</xsl:text>
<xsl:for-each select="/s:sparql/s:results/s:result">
<xsl:variable name="OBJECTURI" select="s:object/@uri"/>
<xsl:variable name="pid" select="substring-after($OBJECTURI,'/')"/>
@ -67,7 +69,8 @@
var myMoveLeftBtn = new YAHOO.widget.Button('moveLeftButton', {onclick: {fn: moveLeft, obj: myCoverFlow}});
var myMoveRightBtn = new YAHOO.widget.Button('moveRightButton', {onclick: {fn: moveRight, obj: myCoverFlow}});
};</xsl:text>
};
</xsl:text>
</script>
<div class="title">Testing YUI's CoverFlow version 0.1 (beta)</div>
<div id="coverFlowTest"/>

7
collection_views/Coverflow_PRE_Collection_View.xsl

@ -1,3 +1,4 @@
<xsl:stylesheet exclude-result-prefixes="php" version="1.0" xmlns:php="http://php.net/xsl"
xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
@ -40,7 +41,8 @@
// YAHOO.util.Event.onDOMReady(function(){
//$(document).ready(function(){
window.onload = function(){
var images = [</xsl:text>
var images = [
</xsl:text>
<xsl:for-each select="/s:sparql/s:results/s:result">
<xsl:variable name="OBJECTURI" select="s:object/@uri"/>
<xsl:variable name="pid" select="substring-after($OBJECTURI,'/')"/>
@ -71,7 +73,8 @@
var myMoveLeftBtn = new YAHOO.widget.Button('moveLeftButton', {onclick: {fn: moveLeft, obj: myCoverFlow}});
var myMoveRightBtn = new YAHOO.widget.Button('moveRightButton', {onclick: {fn: moveRight, obj: myCoverFlow}});
};</xsl:text>
};
</xsl:text>
</script>
<div class="title">Testing YUI's CoverFlow version 0.1 (beta)</div>
<div id="coverFlowTest"/>

143
collection_views/FLV-COLLECTION VIEW(2).xml

@ -18,48 +18,79 @@
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%">
<tr><td colspan="{$cellsPerRow}">
<tr>
<td colspan="{$cellsPerRow}">
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -80,41 +111,70 @@
</xsl:for-each>-
-->
<xsl:apply-templates select="sparql/results"/>
</table><br clear="all" />
</table>
<br clear="all" />
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -143,27 +203,40 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="(content='Collection' or content='Community')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/OBJ/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/OBJ/
<xsl:value-of select="title"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<td valign="top" width="25%">
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
<xsl:attribute name="alt"><xsl:value-of select="$newTitle"/>
<xsl:attribute name="alt">
<xsl:value-of select="$newTitle"/>
</xsl:attribute>
</img> </a> <br clear="all" />
</img>
</a>
<br clear="all" />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
<xsl:value-of select="$newTitle"/>
</a>

131
collection_views/REFWORKS-COLLECTION_VIEW.xml

@ -18,48 +18,79 @@
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%">
<tr><td colspan="{$cellsPerRow}">
<tr>
<td colspan="{$cellsPerRow}">
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -80,41 +111,70 @@
</xsl:for-each>-
-->
<xsl:apply-templates select="s:sparql/s:results"/>
</table><br clear="all" />
</table>
<br clear="all" />
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -145,10 +205,14 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="($CONTENTMODEL='islandora:collectionCModel')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="s:title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="s:title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/OBJ/<xsl:value-of select="s:title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/OBJ/
<xsl:value-of select="s:title"/>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="s:content"/>
@ -164,9 +228,12 @@
</xsl:attribute>
</img> </a> <br clear="all" />-->
<br /><a>
<br />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="s:title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="s:title"/>
</xsl:attribute>
<xsl:value-of select="$newTitle"/>
</a>

145
collection_views/SIMPLE-COLLECTION_VIEW.xml

@ -18,48 +18,79 @@
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%">
<tr><td colspan="{$cellsPerRow}">
<tr>
<td colspan="{$cellsPerRow}">
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -80,41 +111,70 @@
</xsl:for-each>-
-->
<xsl:apply-templates select="s:sparql/s:results"/>
</table><br clear="all" />
</table>
<br clear="all" />
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -145,28 +205,41 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="($CONTENTMODEL='islandora:collectionCModel')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="s:title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="s:title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/OBJ/<xsl:value-of select="s:title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/OBJ/
<xsl:value-of select="s:title"/>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="s:content"/>
</xsl:variable>
<td valign="top" width="25%">
<a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/>
<xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
<xsl:attribute name="alt"><xsl:value-of select="$newTitle"/>
<xsl:attribute name="alt">
<xsl:value-of select="$newTitle"/>
</xsl:attribute>
</img> </a> <br clear="all" />
</img>
</a>
<br clear="all" />
<br /><a>
<br />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="s:title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="s:title"/>
</xsl:attribute>
<xsl:value-of select="$newTitle"/>
</a>

4
collection_views/SmileyStuff-COLLECTION_VIEW.xml

@ -1,3 +1,4 @@
<xsl:stylesheet version="1.0" xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:variable name="BASEURL">
@ -51,7 +52,8 @@
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>
<xsl:text>/fedora/repository/</xsl:text>
<xsl:value-of select="$pid"/>/-/<xsl:value-of select="s:memberTitle"/>
<xsl:value-of select="$pid"/>/-/
<xsl:value-of select="s:memberTitle"/>
</xsl:attribute>
<xsl:value-of select="s:memberTitle"/>
</a>

4
collection_views/Video-COLLECTION_VIEW.xml

@ -1,3 +1,4 @@
<xsl:stylesheet version="1.0" xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:variable name="BASEURL">
@ -48,7 +49,8 @@
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>
<xsl:text>/fedora/repository/</xsl:text>
<xsl:value-of select="$pid"/>/-/<xsl:value-of select="s:memberTitle"/>
<xsl:value-of select="$pid"/>/-/
<xsl:value-of select="s:memberTitle"/>
</xsl:attribute>
<xsl:value-of select="s:memberTitle"/>
</a>

125
collection_views/default-sparqltoHtml.xsl

@ -19,100 +19,165 @@
<xsl:if test="$count>0">
<table>
<tr><td colspan="2">
<tr>
<td colspan="2">
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div>
</td></tr>
</td>
</tr>
<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
<xsl:variable name='PID' select="substring-after($OBJECTURI,'/')"/>
<tr>
<td>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
</img>
</td><td>
</td>
<td>
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
<xsl:value-of select="title"/>
</a>
</td></tr>
</td>
</tr>
</xsl:for-each>
</table>
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>

4
collection_views/simple_list_view.xml

@ -1,3 +1,4 @@
<xsl:stylesheet version="1.0" xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- simple list view for a itql query that looks queries for $object and $title only -->
<xsl:template match="/">
@ -14,7 +15,8 @@
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>
<xsl:text>/fedora/repository/</xsl:text>
<xsl:value-of select="$pid"/>/-/<xsl:value-of select="s:title"/>
<xsl:value-of select="$pid"/>/-/
<xsl:value-of select="s:title"/>
</xsl:attribute>
<xsl:value-of select="s:title"/>
</a>

4
collection_views/standard_jpeg_collection_view.xml

@ -1,3 +1,4 @@
<xsl:stylesheet version="1.0" xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:variable name="BASEURL">
@ -50,7 +51,8 @@
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>
<xsl:text>/fedora/repository/</xsl:text>
<xsl:value-of select="$pid"/>/-/<xsl:value-of select="s:memberTitle"/>
<xsl:value-of select="$pid"/>/-/
<xsl:value-of select="s:memberTitle"/>
</xsl:attribute>
<xsl:value-of select="s:memberTitle"/>
</a>

88
collection_views/yui_coverflow/js/CoverFlow.js vendored

@ -203,15 +203,23 @@ YAHOO.namespace("ext");
},
attachEventListeners: function(){
new YAHOO.util.KeyListener(this.element, { keys:39 },
{ fn:this.selectNext,
new YAHOO.util.KeyListener(this.element, {
keys:39
},
{
fn:this.selectNext,
scope:this,
correctScope:true } ).enable();
correctScope:true
} ).enable();
new YAHOO.util.KeyListener(this.element, { keys:37 },
{ fn:this.selectPrevious,
new YAHOO.util.KeyListener(this.element, {
keys:37
},
{
fn:this.selectPrevious,
scope:this,
correctScope:true } ).enable();
correctScope:true
} ).enable();
},
@ -245,15 +253,39 @@ YAHOO.namespace("ext");
if(distance == 0){// selected
coverFlowItem.setZIndex(this.imageZIndex);
coverFlowItem.isSelected(false);
animateItems.push({item: coverFlowItem, attribute:{angle: {start: 0, end: this.perspectiveAngle} } });
animateItems.push({
item: coverFlowItem,
attribute:{
angle: {
start: 0,
end: this.perspectiveAngle
}
}
});
coverFlowItem = this.coverFlowItems[++i];
coverFlowItem.isSelected(true);
this.showLabel(coverFlowItem.getLabel());
animateItems.push({item: coverFlowItem, attribute:{angle: {start: this.perspectiveAngle, end: 0} } });
animateItems.push({
item: coverFlowItem,
attribute:{
angle: {
start: this.perspectiveAngle,
end: 0
}
}
});
}else{
animateItems.push({item: coverFlowItem, attribute: {left: {start:coverFlowItem.getLeft(), end: coverFlowItem.getLeft() - CoverFlow.IMAGE_SEPARATION} }});
animateItems.push({
item: coverFlowItem,
attribute: {
left: {
start:coverFlowItem.getLeft(),
end: coverFlowItem.getLeft() - CoverFlow.IMAGE_SEPARATION
}
}
});
}
}
}
@ -292,15 +324,39 @@ YAHOO.namespace("ext");
coverFlowItem.setZIndex(this.selectedImageZIndex);
coverFlowItem.isSelected(true);
this.showLabel(coverFlowItem.getLabel());
animateItems.push({item: coverFlowItem, attribute: {angle: {start: this.perspectiveAngle, end: 0}}});
animateItems.push({
item: coverFlowItem,
attribute: {
angle: {
start: this.perspectiveAngle,
end: 0
}
}
});
coverFlowItem = this.coverFlowItems[++i];
coverFlowItem.isSelected(false);
coverFlowItem.setZIndex(this.imageZIndex);
animateItems.push({item: coverFlowItem, attribute: {angle: {start: 0, end: this.perspectiveAngle}}});
animateItems.push({
item: coverFlowItem,
attribute: {
angle: {
start: 0,
end: this.perspectiveAngle
}
}
});
}else{
coverFlowItem.setZIndex(coverFlowItem.getZIndex() - 1);
animateItems.push({item: coverFlowItem, attribute: {left: {start:coverFlowItem.getLeft(), end: coverFlowItem.getLeft() + CoverFlow.IMAGE_SEPARATION} }});
animateItems.push({
item: coverFlowItem,
attribute: {
left: {
start:coverFlowItem.getLeft(),
end: coverFlowItem.getLeft() + CoverFlow.IMAGE_SEPARATION
}
}
});
}
}
}
@ -364,7 +420,10 @@ YAHOO.namespace("ext");
scaledHeight: this.scaleHeight(image),
reflectionRatio: this.reflectionRatio,
bgColor: this.backgroundColor,
onclick: {fn: this.select, scope: this}
onclick: {
fn: this.select,
scope: this
}
});
this.alignCenterHeight(coverFlowItem);
this.coverFlowItems.push(coverFlowItem);
@ -573,7 +632,8 @@ YAHOO.namespace("ext");
ctx.fillRect(0, 0, scaledWidth, scaledHeight);
//apply the background color to the gradient
ctx.globalCompositeOperation = 'destination-over';
ctx.fillStyle = bgColor; '#000';
ctx.fillStyle = bgColor;
'#000';
ctx.globalAlpha = 0.8;
ctx.fillRect(0, 0 , scaledWidth, scaledHeight);
ctx.restore();

75
collection_views/yui_coverflow/js/test.js vendored

@ -4,15 +4,37 @@
YAHOO.util.Event.onDOMReady(function(){
var images = [
{src: 'images/ardillitaMac.jpg', label: 'Ardileta!', onclick: function(){alert('image1');}},
{src: 'http://farm2.static.flickr.com/1380/1426855399_b4b8eccbdb.jpg?v=0'},
{src: 'http://farm1.static.flickr.com/69/213130158_0d1aa23576_d.jpg'},
{src: 'http://farm1.static.flickr.com/69/213130158_0d1aa23576_d.jpg'},
{src: 'images/msn2.jpg', label: 'My Mac'},
{src: 'images/msn2.jpg', label: 'My Mac again...'}
{
src: 'images/ardillitaMac.jpg',
label: 'Ardileta!',
onclick: function(){
alert('image1');
}
},
{
src: 'http://farm2.static.flickr.com/1380/1426855399_b4b8eccbdb.jpg?v=0'
},
{
src: 'http://farm1.static.flickr.com/69/213130158_0d1aa23576_d.jpg'
},
{
src: 'http://farm1.static.flickr.com/69/213130158_0d1aa23576_d.jpg'
},
{
src: 'images/msn2.jpg',
label: 'My Mac'
},
{
src: 'images/msn2.jpg',
label: 'My Mac again...'
}
];
var myCoverFlow = new YAHOO.ext.CoverFlow('coverFlowTest', {height: 200, width: 600, images: images});
var myCoverFlow = new YAHOO.ext.CoverFlow('coverFlowTest', {
height: 200,
width: 600,
images: images
});
function moveLeft(e, coverFlow){
coverFlow.selectNext();
@ -20,17 +42,44 @@ YAHOO.util.Event.onDOMReady(function(){
function moveRight(e, coverFlow){
coverFlow.selectPrevious();
}
var myMoveLeftBtn = new YAHOO.widget.Button('moveLeftButton', {onclick: {fn: moveLeft, obj: myCoverFlow}});
var myMoveRightBtn = new YAHOO.widget.Button('moveRightButton', {onclick: {fn: moveRight, obj: myCoverFlow}});
var myMoveLeftBtn = new YAHOO.widget.Button('moveLeftButton', {
onclick: {
fn: moveLeft,
obj: myCoverFlow
}
});
var myMoveRightBtn = new YAHOO.widget.Button('moveRightButton', {
onclick: {
fn: moveRight,
obj: myCoverFlow
}
});
var otherImages = [
{src: 'images/ardillitaMac.jpg', label: 'Ardileta!', onclick: function(){alert('image1');}},
{src: 'images/msn2.jpg', label: 'My Mac'},
{src: 'images/msn2.jpg', label: 'My Mac again...'}
{
src: 'images/ardillitaMac.jpg',
label: 'Ardileta!',
onclick: function(){
alert('image1');
}
},
{
src: 'images/msn2.jpg',
label: 'My Mac'
},
{
src: 'images/msn2.jpg',
label: 'My Mac again...'
}
];
var anotherCoverFlow = new YAHOO.ext.CoverFlow('anotherCoverFlowTest', {height: 150, width: 500, images: otherImages, bgColor: '#C0C0C0'});
var anotherCoverFlow = new YAHOO.ext.CoverFlow('anotherCoverFlowTest', {
height: 150,
width: 500,
images: otherImages,
bgColor: '#C0C0C0'
});

1
content_models/COLLECTIONCM.xml

@ -1,3 +1,4 @@
<content_model xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Collection" version="2" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes>
<type>text/xml</type>

1
content_models/FAS_slideCModel.xml

@ -1,3 +1,4 @@
<content_model name="standard_slide">
<mimetypes>
<type>image/tiff</type>

33
content_models/STANDARD_QT.xml

@ -53,12 +53,14 @@
<element label="Creator/" name="dc:creator" type="textfield">
<description>An entity primarily responsible for making the
content of the resource such as a person, organization or
service.</description>
service.
</description>
</element>
<element label="Subject" name="dc:subject" type="select">
<description>An entity primarily responsible for making the
content of the resource such as a person, organization or
service.</description>
service.
</description>
<authoritative_list>
<item>home recording</item>
<item>meeting</item>
@ -69,27 +71,32 @@
<element label="Description of Media" name="dc:description" required="true" type="textarea">
<description>Examples include an abstract, table of
contents, or free-text account of the content of the
resource.</description>
resource.
</description>
</element>
<element label="Publisher" name="dc:publisher" type="textfield">
<description>An entity, (including persons, organizations,
or services), responsible for making the resource
available.</description>
available.
</description>
</element>
<element label="Contributor" name="dc:contributor" type="textfield">
<description>An entity responsible for contributing to the
content of the resource such as a person, organization or
service.</description>
service.
</description>
</element>
<element label="Date" name="dc:date" type="textfield">
<description>Temporal scope of the content if known. Date
format is YYYY-MM-DD (e.g. 1890,1910-10,or
2007-10-23)</description>
2007-10-23)
</description>
</element>
<element label="Resource Type" name="dc:type" type="select">
<description>Genre of the content of the resource. Examples
include: home page, novel, poem, working paper, technical
report, essay, dictionary.</description>
report, essay, dictionary.
</description>
<authoritative_list>
<item>none</item>
<item>video</item>
@ -108,16 +115,19 @@
</element>
<element label="Source" name="dc:source" type="textfield">
<description>A reference to a resource from which the
present resource is derived.</description>
present resource is derived.
</description>
</element>
<element label="Identifier" name="dc:identifier" type="textfield">
<description>A unique reference to the resource; In this
instance, the accession number or collection
number.</description>
number.
</description>
</element>
<element label="Language" name="dc:language" type="select">
<description>The language of the intellectual content of
the resource.</description>
the resource.
</description>
<authoritative_list>
<item field="eng">English</item>
<item field="fre">French</item>
@ -129,7 +139,8 @@
<element label="Rights Management" name="dc:rights" type="textarea">
<description>Information about intellectual property
rights, copyright, and various property
rights.</description>
rights.
</description>
</element>
</form_elements>
</ingest_form>

1
content_models/STRICT_PDFCM.xml

@ -1,3 +1,4 @@
<content_model name="strict_pdf" xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes>
<type>application/pdf</type>

15
content_models/ilives_tei2htmlSdep-pageCModel.xml

@ -197,8 +197,11 @@
<xsl:attribute name="class">search persName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22<xsl:value-of
select=".//tei:surname"/>+<xsl:value-of select=".//tei:forename"/>%22+AND+dc.type:collection</xsl:attribute>
name="href">http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22
<xsl:value-of
select=".//tei:surname"/>+
<xsl:value-of select=".//tei:forename"/>%22+AND+dc.type:collection
</xsl:attribute>
<xsl:apply-templates select="*|node()"/>
</a>
</span>
@ -213,7 +216,9 @@
<xsl:attribute name="class">search placeName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection</xsl:attribute>
name="href">http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22
<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection
</xsl:attribute>
<xsl:value-of select="normalize-space(.)"/>
</a>
</xsl:template>
@ -222,7 +227,9 @@
<xsl:attribute name="class">search orgName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection</xsl:attribute>
name="href">http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22
<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection
</xsl:attribute>
<xsl:value-of select="normalize-space(.)"/>
</a>
</xsl:template>

20
content_models/islandora_mods2htmlSdep.xml

@ -435,27 +435,35 @@
</xsl:choose>
</xsl:template>
<xsl:template name="attr">
<xsl:for-each select="@type|@point">:<xsl:call-template name="longName">
<xsl:for-each select="@type|@point">:
<xsl:call-template name="longName">
<xsl:with-param name="name">
<xsl:value-of select="."/>
</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
<xsl:if test="@authority or @edition">
<xsl:for-each select="@authority">(<xsl:call-template name="longName">
<xsl:for-each select="@authority">(
<xsl:call-template name="longName">
<xsl:with-param name="name">
<xsl:value-of select="."/>
</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
<xsl:if test="@edition">Edition <xsl:value-of select="@edition"/>
</xsl:if>)</xsl:if>
<xsl:if test="@edition">Edition
<xsl:value-of select="@edition"/>
</xsl:if>)
</xsl:if>
<xsl:variable name="attrStr">
<xsl:for-each select="@*[local-name()!='edition' and local-name()!='type' and local-name()!='authority' and local-name()!='point']">
<xsl:value-of select="local-name()"/>="<xsl:value-of select="."/>",</xsl:for-each>
<xsl:value-of select="local-name()"/>="
<xsl:value-of select="."/>",
</xsl:for-each>
</xsl:variable>
<xsl:variable name="nattrStr" select="normalize-space($attrStr)"/>
<xsl:if test="string-length($nattrStr)">(<xsl:value-of select="substring($nattrStr,1,string-length($nattrStr)-1)"/>)</xsl:if>
<xsl:if test="string-length($nattrStr)">(
<xsl:value-of select="substring($nattrStr,1,string-length($nattrStr)-1)"/>)
</xsl:if>
</xsl:template>
</xsl:stylesheet>
</foxml:xmlContent>

33
content_models/islandora_qtCModel.xml

@ -76,12 +76,14 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
<element label="Creator/" name="dc:creator" type="textfield">
<description>An entity primarily responsible for making the
content of the resource such as a person, organization or
service.</description>
service.
</description>
</element>
<element label="Subject" name="dc:subject" type="select">
<description>An entity primarily responsible for making the
content of the resource such as a person, organization or
service.</description>
service.
</description>
<authoritative_list>
<item>home recording</item>
<item>meeting</item>
@ -92,27 +94,32 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
<element label="Description of Media" name="dc:description" required="true" type="textarea">
<description>Examples include an abstract, table of
contents, or free-text account of the content of the
resource.</description>
resource.
</description>
</element>
<element label="Publisher" name="dc:publisher" type="textfield">
<description>An entity, (including persons, organizations,
or services), responsible for making the resource
available.</description>
available.
</description>
</element>
<element label="Contributor" name="dc:contributor" type="textfield">
<description>An entity responsible for contributing to the
content of the resource such as a person, organization or
service.</description>
service.
</description>
</element>
<element label="Date" name="dc:date" type="textfield">
<description>Temporal scope of the content if known. Date
format is YYYY-MM-DD (e.g. 1890,1910-10,or
2007-10-23)</description>
2007-10-23)
</description>
</element>
<element label="Resource Type" name="dc:type" type="select">
<description>Genre of the content of the resource. Examples
include: home page, novel, poem, working paper, technical
report, essay, dictionary.</description>
report, essay, dictionary.
</description>
<authoritative_list>
<item>none</item>
<item>video</item>
@ -131,16 +138,19 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
</element>
<element label="Source" name="dc:source" type="textfield">
<description>A reference to a resource from which the
present resource is derived.</description>
present resource is derived.
</description>
</element>
<element label="Identifier" name="dc:identifier" type="textfield">
<description>A unique reference to the resource; In this
instance, the accession number or collection
number.</description>
number.
</description>
</element>
<element label="Language" name="dc:language" type="select">
<description>The language of the intellectual content of
the resource.</description>
the resource.
</description>
<authoritative_list>
<item field="eng">English</item>
<item field="fre">French</item>
@ -152,7 +162,8 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
<element label="Rights Management" name="dc:rights" type="textarea">
<description>Information about intellectual property
rights, copyright, and various property
rights.</description>
rights.
</description>
</element>
</form_elements>
</ingest_form>

146
example_collection_views/MHL-sparqltoHtml.xsl

@ -18,84 +18,144 @@
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3">
<tr><td colspan="{$cellsPerRow}">
<tr>
<td colspan="{$cellsPerRow}">
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<xsl:apply-templates select="sparql/results"/>
</table><br clear="all" />
</table>
<br clear="all" />
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -124,30 +184,44 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="(content='Collection' or content='Community')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/<xsl:value-of select="title"/>/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/
<xsl:value-of select="title"/>/
<xsl:value-of select="title"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<td valign="top" width="25%">
<a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/>
<xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
</img> </a> <br clear="all" />
</img>
</a>
<br clear="all" />
<a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/>
<xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute>
<xsl:value-of select="$newTitle"/>
</a>
<xsl:if test="(content!='Collection' and content!='Community')">
<br />--<a>
<br />--
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
DETAILS
</a>--

95
example_collection_views/critter.xsl

@ -5,29 +5,92 @@
<xsl:template match="/">
<ul>
<li><b>Date Collected:</b><xsl:text> </xsl:text> <xsl:value-of select="/critters:sample/critters:date_collected"/></li>
<li><b>Type:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:type"/></li>
<li><b>Phylum:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:phylum"/></li>
<li><b>SubPhylum:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:SubPhylum"/></li>
<li><b>Class:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:class"/></li>
<li><b>Order:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:order"/></li>
<li><b>Family:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:family"/></li>
<li><b>Genus:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:genus"/></li>
<li><b>Species:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:species"/></li>
<li>
<b>Date Collected:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:date_collected"/>
</li>
<li>
<b>Type:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:type"/>
</li>
<li>
<b>Phylum:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:phylum"/>
</li>
<li>
<b>SubPhylum:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:SubPhylum"/>
</li>
<li>
<b>Class:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:class"/>
</li>
<li>
<b>Order:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:order"/>
</li>
<li>
<b>Family:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:family"/>
</li>
<li>
<b>Genus:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:genus"/>
</li>
<li>
<b>Species:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:species"/>
</li>
</ul>
<h4>Collection Location</h4>
<ul>
<li><b>Site Name:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:sitename"/></li>
<li><b>Country:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:country"/></li>
<li><b>Region:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:region"/></li>
<li><b>Latitude:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:latitude"/></li>
<li><b>Longitude:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:longitude"/></li>
<li><b>Depth:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:depth"/><xsl:text> </xsl:text>Feet</li>
<li>
<b>Site Name:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:site/critters:sitename"/>
</li>
<li>
<b>Country:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:site/critters:country"/>
</li>
<li>
<b>Region:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:site/critters:region"/>
</li>
<li>
<b>Latitude:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:site/critters:latitude"/>
</li>
<li>
<b>Longitude:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:site/critters:longitude"/>
</li>
<li>
<b>Depth:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:site/critters:depth"/>
<xsl:text> </xsl:text>Feet
</li>
</ul>
<h4>Description</h4>
<div><xsl:value-of select="/critters:sample/critters:description"/></div>
<div>
<xsl:value-of select="/critters:sample/critters:description"/>
</div>
</xsl:template>
</xsl:stylesheet>

143
example_collection_views/flv-sparqltoHtml.xsl

@ -18,48 +18,79 @@
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%">
<tr><td colspan="{$cellsPerRow}">
<tr>
<td colspan="{$cellsPerRow}">
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -80,41 +111,70 @@
</xsl:for-each>-
-->
<xsl:apply-templates select="sparql/results"/>
</table><br clear="all" />
</table>
<br clear="all" />
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -143,27 +203,40 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="(content='Collection' or content='Community')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/OBJ/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/OBJ/
<xsl:value-of select="title"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<td valign="top" width="25%">
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
<xsl:attribute name="alt"><xsl:value-of select="$newTitle"/>
<xsl:attribute name="alt">
<xsl:value-of select="$newTitle"/>
</xsl:attribute>
</img> </a> <br clear="all" />
</img>
</a>
<br clear="all" />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
<xsl:value-of select="$newTitle"/>
</a>

139
example_collection_views/mlp-sparqltoHtml.xsl

@ -18,84 +18,144 @@
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3">
<tr><td colspan="{$cellsPerRow}">
<tr>
<td colspan="{$cellsPerRow}">
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<xsl:apply-templates select="sparql/results"/>
</table><br clear="all" />
</table>
<br clear="all" />
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -124,27 +184,38 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="(content='Collection' or content='Community')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/<xsl:value-of select="title"/>/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/
<xsl:value-of select="title"/>/
<xsl:value-of select="title"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<td valign="top" width="25%">
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
</img> <br clear="all" />
</img>
<br clear="all" />
<xsl:value-of select="$newTitle"/>
<xsl:if test="(content!='Collection' and content!='Community')">
<br />--<a>
<br />--
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
DETAILS
</a>--

174
example_collection_views/refworks.xsl

@ -6,27 +6,127 @@
<xsl:if test="/reference/jf">
<h2>General Information</h2>
<table cellpadding="2" cellspacing="2">
<tr><td ><strong>Periodical:</strong></td><td><xsl:value-of select="/reference/jf"/></td></tr>
<tr><td><strong>Abbreviation:</strong></td><td><xsl:value-of select="/reference/jo"/></td></tr>
<tr><td><strong>Volume:</strong></td><td><xsl:value-of select="/reference/vo"/></td></tr>
<tr><td><strong>Issue:</strong></td><td><xsl:value-of select="/reference/is"/></td></tr>
<tr><td><strong>Publisher:</strong></td><td><xsl:value-of select="/reference/pb"/></td></tr>
<tr><td><strong>Place of Publication:</strong></td><td><xsl:value-of select="/reference/pp"/></td></tr>
<tr><td><strong>Edition:</strong></td><td><xsl:value-of select="/reference/ed"/></td></tr>
<tr><td><strong>Year:</strong></td><td><xsl:value-of select="/reference/yr"/></td></tr>
<tr><td><strong>Date:</strong></td><td><xsl:value-of select="/reference/fd"/></td></tr>
<tr><td><strong>Start Page:</strong></td><td><xsl:value-of select="/reference/sp"/></td></tr>
<tr><td><strong>Other Pages:</strong></td><td><xsl:value-of select="/reference/op"/></td></tr>
<tr><td><strong>ISSN/ISBN:</strong></td><td><xsl:value-of select="/reference/sn"/></td></tr>
<tr><td><strong>Language:</strong></td><td><xsl:value-of select="/reference/la"/></td></tr>
<tr><td><strong>UL:</strong></td><td><xsl:value-of select="/reference/ul"/></td></tr>
<tr>
<td >
<strong>Periodical:</strong>
</td>
<td>
<xsl:value-of select="/reference/jf"/>
</td>
</tr>
<tr>
<td>
<strong>Abbreviation:</strong>
</td>
<td>
<xsl:value-of select="/reference/jo"/>
</td>
</tr>
<tr>
<td>
<strong>Volume:</strong>
</td>
<td>
<xsl:value-of select="/reference/vo"/>
</td>
</tr>
<tr>
<td>
<strong>Issue:</strong>
</td>
<td>
<xsl:value-of select="/reference/is"/>
</td>
</tr>
<tr>
<td>
<strong>Publisher:</strong>
</td>
<td>
<xsl:value-of select="/reference/pb"/>
</td>
</tr>
<tr>
<td>
<strong>Place of Publication:</strong>
</td>
<td>
<xsl:value-of select="/reference/pp"/>
</td>
</tr>
<tr>
<td>
<strong>Edition:</strong>
</td>
<td>
<xsl:value-of select="/reference/ed"/>
</td>
</tr>
<tr>
<td>
<strong>Year:</strong>
</td>
<td>
<xsl:value-of select="/reference/yr"/>
</td>
</tr>
<tr>
<td>
<strong>Date:</strong>
</td>
<td>
<xsl:value-of select="/reference/fd"/>
</td>
</tr>
<tr>
<td>
<strong>Start Page:</strong>
</td>
<td>
<xsl:value-of select="/reference/sp"/>
</td>
</tr>
<tr>
<td>
<strong>Other Pages:</strong>
</td>
<td>
<xsl:value-of select="/reference/op"/>
</td>
</tr>
<tr>
<td>
<strong>ISSN/ISBN:</strong>
</td>
<td>
<xsl:value-of select="/reference/sn"/>
</td>
</tr>
<tr>
<td>
<strong>Language:</strong>
</td>
<td>
<xsl:value-of select="/reference/la"/>
</td>
</tr>
<tr>
<td>
<strong>UL:</strong>
</td>
<td>
<xsl:value-of select="/reference/ul"/>
</td>
</tr>
</table>
</xsl:if>
<xsl:if test="/reference/t1">
<h2>Titles</h2>
<ul>
<xsl:for-each select="/reference/t1">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
@ -34,7 +134,9 @@
<ul>
<h3>Secondary Titles</h3>
<xsl:for-each select="/reference/t2">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
@ -42,7 +144,9 @@
<h2>Authors</h2>
<ul>
<xsl:for-each select="/reference/a1">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
@ -51,7 +155,9 @@
<ul>
<h3>Secondary Authors</h3>
<xsl:for-each select="/reference/a2">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
@ -59,34 +165,52 @@
<h2>Keywords</h2>
<ul>
<xsl:for-each select="/reference/k1">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
<xsl:if test="/reference/ab">
<h2>Abstract</h2>
<xsl:for-each select="/reference/ab">
<div><xsl:value-of select="."/> </div>
<div>
<xsl:value-of select="."/>
</div>
</xsl:for-each>
</xsl:if>
<xsl:if test="/reference/no">
<h2>Notes</h2>
<xsl:for-each select="/reference/no">
<div><xsl:value-of select="."/> </div>
<div>
<xsl:value-of select="."/>
</div>
</xsl:for-each>
</xsl:if>
<xsl:variable name="ISSN">
<xsl:value-of select="/reference/sn"/>
</xsl:variable>
<xsl:variable name="BASEURL">
http://articles.library.upei.ca:7888/godot/hold_tab.cgi?hold_tab_branch=PCU&amp;issn=<xsl:value-of select="/reference/sn/text()"/>&amp;date=<xsl:value-of select="/reference/yr/text()"/>&amp;volume=<xsl:value-of select="/reference/vo/text()"/>&amp;issue=<xsl:value-of select="/reference/is/text()"/>&amp;spage=<xsl:value-of select="/reference/sp/text()"/>&amp;atitle=<xsl:value-of select="/reference/t1"/>&amp;stitle=<xsl:value-of select="/reference/jf"/>
http://articles.library.upei.ca:7888/godot/hold_tab.cgi?hold_tab_branch=PCU&amp;issn=
<xsl:value-of select="/reference/sn/text()"/>&amp;date=
<xsl:value-of select="/reference/yr/text()"/>&amp;volume=
<xsl:value-of select="/reference/vo/text()"/>&amp;issue=
<xsl:value-of select="/reference/is/text()"/>&amp;spage=
<xsl:value-of select="/reference/sp/text()"/>&amp;atitle=
<xsl:value-of select="/reference/t1"/>&amp;stitle=
<xsl:value-of select="/reference/jf"/>
</xsl:variable>
<br />
<xsl:if test="/reference/sn">
<div><a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/></xsl:attribute>
<div>
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>
</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<img src="http://asin1.its.unb.ca:8000/muse/images/getit4.gif"/> </a></div>
<img src="http://asin1.its.unb.ca:8000/muse/images/getit4.gif"/>
</a>
</div>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

148
example_collection_views/riri-sparqltoHtml.xsl

@ -18,48 +18,79 @@
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%">
<tr><td colspan="{$cellsPerRow}">
<tr>
<td colspan="{$cellsPerRow}">
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -80,41 +111,70 @@
</xsl:for-each>-
-->
<xsl:apply-templates select="sparql/results"/>
</table><br clear="all" />
</table>
<br clear="all" />
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -143,32 +203,46 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="(content='Collection' or content='Community')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/OBJ/<xsl:value-of select="title"/>.pdf <!-- we know in riri that all OBJ streams are pdf so we can add the extension to tell browsers what it is-->
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/OBJ/
<xsl:value-of select="title"/>.pdf <!-- we know in riri that all OBJ streams are pdf so we can add the extension to tell browsers what it is-->
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<td valign="top" width="25%">
<a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/>
<xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
<xsl:attribute name="alt"><xsl:value-of select="$newTitle"/>
<xsl:attribute name="alt">
<xsl:value-of select="$newTitle"/>
</xsl:attribute>
</img> </a> <br clear="all" />
</img>
</a>
<br clear="all" />
<a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/>
<xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute>
<xsl:value-of select="$newTitle"/>
</a>
<xsl:if test="(content!='Collection' and content!='Community')">
<br />--<a>
<br />--
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
DETAILS
</a>--

125
example_collection_views/sparqltoHtml.xsl

@ -19,48 +19,78 @@
<xsl:if test="$count>0">
<table width='100%'>
<tr><td colspan="2">
<tr>
<td colspan="2">
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div>
</td></tr>
</td>
</tr>
<!--select="//guestbook/entry[position()>=$start and $end>=position()]">-->
<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -68,52 +98,87 @@
<tr>
<td>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
</img>
</td><td>
</td>
<td>
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
<xsl:value-of select="title"/>
</a>
</td></tr>
</td>
</tr>
</xsl:for-each>
</table>
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>

3
fedora_repository.install

@ -1,5 +1,6 @@
<?php
// $Id$
/**
* @file fedora_repository.install

13
fedora_repository.module

@ -1,6 +1,6 @@
<?php
// $Id$
/*
* Created on Aug 10, 2007
@ -22,8 +22,6 @@ function fedora_repository_admin() {
return $adminForm->createAdminForm();
}
/**
* drupal hook
* calls the fedora_repositorys_admin form
@ -550,7 +548,6 @@ function fedora_repository_replace_stream_form_submit($form, &$form_state) {
$item->modify_datastream_by_reference($streamUrl, $dsid, $dsLabel, $dformat);
$form_state['redirect'] = 'fedora/repository/' . $pid;
}
function fedora_repository_edit_qdc_page($pid = NULL, $dsId = NULL) {
@ -869,7 +866,7 @@ function repository_service($pid = NULL, $servicePid = NULL, $serviceMethod = NU
$item = new Fedora_Item($pid);
if ($item !== false) {
if ($item !== FALSE) {
echo $item->get_dissemination($servicePid, $serviceMethod);
}
@ -1180,7 +1177,6 @@ function fedora_repository_theme() {
'arguments' => array(
'element' => NULL
),
'fedora_repository_solution_packs_list' => array(
'arguments' => array(
'solution_packs' => NULL,
@ -1454,7 +1450,6 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
}
}
function fedora_repository_required_fedora_objects() {
// array( 'path-to-foxml-file', 'pid', 'dsid', 'path-to-datastream-file', int dsversion, boolean required)
$module_path = drupal_get_path('module', 'fedora_repository');
@ -1964,7 +1959,6 @@ function fedora_repository_display_schema($file) {
return;
}
function fedora_repository_batch_reingest_object($object, &$context) {
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
@ -2037,7 +2031,8 @@ function fedora_repository_get_islandora_datastream_version($item = NULL, $dsid
$return = NULL;
if (isset($item)) {
$doc = simplexml_load_string($item->get_datastream_dissemination($dsid));
} elseif (isset($datastream_file)) {
}
elseif (isset($datastream_file)) {
$doc = simplexml_load_file($datastream_file);
}

10
fedora_repository.solutionpacks.inc

@ -1,6 +1,5 @@
<?php
/**
* Invokes a hook to any dependent modules asking them if their installations require
* any fedora objects to be present. Modules implementing this hook should return an array
@ -87,7 +86,8 @@ function fedora_repository_solution_pack_form(&$form_state, $solution_pack_modul
if (!$item->exists()) {
$object_status = 'Missing';
$needs_install = TRUE;
} else {
}
else {
if (isset($object['dsid']) && isset($object['datastream_file']) && isset($object['dsversion'])) {
$datastreams = array(
array(
@ -96,7 +96,8 @@ function fedora_repository_solution_pack_form(&$form_state, $solution_pack_modul
'dsversion' => $object['dsversion'],
),
);
} elseif (!empty($object['datastreams'])) {
}
elseif (!empty($object['datastreams'])) {
$datastreams = $object['datastreams'];
}
if (!empty($datastreams) && is_array($datastreams)) {
@ -137,7 +138,8 @@ function fedora_repository_solution_pack_form(&$form_state, $solution_pack_modul
);
if (!$needs_install && !$needs_update) {
$form['install_status']['#value'] = theme_image('misc/watchdog-ok.png') . t('All required objects are installed and up-to-date.');
} else {
}
else {
$form['install_status']['#value'] = theme_image('misc/watchdog-warning.png') . t('Some objects must be re-ingested. See Objects list for details.');
}
$form['submit'] = array(

3
formClass.inc

@ -1,6 +1,6 @@
<?php
// $Id$
/*
* Created on Jan 22, 2008
@ -577,7 +577,6 @@ class formClass {
if (!empty($newElements)) {
$available_dsids = array_merge($available_dsids, $newElements);
}
}
}

50
form_elements/includes/autocomplete.inc

@ -1,6 +1,6 @@
<?php
// $Id$
function ife_autocomplete_person($string) {
$string = trim(strtolower($string));
@ -52,27 +52,32 @@ function ife_autocomplete_person($string) {
foreach ($nodeList as $node) {
$type = $node->getAttribute('type');
$title=null;
$name =null;
$given=null;
$family=null;
$date = null;
$title = NULL;
$name = NULL;
$given = NULL;
$family = NULL;
$date = NULL;
$nameParts = $node->getElementsByTagName('namePart');
foreach ($nameParts as $part) {
switch ($part->getAttribute('type')) {
case 'given': $given = $part->nodeValue; break;
case 'family': $family = $part->nodeValue; break;
case 'termsOfAddress': $title= $part->nodeValue; break;
case 'date': $date = $part->nodeValue; break;
default: $name = $part->nodeValue; break;
case 'given': $given = $part->nodeValue;
break;
case 'family': $family = $part->nodeValue;
break;
case 'termsOfAddress': $title = $part->nodeValue;
break;
case 'date': $date = $part->nodeValue;
break;
default: $name = $part->nodeValue;
break;
}
}
if ($name == null && isset($given) && isset($family)) {
if ($name == NULL && isset($given) && isset($family)) {
$name = (isset($title) ? $title . ' ' : '') . $family . ', ' . $given;
}
$role =null;
$role = NULL;
$roleTerm = $node->getElementsByTagName('roleTerm');
if ($roleTerm->length > 0) {
$role = $roleTerm->item(0)->nodeValue;
@ -85,8 +90,8 @@ function ife_autocomplete_person($string) {
}
}
}
drupal_json($matches); exit();
drupal_json($matches);
exit();
}
function ife_autocomplete_marcrelator($collection, $string='') {
@ -119,8 +124,6 @@ function ife_autocomplete_marcrelator($collection, $string='') {
}
echo drupal_json($terms);
}
}
function ife_autocomplete_gacs($collection, $string='') {
@ -149,8 +152,6 @@ function ife_autocomplete_gacs($collection, $string='') {
}
echo drupal_json($gacs);
}
}
function ife_autocomplete_language($collection, $string='') {
@ -179,14 +180,13 @@ function ife_autocomplete_language($collection, $string='') {
}
echo drupal_json($languages);
}
}
function ife_autocomplete($field, $collection, $string='') {
if ($string == '') {
$string=$collection; $collection=FALSE;
$string = $collection;
$collection = FALSE;
}
module_load_include('php', 'islandora_solr_search', 'Solr/Service');
@ -207,8 +207,7 @@ function ife_autocomplete($field, $collection, $string='') {
try {
$results = $solr->search($query, 0, 10, $additionalParams);
}
catch (Exception $e) {
} catch (Exception $e) {
drupal_set_message(t('error searching ') . $e->getMessage());
}
@ -224,7 +223,8 @@ function ife_autocomplete($field, $collection, $string='') {
$values[$val] = $val;
}
}
} else {
}
else {
$values[$resfield['value']] = $resfield['value'];
}
}

5
form_elements/includes/creative_commons.inc

@ -1,6 +1,6 @@
<?php
class CreativeCommons
{
class CreativeCommons {
public static $cc_jurisdiction_vals = array(
'' => 'International',
@ -57,7 +57,6 @@
'scotland' => 'UK:Scotland',
'us' => 'UnitedStates',
'vn' => 'Vietnam');
public static $cc_versions = array(
'' => '3.0',
'ar' => '2.5',

14
form_elements/includes/filechooser.inc

@ -1,6 +1,6 @@
<?php
// $Id$
function theme_filechooser($element) {
global $base_url;
@ -31,8 +31,6 @@ function theme_filechooser($element) {
return theme('form_element', $element, $output);
}
function ife_filechooser_get_thumbnail($cp_pid, $cm_pid, $file) {
module_load_include('inc', 'fedora_repository', 'CollectionPolicy');
module_load_include('inc', 'fedora_repository', 'ContentModel');
@ -67,12 +65,10 @@ function ife_filechooser_get_thumbnail($cp_pid, $cm_pid, $file) {
exit();
}
}
}
}
function ife_filechooser_cmp($a,$b)
{
function ife_filechooser_cmp($a, $b) {
return strcmp($a['name'], $b['name']);
}
@ -85,7 +81,8 @@ function ife_filechooser_generate_thumbnails($cp_pid, $cm_pid) {
$cp = CollectionPolicy::loadFromCollection($cp_pid);
if ($cm === FALSE || $cp === FALSE) {
echo '[]'; exit();
echo '[]';
exit();
}
$mimeClass = new MimeClass();
@ -134,5 +131,4 @@ function ife_filechooser_generate_thumbnails($cp_pid, $cm_pid) {
}
usort($files, 'ife_filechooser_cmp');
echo json_encode($files);
}

15
form_elements/includes/people.inc

@ -1,6 +1,5 @@
<?php
// $Id$
// this is a bit of a hack. It iterates through the
// form and assigns a dummy value to any field in the $post
@ -36,7 +35,6 @@ function _ife_find_people_element($form, &$keys = array()) {
}
return FALSE;
}
function ife_people_ahah() {
@ -110,7 +108,6 @@ function ife_remove_person_submit($form, &$form_state) {
$form_state['rebuild'] = TRUE;
}
/**
* Submit handler for the "Add Person" button.
*/
@ -134,8 +131,8 @@ function ife_add_person_submit($form, &$form_state) {
}
//only add new person if we are not adding from repository.
$elName = isset($qt_form['entity0']['#parents'][0])?$qt_form['entity0']['#parents'][0]:null;
if ($elName == null || !isset($form_state['clicked_button']['#post'][$elName]['add_from_repository']) || trim($form_state['clicked_button']['#post'][$elName]['add_from_repository']) == '') {
$elName = isset($qt_form['entity0']['#parents'][0]) ? $qt_form['entity0']['#parents'][0] : NULL;
if ($elName == NULL || !isset($form_state['clicked_button']['#post'][$elName]['add_from_repository']) || trim($form_state['clicked_button']['#post'][$elName]['add_from_repository']) == '') {
$people[] = array('name' => '', 'date' => '', 'role' => '', 'subject' => '');
}
unset($form_state['submit_handlers']);
@ -144,8 +141,6 @@ function ife_add_person_submit($form, &$form_state) {
$form_state['rebuild'] = TRUE;
}
/**
* Submit handler for the "Add Person" button.
*/
@ -176,8 +171,6 @@ function ife_add_org_submit($form, &$form_state) {
//$form_state['rebuild'] = TRUE;
}
/**
* Submit handler for the "Add Person" button.
*/
@ -207,8 +200,6 @@ function ife_add_conf_submit($form, &$form_state) {
//$form_state['rebuild'] = TRUE;
}
function theme_people($element) {
drupal_add_js(drupal_get_path('module', 'islandora_form_elements') . '/js/people_ahah.js');
if (!empty($element['#collapsible'])) {
@ -226,7 +217,6 @@ function theme_people($element) {
return '<fieldset' . drupal_attributes($element['#attributes']) . '>' . ($element['#title'] ? '<legend>' . $element['#title'] . '</legend>' : '') . (isset($element['#description']) && $element['#description'] ? '<div class="description">' . $element['#description'] . '</div>' : '') . (!empty($element['#children']) ? $element['#children'] : '') . "</fieldset>\n";
}
function theme_people_items($form) {
$rows = array();
$headers = array(
@ -285,4 +275,3 @@ function theme_people_items($form) {
return $output;
}

192
form_elements/islandora_form_elements.module

@ -1,6 +1,5 @@
<?php
/**
* Implementation of hook_elements():
* Register the duration widget with the Forms API and set default values.
@ -91,33 +90,27 @@ function islandora_form_elements_elements() {
return $type;
}
function ife_fieldset_process($element,$edit,&$form_state)
{
function ife_fieldset_process($element, $edit, &$form_state) {
// echo 'fieldset process '. $element['#collapsible'].'<br/>';
if (isset($element['#collapsed']) && ife_fieldset_children_has_value($element))
{
if (isset($element['#collapsed']) && ife_fieldset_children_has_value($element)) {
unset($element['#collapsed']);
}
return $element;
}
function ife_fieldset_children_has_value($el)
{
function ife_fieldset_children_has_value($el) {
$ret = false;
if ((isset($el['#default_value']) && !is_array($el['#default_value']) && trim($el['#default_value']) != '') ||
(isset($el['#value']) && trim($el['#value']) != ''))
{
(isset($el['#value']) && trim($el['#value']) != '')) {
$ret = true;
} else
{
foreach (element_children($el) as $key)
{
}
else {
foreach (element_children($el) as $key) {
if (!$ret)
{
if (!$ret) {
$ret = (isset($_POST[$key]) && (is_array($_POST[$key]) || trim($_POST[$key]) != '')) || ife_fieldset_children_has_value($el[$key]);
}
}
@ -126,9 +119,7 @@ function ife_fieldset_children_has_value($el)
return $ret;
}
function ife_people_process($element,$edit,&$form_state)
{
function ife_people_process($element, $edit, &$form_state) {
$element['#tree'] = TRUE;
$element['#prefix'] = '<div class="clear-block" id="ife-people-wrapper">';
@ -158,8 +149,7 @@ function ife_people_process($element,$edit,&$form_state)
$person = array();
switch ($json->type)
{
switch ($json->type) {
case 'personal':
$person['name'] = $json->name;
$person['role'] = $json->role;
@ -182,31 +172,28 @@ function ife_people_process($element,$edit,&$form_state)
$people[] = $person;
$form_state['storage']['people'] = $people;
} else if (!isset($form_state['storage']['people']) || empty($form_state['storage']['people']))
{
}
elseif (!isset($form_state['storage']['people']) || empty($form_state['storage']['people'])) {
if ((!isset($form_state['clicked_button']) || count($form_state['clicked_button']) == 0) && isset($element['#default_value']) && is_array($element['#default_value'])) {
$form_state['storage']['people'] = $element['#default_value'];
if (count($element['#default_value']) > 0) {
$element['#collapsed'] = FALSE;
}
} else {
}
else {
$form_state['storage']['people'] = array(array('name' => '', 'role' => '', 'date' => '', 'subject' => ''));
}
}
$i = 0;
foreach ($form_state['storage']['people'] as $person)
{
foreach ($form_state['storage']['people'] as $person) {
$person['delta'] = $i;
$type = 'person';
if (isset($person['organization']))
{
if (isset($person['organization'])) {
$type = 'organization';
} else if (isset($person['conference']))
{
}
elseif (isset($person['conference'])) {
$type = 'conference';
}
@ -274,12 +261,10 @@ $element['add_organization'] = array(
return $element;
}
function ife_person_process($element)
{
function ife_person_process($element) {
$element['#tree'] = TRUE;
if (!isset($element['#value']))
{
if (!isset($element['#value'])) {
$element['#value'] = array('name' => '');
}
@ -335,13 +320,10 @@ function ife_person_process($element)
return $element;
}
function ife_org_process($element)
{
function ife_org_process($element) {
$element['#tree'] = TRUE;
if (!isset($element['#value']))
{
if (!isset($element['#value'])) {
$element['#value'] = array('name' => '');
}
@ -388,13 +370,10 @@ function ife_org_process($element)
return $element;
}
function ife_conf_process($element)
{
function ife_conf_process($element) {
$element['#tree'] = TRUE;
if (!isset($element['#value']))
{
if (!isset($element['#value'])) {
$element['#value'] = array('name' => '');
}
@ -450,20 +429,17 @@ function ife_conf_process($element)
/**
* Our process callback to expand the control.
*/
function ife_sticky_textfield_process($element,$edit,&$form_state)
{
function ife_sticky_textfield_process($element, $edit, &$form_state) {
if (isset($element['#sticky']) && $element['#sticky'] == TRUE)
{
if (isset($element['#sticky']) && $element['#sticky'] == TRUE) {
$element['#type'] = 'sticky_textfield';
$stickyName = preg_replace('/\]/', '', array_pop(preg_split('/\[/', $element['#name']))) . '-sticky';
if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on')
{
if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on') {
$form_state['storage'][$element['#name']] = $element['#value'];
} elseif (isset($form_state['storage'][$element['#name']]))
{
}
elseif (isset($form_state['storage'][$element['#name']])) {
$element['#value'] = $form_state['storage'][$element['#name']];
$element['#sticky_on'] = TRUE;
}
@ -475,19 +451,16 @@ function ife_sticky_textfield_process($element,$edit,&$form_state)
/**
* Our process callback to expand the control.
*/
function ife_datepicker_process($element,$edit,&$form_state)
{
function ife_datepicker_process($element, $edit, &$form_state) {
if (isset($element['#sticky']) && $element['#sticky'] == TRUE)
{
if (isset($element['#sticky']) && $element['#sticky'] == TRUE) {
$stickyName = preg_replace('/\]/', '', array_pop(preg_split('/\[/', $element['#name']))) . '-sticky';
if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on')
{
if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on') {
$form_state['storage'][$element['#name']] = $element['#value'];
} elseif (isset($form_state['storage'][$element['#name']]))
{
}
elseif (isset($form_state['storage'][$element['#name']])) {
$element['#value'] = $form_state['storage'][$element['#name']];
$element['#sticky_on'] = TRUE;
}
@ -496,25 +469,20 @@ function ife_datepicker_process($element,$edit,&$form_state)
return $element;
}
/**
* Our process callback to expand the control.
*/
function ife_sticky_textarea_process($element,$edit,&$form_state)
{
function ife_sticky_textarea_process($element, $edit, &$form_state) {
if (isset($element['#sticky']) && $element['#sticky'] == TRUE)
{
if (isset($element['#sticky']) && $element['#sticky'] == TRUE) {
$element['#type'] = 'sticky_textarea';
$stickyName = preg_replace('/\]/', '', array_pop(preg_split('/\[/', $element['#name']))) . '-sticky';
if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on')
{
if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on') {
$form_state['storage'][$element['#name']] = $element['#value'];
} elseif (isset($form_state['storage'][$element['#name']]))
{
}
elseif (isset($form_state['storage'][$element['#name']])) {
$element['#value'] = $form_state['storage'][$element['#name']];
$element['#sticky_on'] = TRUE;
}
@ -523,24 +491,20 @@ function ife_sticky_textarea_process($element,$edit,&$form_state)
return $element;
}
/**
* Our process callback to expand the control.
*/
function ife_sticky_select_process($element,$edit,&$form_state)
{
function ife_sticky_select_process($element, $edit, &$form_state) {
if (isset($element['#sticky']) && $element['#sticky'] == TRUE)
{
if (isset($element['#sticky']) && $element['#sticky'] == TRUE) {
$element['#type'] = 'sticky_select';
$stickyName = preg_replace('/\]/', '', array_pop(preg_split('/\[/', $element['#name']))) . '-sticky';
if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on')
{
if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on') {
$form_state['storage'][$element['#name']] = $element['#value'];
} elseif (isset($form_state['storage'][$element['#name']]))
{
}
elseif (isset($form_state['storage'][$element['#name']])) {
$element['#value'] = $form_state['storage'][$element['#name']];
$element['#sticky_on'] = TRUE;
}
@ -556,15 +520,13 @@ function ife_copyright_process($element,$edit,&$form_state) {
module_load_include('inc', 'islandora_form_elements', 'includes/creative_commons');
if (isset($element['#sticky']) && $element['#sticky'] == TRUE)
{
if (isset($element['#sticky']) && $element['#sticky'] == TRUE) {
$stickyName = preg_replace('/\]/', '', array_pop(preg_split('/\[/', $element['#name']))) . '-sticky';
if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on')
{
if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on') {
$form_state['storage'][$element['#name']] = $element['#value'];
} elseif (isset($form_state['storage'][$element['#name']]))
{
}
elseif (isset($form_state['storage'][$element['#name']])) {
$element['#value'] = $form_state['storage'][$element['#name']];
$element['#sticky_on'] = TRUE;
}
@ -624,15 +586,12 @@ function ife_copyright_process($element,$edit,&$form_state) {
$element['#title'] = '';
return $element;
}
/**
* Our process callback to expand the control.
*/
function ife_list_process($element,$edit,&$form_state)
{
function ife_list_process($element, $edit, &$form_state) {
if (is_array($element['#default_value'])) {
$element['#default_value'] = join('; ', $element['#default_value']);
}
@ -641,15 +600,13 @@ function ife_list_process($element,$edit,&$form_state)
$element['#value'] = join('; ', $element['#value']);
}
if (isset($element['#sticky']) && $element['#sticky'] == TRUE)
{
if (isset($element['#sticky']) && $element['#sticky'] == TRUE) {
$stickyName = preg_replace('/\]/', '', array_pop(preg_split('/\[/', $element['#name']))) . '-sticky';
if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on')
{
if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on') {
$form_state['storage'][$element['#name']] = $element['#value'];
} elseif (isset($form_state['storage'][$element['#name']]))
{
}
elseif (isset($form_state['storage'][$element['#name']])) {
$element['#value'] = $form_state['storage'][$element['#name']];
$element['#sticky_on'] = TRUE;
}
@ -668,15 +625,12 @@ function islandora_form_elements_theme() {
'sticky_textfield' => array(
'arguments' => array('element'),
),
'sticky_textarea' => array(
'arguments' => array('element'),
),
'sticky_select' => array(
'arguments' => array('element'),
),
'filechooser' => array(
'arguments' => array('element'),
'file' => 'includes/filechooser.inc'
@ -687,7 +641,6 @@ function islandora_form_elements_theme() {
'other_select' => array(
'arguments' => array('element'),
),
'people' => array(
'arguments' => array('element'),
'file' => 'includes/people.inc',
@ -705,18 +658,14 @@ function islandora_form_elements_theme() {
);
}
function ife_other_select_process($element,$edit,&$form_state)
{
if (isset($element['#value']) && trim($element['#value']) != '' && !isset($element['#options'][$element['#value']]))
{
function ife_other_select_process($element, $edit, &$form_state) {
if (isset($element['#value']) && trim($element['#value']) != '' && !isset($element['#options'][$element['#value']])) {
$element['#options'][$element['#value']] = $element['#value'];
}
return $element;
}
function theme_copyright($element)
{
function theme_copyright($element) {
$path = drupal_get_path('module', 'islandora_form_elements');
drupal_add_js($path . '/js/copyright.js');
drupal_add_css($path . '/css/copyright.css');
@ -724,8 +673,7 @@ function theme_copyright($element)
return theme('form_element', $element, $element['#children']);
}
function theme_other_select($element)
{
function theme_other_select($element) {
$path = drupal_get_path('module', 'islandora_form_elements');
drupal_add_js($path . '/js/otherselect.js');
$select = '';
@ -734,8 +682,7 @@ function theme_other_select($element)
return theme('form_element', $element, '<select name="' . $element['#name'] . '" ' . drupal_attributes($element['#attributes']) . ' id="' . $element['#id'] . '" ' . $size . '>' . form_select_options($element) . '</select>');
}
function theme_list($element)
{
function theme_list($element) {
$path = drupal_get_path('module', 'islandora_form_elements');
drupal_add_js($path . '/js/jquery.tag.editor-min.js');
drupal_add_js('$(document).ready(function () { $(\'#' . $element['#id'] . '\').tagEditor({ separator: \';\', confirmRemoval: false, completeOnBlur: true }); }); ', 'inline');
@ -774,11 +721,8 @@ function theme_list($element)
return theme('form_element', $element, $output . $sticky) . $extra;
}
/**
* Format a sticky textarea.
*
@ -819,8 +763,6 @@ function theme_sticky_textarea($element) {
return theme('form_element', $element, '<textarea cols="' . $element['#cols'] . '" rows="' . $element['#rows'] . '" name="' . $element['#name'] . '" id="' . $element['#id'] . '" ' . drupal_attributes($element['#attributes']) . '>' . check_plain($element['#value']) . '</textarea>' . $sticky);
}
/**
* Format a sticky select.
*
@ -846,7 +788,6 @@ function theme_sticky_select($element) {
return theme('form_element', $element, '<select name="' . $element['#name'] . '' . ($multiple ? '[]' : '') . '"' . ($multiple ? ' multiple="multiple" ' : '') . drupal_attributes($element['#attributes']) . ' id="' . $element['#id'] . '" ' . $size . '>' . form_select_options($element) . '</select>' . $sticky);
}
/**
* Theme function to format the output.
*
@ -894,11 +835,8 @@ function theme_datepicker($element) {
return theme('form_element', $element, $output . $sticky) . $extra;
}
/**
* Theme function to format the output.
*
@ -908,7 +846,6 @@ function theme_datepicker($element) {
function theme_sticky_textfield($element) {
//echo '<pre>'; var_dump($element); echo '</pre>';
//return theme('theme_form_element', $element, '<div class="container-inline mark">' . $element['#children'] . '</div>');
$size = empty($element['#size']) ? '' : ' size="' . $element['#size'] . '"';
$maxlength = empty($element['#maxlength']) ? '' : ' maxlength="' . $element['#maxlength'] . '"';
@ -941,28 +878,23 @@ function theme_sticky_textfield($element) {
return theme('form_element', $element, $output . $sticky) . $extra;
}
function ife_filechooser_validate($element,&$form_state)
{
function ife_filechooser_validate($element, &$form_state) {
module_load_include('inc', 'fedora_repository', 'CollectionPolicy');
$cp = CollectionPolicy::loadFromCollection($form_state['storage']['collection_pid']);
if ($cp !== false)
{
if ($cp !== false) {
$form_state['values'][$element['#name']] = $cp->getStagingArea() . '/' . $element['#value'];
}
}
function ife_filechooser_process($element, $edit, &$form_state)
{
function ife_filechooser_process($element, $edit, &$form_state) {
$element['#model_pid'] = $form_state['values']['models'];
return $element;
}
function islandora_form_elements_menu()
{
function islandora_form_elements_menu() {
module_load_include('inc', 'fedora_repository', 'ObjectHelper');

56
form_elements/js/copyright.js

@ -1,6 +1,60 @@
$(document).ready(function () {
var cc_versions = new Array(); cc_versions[""]="3.0"; cc_versions["ar"]="2.5"; cc_versions["au"]="3.0"; cc_versions["at"]="3.0"; cc_versions["be"]="2.0"; cc_versions["br"]="3.0"; cc_versions["bg"]="2.5"; cc_versions["ca"]="2.5"; cc_versions["cl"]="2.0"; cc_versions["cn"]="2.5"; cc_versions["co"]="2.5"; cc_versions["hr"]="3.0"; cc_versions["cz"]="3.0"; cc_versions["dk"]="2.5"; cc_versions["ec"]="3.0"; cc_versions["fi"]="1.0"; cc_versions["fr"]="2.0"; cc_versions["de"]="3.0"; cc_versions["gr"]="3.0"; cc_versions["gt"]="3.0"; cc_versions["hk"]="3.0"; cc_versions["hu"]="2.5"; cc_versions["in"]="2.5"; cc_versions["il"]="2.5"; cc_versions["it"]="2.5"; cc_versions["jp"]="2.0"; cc_versions["kr"]="2.0"; cc_versions["lu"]="3.0"; cc_versions["mk"]="2.5"; cc_versions["my"]="2.5"; cc_versions["mt"]="2.5"; cc_versions["mx"]="2.5"; cc_versions["nl"]="3.0"; cc_versions["nz"]="3.0"; cc_versions["no"]="3.0"; cc_versions["pe"]="2.5"; cc_versions["ph"]="3.0"; cc_versions["pl"]="3.0"; cc_versions["pt"]="2.5"; cc_versions["pr"]="3.0"; cc_versions["ro"]="3.0"; cc_versions["rs"]="3.0"; cc_versions["sg"]="3.0"; cc_versions["si"]="2.5"; cc_versions["za"]="2.5"; cc_versions["es"]="3.0"; cc_versions["se"]="2.5"; cc_versions["ch"]="2.5"; cc_versions["tw"]="3.0"; cc_versions["th"]="3.0"; cc_versions["uk"]="2.0"; cc_versions["scotland"]="2.5"; cc_versions["us"]="3.0"; cc_versions["vn"]="3.0";
var cc_versions = new Array();
cc_versions[""]="3.0";
cc_versions["ar"]="2.5";
cc_versions["au"]="3.0";
cc_versions["at"]="3.0";
cc_versions["be"]="2.0";
cc_versions["br"]="3.0";
cc_versions["bg"]="2.5";
cc_versions["ca"]="2.5";
cc_versions["cl"]="2.0";
cc_versions["cn"]="2.5";
cc_versions["co"]="2.5";
cc_versions["hr"]="3.0";
cc_versions["cz"]="3.0";
cc_versions["dk"]="2.5";
cc_versions["ec"]="3.0";
cc_versions["fi"]="1.0";
cc_versions["fr"]="2.0";
cc_versions["de"]="3.0";
cc_versions["gr"]="3.0";
cc_versions["gt"]="3.0";
cc_versions["hk"]="3.0";
cc_versions["hu"]="2.5";
cc_versions["in"]="2.5";
cc_versions["il"]="2.5";
cc_versions["it"]="2.5";
cc_versions["jp"]="2.0";
cc_versions["kr"]="2.0";
cc_versions["lu"]="3.0";
cc_versions["mk"]="2.5";
cc_versions["my"]="2.5";
cc_versions["mt"]="2.5";
cc_versions["mx"]="2.5";
cc_versions["nl"]="3.0";
cc_versions["nz"]="3.0";
cc_versions["no"]="3.0";
cc_versions["pe"]="2.5";
cc_versions["ph"]="3.0";
cc_versions["pl"]="3.0";
cc_versions["pt"]="2.5";
cc_versions["pr"]="3.0";
cc_versions["ro"]="3.0";
cc_versions["rs"]="3.0";
cc_versions["sg"]="3.0";
cc_versions["si"]="2.5";
cc_versions["za"]="2.5";
cc_versions["es"]="3.0";
cc_versions["se"]="2.5";
cc_versions["ch"]="2.5";
cc_versions["tw"]="3.0";
cc_versions["th"]="3.0";
cc_versions["uk"]="2.0";
cc_versions["scotland"]="2.5";
cc_versions["us"]="3.0";
cc_versions["vn"]="3.0";
function updateCCPreview()
{

31
form_elements/js/jcarousellite_1.0.1.js

@ -236,15 +236,32 @@ $.fn.jCarouselLite = function(o) {
var li = $("li", ul), itemLength = li.size(), curr = o.start;
div.css("visibility", "visible");
li.css({overflow: "hidden", float: o.vertical ? "none" : "left"});
ul.css({margin: "0", padding: "0", position: "relative", "list-style-type": "none", "z-index": "1"});
div.css({overflow: "hidden", position: "relative", "z-index": "2", left: "0px"});
li.css({
overflow: "hidden",
float: o.vertical ? "none" : "left"
});
ul.css({
margin: "0",
padding: "0",
position: "relative",
"list-style-type": "none",
"z-index": "1"
});
div.css({
overflow: "hidden",
position: "relative",
"z-index": "2",
left: "0px"
});
var liSize = o.vertical ? height(li) : width(li); // Full li size(incl margin)-Used for animation
var ulSize = liSize * itemLength; // size of full ul(total length, not just for the visible items)
var divSize = liSize * v; // size of entire div(total length for just the visible items)
li.css({width: li.width(), height: li.height()});
li.css({
width: li.width(),
height: li.height()
});
ul.css(sizeCss, ulSize+"px").css(animCss, -(curr*liSize));
div.css(sizeCss, divSize+"px"); // Width of the DIV. length of visible images
@ -306,7 +323,11 @@ $.fn.jCarouselLite = function(o) {
running = true;
ul.animate(
animCss == "left" ? { left: -(curr*liSize) } : { top: -(curr*liSize) } , o.speed, o.easing,
animCss == "left" ? {
left: -(curr*liSize)
} : {
top: -(curr*liSize)
} , o.speed, o.easing,
function() {
if(o.afterEnd)
o.afterEnd.call(this, vis());

39
form_elements/js/jquery.easing.1.1.js

@ -65,23 +65,44 @@ jQuery.easing = {
return jQuery.easing['bounceout'] (x, t*2-d,0, c, d) * .5 + c*.5 + b;
},
elasin: function(x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
var s=1.70158;
var p=0;
var a=c;
if (t==0) return b;
if ((t/=d)==1) return b+c;
if (!p) p=d*.3;
if (a < Math.abs(c)) {
a=c;
var s=p/4;
}
else var s = p/(2*Math.PI) * Math.asin (c/a);
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
},
elasout: function(x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
var s=1.70158;
var p=0;
var a=c;
if (t==0) return b;
if ((t/=d)==1) return b+c;
if (!p) p=d*.3;
if (a < Math.abs(c)) {
a=c;
var s=p/4;
}
else var s = p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
},
elasinout: function(x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
if (a < Math.abs(c)) { a=c; var s=p/4; }
var s=1.70158;
var p=0;
var a=c;
if (t==0) return b;
if ((t/=d/2)==2) return b+c;
if (!p) p=d*(.3*1.5);
if (a < Math.abs(c)) {
a=c;
var s=p/4;
}
else var s = p/(2*Math.PI) * Math.asin (c/a);
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;

17
form_elements/js/jquery.loadImages.1.0.1.min.js vendored

@ -1 +1,16 @@
(function(c){var h=[];c.loadImages=function(a,d){a instanceof Array||(a=[a]);for(var e=a.length,f=0,g=e;g--;){var b=document.createElement("img");b.onload=function(){f++;f>=e&&c.isFunction(d)&&d()};b.src=a[g];h.push(b)}}})(jQuery);
(function(c){
var h=[];
c.loadImages=function(a,d){
a instanceof Array||(a=[a]);
for(var e=a.length,f=0,g=e;g--;){
var b=document.createElement("img");
b.onload=function(){
f++;
f>=e&&c.isFunction(d)&&d()
};
b.src=a[g];
h.push(b)
}
}
})(jQuery);

46
form_elements/js/jquery.mousewheel.min.js vendored

@ -8,4 +8,48 @@
*
* Requires: 1.2.2+
*/
(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(f){var d=[].slice.call(arguments,1),g=0,e=true;f=c.event.fix(f||window.event);f.type="mousewheel";if(f.wheelDelta){g=f.wheelDelta/120}if(f.detail){g=-f.detail/3}d.unshift(f,g);return c.event.handle.apply(this,d)}})(jQuery);
(function(c){
var a=["DOMMouseScroll","mousewheel"];
c.event.special.mousewheel={
setup:function(){
if(this.addEventListener){
for(var d=a.length;d;){
this.addEventListener(a[--d],b,false)
}
}else{
this.onmousewheel=b
}
},
teardown:function(){
if(this.removeEventListener){
for(var d=a.length;d;){
this.removeEventListener(a[--d],b,false)
}
}else{
this.onmousewheel=null
}
}
};
c.fn.extend({
mousewheel:function(d){
return d?this.bind("mousewheel",d):this.trigger("mousewheel")
},
unmousewheel:function(d){
return this.unbind("mousewheel",d)
}
});
function b(f){
var d=[].slice.call(arguments,1),g=0,e=true;
f=c.event.fix(f||window.event);
f.type="mousewheel";
if(f.wheelDelta){
g=f.wheelDelta/120
}
if(f.detail){
g=-f.detail/3
}
d.unshift(f,g);
return c.event.handle.apply(this,d)
}
})(jQuery);

146
form_elements/js/jquery.tag.editor-min.js vendored

@ -5,4 +5,148 @@
@license: Creative Commons License - ShareAlike http://creativecommons.org/licenses/by-sa/3.0/
@version: 1.4.1
*/
(function(jQuery) { jQuery.fn.tagEditor = function(options) { var defaults = { separator: ",", items: [], className: "tagEditor", confirmRemoval: false, confirmRemovalText: "Do you really want to remove the tag?", completeOnSeparator: false, completeOnBlur: false, tagsBeforeField: false, initialParse: true, imageTag: false, imageTagUrl: "", continuousOutputBuild: false }; options = jQuery.extend(defaults, options); var listBase, textBase = this, hiddenText; var itemBase = []; return this.each(function() { function addTag(tag) { tag = jQuery.trim(tag); for (var i = 0; i < itemBase.length; i++) { if (itemBase[i].toLowerCase() == tag.toLowerCase()) { return false; } } var item = jQuery(document.createElement("li")); item.text(tag); item.attr("title", "Remove tag"); if (options.imageTag) { item.append('<img src="' + options.imageTagUrl + '">'); } item.click(function() { if (options.confirmRemoval) { if (!confirm(options.confirmRemovalText)) { return; } } item.remove(); parse(); }); listBase.append(item); return true; } function resetTags() { itemBase = []; listBase.html(""); textBase.val(""); hiddenText.val(""); for (var i = 0; i < options.items.length; i++) { addTag(jQuery.trim(options.items[i])); } parse(); } function buildArray() { itemBase = []; var items = jQuery("li", listBase); for (var i = 0; i < items.length; i++) { itemBase.push(jQuery.trim(jQuery(items[i]).text())); } if (options.continuousOutputBuild) { hiddenText.val(itemBase.join(options.separator)); } } function parse() { var items = textBase.val().split(options.separator); for (var i = 0; i < items.length; i++) { var trimmedItem = jQuery.trim(items[i]); if (trimmedItem.length > 0) { addTag(trimmedItem); } } textBase.val(""); buildArray(); } function handleKeys(ev) { var keyCode = (ev.which) ? ev.which : ev.keyCode; if (options.completeOnSeparator) { if (String.fromCharCode(keyCode) == options.separator) { parse(); return false; } } switch (keyCode) { case 13: if (jQuery.trim(textBase.val()) != "") { parse(); return false; } return true; default: return true; } } jQuery.fn.extend({ tagEditorGetTags: function() { return itemBase.join(options.separator); }, tagEditorResetTags: function() { resetTags(); }, tagEditorAddTag: function(tag) { return addTag(tag); } }); hiddenText = jQuery(document.createElement("input")); hiddenText.attr("type", "hidden"); if (options.continuousOutputBuild) { hiddenText.attr("name", textBase.attr("name")); textBase.attr("name", textBase.attr("name") + "_old"); } textBase.after(hiddenText); listBase = jQuery(document.createElement("ul")); listBase.attr("class", options.className); if (options.tagsBeforeField) { jQuery(this).before(listBase); } else { jQuery(this).after(listBase); } for (var i = 0; i < options.items.length; i++) { addTag(jQuery.trim(options.items[i])); } if (options.initialParse) { parse(); } if (options.completeOnBlur) { jQuery(this).blur(parse); } buildArray(); jQuery(this).keypress(handleKeys); var form = jQuery(this).parents("form"); if (!options.continuousOutputBuild) { form.submit(function() { parse(); hiddenText.val(itemBase.join(options.separator)); hiddenText.attr("id", textBase.attr("id")); hiddenText.attr("name", textBase.attr("name")); textBase.attr("id", textBase.attr("id") + "_old"); textBase.attr("name", textBase.attr("name") + "_old"); }); } }); }; })(jQuery);
(function(jQuery) {
jQuery.fn.tagEditor = function(options) {
var defaults = {
separator: ",",
items: [],
className: "tagEditor",
confirmRemoval: false,
confirmRemovalText: "Do you really want to remove the tag?",
completeOnSeparator: false,
completeOnBlur: false,
tagsBeforeField: false,
initialParse: true,
imageTag: false,
imageTagUrl: "",
continuousOutputBuild: false
};
options = jQuery.extend(defaults, options);
var listBase, textBase = this, hiddenText;
var itemBase = [];
return this.each(function() {
function addTag(tag) {
tag = jQuery.trim(tag);
for (var i = 0; i < itemBase.length; i++) {
if (itemBase[i].toLowerCase() == tag.toLowerCase()) {
return false;
}
}
var item = jQuery(document.createElement("li"));
item.text(tag);
item.attr("title", "Remove tag");
if (options.imageTag) {
item.append('<img src="' + options.imageTagUrl + '">');
}
item.click(function() {
if (options.confirmRemoval) {
if (!confirm(options.confirmRemovalText)) {
return;
}
}
item.remove();
parse();
});
listBase.append(item);
return true;
}
function resetTags() {
itemBase = [];
listBase.html("");
textBase.val("");
hiddenText.val("");
for (var i = 0; i < options.items.length; i++) {
addTag(jQuery.trim(options.items[i]));
}
parse();
}
function buildArray() {
itemBase = [];
var items = jQuery("li", listBase);
for (var i = 0; i < items.length; i++) {
itemBase.push(jQuery.trim(jQuery(items[i]).text()));
}
if (options.continuousOutputBuild) {
hiddenText.val(itemBase.join(options.separator));
}
}
function parse() {
var items = textBase.val().split(options.separator);
for (var i = 0; i < items.length; i++) {
var trimmedItem = jQuery.trim(items[i]);
if (trimmedItem.length > 0) {
addTag(trimmedItem);
}
}
textBase.val("");
buildArray();
}
function handleKeys(ev) {
var keyCode = (ev.which) ? ev.which : ev.keyCode;
if (options.completeOnSeparator) {
if (String.fromCharCode(keyCode) == options.separator) {
parse();
return false;
}
}
switch (keyCode) {
case 13:
if (jQuery.trim(textBase.val()) != "") {
parse();
return false;
}
return true;
default:
return true;
}
}
jQuery.fn.extend({
tagEditorGetTags: function() {
return itemBase.join(options.separator);
},
tagEditorResetTags: function() {
resetTags();
},
tagEditorAddTag: function(tag) {
return addTag(tag);
}
});
hiddenText = jQuery(document.createElement("input"));
hiddenText.attr("type", "hidden");
if (options.continuousOutputBuild) {
hiddenText.attr("name", textBase.attr("name"));
textBase.attr("name", textBase.attr("name") + "_old");
}
textBase.after(hiddenText);
listBase = jQuery(document.createElement("ul"));
listBase.attr("class", options.className);
if (options.tagsBeforeField) {
jQuery(this).before(listBase);
} else {
jQuery(this).after(listBase);
}
for (var i = 0; i < options.items.length; i++) {
addTag(jQuery.trim(options.items[i]));
}
if (options.initialParse) {
parse();
}
if (options.completeOnBlur) {
jQuery(this).blur(parse);
}
buildArray();
jQuery(this).keypress(handleKeys);
var form = jQuery(this).parents("form");
if (!options.continuousOutputBuild) {
form.submit(function() {
parse();
hiddenText.val(itemBase.join(options.separator));
hiddenText.attr("id", textBase.attr("id"));
hiddenText.attr("name", textBase.attr("name"));
textBase.attr("id", textBase.attr("id") + "_old");
textBase.attr("name", textBase.attr("name") + "_old");
});
}
});
};
})(jQuery);

181
form_elements/js/jquery.ui.datepicker.js vendored

@ -12,7 +12,11 @@
*/
(function( $, undefined ) {
$.extend($.ui, { datepicker: { version: "1.8.4" } });
$.extend($.ui, {
datepicker: {
version: "1.8.4"
}
});
var PROP_NAME = 'datepicker';
var dpuuid = new Date().getTime();
@ -168,12 +172,18 @@ $.extend(Datepicker.prototype, {
/* Create a new instance object. */
_newInst: function(target, inline) {
var id = target[0].id.replace(/([^A-Za-z0-9_])/g, '\\\\$1'); // escape jQuery meta chars
return {id: id, input: target, // associated target
selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
drawMonth: 0, drawYear: 0, // month being drawn
return {
id: id,
input: target, // associated target
selectedDay: 0,
selectedMonth: 0,
selectedYear: 0, // current selection
drawMonth: 0,
drawYear: 0, // month being drawn
inline: inline, // is datepicker inline or not
dpDiv: (!inline ? this.dpDiv : // presentation div
$('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))};
$('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))
};
},
/* Attach the date picker to an input field. */
@ -216,10 +226,18 @@ $.extend(Datepicker.prototype, {
var buttonImage = this._get(inst, 'buttonImage');
inst.trigger = $(this._get(inst, 'buttonImageOnly') ?
$('<img/>').addClass(this._triggerClass).
attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
attr({
src: buttonImage,
alt: buttonText,
title: buttonText
}) :
$('<button type="button"></button>').addClass(this._triggerClass).
html(buttonImage == '' ? buttonText : $('<img/>').attr(
{ src:buttonImage, alt:buttonText, title:buttonText })));
{
src:buttonImage,
alt:buttonText,
title:buttonText
})));
input[isRTL ? 'before' : 'after'](inst.trigger);
inst.trigger.click(function() {
if ($.datepicker._datepickerShowing && $.datepicker._lastInput == input[0])
@ -356,15 +374,22 @@ $.extend(Datepicker.prototype, {
if (nodeName == 'input') {
target.disabled = false;
inst.trigger.filter('button').
each(function() { this.disabled = false; }).end().
filter('img').css({opacity: '1.0', cursor: ''});
each(function() {
this.disabled = false;
}).end().
filter('img').css({
opacity: '1.0',
cursor: ''
});
}
else if (nodeName == 'div' || nodeName == 'span') {
var inline = $target.children('.' + this._inlineClass);
inline.children().removeClass('ui-state-disabled');
}
this._disabledInputs = $.map(this._disabledInputs,
function(value) { return (value == target ? null : value); }); // delete entry
function(value) {
return (value == target ? null : value);
}); // delete entry
},
/* Disable the date picker to a jQuery selection.
@ -379,15 +404,22 @@ $.extend(Datepicker.prototype, {
if (nodeName == 'input') {
target.disabled = true;
inst.trigger.filter('button').
each(function() { this.disabled = true; }).end().
filter('img').css({opacity: '0.5', cursor: 'default'});
each(function() {
this.disabled = true;
}).end().
filter('img').css({
opacity: '0.5',
cursor: 'default'
});
}
else if (nodeName == 'div' || nodeName == 'span') {
var inline = $target.children('.' + this._inlineClass);
inline.children().addClass('ui-state-disabled');
}
this._disabledInputs = $.map(this._disabledInputs,
function(value) { return (value == target ? null : value); }); // delete entry
function(value) {
return (value == target ? null : value);
}); // delete entry
this._disabledInputs[this._disabledInputs.length] = target;
},
@ -496,10 +528,12 @@ $.extend(Datepicker.prototype, {
inst._keyEvent = true;
if ($.datepicker._datepickerShowing)
switch (event.keyCode) {
case 9: $.datepicker._hideDatepicker();
case 9:
$.datepicker._hideDatepicker();
handled = false;
break; // hide on tab out
case 13: var sel = $('td.' + $.datepicker._dayOverClass, inst.dpDiv).
case 13:
var sel = $('td.' + $.datepicker._dayOverClass, inst.dpDiv).
add($('td.' + $.datepicker._currentClass, inst.dpDiv));
if (sel[0])
$.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
@ -507,23 +541,29 @@ $.extend(Datepicker.prototype, {
$.datepicker._hideDatepicker();
return false; // don't submit the form
break; // select the value on enter
case 27: $.datepicker._hideDatepicker();
case 27:
$.datepicker._hideDatepicker();
break; // hide on escape
case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
case 33:
$.datepicker._adjustDate(event.target, (event.ctrlKey ?
-$.datepicker._get(inst, 'stepBigMonths') :
-$.datepicker._get(inst, 'stepMonths')), 'M');
break; // previous month/year on page up/+ ctrl
case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
case 34:
$.datepicker._adjustDate(event.target, (event.ctrlKey ?
+$.datepicker._get(inst, 'stepBigMonths') :
+$.datepicker._get(inst, 'stepMonths')), 'M');
break; // next month/year on page down/+ ctrl
case 35: if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target);
case 35:
if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target);
handled = event.ctrlKey || event.metaKey;
break; // clear on ctrl or command +end
case 36: if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target);
case 36:
if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target);
handled = event.ctrlKey || event.metaKey;
break; // current on ctrl or command +home
case 37: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D');
case 37:
if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D');
handled = event.ctrlKey || event.metaKey;
// -1 day on ctrl or command +left
if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
@ -531,10 +571,12 @@ $.extend(Datepicker.prototype, {
-$.datepicker._get(inst, 'stepMonths')), 'M');
// next month/year on alt +left on Mac
break;
case 38: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D');
case 38:
if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D');
handled = event.ctrlKey || event.metaKey;
break; // -1 week on ctrl or command +up
case 39: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D');
case 39:
if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D');
handled = event.ctrlKey || event.metaKey;
// +1 day on ctrl or command +right
if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
@ -542,10 +584,12 @@ $.extend(Datepicker.prototype, {
+$.datepicker._get(inst, 'stepMonths')), 'M');
// next month/year on alt +right
break;
case 40: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D');
case 40:
if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D');
handled = event.ctrlKey || event.metaKey;
break; // +1 week on ctrl or command +down
default: handled = false;
default:
handled = false;
}
else if (event.keyCode == 36 && event.ctrlKey) // display the date picker on ctrl+home
$.datepicker._showDatepicker(this);
@ -622,17 +666,28 @@ $.extend(Datepicker.prototype, {
$.datepicker._pos[0] -= document.documentElement.scrollLeft;
$.datepicker._pos[1] -= document.documentElement.scrollTop;
}
var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
var offset = {
left: $.datepicker._pos[0],
top: $.datepicker._pos[1]
};
$.datepicker._pos = null;
// determine sizing offscreen
inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'});
inst.dpDiv.css({
position: 'absolute',
display: 'block',
top: '-1000px'
});
$.datepicker._updateDatepicker(inst);
// fix width for dynamic number of date pickers
// and adjust position before showing
offset = $.datepicker._checkOffset(inst, offset, isFixed);
inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none',
left: offset.left + 'px', top: offset.top + 'px'});
inst.dpDiv.css({
position: ($.datepicker._inDialog && $.blockUI ?
'static' : (isFixed ? 'fixed' : 'absolute')),
display: 'none',
left: offset.left + 'px',
top: offset.top + 'px'
});
if (!inst.inline) {
var showAnim = $.datepicker._get(inst, 'showAnim');
var duration = $.datepicker._get(inst, 'duration');
@ -640,8 +695,12 @@ $.extend(Datepicker.prototype, {
$.datepicker._datepickerShowing = true;
var borders = $.datepicker._getBorders(inst.dpDiv);
inst.dpDiv.find('iframe.ui-datepicker-cover'). // IE6- only
css({left: -borders[0], top: -borders[1],
width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()});
css({
left: -borders[0],
top: -borders[1],
width: inst.dpDiv.outerWidth(),
height: inst.dpDiv.outerHeight()
});
};
inst.dpDiv.zIndex($(input).zIndex()+1);
if ($.effects && $.effects[showAnim])
@ -662,8 +721,12 @@ $.extend(Datepicker.prototype, {
var borders = $.datepicker._getBorders(inst.dpDiv);
inst.dpDiv.empty().append(this._generateHTML(inst))
.find('iframe.ui-datepicker-cover') // IE6- only
.css({left: -borders[0], top: -borders[1],
width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()})
.css({
left: -borders[0],
top: -borders[1],
width: inst.dpDiv.outerWidth(),
height: inst.dpDiv.outerHeight()
})
.end()
.find('button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a')
.bind('mouseout', function(){
@ -704,7 +767,12 @@ $.extend(Datepicker.prototype, {
@return (number[2]) the left and top borders */
_getBorders: function(elem) {
var convert = function(value) {
return {thin: 1, medium: 2, thick: 3}[value] || value;
return {
thin: 1,
medium: 2,
thick: 3
}
[value] || value;
};
return [parseFloat(convert(elem.css('border-left-width'))),
parseFloat(convert(elem.css('border-top-width')))];
@ -770,7 +838,11 @@ $.extend(Datepicker.prototype, {
this._datepickerShowing = false;
this._lastInput = null;
if (this._inDialog) {
this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
this._dialogInput.css({
position: 'absolute',
left: '0',
top: '-100px'
});
if ($.blockUI) {
$.unblockUI();
$('body').append(this.dpDiv);
@ -906,7 +978,9 @@ $.extend(Datepicker.prototype, {
var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat');
var date = this._getDate(inst);
var dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
$(altField).each(function() { $(this).val(dateStr); });
$(altField).each(function() {
$(this).val(dateStr);
});
}
},
@ -1284,9 +1358,11 @@ $.extend(Datepicker.prototype, {
while (matches) {
switch (matches[2] || 'd') {
case 'd' : case 'D' :
day += parseInt(matches[1],10); break;
day += parseInt(matches[1],10);
break;
case 'w' : case 'W' :
day += parseInt(matches[1],10) * 7; break;
day += parseInt(matches[1],10) * 7;
break;
case 'm' : case 'M' :
month += parseInt(matches[1],10);
day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
@ -1438,11 +1514,18 @@ $.extend(Datepicker.prototype, {
calender += '<div class="ui-datepicker-group';
if (numMonths[1] > 1)
switch (col) {
case 0: calender += ' ui-datepicker-group-first';
cornerClass = ' ui-corner-' + (isRTL ? 'right' : 'left'); break;
case numMonths[1]-1: calender += ' ui-datepicker-group-last';
cornerClass = ' ui-corner-' + (isRTL ? 'left' : 'right'); break;
default: calender += ' ui-datepicker-group-middle'; cornerClass = ''; break;
case 0:
calender += ' ui-datepicker-group-first';
cornerClass = ' ui-corner-' + (isRTL ? 'right' : 'left');
break;
case numMonths[1]-1:
calender += ' ui-datepicker-group-last';
cornerClass = ' ui-corner-' + (isRTL ? 'left' : 'right');
break;
default:
calender += ' ui-datepicker-group-middle';
cornerClass = '';
break;
}
calender += '">';
}
@ -1658,9 +1741,13 @@ $.extend(Datepicker.prototype, {
var shortYearCutoff = this._get(inst, 'shortYearCutoff');
shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
return {shortYearCutoff: shortYearCutoff,
dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'),
monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')};
return {
shortYearCutoff: shortYearCutoff,
dayNamesShort: this._get(inst, 'dayNamesShort'),
dayNames: this._get(inst, 'dayNames'),
monthNamesShort: this._get(inst, 'monthNamesShort'),
monthNames: this._get(inst, 'monthNames')
};
},
/* Format the given date for display. */

8
form_elements/js/people_ahah.js

@ -47,7 +47,13 @@ Drupal.ahah.prototype.success = function (response, status) {
wrapper[this.method](new_content);
}
$('.datepicker').datepicker({ buttonImage: '/misc/date.png', constrainInput: false, showOn: 'button', changeMonth: true, changeYear: true });
$('.datepicker').datepicker({
buttonImage: '/misc/date.png',
constrainInput: false,
showOn: 'button',
changeMonth: true,
changeYear: true
});
// Immediately hide the new content if we're using any effects.
if (this.showEffect != 'show') {

36
form_elements/xml/gacs.xml

@ -443,7 +443,8 @@
<name authorized="yes">Transcaucasia</name>
<note>
<text>Coded [e-ur-ai] (Armenia (Republic)), [e-ur-aj] (Azerbaijan), [e-ur-gs] (Georgia
(Republic)) before June 1998]</text>
(Republic)) before June 1998]
</text>
</note>
</uf>
<uf>
@ -552,7 +553,8 @@
<name authorized="yes">Transcaucasia</name>
<note>
<text>Coded [e-ur-ai] (Armenia (Republic)), [e-ur-aj] (Azerbaijan), [e-ur-gs] (Georgia
(Republic)) before June 1998]</text>
(Republic)) before June 1998]
</text>
</note>
</uf>
<uf>
@ -1385,7 +1387,8 @@
<code>a-em</code>
<note>
<text>Coded [a-pt] (Portuguese Timor) before April 21, 1980; coded [a-io] (Indonesia) from
1980-Sept. 2002]</text>
1980-Sept. 2002]
</text>
</note>
<uf>
<name authorized="yes">Lesser Sunda Islands (Indonesia and East Timor)</name>
@ -1771,7 +1774,8 @@
<name authorized="yes">Transcaucasia</name>
<note>
<text>Coded [e-ur-ai] (Armenia (Republic)), [e-ur-aj] (Azerbaijan), [e-ur-gs] (Georgia
(Republic)) before June 1998]</text>
(Republic)) before June 1998]
</text>
</note>
</uf>
<uf>
@ -1787,13 +1791,15 @@
<code>e-gx</code>
<note>
<text>For Germany as a whole regardless of time period; includes Germany (East) and Germany
(West) as a whole between 1949 and 1990]</text>
(West) as a whole between 1949 and 1990]
</text>
</note>
<uf>
<name authorized="yes">Berlin (Germany)</name>
<note>
<text>Coded [e-gx] (Germany) for Berlin as a whole; [e-ge] (Germany (East)) for East
Berlin; or [e-gw] (Germany (West)) for West Berlin before Jan. 1991]</text>
Berlin; or [e-gw] (Germany (West)) for West Berlin before Jan. 1991]
</text>
</note>
<uf>
<name>East Berlin</name>
@ -1824,7 +1830,8 @@
<code>e-ge</code>
<note>
<text>For the eastern part of Germany before 1949 or after 1990 and for the German
Democratic Republic between 1949-1990]</text>
Democratic Republic between 1949-1990]
</text>
</note>
<uf>
<name>Democratic German Republic</name>
@ -1845,7 +1852,8 @@
<code>e-gw</code>
<note>
<text>For the western part of Germany before 1949 or after 1990 and for the Federal Republic
of Germany between 1949-1990</text>
of Germany between 1949-1990
</text>
</note>
<uf>
<name>Federal German Republic</name>
@ -2551,7 +2559,8 @@
<code>pokb</code>
<note>
<text>Coded [pogn] (Gilbert and Ellice Islands) or [poln] (Line Islands) before Mar.
1988</text>
1988
</text>
</note>
<uf>
<name authorized="yes">Banaba (Kiribati)</name>
@ -2620,7 +2629,8 @@
<code>e-kv</code>
<note>
<text>Coded [e-rb] (Serbia) before May 2008 and [e-yu] (Serbia and Montenegro) before April
2007</text>
2007
</text>
</note>
</gac>
<gac>
@ -5052,7 +5062,8 @@
<code>poup</code>
<note>
<text>Includes American Samoa, Guam, Pacific Islands (Trust Territory) treated
collectively</text>
collectively
</text>
</note>
<uf>
<name authorized="yes">Pacific Islands (Trust Territory)</name>
@ -5456,7 +5467,8 @@
<name authorized="yes">Socotra (Yemen)</name>
<note>
<text>Coded [i-xo] (Socotra Island) before Mar. 1988; Coded [a-ys] (Yemen (People's
Democratic Republic) before Oct. 1992</text>
Democratic Republic) before Oct. 1992
</text>
</note>
<uf>
<name>Sokotra (Yemen)</name>

6
form_elements/xml/languages.xml

@ -4874,7 +4874,8 @@
<code>cai</code>
<note>
<text>Use for the other languages of Central America and Mexico, as well as for the
languages of the Azteco-Tanoan language phylum.</text>
languages of the Azteco-Tanoan language phylum.
</text>
</note>
<uf>
<name authorized="yes">Amuzgo</name>
@ -12732,7 +12733,8 @@
<code>nai</code>
<note>
<text>Use for the other languages of North America north of Mexico excluding the
languages of the Azteco-Tanoan language phylum.</text>
languages of the Azteco-Tanoan language phylum.
</text>
</note>
<uf>
<name authorized="yes">Alabama</name>

2
ilives/book.inc

@ -1,6 +1,6 @@
<?php
// $Id$
class IslandoraBook {

3
ilives/fedora_ilives.install

@ -1,5 +1,6 @@
<?php
// $Id$
/*
* @file fedora_ilives.install

2
ilives/fedora_ilives.module

@ -1,6 +1,6 @@
<?php
// $Id$
/*
* To change this template, choose Tools | Templates

7
ilives/image_rotator_tagger_block.inc

@ -1,5 +1,6 @@
<?php
// $Id$
/*
* @file image_rotator_tagger_block.inc
@ -42,10 +43,8 @@ and $object <dc:title> $title';
return array('pid' => $pid,
//'title' => $randresult->textContent);
'title' => $title->nodeValue);
}
function _fedora_image_rotator_tagger_block_content() {
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'plugins/tagging_form');
@ -78,7 +77,6 @@ function _fedora_image_rotator_tagger_block_content() {
}
}
/*
function fedora_ilives_preprocess_page(&$variables) {
drupal_add_js(drupal_get_path('module', 'fedora_ilives').'/fedora_ilives_ajax.js', 'theme');
@ -104,4 +102,5 @@ class ShowILivesStreamsInFieldSets {
return theme('fieldset', $collection_fieldset)
. drupal_get_form('fedora_repository_image_tagging_form', $this->pid);
}
}

6
ilives/tests/fedora_ilives.test

@ -1,5 +1,6 @@
<?php
// $Id$
/*
* Tests the functions of the Fedora Repository module.
@ -31,7 +32,6 @@ class FedoraBookTestCase extends DrupalWebTestCase {
$this->drupalLogin($repository_user);
}
public function testBookCModel() {
@ -73,7 +73,6 @@ class FedoraBookTestCase extends DrupalWebTestCase {
$this->pass("Successfully ingested book object $book_pid.");
}
$this->cleanUpRepository($pid_list);
}
private function cleanUpRepository($pid_list = array()) {
@ -130,3 +129,4 @@ class FedoraBookTestCase extends DrupalWebTestCase {
}
}

3
ilives/xml/ilives_CollectionModel.xml

@ -128,7 +128,8 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
<dc:description>Made possible through a generous private donation, the IslandLives project builds on the Robertson Library’s mission to preserve and share unique material relating to Prince Edward Island and demonstrates UPEI&apos;s ongoing commitment to making PEI&apos;s cultural and published heritage available to all.
Utilizing the library’s “Prince Edward Island Collection” and the latest in digitization technology, IslandLives will start by digitizing 300 or so published community histories dating from the mid-1800’s to the present day. These transformed community histories will form the basis of a rich online repository.
IslandLives will provide a variety of search interfaces that will allow users to browse and search the content by name, community, time period, and keyword. The Island community will have a whole new way to rediscover, search and share their stories.
This project will engage and build community – recruiting interested individuals from the cultural heritage community and everyday Islanders. Project staff will travel to communities and host ‘digitization days’, introducing community members to the project and its goals, providing them with an opportunity to digitize their own content, and to contribute their content to the IslandLives collection.</dc:description>
This project will engage and build community – recruiting interested individuals from the cultural heritage community and everyday Islanders. Project staff will travel to communities and host ‘digitization days’, introducing community members to the project and its goals, providing them with an opportunity to digitize their own content, and to contribute their content to the IslandLives collection.
</dc:description>
<dc:contributor>Robertson Library, University of Prince Edward Island</dc:contributor>
<dc:identifier>ilives:CollectionModel</dc:identifier>
</oai_dc:dc>

15
ilives/xml/ilives_tei2htmlSdep-pageCModel.xml

@ -189,8 +189,11 @@
<xsl:attribute name="class">search persName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22<xsl:value-of
select=".//tei:surname"/>+<xsl:value-of select=".//tei:forename"/>%22+AND+dc.type:collection</xsl:attribute>
name="href">http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22
<xsl:value-of
select=".//tei:surname"/>+
<xsl:value-of select=".//tei:forename"/>%22+AND+dc.type:collection
</xsl:attribute>
<xsl:apply-templates select="*|node()"/>
</a>
</span>
@ -205,7 +208,9 @@
<xsl:attribute name="class">search placeName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection</xsl:attribute>
name="href">http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22
<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection
</xsl:attribute>
<xsl:value-of select="normalize-space(.)"/>
</a>
</xsl:template>
@ -214,7 +219,9 @@
<xsl:attribute name="class">search orgName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection</xsl:attribute>
name="href">http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22
<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection
</xsl:attribute>
<xsl:value-of select="normalize-space(.)"/>
</a>
</xsl:template>

9
ilives/xsl/MODS3-22simpleDC.xsl

@ -297,7 +297,8 @@ Version 1.0 2007-05-04 Tracy Meehleib <tmee@loc.gov>
<xsl:choose>
<xsl:when test="contains ('isbn issn uri doi lccn uri', $type)">
<dc:identifier>
<xsl:value-of select="$type"/>: <xsl:value-of select="."/>
<xsl:value-of select="$type"/>: 
<xsl:value-of select="."/>
</dc:identifier>
</xsl:when>
<xsl:otherwise>
@ -389,12 +390,14 @@ Version 1.0 2007-05-04 Tracy Meehleib <tmee@loc.gov>
<xsl:template match="mods:dateIssued[@point='start'] | mods:dateCreated[@point='start'] | mods:dateCaptured[@point='start'] | mods:dateOther[@point='start'] ">
<xsl:variable name="dateName" select="local-name()"/>
<dc:date>
<xsl:value-of select="."/>-<xsl:value-of select="../*[local-name()=$dateName][@point='end']"/>
<xsl:value-of select="."/>-
<xsl:value-of select="../*[local-name()=$dateName][@point='end']"/>
</dc:date>
</xsl:template>
<xsl:template match="mods:temporal[@point='start'] ">
<xsl:value-of select="."/>-<xsl:value-of select="../mods:temporal[@point='end']"/>
<xsl:value-of select="."/>-
<xsl:value-of select="../mods:temporal[@point='end']"/>
</xsl:template>
<xsl:template match="mods:temporal[@point!='start' and @point!='end'] ">

163
ilives/xsl/book_view.xsl

@ -14,52 +14,161 @@
<xsl:template match="/">
<h1 ><xsl:value-of select="//mods:titleInfo/mods:nonSort"/><xsl:text> </xsl:text><xsl:value-of select="//mods:titleInfo/mods:title"/> <xsl:for-each select="//mods:titleInfo/mods:subTitle">
: <xsl:value-of select="."/></xsl:for-each></h1>
<xsl:for-each select="//mods:titleInfo[@type='alternative']/mods.title"><h3>
<h1 >
<xsl:value-of select="//mods:titleInfo/mods:nonSort"/>
<xsl:text> </xsl:text>
<xsl:value-of select="//mods:titleInfo/mods:title"/>
<xsl:for-each select="//mods:titleInfo/mods:subTitle">
:
<xsl:value-of select="."/>
</xsl:for-each>
</h1>
<xsl:for-each select="//mods:titleInfo[@type='alternative']/mods.title">
<h3>
<!-- <xsl:value-of select="substring-before(text(),'/')"/>-->
<xsl:value-of select="."/><xsl:text> </xsl:text> </h3>
<xsl:value-of select="."/>
<xsl:text> </xsl:text>
</h3>
</xsl:for-each>
<table cellpadding="3" cellspacing="2" valign="top" ><tr><td valign="top">
<table cellpadding="3" cellspacing="2" valign="top" >
<tr>
<td valign="top">
<img>
<xsl:attribute name="src"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/<xsl:copy-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
<xsl:copy-of select="$PID"/>/TN
</xsl:attribute>
</img>
</td><td ><div style="align:left"><table cellpadding="3" cellspacing="2" width="90%" >
<tr><td align="right" valign="top"><b>By Statement: </b></td><td valign="top"><xsl:value-of select="//mods:note[@type='statement of responsibility']"/></td></tr>
<tr><td align="right" valign="top"><b>Place of Publication: </b></td ><td valign="top"><xsl:value-of select="//mods:placeTerm[@type='text']"/></td></tr>
<tr><td align="right" valign="top"><b>Publisher: </b></td><td valign="top"><xsl:value-of select="//mods:publisher"/></td></tr>
<tr><td align="right" valign="top"><b>Date: </b></td><td valign="top"><xsl:value-of select="//mods:dateIssued"/></td></tr>
<tr><td align="right" valign="top"><b>Language: </b></td><td valign="top"><xsl:value-of select="//mods:languageTerm"/></td></tr>
<tr><td align="right" valign="top"><b>Pagination: </b></td><td valign="top"><xsl:value-of select="//mods:extent"/></td></tr>
<tr><td align="right" valign="top"><b>ISBN 10: </b></td><td valign="top"><xsl:value-of select="//mods:identifier[@type='isbn']"/></td></tr>
<tr><td align="right" valign="top"><b>Subjects: </b></td><td valign="top"><xsl:for-each select="//mods:subject">
</td>
<td >
<div style="align:left">
<table cellpadding="3" cellspacing="2" width="90%" >
<tr>
<td align="right" valign="top">
<b>By Statement: </b>
</td>
<td valign="top">
<xsl:value-of select="//mods:note[@type='statement of responsibility']"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>Place of Publication: </b>
</td >
<td valign="top">
<xsl:value-of select="//mods:placeTerm[@type='text']"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>Publisher: </b>
</td>
<td valign="top">
<xsl:value-of select="//mods:publisher"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>Date: </b>
</td>
<td valign="top">
<xsl:value-of select="//mods:dateIssued"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>Language: </b>
</td>
<td valign="top">
<xsl:value-of select="//mods:languageTerm"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>Pagination: </b>
</td>
<td valign="top">
<xsl:value-of select="//mods:extent"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>ISBN 10: </b>
</td>
<td valign="top">
<xsl:value-of select="//mods:identifier[@type='isbn']"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>Subjects: </b>
</td>
<td valign="top">
<xsl:for-each select="//mods:subject">
<xsl:for-each select="*">
<a><xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/mods.subject:"<xsl:value-of select="normalize-space(.)"/>"%20AND%20dc.type:collection%20AND%20dc.type:ingested
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/mods.subject:"
<xsl:value-of select="normalize-space(.)"/>"%20AND%20dc.type:collection%20AND%20dc.type:ingested
</xsl:attribute>
<xsl:value-of select="."/></a><xsl:text> </xsl:text></xsl:for-each><br /></xsl:for-each>
</td></tr>
</table></div></td><td valign="top">
<xsl:value-of select="."/>
</a>
<xsl:text> </xsl:text>
</xsl:for-each>
<br />
</xsl:for-each>
</td>
</tr>
</table>
</div>
</td>
<td valign="top">
<xsl:if test="$INGESTED = 'true'">
<div><a><xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_viewer/<xsl:value-of select="$PID"/></xsl:attribute>Read</a>
</div></xsl:if>
<div>
<a><xsl:attribute name="href">http://islandpines.roblib.upei.ca/opac/en-CA/skin/roblib/xml/rdetail.xml?r=<xsl:value-of select="$RECORDID"/></xsl:attribute>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_viewer/
<xsl:value-of select="$PID"/>
</xsl:attribute>Read
</a>
</div>
</xsl:if>
<div>
<a>
<xsl:attribute name="href">http://islandpines.roblib.upei.ca/opac/en-CA/skin/roblib/xml/rdetail.xml?r=
<xsl:value-of select="$RECORDID"/>
</xsl:attribute>
Checkout
</a>
</div> <xsl:if test="$INGESTED = 'true'"><div>
<a><xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/<xsl:value-of select="$PID"/>/PDF/<xsl:value-of select="$PID"/>.pdf</xsl:attribute>Download</a>
</div></xsl:if>
</div>
<xsl:if test="$INGESTED = 'true'">
<div>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
<xsl:value-of select="$PID"/>/PDF/
<xsl:value-of select="$PID"/>.pdf
</xsl:attribute>Download
</a>
</div>
</xsl:if>
<xsl:if test="($USER > 0) and ($INGESTED = 'true')">
<div>
<a><xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>teieditor/<xsl:value-of select="$PID"/></xsl:attribute>Edit</a>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>teieditor/
<xsl:value-of select="$PID"/>
</xsl:attribute>Edit
</a>
</div>
</xsl:if>
</td></tr></table>
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>

13
ilives/xsl/pageResults.xsl

@ -118,21 +118,26 @@
<td valign="top" width="16%">
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_viewer/<xsl:copy-of select="$PIDVALUE"/>
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_viewer/
<xsl:copy-of select="$PIDVALUE"/>
</xsl:attribute>
<img>
<xsl:attribute name="alt">Thumbnail <xsl:copy-of select="$PIDVALUE"/></xsl:attribute>
<xsl:attribute name="alt">Thumbnail
<xsl:copy-of select="$PIDVALUE"/>
</xsl:attribute>
<xsl:attribute name="src">
<!--http://islandlives.ca:8080/adore-djatoka/resolver?url_ver=Z39.88-2004&amp;rft_id=http://islandlives.ca/fedora/repository/<xsl:copy-of select="$PIDVALUE"/>/JP2/jp2.jp2&amp;svc_id=info:lanl-repo/svc/getRegion&amp;svc_val_fmt=info:ofi/fmt:kev:mtx:jpeg2000&amp;svc.format=image/jpeg&amp;svc.level=0&amp;svc.rotate=0&amp;svc.region=0,0,100,100</xsl:attribute>
-->
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/<xsl:copy-of select="$PIDVALUE"/>/TN
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
<xsl:copy-of select="$PIDVALUE"/>/TN
</xsl:attribute>
</img>
</a>
<br />
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_viewer/<xsl:value-of select="$PIDVALUE"/>
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_viewer/
<xsl:value-of select="$PIDVALUE"/>
</xsl:attribute>
<xsl:value-of select="substring-before($DCTITLE, '-')"/>
<br />

105
ilives/xsl/results.xsl

@ -41,8 +41,12 @@
<xsl:choose>
<xsl:when test="$HITTOTAL > 0">
Total Hits = <strong><xsl:value-of select="$HITTOTAL"/>,</strong>
Number of Hits/page = <xsl:value-of select="$HITPAGESIZE"/>
Total Hits =
<strong>
<xsl:value-of select="$HITTOTAL"/>,
</strong>
Number of Hits/page =
<xsl:value-of select="$HITPAGESIZE"/>
<!-- <br />You may not have sufficient privileges to view any or all of the items found. The objects you have rights to view will be shown below.-->
<!--Current page = <xsl:value-of select="@hitPageStart"/>-->
<br/>
@ -54,15 +58,24 @@
<xsl:if test="$HITPAGENO > 1">
<li class="pager-previous">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/<xsl:value-of select="$FULLQUERY"/>/<xsl:value-of select="$HITPAGESTARTT - $HITPAGESIZE"/></xsl:attribute>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/
<xsl:value-of select="$FULLQUERY"/>/
<xsl:value-of select="$HITPAGESTARTT - $HITPAGESIZE"/>
</xsl:attribute>
&lt; Previous
</a>
</li>
</xsl:if><xsl:text> </xsl:text>
</xsl:if>
<xsl:text> </xsl:text>
<xsl:if test="$HITPAGENO &lt; $HITPAGENOLAST">
<li class="pager-next">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/<xsl:value-of select="$FULLQUERY"/>/<xsl:value-of select="$HITPAGESTARTT+$HITPAGESIZE"/></xsl:attribute>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/
<xsl:value-of select="$FULLQUERY"/>/
<xsl:value-of select="$HITPAGESTARTT+$HITPAGESIZE"/>
</xsl:attribute>
Next >
</a>
</li>
@ -89,15 +102,24 @@
<xsl:if test="$HITPAGENO > 1">
<li class="pager-previous">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/<xsl:value-of select="$FULLQUERY"/>/<xsl:value-of select="$HITPAGESTARTT - $HITPAGESIZE"/></xsl:attribute>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/
<xsl:value-of select="$FULLQUERY"/>/
<xsl:value-of select="$HITPAGESTARTT - $HITPAGESIZE"/>
</xsl:attribute>
&lt; Previous
</a>
</li>
</xsl:if><xsl:text> </xsl:text>
</xsl:if>
<xsl:text> </xsl:text>
<xsl:if test="$HITPAGENO &lt; $HITPAGENOLAST">
<li class="pager-next">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/<xsl:value-of select="$FULLQUERY"/>/<xsl:value-of select="$HITPAGESTARTT+$HITPAGESIZE"/></xsl:attribute>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/
<xsl:value-of select="$FULLQUERY"/>/
<xsl:value-of select="$HITPAGESTARTT+$HITPAGESIZE"/>
</xsl:attribute>
Next >
</a>
</li>
@ -111,12 +133,21 @@
<h2>Your search yielded no results</h2>
<div class="content"><ul>
<div class="content">
<ul>
<li>Check if your spelling is correct.</li>
<li>Remove quotes around phrases to match each word individually: <em>"blue smurf"</em> will match less than <em>blue smurf</em>.</li>
<li>Consider loosening your query with <em>OR</em>: <em>blue smurf</em> will match less than <em>blue OR smurf</em>.</li>
</ul></div>
<li>Remove quotes around phrases to match each word individually:
<em>"blue smurf"</em> will match less than
<em>blue smurf</em>.
</li>
<li>Consider loosening your query with
<em>OR</em>:
<em>blue smurf</em> will match less than
<em>blue OR smurf</em>.
</li>
</ul>
</div>
</div>
@ -126,12 +157,15 @@
<xsl:template match="objects">
<table cellpadding="3" cellspacing="3" width="100%"><div class="search-results">
<tr><td colspan="2">
<table cellpadding="3" cellspacing="3" width="100%">
<div class="search-results">
<tr>
<td colspan="2">
</td></tr>
</td>
</tr>
<xsl:for-each select="object">
<xsl:variable name="PIDVALUE">
<xsl:choose>
@ -156,7 +190,8 @@
</xsl:for-each>
</div></table>
</div>
</table>
</xsl:template>
<xsl:template name="splitBySpace">
@ -209,15 +244,21 @@
<xsl:variable name="CLEANTITLE">
<xsl:value-of select="php:functionString('fedora_repository_urlencode_string', $DCTITLE)"/>
</xsl:variable>
<tr><td valign="top">
<tr>
<td valign="top">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives/<xsl:copy-of select="$PIDVALUE"/>/<xsl:value-of select="$FULLQUERY"/>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives/
<xsl:copy-of select="$PIDVALUE"/>/
<xsl:value-of select="$FULLQUERY"/>
</xsl:attribute>
<!--<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/><![CDATA[&pid=]]><xsl:value-of select="$PIDVALUE"/><![CDATA[&collection=object]]>
</xsl:attribute>-->
<img>
<xsl:attribute name="src"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/<xsl:copy-of select="$PIDVALUE"/>/TN
<xsl:attribute name="src">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
<xsl:copy-of select="$PIDVALUE"/>/TN
</xsl:attribute>
<xsl:attribute name="height">100</xsl:attribute>
</img>
@ -234,17 +275,22 @@
<span class="searchtitle">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives/<xsl:value-of select="$PIDVALUE"/>/<xsl:value-of select="$FULLQUERY"/>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives/
<xsl:value-of select="$PIDVALUE"/>/
<xsl:value-of select="$FULLQUERY"/>
</xsl:attribute>
<xsl:for-each select="field[@name='mods.title']">
<!-- <xsl:value-of select="substring-before(text(),'/')"/>-->
<xsl:value-of select="node()"/><xsl:text> </xsl:text>
<xsl:value-of select="node()"/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:for-each select="field[@name='mods.subTitle']">
<span class="searchsubtitle">
<xsl:text> : </xsl:text><xsl:value-of select="node()"/>
<xsl:text> : </xsl:text>
<xsl:value-of select="node()"/>
</span>
</xsl:for-each>
@ -255,35 +301,40 @@
<xsl:for-each select="field[@name='mods.sor']">
<span class="searchcreator">
<xsl:text> / </xsl:text> <xsl:value-of select="node()"/>
<xsl:text> / </xsl:text>
<xsl:value-of select="node()"/>
</span>
</xsl:for-each>
<xsl:for-each select="field[@name='mods.place_of_publication']">
<span class="searchpop">
<xsl:text> </xsl:text> <xsl:value-of select="node()"/>
<xsl:text> </xsl:text>
<xsl:value-of select="node()"/>
</span>
</xsl:for-each>
<xsl:for-each select="field[@name='mods.publisher']">
<span class="searchpop">
<xsl:text> : </xsl:text> <xsl:value-of select="node()"/>
<xsl:text> : </xsl:text>
<xsl:value-of select="node()"/>
</span>
</xsl:for-each>
<xsl:for-each select="field[@name='mods.dateIssued']">
<span class="searchdateIssued">
<xsl:text>, </xsl:text> <xsl:value-of select="node()"/>.
<xsl:text>, </xsl:text>
<xsl:value-of select="node()"/>.
</span>
</xsl:for-each>
<xsl:for-each select="field[@name='mods.edition']">
<span class="searchedition">
<xsl:text> </xsl:text> <xsl:value-of select="node()"/>
<xsl:text> </xsl:text>
<xsl:value-of select="node()"/>
</span>
</xsl:for-each>

1
islandoracm.xsd

@ -1,3 +1,4 @@
<xsd:schema xmlns="http://www.islandora.ca" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.islandora.ca" elementFormDefault="qualified">
<xsd:annotation>

4
js/AC_Quicktime.js

@ -64,7 +64,9 @@ var gQTGeneratorVersion = 1.2;
var gQTBehaviorID = "qt_event_source";
var gQTEventsEnabled = false;
function AC_QuickTimeVersion() { return gQTGeneratorVersion; }
function AC_QuickTimeVersion() {
return gQTGeneratorVersion;
}
function _QTComplain(callingFcnName, errMsg)
{

13
js/printer_tool.js

@ -3,12 +3,19 @@
var PrinterTool = {};
PrinterTool.windowSettings = 'toolbar=no,location=no,' + 'status=no,menu=no,scrollbars=yes,width=650,height=400';
/** * Open a printer-friendly page and prompt for printing. * @param tagID * The ID of the tag that contains the material that should * be printed. */
PrinterTool.print = function (tagID) { var target = document.getElementById(tagID); var title = document.title;
if(!target || target.childNodes.length === 0) { alert("Nothing to Print"); return;
PrinterTool.print = function (tagID) {
var target = document.getElementById(tagID);
var title = document.title;
if(!target || target.childNodes.length === 0) {
alert("Nothing to Print");
return;
}
var content = target.innerHTML;
var text = '<html><head><title>' + title +
'</title><body>' + content +'</body></html>';
printerWindow = window.open('', '', PrinterTool.windowSettings); printerWindow.document.open(); printerWindow.document.write(text); printerWindow.document.close();
printerWindow = window.open('', '', PrinterTool.windowSettings);
printerWindow.document.open();
printerWindow.document.write(text);
printerWindow.document.close();
printerWindow.print();
};

51
js/swfobject.js

@ -10,23 +10,37 @@ if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) {
if (!document.getElementById) { return; }
if (!document.getElementById) {
return;
}
this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params = new Object();
this.variables = new Object();
this.attributes = new Array();
if(swf) { this.setAttribute('swf', swf); }
if(id) { this.setAttribute('id', id); }
if(w) { this.setAttribute('width', w); }
if(h) { this.setAttribute('height', h); }
if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
if(swf) {
this.setAttribute('swf', swf);
}
if(id) {
this.setAttribute('id', id);
}
if(w) {
this.setAttribute('width', w);
}
if(h) {
this.setAttribute('height', h);
}
if(ver) {
this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split(".")));
}
this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
if (!window.opera && document.all && this.installedVer.major > 7) {
// only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
deconcept.SWFObject.doPrepUnload = true;
}
if(c) { this.addParam('bgcolor', c); }
if(c) {
this.addParam('bgcolor', c);
}
var q = quality ? quality : 'high';
this.addParam('quality', q);
this.setAttribute('useExpressInstall', false);
@ -34,7 +48,9 @@ deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, re
var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
this.setAttribute('xiRedirectUrl', xir);
this.setAttribute('redirectUrl', '');
if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
if(redirectUrl) {
this.setAttribute('redirectUrl', redirectUrl);
}
}
deconcept.SWFObject.prototype = {
useExpressInstall: function(path) {
@ -81,9 +97,13 @@ deconcept.SWFObject.prototype = {
swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'"';
swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
var params = this.getParams();
for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
for(var key in params){
swfNode += [key] +'="'+ params[key] +'" ';
}
var pairs = this.getVariablePairs().join("&");
if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
if (pairs.length > 0){
swfNode += 'flashvars="'+ pairs +'"';
}
swfNode += '/>';
} else { // PC IE
if (this.getAttribute("doExpressInstall")) {
@ -97,7 +117,9 @@ deconcept.SWFObject.prototype = {
swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
}
var pairs = this.getVariablePairs().join("&");
if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
if(pairs.length > 0) {
swfNode += '<param name="flashvars" value="'+ pairs +'" />';
}
swfNode += "</object>";
}
return swfNode;
@ -209,7 +231,12 @@ if (deconcept.SWFObject.doPrepUnload) {
window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
}
/* add Array.push if needed (ie5) */
if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}
if (Array.prototype.push == null) {
Array.prototype.push = function(item) {
this[this.length] = item;
return this.length;
}
}
/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;

6
plugins/CollectionFormBuilder.inc

@ -1,5 +1,6 @@
<?php
// $Id$
module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
/*
@ -9,7 +10,9 @@ module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
* implements methods from content model ingest form xml
* builds a dc metadata form
*/
class CollectionFormBuilder extends FormBuilder {
function CollectionFormBuilder() {
module_load_include('inc', 'CollectionFormBuilder', '');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
@ -42,4 +45,5 @@ class CollectionFormBuilder extends FormBuilder {
$ds1v->appendChild($ds1content);
$rootElement->appendChild($ds1);
}
}

7
plugins/CreateCollection.inc

@ -1,5 +1,6 @@
<?php
// $Id$
/*
*
@ -8,8 +9,8 @@
*/
class CreateCollection {
function CreateCollection() {
function CreateCollection() {
}
@ -17,6 +18,4 @@ class CreateCollection {
return TRUE; //nothing needed here as we are not transforming any files
}
}

9
plugins/DarwinCore.inc

@ -1,6 +1,6 @@
<?php
// $Id$
class DarwinCore {
@ -226,8 +226,7 @@ class DarwinCore {
try {
$proc = new XsltProcessor();
}
catch (Exception $e) {
} catch (Exception $e) {
drupal_set_message(t("!e", array('!e' => $e->getMessage())), 'error');
return " ";
}
@ -256,9 +255,7 @@ class DarwinCore {
'MachineObservation' => 'MachineObservation',
'NomenclaturalChecklist' => 'NomenclaturalChecklist',
),
);
public $dwcFields = array(
'dc:type',
'dc:language',
@ -283,8 +280,6 @@ class DarwinCore {
'dwc:eventDate',
'dwc:eventTime',
);
public $darwinCoreXML = '
<SimpleDarwinRecordSet xmlns="http://rs.tdwg.org/dwc/xsd/simpledarwincore/" xmlns:dc="http://purl.org/dc/terms/" xmlns:dwc="http://rs.tdwg.org/dwc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://rs.tdwg.org/dwc/xsd/simpledarwincore/ http://rs.tdwg.org/dwc/xsd/tdwg_dwc_simple.xsd">
<SimpleDarwinRecord>

6
plugins/DemoFormBuilder.inc

@ -1,5 +1,6 @@
<?php
// $Id$
module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
/*
@ -9,7 +10,9 @@ module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
* implements methods from content model ingest form xml
* builds a dc metadata form
*/
class DemoFormBuilder extends FormBuilder {
function DemoFormBuilder() {
module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
@ -73,5 +76,6 @@ class DemoFormBuilder extends FormBuilder {
}
}
}
}

6
plugins/DocumentConverter.inc

@ -1,13 +1,12 @@
<?php
// $Id$
/**
*
* This class implements document (doc, odt, pdf, etc.) conversion for a generic
* multi-format document collection.
*/
class DocumentConverter {
private $converter_service_url = "http://localhost:8080/converter/service";
@ -69,11 +68,12 @@ class DocumentConverter {
return FALSE;
}
}
}
/*
$documentConverter = new DocumentConverter();
$inputFile = "document.docx";
$outputType = "txt";
$documentConverter->convert( null, 'TXT', $inputFile, $outputType);
$documentConverter->convert( NULL, 'TXT', $inputFile, $outputType);
/* */

3
plugins/Exiftool.inc

@ -1,5 +1,6 @@
<?php
// $Id$
/*
*

12
plugins/Ffmpeg.inc

@ -1,5 +1,6 @@
<?php
// $Id$
/*
*
@ -8,11 +9,13 @@
*/
class Ffmpeg {
function Ffmpeg() {
}
function extract_thumbnail($parameterArray, $dsid, $file, $file_ext) {
$defaults = array('ss' => '00:00:10', 's' => null);
$defaults = array('ss' => '00:00:10', 's' => NULL);
$params = array_merge($defaults, $parameterArray);
$system = getenv('System');
$file_suffix = '_' . $dsid . '.' . $file_ext;
@ -20,16 +23,17 @@ class Ffmpeg {
$output = array();
$size = '';
if($params['s'] != null) {
if ($params['s'] != NULL) {
$size = ' -s ' . escapeshellarg($params['s']);
}
exec('ffmpeg -i ' . escapeshellarg($file) . ' -r 1 -ss ' . escapeshellarg($params['ss']) . ' ' . $size . ' -t 1 ' . escapeshellarg($file . $file_suffix));
if (!file_exists($file . $file_suffix)) {
return false;
return FALSE;
}
$_SESSION['fedora_ingest_files']["$dsid"] = $file . $file_suffix;
return TRUE;
}
}

13
plugins/Flv.inc

@ -1,5 +1,6 @@
<?php
// $Id$
/*
* Created on 19-Feb-08
@ -8,6 +9,7 @@
* implements method from content model ingest form xml
*/
class FormBuilder {
function FormBuilder() {
module_load_include('inc', 'Flv', '');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
@ -52,8 +54,7 @@ class FormBuilder {
$previousElement = $dom->createElement($key, $value);
$oai->appendChild($previousElement);
}
}
catch (exception $e) {
} catch (exception $e) {
drupal_set_message(t("!e", array('!e' => $e->getMessage())), 'error');
continue;
}
@ -102,8 +103,7 @@ class FormBuilder {
}
unlink($form_values['fullpath']);
}
}
catch (exception $e) {
} catch (exception $e) {
drupal_set_message(t('Error ingesting object: !e', array('!e' => $e->getMessage())), 'error');
return;
}
@ -190,7 +190,6 @@ class FormBuilder {
$rdf->appendChild($rdfdesc);
$rdfdesc->appendChild($member);
$rootElement->appendChild($drdf);
}
/**
@ -222,7 +221,6 @@ class FormBuilder {
$rootElement->appendChild($objproperties);
}
function buildQDCForm(&$form, $ingest_form_definition, &$form_values) {
$form['indicator2'] = array(
'#type' => 'fieldset',
@ -253,7 +251,6 @@ class FormBuilder {
'#type' => $type,
'#options' => $options,
);
}
else {
$form['indicator2']["$name"] = array(

7
plugins/FlvFormBuilder.inc

@ -1,5 +1,6 @@
<?php
// $Id$
module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
@ -7,7 +8,9 @@ module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
* implements methods from content model ingest form xml
* builds a dc metadata form
*/
class FlvFormBuilder extends FormBuilder {
function FlvFormBuilder() {
module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
@ -16,6 +19,7 @@ class FlvFormBuilder extends FormBuilder {
/*
* method overrides method in FormBuilder. We changed the dsid from OBJ to FLV and added the TN datastream
*/
function createFedoraDataStreams($form_values, &$dom, &$rootElement) {
module_load_include('inc', 'fedora_repository', 'MimeClass');
global $base_url;
@ -60,5 +64,6 @@ class FlvFormBuilder extends FormBuilder {
$ds1v->appendChild($ds1content);
$rootElement->appendChild($ds1);
}
}

26
plugins/FormBuilder.inc

@ -1,6 +1,6 @@
<?php
// $Id$
/*
* Created on 19-Feb-08
@ -10,6 +10,7 @@
* builds a dc metadata form
*/
class FormBuilder {
function FormBuilder() {
module_load_include('inc', 'FormBuilder', '');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
@ -55,15 +56,13 @@ class FormBuilder {
$previousElement = $dom->createElement($key, $value);
$oai->appendChild($previousElement);
}
}
catch (exception $e) {
} catch (exception $e) {
drupal_set_message(t("!e", array('!e' => $e->getMessage())), 'error');
continue;
}
}
$rootElement->appendChild($datastream);
}
}
//create the security Policy
@ -78,8 +77,7 @@ class FormBuilder {
}
try {
$xml = new SimpleXMLElement($policyStreamDoc);
}
catch (Exception $e) {
} catch (Exception $e) {
watchdog(t("Fedora_Repository"), t("Problem getting security policy."), NULL, WATCHDOG_ERROR);
drupal_set_message(t('Problem getting security policy: !e', array('!e' => $e->getMessage())), 'error');
return FALSE;
@ -114,7 +112,6 @@ class FormBuilder {
return TRUE;
}
function handleQDCForm($form_values) {
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'CollectionPolicy');
@ -162,8 +159,7 @@ class FormBuilder {
}
}
file_delete($form_values['ingest-file-location']);
}
catch (exception $e) {
} catch (exception $e) {
drupal_set_message(t('Error ingesting object: !e', array('!e' => $e->getMessage())), 'error');
watchdog(t("Fedora_Repository"), t("Error ingesting object: !e", array('!e' => $e->getMessage())), NULL, WATCHDOG_ERROR);
return;
@ -250,7 +246,6 @@ class FormBuilder {
}
}
/**
* Creates the RELS-EXT for the foxml
*/
@ -293,7 +288,6 @@ class FormBuilder {
$rootElement->appendChild($drdf);
}
/**
* Creates the standard foxml properties
*/
@ -315,7 +309,6 @@ class FormBuilder {
$rootElement->appendChild($objproperties);
}
function buildQDCForm(&$form, $elements, &$form_values) {
$form['#multistep'] = TRUE; // used so that it triggers a form rebuild every time.
$form['indicator2'] = array(
@ -327,7 +320,8 @@ class FormBuilder {
if ($element['type'] == 'markup') {
$el = array('#value' => $element['description']);
} else {
}
else {
$el = array(
'#title' => $element['label'],
'#required' => ($element['required'] ? 1 : 0),
@ -347,9 +341,11 @@ class FormBuilder {
foreach ($element['parameters'] as $key => $val) {
if ($key == '#autocomplete_path') {
$autocomplete_path = $val;
} elseif ($key == '#autocomplete_omit_collection') {
}
elseif ($key == '#autocomplete_omit_collection') {
$autocomplete_omit_collection = TRUE;
} else {
}
else {
$el[$key] = $val;
}
}

5
plugins/ImageManipulation.inc

@ -1,6 +1,6 @@
<?php
// $Id$
/*
*
@ -21,7 +21,8 @@ class ImageManipulation {
if (!isset($parameterArray['height'])) {
$height = $width;
} else {
}
else {
$height = $parameterArray['height'];
}

108
plugins/ModsFormBuilder.inc

@ -1,19 +1,19 @@
<?php
// $Id$
module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
class ModsFormBuilder extends FormBuilder {
static $MODS_NS = 'http://www.loc.gov/mods/v3';
protected $cm;
protected $item;
protected $pid;
function __construct($pid=null)
{
function __construct($pid=NULL) {
parent::__construct();
if ($pid !== null)
{
if ($pid !== NULL) {
module_load_include('inc', 'fedora_repository', 'ContentModel');
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
@ -23,8 +23,7 @@ class ModsFormBuilder extends FormBuilder {
}
}
function handleEditMetadataForm(&$form_id, &$form_values, &$soap_client)
{
function handleEditMetadataForm(&$form_id, &$form_values, &$soap_client) {
$dom = new DomDocument("1.0", "UTF-8");
$dom->formatOutput = TRUE;
$mods = $this->modsFromForm($form_values, $dom);
@ -36,8 +35,7 @@ class ModsFormBuilder extends FormBuilder {
drupal_goto('/fedora/repository/' . $this->pid);
}
function buildEditMetadataForm()
{
function buildEditMetadataForm() {
$form['#multistep'] = TRUE; // used so that it triggers a form rebuild every time.
$form['indicator2'] = array(
'#type' => 'fieldset',
@ -68,7 +66,7 @@ class ModsFormBuilder extends FormBuilder {
'#type' => $element['type']
);
$includeEl = true;
$includeEl = TRUE;
$elname = explode('][', $element['name']);
$elLocation = &$form['indicator2'];
while (isset($elLocation[$name[0]]) && ($partial = array_shift($elname)) != NULL) {
@ -92,25 +90,24 @@ class ModsFormBuilder extends FormBuilder {
// echo $nodeList->item(0)->nodeValue.' ';
// echo '<br/>';
if (is_string($nodeList))
{
if (is_string($nodeList)) {
$el['#default_value'] = $nodeList;
} else if ($nodeList->length > 1)
{
}
elseif ($nodeList->length > 1) {
$el['#default_value'] = array();
foreach ($nodeList as $node)
{
foreach ($nodeList as $node) {
$el['#default_value'][] = $node->nodeValue;
}
} else if ($nodeList->length > 0)
{
}
elseif ($nodeList->length > 0) {
if ($el['#type'] == 'list') {
$values = array();
for ($i = 0; $i < $nodeList->length; $i++) {
$values[] = $nodeList->item($i)->nodeValue;
}
$el['#default_value'] = join('; ', $values);
} else {
}
else {
$el['#default_value'] = $nodeList->item(0)->nodeValue;
}
}
@ -120,11 +117,9 @@ class ModsFormBuilder extends FormBuilder {
if ($key != '#sticky') {
$el[$key] = $val;
}
}
if ($element['type'] == 'people')
{
if ($element['type'] == 'people') {
$names = $xpath->evaluate('/mods:mods/mods:name');
$people = array();
@ -134,20 +129,23 @@ class ModsFormBuilder extends FormBuilder {
$role = $mname->getElementsByTagName('roleTerm')->item(0)->nodeValue;
$nameParts = $mname->getElementsByTagName('namePart');
foreach ($nameParts as $namePart)
{
foreach ($nameParts as $namePart) {
switch ($namePart->getAttribute('type')) {
case 'given': $given = $namePart->nodeValue; break;
case 'family': $family = $namePart->nodeValue; break;
case 'termsOfAddress': $title = $namePart->nodeValue; break;
case 'date': $date = $namePart->nodeValue; break;
default: $name = $namePart->nodeValue; break;
case 'given': $given = $namePart->nodeValue;
break;
case 'family': $family = $namePart->nodeValue;
break;
case 'termsOfAddress': $title = $namePart->nodeValue;
break;
case 'date': $date = $namePart->nodeValue;
break;
default: $name = $namePart->nodeValue;
break;
}
}
$person = array('role' => $role);
switch ($type)
{
switch ($type) {
case 'personal':
if (isset($given) && isset($family) && !isset($name)) {
$name = (isset($title) ? $title . ' ' : '') . $family . ', ' . $family;
@ -172,20 +170,23 @@ class ModsFormBuilder extends FormBuilder {
$type = $mname->getAttribute('type');
$nameParts = $mname->getElementsByTagName('namePart');
foreach ($nameParts as $namePart)
{
foreach ($nameParts as $namePart) {
switch ($namePart->getAttribute('type')) {
case 'given': $given = $namePart->nodeValue; break;
case 'family': $family = $namePart->nodeValue; break;
case 'termsOfAddress': $title = $namePart->nodeValue; break;
case 'date': $date = $namePart->nodeValue; break;
default: $name = $namePart->nodeValue; break;
case 'given': $given = $namePart->nodeValue;
break;
case 'family': $family = $namePart->nodeValue;
break;
case 'termsOfAddress': $title = $namePart->nodeValue;
break;
case 'date': $date = $namePart->nodeValue;
break;
default: $name = $namePart->nodeValue;
break;
}
}
$person = array('subject' => 1);
switch ($type)
{
switch ($type) {
case 'personal':
if (isset($given) && isset($family) && !isset($name)) {
$name = (isset($title) ? $title . ' ' : '') . $family . ', ' . $family;
@ -205,7 +206,6 @@ class ModsFormBuilder extends FormBuilder {
}
$el['#default_value'] = $people;
}
@ -225,10 +225,8 @@ class ModsFormBuilder extends FormBuilder {
);
return $form;
}
}
}
function handleModsForm(&$form_values, &$form_state) {
@ -291,15 +289,13 @@ class ModsFormBuilder extends FormBuilder {
}
}
file_delete($form_values['ingest-file-location']);
}
catch (exception $e) {
} catch (exception $e) {
drupal_set_message(t('Error ingesting object: !e', array('!e' => $e->getMessage())), 'error');
watchdog(t("Fedora_Repository"), t("Error ingesting object: !e", array('!e' => $e->getMessage())), NULL, WATCHDOG_ERROR);
return;
}
}
function createCollectionPolicy($form_values, &$dom, &$rootElement) {
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$model = new fedora_item($form_values['content_model_pid']);
@ -378,9 +374,7 @@ class ModsFormBuilder extends FormBuilder {
$rootElement->appendChild($datastream);
}
function modsFromForm(&$form_values,&$dom)
{
function modsFromForm(&$form_values, &$dom) {
///begin writing MODS
$mods = $dom->createElement("mods:mods");
@ -489,7 +483,8 @@ class ModsFormBuilder extends FormBuilder {
}
$originInfo->appendChild($date);
$addOriginInfo = TRUE;
} else {
}
else {
if (isset($form_values['mods_createdDate'])) {
$date = $dom->createElement('mods:createdDate', htmlspecialchars(trim($form_values['mods_createdDate'])));
$originInfo->appendChild($date);
@ -513,7 +508,6 @@ class ModsFormBuilder extends FormBuilder {
$originInfo->appendChild($date);
$addOriginInfo = TRUE;
}
}
if (isset($form_values['mods_pubinfo_journalFreq']) && trim($form_values['mods_pubinfo_journalFreq']) != '') {
@ -550,11 +544,9 @@ class ModsFormBuilder extends FormBuilder {
}
if (isset($form_values['mods_language']) && trim($form_values['mods_language']) != '')
{
if (isset($form_values['mods_language']) && trim($form_values['mods_language']) != '') {
$languageList = explode(';', htmlspecialchars($form_values['mods_language']));
foreach ($languageList as $lang)
{
foreach ($languageList as $lang) {
$language = $dom->createElement('mods:language');
$langTerm = $dom->createElement('mods:languageTerm', htmlspecialchars($lang));
$langTerm->setAttribute('type', 'text');
@ -648,8 +640,6 @@ class ModsFormBuilder extends FormBuilder {
$accessCondition = $dom->createElement('mods:accessCondition', htmlspecialchars($license));
$accessCondition->setAttribute('type', 'Creative Commons License');
$mods->appendChild($accessCondition);
}
if (isset($form_values['mods_rights']) && trim($form_values['mods_rights']) != '') {
@ -706,11 +696,11 @@ class ModsFormBuilder extends FormBuilder {
if (isset($val['subject'])) {
$subject->appendChild($name);
$hasSubject = TRUE;
} else {
}
else {
$mods->appendChild($name);
}
}
}
}

11
plugins/PersonalCollectionClass.inc

@ -1,7 +1,9 @@
<?php
// $Id$
class PersonalCollectionClass {
function PersonalCollectionClass() {
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
}
@ -36,9 +38,7 @@ class PersonalCollectionClass {
$object = $soapClient->__soapCall('ingest', array(
$params
));
}
catch (exception $e) {
} catch (exception $e) {
drupal_set_message(t('Error ingesting personal collection object: !e', array('!e' => $e->getMessage())), 'error');
return FALSE;
}
@ -49,8 +49,7 @@ class PersonalCollectionClass {
$collectionTemplate = file_get_contents(drupal_get_path('module', 'Fedora_Repository') . '/collection_policies/PERSONAL-COLLECTION-POLICY.xml');
try {
$xml = new SimpleXMLElement($collectionTemplate);
}
catch (Exception $e) {
} catch (Exception $e) {
watchdog(t("Fedora_Repository"), t("Problem creating personal collection policy, could not parse collection policy stream."), NULL, WATCHDOG_ERROR);
drupal_set_message(t('Problem creating personal collection policy, could not parse collection policy stream: !e', array('!e' => $e->getMessage())), 'error');
return FALSE;

11
plugins/QtFormBuilder.php

@ -1,4 +1,5 @@
<?php
module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
/*
*
@ -7,16 +8,18 @@ module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
* implements methods from content model ingest form xml
* builds a dc metadata form
*/
class QtFormBuilder extends FormBuilder {
function QtFormBuilder() {
module_load_include('php', 'Fedora_Repository', 'plugins/FormBuilder');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
}
/*
* method overrides method in FormBuilder. We changed the dsid from OBJ to OBJ and added the TN datastream
*/
function createFedoraDataStreams($form_values, &$dom, &$rootElement) {
module_load_include('inc', 'fedora_repository', 'MimeClass');
global $base_url;
@ -91,12 +94,8 @@ if(empty($_SESSION['fedora_ingest_files']) || !isset($_SESSION['fedora_ingest_fi
$rootElement->appendChild($ds1);
}
}
}
}
?>

13
plugins/Refworks.inc

@ -1,5 +1,6 @@
<?php
// $Id$
/*
* Created on 26-Feb-08
@ -10,6 +11,7 @@
module_load_include('inc', 'fedora_repository', 'SecurityClass');
class Refworks {
private $romeoUrlString = "";
private $referenceList;
private $securityHelper;
@ -68,8 +70,7 @@ class Refworks {
//$xml=simplexml_load_string(trim(file_get_contents($file),NULL,TRUE));
//$dom = dom_import_simplexml($xml);//test to see if it behaves better
//$xml = new SimpleXMLElement(trim(file_get_contents($file)));
}
catch (Exception $e) {
} catch (Exception $e) {
drupal_set_message(t('Error processing Refworks file: ') . $e->getMessage());
return FALSE;
}
@ -278,8 +279,7 @@ class Refworks {
if ($deleteFiles > 0) {
unlink($form_values['fullpath']);
}
}
catch (exception $e) {
} catch (exception $e) {
$errors++;
$errorMessage = 'yes';
watchdog(t("FEDORA_REPOSITORY"), t("Error during ingest !it !e", array('!it' => $item_title, '!e' => $e)), NULL, WATCHDOG_ERROR);
@ -326,7 +326,6 @@ class Refworks {
$rdfdesc->appendChild($member);
$rdfdesc->appendChild($model);
$rootElement->appendChild($drdf);
}
function createRomeoDataStream(&$dom, &$rootElement) {
@ -397,7 +396,6 @@ class Refworks {
$rootElement->appendChild($objproperties);
}
/**
* Read the list of Users from the U1 field and Roles from the U2 field and add elements
* to the security policy record for this item, then add the record as the security policy datastream.
@ -446,4 +444,5 @@ class Refworks {
$rootElement->appendChild($ds1);
$ds1content->appendChild($dom->importNode(dom_import_simplexml($custom_policy_sxe), TRUE));
}
}

6
plugins/ShowDemoStreamsInFieldSets.inc

@ -1,5 +1,6 @@
<?php
// $Id$
/*
* Created on 17-Apr-08
@ -7,7 +8,9 @@
*
*/
class ShowDemoStreamsInFieldSets {
private $pid = NULL;
function ShowDemoStreamsInFieldSets($pid) {
//drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$this->pid = $pid;
@ -22,4 +25,5 @@ class ShowDemoStreamsInFieldSets {
);
return theme('fieldset', $collection_fieldset);
}
}

16
plugins/ShowStreamsInFieldSets.inc

@ -1,11 +1,14 @@
<?php
// $Id$
/*
* Created on 17-Apr-08
*/
class ShowStreamsInFieldSets {
private $pid = NULL;
function ShowStreamsInFieldSets($pid) {
$this->pid = $pid;
}
@ -41,7 +44,6 @@ class ShowStreamsInFieldSets {
return theme('fieldset', $collection_fieldset);
}
// Same as showTN but artinventory stores the image in a dsid of IMAGE instead of OBJ
function showArtInventoryTN() {
global $base_url;
@ -109,7 +111,6 @@ class ShowStreamsInFieldSets {
return $tabset;
}
function showQdc() {
module_load_include('inc', 'fedora_repository', 'ObjectHelper');
$objectHelper = new ObjectHelper();
@ -131,8 +132,6 @@ class ShowStreamsInFieldSets {
return "<a href='" . $base_url . "/fedora/repository/" . $this->pid . "/OBJ/" . $streams['OBJ']['label'] . "'>" . $streams['OBJ']['label'] . "</a>";
}
function showRefworks() {
$path = drupal_get_path('module', 'fedora_repository');
module_load_include('inc', 'fedora_repository', 'ObjectHelper');
@ -144,8 +143,7 @@ class ShowStreamsInFieldSets {
}
try {
$proc = new XsltProcessor();
}
catch (Exception $e) {
} catch (Exception $e) {
drupal_set_message(t("!e", array('!e' => $e->getMessage())), 'error');
return " ";
}
@ -189,8 +187,7 @@ class ShowStreamsInFieldSets {
try {
$proc = new XsltProcessor();
}
catch (Exception $e) {
} catch (Exception $e) {
drupal_set_message(t("!e", array('!e' => $e->getMessage())), 'error');
return;
}
@ -210,4 +207,5 @@ class ShowStreamsInFieldSets {
);
return theme('fieldset', $collection_fieldset);
}
}

2
plugins/fedoraObject.inc

@ -1,6 +1,7 @@
<?php
class FedoraObject {
function __construct($pid = '') {
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
if (!empty($pid)) {
@ -47,4 +48,5 @@ class FedoraObject {
return $tabset;
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save