Skip to content

Commit

Permalink
Merge remote branch 'uls/headings' into uls-install
Browse files Browse the repository at this point in the history
Conflicts:
	includes/ead_html.inc
	transforms/ead_to_html.xslt
  • Loading branch information
ctgraham committed Nov 8, 2021
2 parents 0746b49 + e3e085e commit 1084ce0
Show file tree
Hide file tree
Showing 6 changed files with 440 additions and 21 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Having problems or solved a problem? Check out the Islandora google groups for a
### Q. What elements are necessary in finding aid EAD metadata?

A. Components (`c`, `c01`, `c02`, `c03`, _etc_) *MUST* have `id` attributes unique to the given XML document in order to reliably produce links and relationships. Components *MUST* have a `level` as one of:
* `subgrp`
* `series`
* `subseries`
* `file`
Expand Down
10 changes: 10 additions & 0 deletions includes/blocks.inc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ function islandora_manuscript_container_list($object) {
'default' => array(
'select_node' => FALSE,
),
'recordgrp' => array(
'valid_children' => array(
'subgrp',
),
),
'subgrp' => array(
'valid_children' => array(
'series',
),
),
'series' => array(
'valid_children' => array(
'subseries',
Expand Down
20 changes: 20 additions & 0 deletions includes/ead_html.inc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,27 @@ define('ISLANDORA_MANUSCRIPT_CONTAINER_TAG_URI', 'http://islandora.ca/manuscript
*/
function islandora_manuscript_preprocess_ead_display_variables(&$variables) {
$variables['xslt_parameters'][''] = (isset($variables['xslt_parameters']['']) ? $variables['xslt_parameters'][''] : array()) + array(
"containerlist_string" => t('Container List'),
"container_string" => t('Containers'),
"unitid_string" => t('Unit Id'),
"physdesc_string" => t('Extent'),
"physloc_string" => t('Physical Location'),
"langmaterial_string" => t('Language'),
"controlaccess_string" => t('Subjects'),
"corpname_string" => t('Corporate Names'),
"persname_string" => t('Personal Names'),
"famname_string" => t('Family Names'),
"geogname_string" => t('Geographic Names'),
"occupation_string" => t('Occupations'),
"subject_string" => t('Other Subjects'),
"genreform_string" => t('Genres'),
"recordgrp_string" => t('Record Group'),
"subgrp_string" => t('Subgroup'),
"series_string" => t('Series'),
"subseries_string" => t('Subseries'),
"subfonds" => t('Subfonds'),
"file_string" => t('File'),
"item_string" => t('Item'),
);
$variables['xslt_parameters']['']['call_query_link'] = variable_get('islandora_manuscript_query_enable', true) ? 'true' : 'false';
$variables['xslt_parameters']['']['call_direct_link'] = variable_get('islandora_manuscript_direct_enable', false) ? 'true' : false;
Expand Down
4 changes: 2 additions & 2 deletions includes/jstreebuilder.inc
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,12 @@ class ContainerListJSTreeBuilder extends JSTreeBuilder {
/**
* Inherits.
*
* Only return results for series and subseries, and make a couple
* Only return results for recordgrp, subgrp, series and subseries, and make a couple
* adjustments to the data.
*/
protected function getComponentTree(DOMElement $element) {
$type = $element->getAttribute('level');
if (in_array($type, array('series', 'subseries'))) {
if (in_array($type, array('recordgrp', 'subgrp', 'series', 'subseries'))) {
$to_return = parent::getComponentTree($element);
$to_return['a_attr']['href'] = url("islandora/object/{$this->object->id}", array('fragment' => $to_return['id']));
$to_return['id'] = "container_list_{$to_return['id']}";
Expand Down
10 changes: 10 additions & 0 deletions includes/link.inc
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,16 @@ function islandora_manuscript_link_to_finding_aid_form($form, &$form_state, Abst
'default' => array(
'select_node' => FALSE,
),
'recordgrp' => array(
'valid_children' => array(
'subgrp',
),
),
'subgrp' => array(
'valid_children' => array(
'series',
),
),
'series' => array(
'valid_children' => array(
'subseries',
Expand Down
Loading

0 comments on commit 1084ce0

Please sign in to comment.