Author: peter
Date: 2008-11-11 12:02:43 -0800 (Tue, 11 Nov 2008)
New Revision: 1563
Modified:
trunk/qubit/apps/qubit/modules/informationobject/actions/showAction.class.php
trunk/qubit/apps/qubit/modules/informationobject/templates/editIsadSuccess.php
trunk/qubit/apps/qubit/modules/informationobject/templates/showIsadSuccess.php
Log:
update display of dates, creators and history
Modified:
trunk/qubit/apps/qubit/modules/informationobject/actions/showAction.class.php
===================================================================
---
trunk/qubit/apps/qubit/modules/informationobject/actions/showAction.class.php
2008-11-11 19:13:01 UTC (rev 1562)
+++
trunk/qubit/apps/qubit/modules/informationobject/actions/showAction.class.php
2008-11-11 20:02:43 UTC (rev 1563)
@@ -31,6 +31,7 @@
// Events
$this->actorEvents = $this->informationObject->getActorEvents();
+ $this->creators = $this->informationObject->getCreators();
// Properties
$this->languageCodes = $this->informationObject->getProperties($name =
'information_object_language');
Modified:
trunk/qubit/apps/qubit/modules/informationobject/templates/editIsadSuccess.php
===================================================================
---
trunk/qubit/apps/qubit/modules/informationobject/templates/editIsadSuccess.php
2008-11-11 19:13:01 UTC (rev 1562)
+++
trunk/qubit/apps/qubit/modules/informationobject/templates/editIsadSuccess.php
2008-11-11 20:02:43 UTC (rev 1563)
@@ -86,7 +86,7 @@
<table id="actorEvents" class="inline" style="margin-top: 25px;">
<tr>
<th style="width: 35%;"><?php echo __('Name') ?></th>
- <th style="width: 25%;"><?php echo __('Role/Event') ?></th>
+ <th style="width: 25%;"><?php echo __('Role').'/'.__('Event') ?></th>
<th style="width: 30%;"><?php echo __('Date(s)') ?></th>
<th style="width: 10%"> </th>
</tr>
@@ -95,7 +95,7 @@
<tr>
<?php if ($actorEvent->getActor()): ?>
<td>
- <?php echo link_to($actorEvent->getActor(),
'actor/edit?id='.$actorEvent->getActorId()) ?>
+ <?php echo $actorEvent->getActor() ?>
</td>
<?php else: ?>
<td></td>
@@ -169,15 +169,20 @@
<?php if ($creators): ?>
<?php foreach ($creators as $creator): ?>
<div class="form-item">
- <label for="history"><?php echo __('administrative/biographical
history'); ?></label>
- <table class="inline" style="width: 98%;">
- <tr><td style="width: 95%; border: 0;">
- <?php echo '<b>'.$creator.'</b><br />' ?>
- <?php echo nl2br($creator->getHistory(array('cultureFallback' =>
'true'))) ?></td><td style="border: 0;"><?php echo link_to(image_tag('pencil',
'align=top'),
'actor/edit?id='.$creator->getId().'&informationObjectReroute='.$informationObject->getId())
?>
- </td></tr></table>
- </div>
- <?php endforeach; ?>
- <?php endif; ?>
+ <label>
+ <?php $entityTypeId = $creator->getEntityTypeId() ?>
+ <?php if ($entityTypeId == QubitTerm::CORPORATE_BODY_ID): ?>
+ <?php echo __('Administrative').' ' ?>
+ <?php elseif (($entityTypeId == QubitTerm::PERSON_ID) || ($entityTypeId
== QubitTerm::FAMILY_ID)): ?>
+ <?php echo __('Biographic').' ' ?>
+ <?php endif; ?>
+ <?php echo __('history').': ' ?></td><td><?php echo $creator ?>
+ </label>
+ <table class="inline" style="margin: 0;"><tr><td><?php echo
nl2br($creator->getHistory(array('cultureFallback' => 'true'))) ?></td><td
style="width: 20px;"><?php echo link_to(image_tag('pencil', 'align=top'),
'actor/edit?id='.$creator->getId().'&informationObjectReroute='.$informationObject->getId())
?></td></tr>
+ </table>
+ </div>
+ <?php endforeach; ?>
+ <?php endif; ?>
<div class="form-item">
<label for="repository_id"><?php echo __('repository'); ?></label>
Modified:
trunk/qubit/apps/qubit/modules/informationobject/templates/showIsadSuccess.php
===================================================================
---
trunk/qubit/apps/qubit/modules/informationobject/templates/showIsadSuccess.php
2008-11-11 19:13:01 UTC (rev 1562)
+++
trunk/qubit/apps/qubit/modules/informationobject/templates/showIsadSuccess.php
2008-11-11 20:02:43 UTC (rev 1563)
@@ -18,13 +18,6 @@
</tr>
<?php endif; ?>
-<?php if ($informationObject->getLevelOfDescriptionId()) : ?>
-<tr>
-<th><?php echo __('level of description'); ?></th>
-<td><?php echo $informationObject->getLevelOfDescription(); ?></td>
-</tr>
-<?php endif; ?>
-
<?php if (count($informationObject->getDates()) > 0) : ?>
<tr><th><?php echo __('dates'); ?></th><td>
<?php foreach ($informationObject->getDates() as $date): ?>
@@ -35,31 +28,23 @@
<?php echo $date->getType()->getRole()?>: <?php echo $actor ?><br />
<?php endif; ?>
<?php if ($place=$date->getPlace()): ?>
- <?php echo __('place of').' '.$date->getType() ?>: <?php echo $place
?><br />
+ <?php echo __('Place') ?>: <?php echo $place ?><br />
<?php endif; ?>
<?php if ($note=$date->getDescription()): ?>
- <?php echo __('note') ?>: <?php echo $date->getDescription() ?><br />
+ <?php echo __('Note') ?>: <?php echo $date->getDescription() ?><br />
<?php endif; ?>
</div>
<?php endif; ?>
-
-<br />
<?php endforeach; ?>
</td></tr>
<?php endif; ?>
-<?php foreach ($actorEvents as $actorEvent): ?>
- <tr>
- <th><?php echo $actorEvent->getType()->getRole(); ?></th>
- <td><?php echo link_to($actorEvent->getActor(),
'actor/show?id='.$actorEvent->getActorId()); ?>
- <?php if ($actorEvent->getActor()->getDatesOfExistence()) echo '
('.$actorEvent->getActor()->getDatesOfExistence(array('cultureFallback' =>
true)).')'; ?>
- <br />
- <?php if ($actorEvent->getTypeId() == QubitTerm::CREATION_ID): ?>
- <?php echo
nl2br($actorEvent->getActor()->getHistory(array('cultureFallback' => true))); ?>
- <?php endif; ?>
- </td>
- </tr>
-<?php endforeach; ?>
+<?php if ($informationObject->getLevelOfDescriptionId()) : ?>
+<tr>
+<th><?php echo __('level of description'); ?></th>
+<td><?php echo $informationObject->getLevelOfDescription(); ?></td>
+</tr>
+<?php endif; ?>
<?php if (strlen($value =
$informationObject->getExtentAndMedium(array('cultureFallback' => true))) > 0)
: ?>
<tr>
@@ -80,6 +65,26 @@
</tr>
<?php endif; ?>
+<?php foreach ($creators as $creator): ?>
+ <tr>
+ <th><?php echo __('name of creator') ?></th>
+ <td><?php echo link_to($creator, 'actor/show?id='.$creator->getId()); ?>
+ <?php if ($existence =
$creator->getDatesOfExistence(array('cultureFallback' => true))) echo '
('.$existence.')'; ?>
+ <?php if ($history = $creator->getHistory(array('cultureFallback' =>
true))): ?>
+ <table class="detail" style="margin-top: 5px;"><tr><th style="text-align:
left; padding: 1px;">
+ <?php if ($creator->getEntityTypeId() == QubitTerm::CORPORATE_BODY_ID): ?>
+ <?php echo __('Administrative').' ' ?>
+ <?php else: ?>
+ <?php echo __('Biographic').' ' ?>
+ <?php endif; ?>
+ <?php echo __('history') ?></th></tr>
+ <tr><td><?php echo nl2br($history); ?></td></tr>
+ </table>
+ <?php endif; ?>
+ </td>
+ </tr>
+<?php endforeach; ?>
+
<?php if (count($physicalObjects) && $editCredentials): ?>
<?php include_partial('physicalobject/show',
array('informationObject'=>$informationObject,
'physicalObjects'=>$physicalObjects)); ?>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---