Author: peter
Date: Sun Sep 13 16:35:24 2009
New Revision: 3253
Log:
map Publication Notes to EAD <bibliography> and only output General Notes to
EAD <note> element
Modified:
trunk/apps/qubit/modules/informationobject/templates/exportEadSuccess.xml.php
Modified:
trunk/apps/qubit/modules/informationobject/templates/exportEadSuccess.xml.php
==============================================================================
---
trunk/apps/qubit/modules/informationobject/templates/exportEadSuccess.xml.php
Sun Sep 13 16:04:31 2009 (r3252)
+++
trunk/apps/qubit/modules/informationobject/templates/exportEadSuccess.xml.php
Sun Sep 13 16:35:24 2009 (r3253)
@@ -117,8 +117,7 @@
<?php foreach ($langmaterial as $languageCode): ?>
<language langcode="<?php echo ($iso6392 =
$iso639convertor->getID3($languageCode)) ? strtolower($iso6392) : $languageCode
?>"><?php echo format_language($languageCode) ?></language><?php endforeach; ?>
</langmaterial><?php endif; ?>
- <?php if (0 < count($notes = $informationObject->getNotes())): ?><?php
foreach ($notes as $note): ?>
- <note type="<?php echo
htmlspecialchars($note->getType(array('cultureFallback' => true))) ?>"
encodinganalog="3.6.1"><p><?php echo
htmlspecialchars($note->getContent(array('cultureFallback' => true)))
?></p></note><?php endforeach; ?><?php endif; ?>
+ <?php if (0 < count($notes =
$informationObject->getNotesByType(array('noteTypeId' =>
QubitTerm::GENERAL_NOTE_ID)))): ?><?php foreach ($notes as $note): ?><note
type="<?php echo htmlspecialchars($note->getType(array('cultureFallback' =>
true))) ?>" encodinganalog="3.6.1"><p><?php echo
htmlspecialchars($note->getContent(array('cultureFallback' => true)))
?></p></note><?php endforeach; ?><?php endif; ?>
</did>
<?php foreach ($informationObject->getCreators() as $creator): ?>
<?php if ($value = $creator->getHistory(array('cultureFallback' =>
true))): ?>
@@ -176,6 +175,7 @@
<userestrict encodinganalog="3.4.2"><p><?php echo
htmlspecialchars(nl2br($value)) ?></p></userestrict><?php endif; ?>
<?php if (0 < strlen($value =
$informationObject->getFindingAids(array('cultureFallback' => true)))): ?>
<otherfindaid encodinganalog="3.4.5"><p><?php echo
htmlspecialchars(nl2br($value)) ?></p></otherfindaid><?php endif; ?>
+ <?php if (0 < count($publicationNotes =
$informationObject->getNotesByType(array('noteTypeId' =>
QubitTerm::PUBLICATION_NOTE_ID)))): ?><?php foreach ($publicationNotes as
$note): ?><bibliography encodinganalog="3.5.4"><?php echo
htmlspecialchars(nl2br($note)) ?></bibliography><?php endforeach; ?><?php
endif; ?>
<dsc type="combined"><?php $nestedRgt = array() ?><?php foreach
($informationObject->getDescendants()->orderBy('lft') as $descendant): ?>
<c <?php if (0 < strlen($levelOfDescription =
$descendant->getLevelOfDescription()->getName(array('culture' => 'en')))):
?>level="<?php if (in_array(strtolower($levelOfDescription), $eadLevels)):
?><?php echo strtolower($levelOfDescription).'"' ?><?php else: ?><?php echo
'otherlevel" otherlevel="'.$levelOfDescription.'"' ?><?php endif; ?><?php
endif; ?>>
@@ -237,8 +237,7 @@
<?php foreach ($langmaterial as $languageCode): ?>
<language langcode="<?php echo ($iso6392 =
$iso639convertor->getID3($languageCode)) ? strtolower($iso6392) : $languageCode
?>"><?php echo format_language($languageCode) ?></language><?php endforeach; ?>
</langmaterial><?php endif; ?>
- <?php if (0 < count($notes = $descendant->getNotes())): ?><?php foreach
($notes as $note): ?>
- <note type="<?php echo htmlspecialchars($note->getType()) ?>"
encodinganalog="3.6.1"><p><?php echo
htmlspecialchars($note->getContent(array('cultureFallback' => true)))
?></p></note><?php endforeach; ?><?php endif; ?>
+ <?php if (0 < count($notes =
$descendant->getNotesByType(array('noteTypeId' =>
QubitTerm::GENERAL_NOTE_ID)))): ?><?php foreach ($notes as $note): ?><note
type="<?php echo htmlspecialchars($note->getType(array('cultureFallback' =>
true))) ?>" encodinganalog="3.6.1"><p><?php echo
htmlspecialchars($note->getContent(array('cultureFallback' => true)))
?></p></note><?php endforeach; ?><?php endif; ?>
</did>
<?php foreach ($descendant->getCreators() as $creator): ?>
<?php if ($value = $creator->getHistory(array('cultureFallback' =>
true))): ?>
@@ -295,6 +294,7 @@
<userestrict encodinganalog="3.4.2"><p><?php echo
htmlspecialchars(nl2br($value)) ?></p></userestrict><?php endif; ?>
<?php if (0 < strlen($value =
$descendant->getFindingAids(array('cultureFallback' => true)))): ?>
<otherfindaid encodinganalog="3.4.5"><p><?php echo
htmlspecialchars(nl2br($value)) ?></p></otherfindaid><?php endif; ?>
+ <?php if (0 < count($publicationNotes =
$descendant->getNotesByType(array('noteTypeId' =>
QubitTerm::PUBLICATION_NOTE_ID)))): ?><?php foreach ($publicationNotes as
$note): ?><bibliography encodinganalog="3.5.4"><?php echo
htmlspecialchars(nl2br($note)) ?></bibliography><?php endforeach; ?><?php
endif; ?>
<?php if ($descendant->getRgt() == $descendant->getLft() + 1): ?>
</c>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---