Author: david
Date: 2008-11-10 17:44:40 -0800 (Mon, 10 Nov 2008)
New Revision: 1554
Modified:
trunk/qubit/apps/qubit/modules/informationobject/templates/editRadSuccess.php
Log:
Copy changes for events and acess points from editISAD template to editRAD
template.
Modified:
trunk/qubit/apps/qubit/modules/informationobject/templates/editRadSuccess.php
===================================================================
---
trunk/qubit/apps/qubit/modules/informationobject/templates/editRadSuccess.php
2008-11-11 01:39:45 UTC (rev 1553)
+++
trunk/qubit/apps/qubit/modules/informationobject/templates/editRadSuccess.php
2008-11-11 01:44:40 UTC (rev 1554)
@@ -198,44 +198,87 @@
<fieldset class="collapsible collapsed">
<legend><?php echo __('1.4 Dates of creation area'); ?></legend>
-
<div class="form-item">
<label for="newCreationDateNote"><?php echo __('creation context');
?></label>
- <table class="inline">
+ <table id="actorEvents" class="inline" style="margin-top: 25px;">
+ <tr style="border-top: 1px solid #999999;">
+ <td style="width: 40%; color: #999999; font-weight: bold"><?php echo
__('Name') ?></td>
+ <td style="width: 25%; color: #999999; font-weight: bold"><?php echo
__('Role/Event') ?></td>
+ <td style= "width: 30%; color: #999999; font-weight: bold"><?php
echo __('Date(s)') ?></td>
+ <td style="width:5%"></td>
+ </tr>
+ <?php if(count($actorEvents)): ?>
+ <?php foreach ($actorEvents as $actorEvent): ?>
+ <tr>
+ <?php if ($actorEvent->getActor()): ?>
+ <td>
+ <?php echo link_to($actorEvent->getActor(),
'actor/edit?id='.$actorEvent->getActorId()) ?>
+ </td>
+ <?php else: ?>
+ <td> </td>
+ <?php endif; ?>
+ <td>
+ <?php echo $actorEvent->getType()->getRole() ?>
+ </td>
+ <td><?php echo $actorEvent->getDateDisplay(array('cultureFallback'
=> 'true')) ?></td>
+ <td style="text-align: center;">
+ <?php echo link_to(image_tag('delete', 'align=top'),
'informationobject/deleteEvent?eventId='.$actorEvent->getId().'&returnTemplate=isad')
?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ <?php endif; ?>
+ </table>
- <tr>
- <td colspan ="2" class="headerCell" style="width: 55%;"><?php echo
__('creator'); ?></td>
- <td class="headerCell" style="width: 40%;"><i><?php echo __('or'); ?>
</i><?php echo __('add new creator name'); ?></td>
- </tr>
- <tr>
- <td colspan ="2"><?php echo object_select_tag($newCreationEvent,
'getActorId', array('related_class' => 'QubitActor', 'include_blank' => true,
'peer_method' => 'getAllExceptUsers')) ?></td>
- <td><?php echo input_tag('newActorAuthorizedName') ?></td>
- </tr>
- <tr><td class="headerCell"><?php echo __('creation year'); ?></td><td
class="headerCell"><?php echo __('end year (if range)'); ?></td>
- <td class="headerCell"><?php echo __('date display (defaults to date
range)'); ?></td></tr>
- <tr><td><?php echo input_tag('creationYear', '', 'maxlength=4
style="width:35px;"') ?></td>
- <td><?php echo input_tag('endYear', '', 'maxlength=4
style="width:35px;"') ?></td>
- <td><?php echo input_tag('newCreationDateNote') ?></td></tr>
- </table>
+ <!-- add new creation event yui dialog object -->
+ <?php echo include_partial('newActorEventDialog') ?>
- <?php if ($creationEvents): ?>
- <table class="inline" style="margin-top: 20px;">
- <tr><td style="width: 55%; color: #999999; font-weight: bold;
border-top: 1px solid #000000;"><?php echo __('Creator') ?></td>
- <td style= "width: 40%; color: #999999; font-weight: bold; border-top:
1px solid #000000;"><?php echo __('Creation date(s)') ?></td>
- <td style="width:5%; border-top: 1px solid #000000;"></td></tr>
- <?php foreach ($creationEvents as $creationEvent): ?>
- <tr><td><?php if ($creationEvent->getActor()): ?>
- <?php echo link_to($creationEvent->getActor(),
'actor/edit?id='.$creationEvent->getActorId()) ?>
- <?php endif; ?></td>
- <td><?php echo $creationEvent->getDescription(array('cultureFallback'
=> 'true')) ?></td>
- <td style="text-align: center;"><?php echo link_to(image_tag('delete',
'align=top'),
'informationobject/deleteEvent?eventId='.$creationEvent->getId().'&returnTemplate=rad')
?></td></tr>
- <?php endforeach; ?>
- <?php endif; ?>
+ <div class="form-item">
+ <fieldset id="newActorEventFields" style="border: 1px solid #cccccc;
padding: 1px; background: #fff">
+ <label for="newActorEvent"><?php echo __('new event'); ?></label>
+
+ <!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
+ <!-- NOTE: The newActorEventDialog script cuts this *entire* -->
+ <!-- "newActorEvent" table and pastes it in a YUI dialog object. -->
+ <!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
+ <table id="newActorEvent" class="inline">
+ <tr>
+ <td colspan ="2" class="headerCell" style="width: 55%;"><?php echo
__('name'); ?></td>
+ <td class="headerCell" style="width: 40%;"><i><?php echo __('or');
?> </i><?php echo __('add new name'); ?></td>
+ </tr>
+ <tr>
+ <td colspan ="2"><?php echo object_select_tag($newActorEvent,
'getActorId',
+ array('related_class' => 'QubitActor',
+ 'name' => 'newActorEvent[actorId]',
+ 'include_blank' => true,
+ 'peer_method' => 'getAllExceptUsers')) ?></td>
+ <td><?php echo input_tag('newActorEvent[newActorAuthorizedName]')
?></td>
+ </tr>
+ <tr>
+ <td colspan="2" class="headerCell" style="width: 55%;"><?php echo
__('event type') ?></td><td class="headerCell" style="width: 40%;"><?php echo
__('place') ?></td>
+ </tr>
+ <tr>
+ <td colspan="2"><?php echo select_tag('newActorEvent[eventTypeId]',
options_for_select($actorEventTypes, $defaultActorEventType))?></td>
+ <td><?php echo select_tag('newActorEvent[placeId]',
options_for_select($actorEventPlaces))?></td>
+ </tr>
+ <tr>
+ <td class="headerCell"><?php echo __('year'); ?></td><td
class="headerCell"><?php echo __('end year'); ?></td>
+ <td class="headerCell"><?php echo __('date display (defaults to date
range)'); ?></td></tr>
+ <tr>
+ <td><?php echo input_tag('newActorEvent[year]', '', 'maxlength=4
style="width:35px;"') ?></td>
+ <td><?php echo input_tag('newActorEvent[endYear]', '', 'maxlength=4
style="width:35px;"') ?></td>
+ <td><?php echo input_tag('newActorEvent[dateDisplay]') ?></td>
+ </tr>
+ <tr>
+ <td colspan="3" class="headerCell"><?php echo __('note'); ?></td>
+ </tr>
+ <tr>
+ <td colspan="3"><?php echo input_tag('newActorEvent[description]')
?></td>
+ </tr>
</table>
+ </fieldset>
</div>
<?php if ($creators): ?>
-
<?php foreach ($creators as $creator): ?>
<div class="form-item">
<label for="history"><?php echo __('administrative/biographical
history'); ?></label>
@@ -247,6 +290,7 @@
</div>
<?php endforeach; ?>
<?php endif; ?>
+ </div>
</fieldset>
<fieldset class="collapsible collapsed">
@@ -482,9 +526,10 @@
<fieldset class="collapsible collapsed">
<legend><?php echo __('access points'); ?></legend>
-
- <div class="form-item">
- <label for="subject_id"><?php echo __('subject access points');
?></label>
+
+ <?php include_partial('addAccessPointTermDialog') ?>
+ <div class="form-item" id="subjectAccessPoints">
+ <label for="subject_id"><?php echo __('subject access points'); ?><span
id="addSubjectAccessPointLink" style="font-weight:normal"></span></label>
<?php if ($subjectAccessPoints): ?>
<?php foreach ($subjectAccessPoints as $subject): ?>
<?php echo $subject->getTerm() ?> <?php echo
link_to(image_tag('delete', 'align=top'),
'informationobject/deleteTermRelation?TermRelationId='.$subject->getId().'&returnTemplate=rad')
?><br/>
@@ -493,8 +538,8 @@
<?php echo object_select_tag($newSubjectAccessPoint, 'getTermId',
array('name' => 'subject_id', 'id' => 'subject_id', 'include_blank' => true,
'peer_method' => 'getSubjects', 'class'=>'multiInstance')) ?>
</div>
- <div class="form-item">
- <label for="place_id"><?php echo __('place access points'); ?></label>
+ <div class="form-item" id="placeAccessPoints">
+ <label for="place_id"><?php echo __('place access points'); ?><span
id="addPlaceAccessPointLink" style="font-weight:normal"></span></label>
<?php if ($placeAccessPoints): ?>
<?php foreach ($placeAccessPoints as $place): ?>
<?php echo $place->getTerm() ?> <?php echo
link_to(image_tag('delete', 'align=top'),
'informationobject/deleteTermRelation?TermRelationId='.$place->getId().'&returnTemplate=rad')
?><br/>
@@ -507,8 +552,8 @@
<label for="name_id"><?php echo __('name access points'); ?></label>
<?php if ($nameAccessPoints): ?>
<?php foreach ($nameAccessPoints as $name): ?>
- <?php echo $name->getActor().' ('.$name->getActorRole().')' ?>
- <?php if ($name->getActorRoleId() == QubitTerm::SUBJECT_ID): ?>
+ <?php echo $name->getActor().' ('.$name->getType()->getRole().')' ?>
+ <?php if ($name->getTypeId() == QubitTerm::SUBJECT_ID): ?>
<?php echo link_to(image_tag('delete', 'align=top'),
'informationobject/deleteEvent?eventId='.$name->getId().'&returnTemplate=rad')
?>
<?php endif; ?>
<br/>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---