Author: sevein
Date: Wed Aug 17 15:13:54 2011
New Revision: 9523
Log:
Add rights area in view screen for each digital object usage: master, thumb,
reference, and global rights
Added:
trunk/apps/qubit/modules/digitalobject/templates/_rights.php
trunk/apps/qubit/modules/right/templates/_right.php
Modified:
trunk/apps/qubit/modules/right/templates/_relatedRights.php
trunk/plugins/sfIsadPlugin/modules/sfIsadPlugin/templates/indexSuccess.php
Added: trunk/apps/qubit/modules/digitalobject/templates/_rights.php
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/apps/qubit/modules/digitalobject/templates/_rights.php Wed Aug
17 15:13:54 2011 (r9523)
@@ -0,0 +1,43 @@
+<div class="section">
+
+ <h2><?php echo __('Digital object (%1%) rights area', array('%1%' =>
$resource->usage)) ?></h2>
+
+ <?php foreach ($resource->getRights() as $item): ?>
+
+ <?php echo get_partial('right/right', array('resource' => $item->object))
?>
+
+ <?php endforeach; ?>
+
+</div>
+
+<div class="section">
+
+ <?php if ($child = $resource->getChildByUsageId(QubitTerm::REFERENCE_ID)): ?>
+
+ <h2><?php echo __('Digital object (%1%) rights area', array('%1%' =>
$child->usage)) ?></h2>
+
+ <?php foreach ($child->getRights() as $item): ?>
+
+ <?php echo get_partial('right/right', array('resource' =>
$item->object)) ?>
+
+ <?php endforeach; ?>
+
+ <?php endif; ?>
+
+</div>
+
+<div class="section">
+
+ <?php if ($child = $resource->getChildByUsageId(QubitTerm::THUMBNAIL_ID)): ?>
+
+ <h2><?php echo __('Digital object (%1%) rights area', array('%1%' =>
$child->usage)) ?></h2>
+
+ <?php foreach ($child->getRights() as $item): ?>
+
+ <?php echo get_partial('right/right', array('resource' =>
$item->object)) ?>
+
+ <?php endforeach; ?>
+
+ <?php endif; ?>
+
+</div>
Modified: trunk/apps/qubit/modules/right/templates/_relatedRights.php
==============================================================================
--- trunk/apps/qubit/modules/right/templates/_relatedRights.php Wed Aug 17
14:37:28 2011 (r9522)
+++ trunk/apps/qubit/modules/right/templates/_relatedRights.php Wed Aug 17
15:13:54 2011 (r9523)
@@ -1,56 +1,5 @@
<?php foreach ($ancestor->getRights() as $item): ?>
- <div class="field">
- <h3><?php echo __('Related right') ?></h3>
- <div>
- <?php if (0 == count($resource->getRights())): ?>
- <?php echo link_to(render_title($item->subject), array($item->subject,
'module' => 'informationobject'), array('title' => __('Inherited from %1%',
array('%1%' => $ancestor)))) ?>
- <?php endif; ?>
+ <?php echo get_partial('right/right', array('resource' => $item->object)) ?>
- <?php echo render_show(__('Act'), render_value($item->object->act)) ?>
-
- <?php echo render_show(__('Restriction'),
render_value($item->object->getRestriction(array('cultureFallback' => true))))
?>
-
- <?php echo render_show(__('Start date'),
render_value($item->object->startDate)) ?>
-
- <?php echo render_show(__('End date'),
render_value($item->object->endDate)) ?>
-
- <?php echo render_show(__('Rights holder'),
render_value($item->object->rightsHolder)) ?>
-
- <?php echo render_show(__('Right note'),
render_value($item->object->getRightNote(array('cultureFallback' => true)))) ?>
-
- <?php echo render_show(__('Basis'), render_value($item->object->basis))
?>
-
- <?php if (QubitTerm::RIGHT_BASIS_COPYRIGHT_ID ==
$item->object->basisId): ?>
-
- <?php echo render_show(__('Copyright status'),
render_value($item->object->copyrightStatus)) ?>
-
- <?php echo render_show(__('Copyright status date'),
render_value($item->object->copyrightStatusDate)) ?>
-
- <?php echo render_show(__('Copyright jurisdiction'),
render_value(format_country($item->object->copyrightJurisdiction))) ?>
-
- <?php echo render_show(__('Copyright note'),
render_value($item->object->getCopyrightNote(array('cultureFallback' =>
true)))) ?>
-
- <?php elseif (QubitTerm::RIGHT_BASIS_LICENSE_ID ==
$item->object->basisId): ?>
-
- <?php echo render_show(__('License identifier'),
render_value($item->object->getLicenseIdentifier(array('cultureFallback' =>
true)))) ?>
-
- <?php echo render_show(__('License terms'),
render_value($item->object->getLicenseTerms(array('cultureFallback' => true))))
?>
-
- <?php echo render_show(__('License note'),
render_value($item->object->getLicenseNote(array('cultureFallback' => true))))
?>
-
- <?php elseif (QubitTerm::RIGHT_BASIS_STATUTE_ID ==
$item->object->basisId): ?>
-
- <?php echo render_show(__('Statute jurisdiction'),
render_value($item->object->getStatuteJurisdiction(array('cultureFallback' =>
true)))) ?>
-
- <?php echo render_show(__('Statute citation'),
render_value($item->object->getStatuteCitation(array('cultureFallback' =>
true)))) ?>
-
- <?php echo render_show(__('Statute determination date'),
render_value($item->object->statuteDeterminationDate)) ?>
-
- <?php echo render_show(__('Statute note'),
render_value($item->object->getStatuteNote(array('cultureFallback' => true))))
?>
-
- <?php endif; ?>
-
- </div>
- </div>
<?php endforeach; ?>
Added: trunk/apps/qubit/modules/right/templates/_right.php
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/apps/qubit/modules/right/templates/_right.php Wed Aug 17 15:13:54
2011 (r9523)
@@ -0,0 +1,54 @@
+<div class="field">
+ <h3><?php echo __('Related right') ?></h3>
+ <div>
+
+ <?php // if (0 == count($resource->getRights())): ?>
+ <?php // echo link_to(render_title($item->subject),
array($item->subject, 'module' => 'informationobject'), array('title' =>
__('Inherited from %1%', array('%1%' => $ancestor)))) ?>
+ <?php // endif; ?>
+
+ <?php echo render_show(__('Act'), render_value($resource->act)) ?>
+
+ <?php echo render_show(__('Restriction'),
render_value($resource->getRestriction(array('cultureFallback' => true)))) ?>
+
+ <?php echo render_show(__('Start date'),
render_value($resource->startDate)) ?>
+
+ <?php echo render_show(__('End date'), render_value($resource->endDate)) ?>
+
+ <?php echo render_show(__('Rights holder'),
render_value($resource->rightsHolder)) ?>
+
+ <?php echo render_show(__('Right note'),
render_value($resource->getRightNote(array('cultureFallback' => true)))) ?>
+
+ <?php echo render_show(__('Basis'), render_value($resource->basis)) ?>
+
+ <?php if (QubitTerm::RIGHT_BASIS_COPYRIGHT_ID == $resource->basisId): ?>
+
+ <?php echo render_show(__('Copyright status'),
render_value($resource->copyrightStatus)) ?>
+
+ <?php echo render_show(__('Copyright status date'),
render_value($resource->copyrightStatusDate)) ?>
+
+ <?php echo render_show(__('Copyright jurisdiction'),
render_value(format_country($resource->copyrightJurisdiction))) ?>
+
+ <?php echo render_show(__('Copyright note'),
render_value($resource->getCopyrightNote(array('cultureFallback' => true)))) ?>
+
+ <?php elseif (QubitTerm::RIGHT_BASIS_LICENSE_ID == $resource->basisId): ?>
+
+ <?php echo render_show(__('License identifier'),
render_value($resource->getLicenseIdentifier(array('cultureFallback' =>
true)))) ?>
+
+ <?php echo render_show(__('License terms'),
render_value($resource->getLicenseTerms(array('cultureFallback' => true)))) ?>
+
+ <?php echo render_show(__('License note'),
render_value($resource->getLicenseNote(array('cultureFallback' => true)))) ?>
+
+ <?php elseif (QubitTerm::RIGHT_BASIS_STATUTE_ID == $resource->basisId): ?>
+
+ <?php echo render_show(__('Statute jurisdiction'),
render_value($resource->getStatuteJurisdiction(array('cultureFallback' =>
true)))) ?>
+
+ <?php echo render_show(__('Statute citation'),
render_value($resource->getStatuteCitation(array('cultureFallback' => true))))
?>
+
+ <?php echo render_show(__('Statute determination date'),
render_value($resource->statuteDeterminationDate)) ?>
+
+ <?php echo render_show(__('Statute note'),
render_value($resource->getStatuteNote(array('cultureFallback' => true)))) ?>
+
+ <?php endif; ?>
+
+ </div>
+</div>
Modified:
trunk/plugins/sfIsadPlugin/modules/sfIsadPlugin/templates/indexSuccess.php
==============================================================================
--- trunk/plugins/sfIsadPlugin/modules/sfIsadPlugin/templates/indexSuccess.php
Wed Aug 17 14:37:28 2011 (r9522)
+++ trunk/plugins/sfIsadPlugin/modules/sfIsadPlugin/templates/indexSuccess.php
Wed Aug 17 15:13:54 2011 (r9523)
@@ -204,7 +204,11 @@
</div> <!-- /.section#descriptionControlArea -->
<?php if (0 < count($resource->digitalObjects)): ?>
+
<?php echo get_partial('digitalobject/metadata', array('resource' =>
$resource->digitalObjects[0])) ?>
+
+ <?php echo get_partial('digitalobject/rights', array('resource' =>
$resource->digitalObjects[0])) ?>
+
<?php endif; ?>
<div class="section" id="accessionArea">
--
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.