Skip to content

Commit 7f34cad

Browse files
committed
Enhancements #66, #67, #70: render EAD to HTML more semantically.
2 parents 3b738dd + df8a923 commit 7f34cad

File tree

6 files changed

+368
-18
lines changed

6 files changed

+368
-18
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Having problems or solved a problem? Check out the Islandora google groups for a
5050
### Q. What elements are necessary in finding aid EAD metadata?
5151

5252
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:
53+
* `subgrp`
5354
* `series`
5455
* `subseries`
5556
* `file`

includes/blocks.inc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ function islandora_manuscript_container_list($object) {
6666
'default' => array(
6767
'select_node' => FALSE,
6868
),
69+
'subgrp' => array(
70+
'valid_children' => array(
71+
'series',
72+
),
73+
),
6974
'series' => array(
7075
'valid_children' => array(
7176
'subseries',

includes/ead_html.inc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,22 @@ define('ISLANDORA_MANUSCRIPT_CONTAINER_TAG_URI', 'http://islandora.ca/manuscript
2323
*/
2424
function islandora_manuscript_preprocess_ead_display_variables(&$variables) {
2525
$variables['xslt_parameters'][''] = (isset($variables['xslt_parameters']['']) ? $variables['xslt_parameters'][''] : array()) + array(
26+
"containerlist_string" => t('Container List'),
2627
"container_string" => t('Containers'),
28+
"unitid_string" => t('Unit Id'),
29+
"physdesc_string" => t('Extent'),
30+
"physloc_string" => t('Physical Location'),
31+
"langmaterial_string" => t('Language'),
32+
"controlaccess_string" => t('Subjects'),
33+
"corpname_string" => t('Corporate Names'),
34+
"persname_string" => t('Personal Names'),
35+
"famname_string" => t('Family Names'),
36+
"geoname_string" => t('Geographic Names'),
37+
"occupation_string" => t('Occupations'),
38+
"subject_string" => t('Other Subjects'),
39+
"genreform_string" => t('Genres'),
2740
);
41+
2842
$variables['doc'] = $doc = new DOMDocument();
2943
$doc->loadXML($variables['object']['EAD']->content);
3044

includes/jstreebuilder.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,12 @@ class ContainerListJSTreeBuilder extends JSTreeBuilder {
214214
/**
215215
* Inherits.
216216
*
217-
* Only return results for series and subseries, and make a couple
217+
* Only return results for subgrp, series and subseries, and make a couple
218218
* adjustments to the data.
219219
*/
220220
protected function getComponentTree(DOMElement $element) {
221221
$type = $element->getAttribute('level');
222-
if (in_array($type, array('series', 'subseries'))) {
222+
if (in_array($type, array('subgrp', 'series', 'subseries'))) {
223223
$to_return = parent::getComponentTree($element);
224224
$to_return['a_attr']['href'] = url("islandora/object/{$this->object->id}", array('fragment' => $to_return['id']));
225225
$to_return['id'] = "container_list_{$to_return['id']}";

includes/link.inc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ function islandora_manuscript_link_to_finding_aid_form($form, &$form_state, Abst
210210
'default' => array(
211211
'select_node' => FALSE,
212212
),
213+
'subgrp' => array(
214+
'valid_children' => array(
215+
'series',
216+
),
217+
),
213218
'series' => array(
214219
'valid_children' => array(
215220
'subseries',

0 commit comments

Comments
 (0)