Author: jablko
Date: Sat Aug 29 15:43:19 2009
New Revision: 3118
Log:
Skip some intermediate variables
Modified:
trunk/apps/qubit/modules/informationobject/actions/showAction.class.php
trunk/apps/qubit/modules/informationobject/actions/showDcAction.class.php
trunk/apps/qubit/modules/informationobject/actions/showModsAction.class.php
trunk/apps/qubit/modules/informationobject/actions/showRadAction.class.php
trunk/apps/qubit/modules/informationobject/templates/showDcSuccess.php
trunk/apps/qubit/modules/informationobject/templates/showIsadSuccess.php
trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php
trunk/apps/qubit/modules/informationobject/templates/showRadSuccess.php
Modified:
trunk/apps/qubit/modules/informationobject/actions/showAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/showAction.class.php
Sat Aug 29 00:01:58 2009 (r3117)
+++ trunk/apps/qubit/modules/informationobject/actions/showAction.class.php
Sat Aug 29 15:43:19 2009 (r3118)
@@ -42,19 +42,7 @@
// HACK: populate information object from ORM
$request->setAttribute('informationObject', $this->informationObject);
- // Determine if user has edit priviliges
- $this->editCredentials = false;
- if (SecurityPriviliges::editCredentials($this->getUser(),
'informationObject'))
- {
- $this->editCredentials = true;
- }
-
- // Events
- $this->creators = $this->informationObject->getCreators();
-
// Access points
- $this->subjectAccessPoints =
$this->informationObject->getSubjectAccessPoints();
- $this->placeAccessPoints =
$this->informationObject->getPlaceAccessPoints();
$this->nameAccessPoints = array();
foreach ($this->informationObject->getActorEvents() as $event)
{
@@ -64,32 +52,25 @@
}
}
- // Material types
- $this->materialTypes = $this->informationObject->getMaterialTypes();
-
// Physical objects
$this->physicalObjects =
QubitRelation::getRelatedSubjectsByObjectId('QubitPhysicalObject',
$this->informationObject->getId(),
array('typeId'=>QubitTerm::HAS_PHYSICAL_OBJECT_ID));
- // Digital object
- $this->digitalObject = $this->informationObject->getDigitalObject();
-
- // Display reference as compound digital object?
- $this->showCompoundDigitalObject =
$this->informationObject->showAsCompoundDigitalObject(QubitTerm::REFERENCE_ID);
-
// Only show link to view/download master copy of digital object if
// the user has edit credentials OR it's a text object (to allow reading)
$this->digitalObjectLink = null;
- if (null !== $this->digitalObject && ($this->editCredentials ||
QubitTerm::TEXT_ID == $this->digitalObject->getMediaTypeId()))
+ if (0 < count($this->informationObject->digitalObjects)
+ && (SecurityPriviliges::editCredentials($this->getUser(),
'informationObject')
+ || QubitTerm::TEXT_ID ==
$this->informationObject->digitalObjects[0]->getMediaTypeId()))
{
- if ($this->digitalObject->isImage())
+ if ($this->informationObject->digitalObjects[0]->isImage())
{
- $this->digitalObjectLink =
'digitalobject/showFullScreen?id='.$this->digitalObject->getId();
+ $this->digitalObjectLink =
'digitalobject/showFullScreen?id='.$this->informationObject->digitalObjects[0]->getId();
}
else
{
// Build a fully qualified URL to this digital object asset
- $this->digitalObjectLink =
$request->getUriPrefix().$request->getRelativeUrlRoot().$this->digitalObject->getFullPath();
+ $this->digitalObjectLink =
$request->getUriPrefix().$request->getRelativeUrlRoot().$this->informationObject->digitalObjects[0]->getFullPath();
}
}
}
Modified:
trunk/apps/qubit/modules/informationobject/actions/showDcAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/showDcAction.class.php
Sat Aug 29 00:01:58 2009 (r3117)
+++ trunk/apps/qubit/modules/informationobject/actions/showDcAction.class.php
Sat Aug 29 15:43:19 2009 (r3118)
@@ -34,24 +34,5 @@
// run the core informationObject show action commands
parent::execute($request);
-
- // add DC specific commands
- $this->dcTypes = QubitDc::getTypes($this->informationObject);
-
- if ($relation =
$this->informationObject->getPropertyByName('information_object_relation'))
- {
- if (strlen($relation->getValue()) > 0)
- {
- $this->dcRelation = $relation;
- }
- else
- {
- $this->dcRelation = null;
- }
- }
- else
- {
- $this->dcRelation = null;
- }
}
}
Modified:
trunk/apps/qubit/modules/informationobject/actions/showModsAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/showModsAction.class.php
Sat Aug 29 00:01:58 2009 (r3117)
+++ trunk/apps/qubit/modules/informationobject/actions/showModsAction.class.php
Sat Aug 29 15:43:19 2009 (r3118)
@@ -34,8 +34,5 @@
// run the core informationObject show action commands
parent::execute($request);
-
- // add MODS specific commands
- $this->modsTypes = QubitMods::getTypes($this->informationObject);
}
}
Modified:
trunk/apps/qubit/modules/informationobject/actions/showRadAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/showRadAction.class.php
Sat Aug 29 00:01:58 2009 (r3117)
+++ trunk/apps/qubit/modules/informationobject/actions/showRadAction.class.php
Sat Aug 29 15:43:19 2009 (r3118)
@@ -38,33 +38,5 @@
// add RAD specific commands
$this->radNotes = $this->informationObject->getNotesByTaxonomy($options =
array('taxonomyId' => QubitTaxonomy::RAD_NOTE_ID));
$this->radTitleNotes =
$this->informationObject->getNotesByTaxonomy($options = array('taxonomyId' =>
QubitTaxonomy::RAD_TITLE_NOTE_ID));
-
- $infoObject = $this->informationObject;
-
- // Rad 1.1 properties
- $this->radOtherTitleInformation =
$infoObject->getPropertyByName('other_title_information', array('scope'=>'rad',
'cultureFallback'));
- $this->radTitleStatementOfResponsibility =
$infoObject->getPropertyByName('title_statement_of_responsibility',
array('scope'=>'rad'));
-
- // RAD 1.2 properties
- $this->radEditionStatementOfResponsibility =
$infoObject->getPropertyByName('edition_statement_of_responsibility',
array('scope'=>'rad'));
-
- // RAD 1.3 properties
- $this->radStatementOfScaleCartographic =
$infoObject->getPropertyByName('statement_of_scale_cartographic',
array('scope'=>'rad'));
- $this->radStatementOfProjection =
$infoObject->getPropertyByName('statement_of_projection',
array('scope'=>'rad'));
- $this->radStatementOfCoordinates =
$infoObject->getPropertyByName('statement_of_coordinates',
array('scope'=>'rad'));
- $this->radStatementOfScaleArchitectural =
$infoObject->getPropertyByName('statement_of_scale_architectural',
array('scope'=>'rad'));
- $this->radIssuingJursidictionAndDenomination =
$infoObject->getPropertyByName('issuing_jursidiction_and_denomination',
array('scope'=>'rad'));
-
- // RAD 1.6 properties
- $this->radTitleProperOfPublishersSeries =
$infoObject->getPropertyByName('title_proper_of_publishers_series',
array('scope'=>'rad'));
- $this->radParallelTitlesOfPublishersSeries =
$infoObject->getPropertyByName('parallel_titles_of_publishers_series',
array('scope'=>'rad'));
- $this->radOtherTitleInformationOfPublishersSeries =
$infoObject->getPropertyByName('other_title_information_of_publishers_series',
array('scope'=>'rad'));
- $this->radStatementOfResponsibilityRelatingToPublishersSeries =
$infoObject->getPropertyByName('statement_of_responsibility_relating_to_publishers_series',
array('scope'=>'rad'));
- $this->radNumberingWithinPublishersSeries =
$infoObject->getPropertyByName('numbering_within_publishers_series',
array('scope'=>'rad'));
- $this->radNoteOnPublishersSeries =
$infoObject->getPropertyByName('note_on_publishers_series',
array('scope'=>'rad'));
-
- // RAD 1.9 properties
- $this->radStandardNumber =
$infoObject->getPropertyByName('standard_number', array('scope'=>'rad'));
-
}
}
Modified: trunk/apps/qubit/modules/informationobject/templates/showDcSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showDcSuccess.php
Sat Aug 29 00:01:58 2009 (r3117)
+++ trunk/apps/qubit/modules/informationobject/templates/showDcSuccess.php
Sat Aug 29 15:43:19 2009 (r3118)
@@ -5,7 +5,7 @@
<tr>
<td colspan="2" class="headerCell">
- <?php if ($editCredentials): ?>
+ <?php if (SecurityPriviliges::editCredentials($sf_user,
'informationObject')): ?>
<?php echo link_to(render_title(QubitDc::getLabel($informationObject)),
array('module' => 'informationobject', 'action' => 'edit', 'id' =>
$informationObject->id)) ?>
<?php else: ?>
<?php echo render_title(QubitDc::getLabel($informationObject)) ?>
@@ -13,7 +13,7 @@
</td>
</tr>
-<?php if ($showCompoundDigitalObject): ?>
+<?php if
($informationObject->showAsCompoundDigitalObject(QubitTerm::REFERENCE_ID)): ?>
<tr>
<td colspan="2">
<div style="text-align: center">
@@ -21,12 +21,12 @@
</div>
</td>
</tr>
-<?php elseif (isset($digitalObject)): ?>
+<?php elseif (0 < count($informationObject->digitalObjects)): ?>
<tr>
<td colspan="2">
<div style="text-align: center">
<?php include_component('digitalobject', 'show', array(
- 'digitalObject' => $digitalObject, 'usageType' =>
QubitTerm::REFERENCE_ID, 'link' => $digitalObjectLink)) ?>
+ 'digitalObject' => $informationObject->digitalObjects[0], 'usageType'
=> QubitTerm::REFERENCE_ID, 'link' => $digitalObjectLink)) ?>
</div>
</td>
</tr>
@@ -48,7 +48,7 @@
</tr>
<?php endif; ?>
-<?php foreach ($creators as $creator): ?>
+<?php foreach ($informationObject->getCreators() as $creator): ?>
<tr>
<th><?php echo __('creator') ?></th>
<td><?php echo link_to(render_title($creator), array('module' => 'actor',
'action' => 'show', 'id' => $creator->id)) ?>
@@ -87,8 +87,8 @@
<?php endforeach; ?>
<?php endif; ?>
-<?php if (0 < count($dcTypes)): ?>
-<?php foreach ($dcTypes as $dcType): ?>
+<?php if (0 < count(QubitDc::getTypes($informationObject))): ?>
+<?php foreach (QubitDc::getTypes($informationObject) as $dcType): ?>
<tr>
<th><?php echo __('type') ?></th>
<td>
@@ -123,10 +123,10 @@
<?php endif; ?>
<?php endif; ?>
-<?php if ($dcRelation): ?>
+<?php if (0 < strlen($value =
$informationObject->getPropertyByName('relation', array('scope' =>
'dc'))->value)): ?>
<tr>
<th><?php echo __('relation') ?></th>
- <td><?php echo $dcRelation->getValue() ?></td>
+ <td><?php echo $value ?></td>
</tr>
<?php endif; ?>
@@ -138,16 +138,16 @@
<?php endforeach; ?>
<?php endif; ?>
-<?php if (0 < count($subjectAccessPoints)): ?>
- <?php foreach ($subjectAccessPoints as $subject): ?>
+<?php if (0 < count($informationObject->getSubjectAccessPoints())): ?>
+ <?php foreach ($informationObject->getSubjectAccessPoints() as $subject): ?>
<tr><th><?php echo __('subject') ?></th><td>
<?php echo link_to($subject->term, array('module' => 'term', 'action' =>
'browse', 'termId' => $subject->term->id)) ?>
</td></tr>
<?php endforeach; ?>
<?php endif; ?>
-<?php if (0 < count($placeAccessPoints)): ?>
- <?php foreach ($placeAccessPoints as $place): ?>
+<?php if (0 < count($informationObject->getPlaceAccessPoints())): ?>
+ <?php foreach ($informationObject->getPlaceAccessPoints() as $place): ?>
<tr><th><?php echo __('coverage') ?></th><td>
<?php echo link_to($place->term, array('module' => 'term', 'action' =>
'browse', 'termId' => $place->term->id)) ?>
</td></tr>
@@ -169,43 +169,43 @@
<?php endif; ?>
<!-- Digital Object metadata -->
-<?php if (isset($digitalObject)): ?>
+<?php if (0 < count($informationObject->digitalObjects)): ?>
<tr><td colspan="2" class="subHeaderCell">
<?php echo __('digital object metadata') ?>
</td></tr>
- <?php if ($digitalObject->getName()): ?>
+ <?php if ($informationObject->digitalObjects[0]->getName()): ?>
<tr>
<th><?php echo __('filename') ?></th>
- <td><?php echo $digitalObject->getName() ?></td>
+ <td><?php echo $informationObject->digitalObjects[0]->getName() ?></td>
</tr>
<?php endif; ?>
- <?php if ($digitalObject->getMediaType()): ?>
+ <?php if ($informationObject->digitalObjects[0]->getMediaType()): ?>
<tr>
<th><?php echo __('media type') ?></th>
- <td><?php echo $digitalObject->getMediaType() ?></td>
+ <td><?php echo $informationObject->digitalObjects[0]->getMediaType()
?></td>
</tr>
<?php endif; ?>
- <?php if ($digitalObject->getMimeType()): ?>
+ <?php if ($informationObject->digitalObjects[0]->getMimeType()): ?>
<tr>
<th><?php echo __('mime-type') ?></th>
- <td><?php echo $digitalObject->getMimeType() ?></td>
+ <td><?php echo $informationObject->digitalObjects[0]->getMimeType() ?></td>
</tr>
<?php endif; ?>
- <?php if ($digitalObject->getByteSize()): ?>
+ <?php if ($informationObject->digitalObjects[0]->getByteSize()): ?>
<tr>
<th><?php echo __('filesize') ?></th>
- <td><?php echo hr_filesize($digitalObject->getByteSize()) ?></td>
+ <td><?php echo
hr_filesize($informationObject->digitalObjects[0]->getByteSize()) ?></td>
</tr>
<?php endif; ?>
- <?php if ($digitalObject->getCreatedAt()): ?>
+ <?php if ($informationObject->digitalObjects[0]->getCreatedAt()): ?>
<tr>
<th><?php echo __('uploaded') ?></th>
- <td><?php echo $digitalObject->getCreatedAt() ?></td>
+ <td><?php echo $informationObject->digitalObjects[0]->getCreatedAt()
?></td>
</tr>
<?php endif; ?>
<?php endif; ?>
Modified:
trunk/apps/qubit/modules/informationobject/templates/showIsadSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showIsadSuccess.php
Sat Aug 29 00:01:58 2009 (r3117)
+++ trunk/apps/qubit/modules/informationobject/templates/showIsadSuccess.php
Sat Aug 29 15:43:19 2009 (r3118)
@@ -5,7 +5,7 @@
<tr>
<td colspan="2" class="headerCell">
- <?php if ($editCredentials): ?>
+ <?php if (SecurityPriviliges::editCredentials($sf_user,
'informationObject')): ?>
<?php echo link_to(render_title(QubitIsad::getLabel($informationObject)),
array('module' => 'informationobject', 'action' => 'edit', 'id' =>
$informationObject->id)) ?>
<?php else: ?>
<?php echo render_title(QubitIsad::getLabel($informationObject)) ?>
@@ -13,7 +13,7 @@
</td>
</tr>
-<?php if ($showCompoundDigitalObject): ?>
+<?php if
($informationObject->showAsCompoundDigitalObject(QubitTerm::REFERENCE_ID)): ?>
<tr>
<td colspan="2">
<div style="text-align: center">
@@ -21,12 +21,12 @@
</div>
</td>
</tr>
-<?php elseif (isset($digitalObject)): ?>
+<?php elseif (0 < count($informationObject->digitalObjects)): ?>
<tr>
<td colspan="2">
<div style="text-align: center">
<?php include_component('digitalobject', 'show', array(
- 'digitalObject' => $digitalObject, 'usageType' =>
QubitTerm::REFERENCE_ID, 'link' => $digitalObjectLink)) ?>
+ 'digitalObject' => $informationObject->digitalObjects[0], 'usageType'
=> QubitTerm::REFERENCE_ID, 'link' => $digitalObjectLink)) ?>
</div>
</td>
</tr>
@@ -96,7 +96,7 @@
<!-- START CONTEXT AREA -->
<!-- ******************************************** -->
-<?php if (0 < count($creators)
+<?php if (0 < count($informationObject->getCreators())
|| 0 < count($physicalObjects)
|| 0 < strlen($informationObject->getRepositoryId())
|| 0 < strlen($informationObject->getArchivalHistory(array('cultureFallback'
=> true)))
@@ -109,7 +109,7 @@
</td></tr>
<?php endif; ?>
-<?php foreach ($creators as $creator): ?>
+<?php foreach ($informationObject->getCreators() as $creator): ?>
<tr>
<th><?php echo __('name of creator') ?></th>
<td><?php echo link_to(render_title($creator), array('module' => 'actor',
'action' => 'show', 'id' => $creator->id)) ?>
@@ -129,7 +129,7 @@
</tr>
<?php endforeach; ?>
-<?php if (count($physicalObjects) && $editCredentials): ?>
+<?php if (count($physicalObjects) &&
SecurityPriviliges::editCredentials($sf_user, 'informationObject')): ?>
<?php include_partial('physicalobject/show',
array('informationObject' => $informationObject, 'physicalObjects' =>
$physicalObjects)) ?>
<?php endif; ?>
@@ -346,21 +346,21 @@
<!-- START ACCESS POINTS -->
<!-- ******************************************** -->
-<?php if (0 < count($subjectAccessPoints)
- || 0 < count($placeAccessPoints)
+<?php if (0 < count($informationObject->getSubjectAccessPoints())
+ || 0 < count($informationObject->getPlaceAccessPoints())
|| 0 < count($nameAccessPoints)): ?>
<tr><td colspan="2" class="subHeaderCell">
<?php echo __('access points') ?>
</td></tr>
<?php endif; ?>
-<?php if (0 < count($subjectAccessPoints)): ?>
+<?php if (0 < count($informationObject->getSubjectAccessPoints())): ?>
<tr>
<th>
<?php echo __('subject access points') ?>
</th><td>
<ul>
- <?php foreach ($subjectAccessPoints as $subject): ?>
+ <?php foreach ($informationObject->getSubjectAccessPoints() as
$subject): ?>
<li><?php echo link_to($subject->term, array('module' => 'term',
'action' => 'browse', 'termId' => $subject->term->id)) ?></li>
<?php endforeach; ?>
</ul>
@@ -368,13 +368,13 @@
</tr>
<?php endif; ?>
-<?php if (0 < count($placeAccessPoints)): ?>
+<?php if (0 < count($informationObject->getPlaceAccessPoints())): ?>
<tr>
<th>
<?php echo __('place access points') ?>
</th><td>
<ul>
- <?php foreach ($placeAccessPoints as $place): ?>
+ <?php foreach ($informationObject->getPlaceAccessPoints() as $place):
?>
<li><?php echo link_to($place->term, array('module' => 'term',
'action' => 'browse', 'termId' => $place->term->id)) ?></li>
<?php endforeach; ?>
</ul>
@@ -499,43 +499,43 @@
<!-- START DIGITAL OBJECT METADATA -->
<!-- ******************************************** -->
-<?php if (isset($digitalObject)): ?>
+<?php if (0 < count($informationObject->digitalObjects)): ?>
<tr><td colspan="2" class="subHeaderCell">
<?php echo __('digital object metadata') ?>
</td></tr>
- <?php if ($digitalObject->getName()): ?>
+ <?php if ($informationObject->digitalObjects[0]->getName()): ?>
<tr>
<th><?php echo __('filename') ?></th>
- <td><?php echo $digitalObject->getName() ?></td>
+ <td><?php echo $informationObject->digitalObjects[0]->getName() ?></td>
</tr>
<?php endif; ?>
- <?php if ($digitalObject->getMediaType()): ?>
+ <?php if ($informationObject->digitalObjects[0]->getMediaType()): ?>
<tr>
<th><?php echo __('media type') ?></th>
- <td><?php echo $digitalObject->getMediaType() ?></td>
+ <td><?php echo $informationObject->digitalObjects[0]->getMediaType()
?></td>
</tr>
<?php endif; ?>
- <?php if ($digitalObject->getMimeType()): ?>
+ <?php if ($informationObject->digitalObjects[0]->getMimeType()): ?>
<tr>
<th><?php echo __('mime-type') ?></th>
- <td><?php echo $digitalObject->getMimeType() ?></td>
+ <td><?php echo $informationObject->digitalObjects[0]->getMimeType() ?></td>
</tr>
<?php endif; ?>
- <?php if ($digitalObject->getByteSize()): ?>
+ <?php if ($informationObject->digitalObjects[0]->getByteSize()): ?>
<tr>
<th><?php echo __('filesize') ?></th>
- <td><?php echo hr_filesize($digitalObject->getByteSize()) ?></td>
+ <td><?php echo
hr_filesize($informationObject->digitalObjects[0]->getByteSize()) ?></td>
</tr>
<?php endif; ?>
- <?php if ($digitalObject->getCreatedAt()): ?>
+ <?php if ($informationObject->digitalObjects[0]->getCreatedAt()): ?>
<tr>
<th><?php echo __('uploaded') ?></th>
- <td><?php echo $digitalObject->getCreatedAt() ?></td>
+ <td><?php echo $informationObject->digitalObjects[0]->getCreatedAt()
?></td>
</tr>
<?php endif; ?>
<?php endif; ?>
Modified:
trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php
Sat Aug 29 00:01:58 2009 (r3117)
+++ trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php
Sat Aug 29 15:43:19 2009 (r3118)
@@ -5,7 +5,7 @@
<tr>
<td colspan="2" class="headerCell">
- <?php if ($editCredentials): ?>
+ <?php if (SecurityPriviliges::editCredentials($sf_user,
'informationObject')): ?>
<?php echo link_to(render_title(QubitDc::getLabel($informationObject)),
array('module' => 'informationobject', 'action' => 'edit', 'id' =>
$informationObject->id)) ?>
<?php else: ?>
<?php echo render_title(QubitDc::getLabel($informationObject)) ?>
@@ -13,7 +13,7 @@
</td>
</tr>
-<?php if ($showCompoundDigitalObject): ?>
+<?php if
($informationObject->showAsCompoundDigitalObject(QubitTerm::REFERENCE_ID)): ?>
<tr>
<td colspan="2">
<div style="text-align: center">
@@ -21,12 +21,12 @@
</div>
</td>
</tr>
-<?php elseif (isset($digitalObject)): ?>
+<?php elseif (0 < count($informationObject->digitalObjects)): ?>
<tr>
<td colspan="2">
<div style="text-align: center">
<?php include_component('digitalobject', 'show', array(
- 'digitalObject' => $digitalObject, 'usageType' =>
QubitTerm::REFERENCE_ID, 'link' => $digitalObjectLink)) ?>
+ 'digitalObject' => $informationObject->digitalObjects[0], 'usageType'
=> QubitTerm::REFERENCE_ID, 'link' => $digitalObjectLink)) ?>
</div>
</td>
</tr>
@@ -82,8 +82,8 @@
<?php endforeach; ?>
<?php endif; ?>
-<?php if (0 < count($modsTypes)): ?>
-<?php foreach ($modsTypes as $modsType): ?>
+<?php if (0 < count(QubitMods::getTypes($informationObject))): ?>
+<?php foreach (QubitMods::getTypes($informationObject) as $modsType): ?>
<tr>
<th><?php echo __('type of resource') ?></th>
<td>
@@ -101,17 +101,17 @@
<?php endforeach; ?>
<?php endif; ?>
-<?php if (isset($digitalObject)): ?>
- <?php if ($digitalObject->getMimeType()): ?>
+<?php if (0 < count($informationObject->digitalObjects)): ?>
+ <?php if ($informationObject->digitalObjects[0]->getMimeType()): ?>
<tr>
<th><?php echo __('internet media type') ?></th>
- <td><?php echo $digitalObject->getMimeType() ?></td>
+ <td><?php echo $informationObject->digitalObjects[0]->getMimeType() ?></td>
</tr>
<?php endif; ?>
<?php endif; ?>
-<?php if (0 < count($subjectAccessPoints)): ?>
- <?php foreach ($subjectAccessPoints as $subject): ?>
+<?php if (0 < count($informationObject->getSubjectAccessPoints())): ?>
+ <?php foreach ($informationObject->getSubjectAccessPoints() as $subject): ?>
<tr><th><?php echo __('subject') ?></th><td>
<?php echo link_to($subject->term, array('module' => 'term', 'action' =>
'browse', 'termId' => $subject->term->id)) ?>
</td></tr>
@@ -125,9 +125,9 @@
</tr>
<?php endif; ?>
-<?php if (isset($digitalObject)): ?>
+<?php if (0 < count($informationObject->digitalObjects)): ?>
<tr><th><?php echo __('URL') ?></th>
- <td><?php echo
link_to(image_path($informationObject->digitalObject->getFullPath(), true))
?></td>
+ <td><?php echo
link_to(image_path($informationObject->digitalObjects[0]->getFullPath(), true))
?></td>
</tr>
<?php endif; ?>
@@ -146,43 +146,43 @@
<?php endif; ?>
<!-- Digital Object metadata -->
-<?php if (isset($digitalObject)): ?>
+<?php if (0 < count($informationObject->digitalObjects)): ?>
<tr><td colspan="2" class="subHeaderCell">
<?php echo __('digital object metadata') ?>
</td></tr>
- <?php if ($digitalObject->getName()): ?>
+ <?php if ($informationObject->digitalObjects[0]->getName()): ?>
<tr>
<th><?php echo __('filename') ?></th>
- <td><?php echo $digitalObject->getName() ?></td>
+ <td><?php echo $informationObject->digitalObjects[0]->getName() ?></td>
</tr>
<?php endif; ?>
- <?php if ($digitalObject->getMediaType()): ?>
+ <?php if ($informationObject->digitalObjects[0]->getMediaType()): ?>
<tr>
<th><?php echo __('media type') ?></th>
- <td><?php echo $digitalObject->getMediaType() ?></td>
+ <td><?php echo $informationObject->digitalObjects[0]->getMediaType()
?></td>
</tr>
<?php endif; ?>
- <?php if ($digitalObject->getMimeType()): ?>
+ <?php if ($informationObject->digitalObjects[0]->getMimeType()): ?>
<tr>
<th><?php echo __('mime-type') ?></th>
- <td><?php echo $digitalObject->getMimeType() ?></td>
+ <td><?php echo $informationObject->digitalObjects[0]->getMimeType() ?></td>
</tr>
<?php endif; ?>
- <?php if ($digitalObject->getByteSize()): ?>
+ <?php if ($informationObject->digitalObjects[0]->getByteSize()): ?>
<tr>
<th><?php echo __('filesize') ?></th>
- <td><?php echo hr_filesize($digitalObject->getByteSize()) ?></td>
+ <td><?php echo
hr_filesize($informationObject->digitalObjects[0]->getByteSize()) ?></td>
</tr>
<?php endif; ?>
- <?php if ($digitalObject->getCreatedAt()): ?>
+ <?php if ($informationObject->digitalObjects[0]->getCreatedAt()): ?>
<tr>
<th><?php echo __('uploaded') ?></th>
- <td><?php echo $digitalObject->getCreatedAt() ?></td>
+ <td><?php echo $informationObject->digitalObjects[0]->getCreatedAt()
?></td>
</tr>
<?php endif; ?>
<?php endif; ?>
Modified:
trunk/apps/qubit/modules/informationobject/templates/showRadSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showRadSuccess.php
Sat Aug 29 00:01:58 2009 (r3117)
+++ trunk/apps/qubit/modules/informationobject/templates/showRadSuccess.php
Sat Aug 29 15:43:19 2009 (r3118)
@@ -5,7 +5,7 @@
<tr>
<td colspan="2" class="headerCell">
- <?php if ($editCredentials): ?>
+ <?php if (SecurityPriviliges::editCredentials($sf_user,
'informationObject')): ?>
<?php echo link_to(render_title(QubitRad::getLabel($informationObject)),
array('module' => 'informationobject', 'action' => 'edit', 'id' =>
$informationObject->id)) ?>
<?php else: ?>
@@ -15,7 +15,7 @@
</tr>
<!-- Digital Object reference representation -->
-<?php if ($showCompoundDigitalObject): ?>
+<?php if
($informationObject->showAsCompoundDigitalObject(QubitTerm::REFERENCE_ID)): ?>
<tr>
<td colspan="2">
<div style="text-align: center">
@@ -23,12 +23,12 @@
</div>
</td>
</tr>
-<?php elseif (isset($digitalObject)): ?>
+<?php elseif (0 < count($informationObject->digitalObjects)): ?>
<tr>
<td colspan="2">
<div style="text-align: center">
<?php include_component('digitalobject', 'show', array(
- 'digitalObject' => $digitalObject, 'usageType' =>
QubitTerm::REFERENCE_ID, 'link' => $digitalObjectLink)) ?>
+ 'digitalObject' => $informationObject->digitalObjects[0], 'usageType'
=> QubitTerm::REFERENCE_ID, 'link' => $digitalObjectLink)) ?>
</div>
</td>
</tr>
@@ -42,13 +42,13 @@
</tr>
<?php endif; ?>
-<?php if (0 < count($materialTypes)): ?>
+<?php if (0 < count($informationObject->getMaterialTypes())): ?>
<tr>
<th>
<?php echo __('general material designation') ?>
</th><td>
<ul>
- <?php foreach ($materialTypes as $materialType): ?>
+ <?php foreach ($informationObject->getMaterialTypes() as
$materialType): ?>
<li><?php echo $materialType->getTerm() ?></li>
<?php endforeach; ?>
</ul>
@@ -63,14 +63,14 @@
</tr>
<?php endif; ?>
-<?php if (0 < strlen($value =
$radOtherTitleInformation->getValue(array('cultureFallback' => true)))): ?>
+<?php if (0 < strlen($value =
$informationObject->getPropertyByName('otherTitleInformation', array('scope' =>
'rad'))->getValue(array('cultureFallback' => true)))): ?>
<tr>
<th><?php echo __('other title information') ?></th>
<td><?php echo $value ?></td>
</tr>
<?php endif; ?>
-<?php if (0 < strlen($value =
$radTitleStatementOfResponsibility->getValue(array('cultureFallback' =>
true)))): ?>
+<?php if (0 < strlen($value =
$informationObject->getPropertyByName('titleStatementOfResponsibility',
array('scope' => 'rad'))->getValue(array('cultureFallback' => true)))): ?>
<tr>
<th><?php echo __('title statements of responsibility') ?></th>
<td><?php echo $value ?></td>
@@ -121,7 +121,7 @@
</tr>
<?php endif; ?>
-<?php if (0 < strlen($value =
$radEditionStatementOfResponsibility->getValue(array('cultureFallback' =>
true)))): ?>
+<?php if (0 < strlen($value =
$informationObject->getPropertyByName('editionStatementOfResponsibility',
array('scope' => 'rad'))->getValue(array('cultureFallback' => true)))): ?>
<tr>
<th><?php echo __('edition statement of responsibility') ?></th>
<td><?php echo $value ?></td>
@@ -130,35 +130,35 @@
<!-- End edition area -->
<!-- Class of material specific details area -->
-<?php if (0 < strlen($value =
$radStatementOfScaleCartographic->getValue(array('cultureFallback' => true)))):
?>
+<?php if (0 < strlen($value =
$informationObject->getPropertyByName('statementOfScaleCartographic',
array('scope' => 'rad'))->getValue(array('cultureFallback' => true)))): ?>
<tr>
<th><?php echo __('statement of scale (cartographic)') ?></th>
<td><?php echo $value ?></td>
</tr>
<?php endif; ?>
-<?php if (0 < strlen($value =
$radStatementOfProjection->getValue(array('cultureFallback' => true)))): ?>
+<?php if (0 < strlen($value =
$informationObject->getPropertyByName('statementOfProjection', array('scope' =>
'rad'))->getValue(array('cultureFallback' => true)))): ?>
<tr>
<th><?php echo __('statement of projection (cartographic)') ?></th>
<td><?php echo $value ?></td>
</tr>
<?php endif; ?>
-<?php if (0 < strlen($value =
$radStatementOfCoordinates->getValue(array('cultureFallback' => true)))): ?>
+<?php if (0 < strlen($value =
$informationObject->getPropertyByName('statementOfCoordinates', array('scope'
=> 'rad'))->getValue(array('cultureFallback' => true)))): ?>
<tr>
<th><?php echo __('statement of coordinates (cartographic)') ?></th>
<td><?php echo $value ?></td>
</tr>
<?php endif; ?>
-<?php if (0 < strlen($value =
$radStatementOfScaleArchitectural->getValue(array('cultureFallback' =>
true)))): ?>
+<?php if (0 < strlen($value =
$informationObject->getPropertyByName('statementOfScaleArchitectural',
array('scope' => 'rad'))->getValue(array('cultureFallback' => true)))): ?>
<tr>
<th><?php echo __('statement of scale (architectural)') ?></th>
<td><?php echo $value ?></td>
</tr>
<?php endif; ?>
-<?php if (0 < strlen($value =
$radIssuingJursidictionAndDenomination->getValue(array('cultureFallback' =>
true)))): ?>
+<?php if (0 < strlen($value =
$informationObject->getPropertyByName('issuingJursidictionAndDenomination',
array('scope' => 'rad'))->getValue(array('cultureFallback' => true)))): ?>
<tr>
<th><?php echo __('issuing jurisdiction and denomination (philatelic)')
?></th>
<td><?php echo $value ?></td>
@@ -191,7 +191,7 @@
</tr>
<?php endif; ?>
-<?php foreach ($creators as $creator): ?>
+<?php foreach ($informationObject->getCreators() as $creator): ?>
<tr>
<th><?php echo __('name of creator') ?></th>
<td><?php echo link_to(render_title($creator), array('module' => 'actor',
'action' => 'show', 'id' => $creator->id)) ?>
@@ -229,42 +229,42 @@
<!-- End physical description area -->
<!-- Publisher's series area -->
-<?php if (0 < strlen($value =
$radTitleProperOfPublishersSeries->getValue(array('cultureFallback' =>
true)))): ?>
+<?php if (0 < strlen($value =
$informationObject->getPropertyByName('titleProperOfPublishersSeries',
array('scope' => 'rad'))->getValue(array('cultureFallback' => true)))): ?>
<tr>
<th><?php echo __('title proper of publisher\'s series') ?></th>
<td><?php echo $value ?></td>
</tr>
<?php endif; ?>
-<?php if (0 < strlen($value =
$radParallelTitlesOfPublishersSeries->getValue(array('cultureFallback' =>
true)))): ?>
+<?php if (0 < strlen($value =
$informationObject->getPropertyByName('parallelTitlesOfPublishersSeries',
array('scope' => 'rad'))->getValue(array('cultureFallback' => true)))): ?>
<tr>
<th><?php echo __('parallel titles of publisher\'s series') ?></th>
<td><?php echo $value ?></td>
</tr>
<?php endif; ?>
-<?php if (0 < strlen($value =
$radOtherTitleInformationOfPublishersSeries->getValue(array('cultureFallback'
=> true)))): ?>
+<?php if (0 < strlen($value =
$informationObject->getPropertyByName('otherTitleInformationOfPublishersSeries',
array('scope' => 'rad'))->getValue(array('cultureFallback' => true)))): ?>
<tr>
<th><?php echo __('other title information of publisher\'s series') ?></th>
<td><?php echo $value ?></td>
</tr>
<?php endif; ?>
-<?php if (0 < strlen($value =
$radStatementOfResponsibilityRelatingToPublishersSeries->getValue(array('cultureFallback'
=> true)))): ?>
+<?php if (0 < strlen($value =
$informationObject->getPropertyByName('statementOfResponsibilityRelatingToPublishersSeries',
array('scope' => 'rad'))->getValue(array('cultureFallback' => true)))): ?>
<tr>
<th><?php echo __('statement of responsibility relating to publisher\'s
series') ?></th>
<td><?php echo $value ?></td>
</tr>
<?php endif; ?>
-<?php if (0 < strlen($value =
$radNumberingWithinPublishersSeries->getValue(array('cultureFallback' =>
true)))): ?>
+<?php if (0 < strlen($value =
$informationObject->getPropertyByName('numberingWithinPublishersSeries',
array('scope' => 'rad'))->getValue(array('cultureFallback' => true)))): ?>
<tr>
<th><?php echo __('numbering within publisher\'s series') ?></th>
<td><?php echo $value ?></td>
</tr>
<?php endif; ?>
-<?php if (0 < strlen($value =
$radNoteOnPublishersSeries->getValue(array('cultureFallback' => true)))): ?>
+<?php if (0 < strlen($value =
$informationObject->getPropertyByName('noteOnPublishersSeries', array('scope'
=> 'rad'))->getValue(array('cultureFallback' => true)))): ?>
<tr>
<th><?php echo __('Note on publisher\'s series') ?></th>
<td><?php echo $value ?></td>
@@ -407,7 +407,7 @@
<!-- End notes area -->
<!-- Standard number area -->
-<?php if (0 < strlen($value =
$radStandardNumber->getValue(array('cultureFallback' => true)))): ?>
+<?php if (0 < strlen($value =
$informationObject->getPropertyByName('standardNumber', array('scope' =>
'rad'))->getValue(array('cultureFallback' => true)))): ?>
<tr>
<th><?php echo __('standard number') ?></th>
<td><?php echo $value ?></td>
@@ -416,13 +416,13 @@
<!-- End standard number area -->
<!-- Access Points -->
-<?php if (0 < count($subjectAccessPoints)): ?>
+<?php if (0 < count($informationObject->getSubjectAccessPoints())): ?>
<tr>
<th>
<?php echo __('subject access points') ?>
</th><td>
<ul>
- <?php foreach ($subjectAccessPoints as $subject): ?>
+ <?php foreach ($informationObject->getSubjectAccessPoints() as
$subject): ?>
<li><?php echo link_to($subject->term, array('module' => 'term',
'action' => 'browse', 'termId' => $subject->term->id)) ?></li>
<?php endforeach; ?>
</ul>
@@ -430,13 +430,13 @@
</tr>
<?php endif; ?>
-<?php if (0 < count($placeAccessPoints)): ?>
+<?php if (0 < count($informationObject->getPlaceAccessPoints())): ?>
<tr>
<th>
<?php echo __('place access points') ?>
</th><td>
<ul>
- <?php foreach ($placeAccessPoints as $place): ?>
+ <?php foreach ($informationObject->getPlaceAccessPoints() as $place):
?>
<li><?php echo link_to($place->term, array('module' => 'term',
'action' => 'browse', 'termId' => $place->term->id)) ?></li>
<?php endforeach; ?>
</ul>
@@ -540,50 +540,50 @@
<!-- End Control Area -->
<!-- Physical Object Area -->
-<?php if (count($physicalObjects) && $editCredentials): ?>
+<?php if (count($physicalObjects) &&
SecurityPriviliges::editCredentials($sf_user, 'informationObject')): ?>
<?php include_partial('physicalobject/show',
array('informationObject' => $informationObject, 'physicalObjects' =>
$physicalObjects)) ?>
<?php endif; ?>
<!-- End Physical Object Area -->
<!-- Digital Object metadata -->
-<?php if (isset($digitalObject)): ?>
+<?php if (0 < count($informationObject->digitalObjects)): ?>
<tr><td colspan="2" class="subHeaderCell">
<?php echo __('digital object metadata') ?>
</td></tr>
- <?php if ($digitalObject->getName()): ?>
+ <?php if ($informationObject->digitalObjects[0]->getName()): ?>
<tr>
<th><?php echo __('filename') ?></th>
- <td><?php echo $digitalObject->getName() ?></td>
+ <td><?php echo $informationObject->digitalObjects[0]->getName() ?></td>
</tr>
<?php endif; ?>
- <?php if ($digitalObject->getMediaType()): ?>
+ <?php if ($informationObject->digitalObjects[0]->getMediaType()): ?>
<tr>
<th><?php echo __('media type') ?></th>
- <td><?php echo $digitalObject->getMediaType() ?></td>
+ <td><?php echo $informationObject->digitalObjects[0]->getMediaType()
?></td>
</tr>
<?php endif; ?>
- <?php if ($digitalObject->getMimeType()): ?>
+ <?php if ($informationObject->digitalObjects[0]->getMimeType()): ?>
<tr>
<th><?php echo __('mime-type') ?></th>
- <td><?php echo $digitalObject->getMimeType() ?></td>
+ <td><?php echo $informationObject->digitalObjects[0]->getMimeType() ?></td>
</tr>
<?php endif; ?>
- <?php if ($digitalObject->getByteSize()): ?>
+ <?php if ($informationObject->digitalObjects[0]->getByteSize()): ?>
<tr>
<th><?php echo __('filesize') ?></th>
- <td><?php echo hr_filesize($digitalObject->getByteSize()) ?></td>
+ <td><?php echo
hr_filesize($informationObject->digitalObjects[0]->getByteSize()) ?></td>
</tr>
<?php endif; ?>
- <?php if ($digitalObject->getCreatedAt()): ?>
+ <?php if ($informationObject->digitalObjects[0]->getCreatedAt()): ?>
<tr>
<th><?php echo __('uploaded') ?></th>
- <td><?php echo $digitalObject->getCreatedAt() ?></td>
+ <td><?php echo $informationObject->digitalObjects[0]->getCreatedAt()
?></td>
</tr>
<?php endif; ?>
<?php endif; ?>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---