Author: mj
Date: Fri Nov  4 12:31:32 2011
New Revision: 10264

Log:
Fixes #2038.

Modified:
   trunk/lib/model/QubitTerm.php
   trunk/plugins/sfEadPlugin/modules/sfEadPlugin/templates/indexSuccess.xml.php

Modified: trunk/lib/model/QubitTerm.php
==============================================================================
--- trunk/lib/model/QubitTerm.php       Fri Nov  4 11:58:32 2011        (r10263)
+++ trunk/lib/model/QubitTerm.php       Fri Nov  4 12:31:32 2011        (r10264)
@@ -319,6 +319,11 @@
     return QubitTaxonomy::getTermsById(QubitTaxonomy::NOTE_TYPE_ID, $options);
   }
 
+  public function getSourceNotes()
+  {
+    return $this->getNotesByType(array('noteTypeId' => 
QubitTerm::SOURCE_NOTE_ID));
+  }
+
   public static function getSubjects($options = array())
   {
     return QubitTaxonomy::getTermsById(QubitTaxonomy::SUBJECT_ID, $options);

Modified: 
trunk/plugins/sfEadPlugin/modules/sfEadPlugin/templates/indexSuccess.xml.php
==============================================================================
--- 
trunk/plugins/sfEadPlugin/modules/sfEadPlugin/templates/indexSuccess.xml.php    
    Fri Nov  4 11:58:32 2011        (r10263)
+++ 
trunk/plugins/sfEadPlugin/modules/sfEadPlugin/templates/indexSuccess.xml.php    
    Fri Nov  4 12:31:32 2011        (r10264)
@@ -173,7 +173,7 @@
     <genreform><?php echo esc_specialchars($materialtype->getTerm()) 
?></genreform>
 <?php endforeach; ?>
 <?php foreach ($subjects as $subject): ?>
-    <subject><?php echo esc_specialchars($subject->getTerm()) ?></subject>
+    <subject<?php if ($subject->getTerm()->code):?> authfilenumber="<?php echo 
$subject->getTerm()->code ?>"<?php endif; ?><?php if 
($subject->getTerm()->getSourceNotes()):?> source="<?php foreach 
($subject->getTerm()->getSourceNotes() as $note): ?><?php echo $note ?><?php 
endforeach; ?>"<?php endif; ?>><?php echo esc_specialchars($subject->getTerm()) 
?></subject>
 <?php endforeach; ?>
 <?php foreach ($places as $place): ?>
     <geogname><?php echo esc_specialchars($place->getTerm()) ?></geogname>

-- 
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.com/group/qubit-commits?hl=en.

Reply via email to