Author: jablko
Date: Fri Aug 28 17:12:06 2009
New Revision: 3109

Log:
Avoid some echo statements and string concatenation in templates

Modified:
   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/templates/showDcSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showDcSuccess.php      
Fri Aug 28 16:42:19 2009        (r3108)
+++ trunk/apps/qubit/modules/informationobject/templates/showDcSuccess.php      
Fri Aug 28 17:12:06 2009        (r3109)
@@ -52,7 +52,7 @@
   <tr>
   <th><?php echo __('creator') ?></th>
   <td><?php echo link_to(render_title($creator), array('module' => 'actor', 
'action' => 'show', 'id' => $creator->id)) ?>
-    <?php if ($existence = 
$creator->getDatesOfExistence(array('cultureFallback' => true))) echo ' 
('.$existence.')' ?>
+    <?php if ($existence = 
$creator->getDatesOfExistence(array('cultureFallback' => true))): ?> (<?php 
echo $existence ?>)<?php endif; ?>
   </td>
   </tr>
 <?php endforeach; ?>
@@ -61,7 +61,7 @@
   <tr>
   <th><?php echo __('publisher') ?></th>
   <td><?php echo link_to(render_title($publisher), array('module' => 'actor', 
'action' => 'show', 'id' => $publisher->id)) ?>
-    <?php if ($existence = 
$publisher->getDatesOfExistence(array('cultureFallback' => true))) echo ' 
('.$existence.')' ?>
+    <?php if ($existence = 
$publisher->getDatesOfExistence(array('cultureFallback' => true))): ?> (<?php 
echo $existence ?>) <?php endif; ?>
   </td>
   </tr>
 <?php endforeach; ?>
@@ -70,7 +70,7 @@
   <tr>
   <th><?php echo __('contributor') ?></th>
   <td><?php echo link_to(render_title($contributor), array('module' => 
'actor', 'action' => 'show', 'id' => $contributor->id)) ?>
-    <?php if ($existence = 
$contributor->getDatesOfExistence(array('cultureFallback' => true))) echo ' 
('.$existence.')' ?>
+    <?php if ($existence = 
$contributor->getDatesOfExistence(array('cultureFallback' => true))): ?> (<?php 
echo $existence ?>)<?php endif; ?>
   </td>
   </tr>
 <?php endforeach; ?>
@@ -81,7 +81,7 @@
   <th><?php echo __('date') ?></th>
   <td>
     <?php echo date_display($date); ?>
-    <?php echo '('.$date->getType().')' ?>
+    (<?php echo $date->getType() ?>)
   </td>
 </tr>
 <?php endforeach; ?>
@@ -116,7 +116,7 @@
   <?php if ($parent->getParentId()): ?>
   <tr>
     <th><?php echo __('relation') ?></th>
-    <td><?php echo __('is part of').': ' ?>
+    <td><?php echo __('is part of') ?>:
         <?php echo link_to(render_title($parent), array('module' => 
'informationobject', 'action' => 'show', 'id' => $parent->id)) ?>
     </td>
    </tr>

Modified: 
trunk/apps/qubit/modules/informationobject/templates/showIsadSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showIsadSuccess.php    
Fri Aug 28 16:42:19 2009        (r3108)
+++ trunk/apps/qubit/modules/informationobject/templates/showIsadSuccess.php    
Fri Aug 28 17:12:06 2009        (r3109)
@@ -113,13 +113,13 @@
   <tr>
   <th><?php echo __('name of creator') ?></th>
   <td><?php echo link_to(render_title($creator), array('module' => 'actor', 
'action' => 'show', 'id' => $creator->id)) ?>
-    <?php if ($existence = 
$creator->getDatesOfExistence(array('cultureFallback' => true))) echo ' 
('.$existence.')' ?>
+    <?php if ($existence = 
$creator->getDatesOfExistence(array('cultureFallback' => true))): ?> (<?php 
echo $existence ?>)<?php endif; ?>
   <?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 echo __('Administrative') ?>
     <?php else: ?>
-      <?php echo __('Biographic').' ' ?>
+      <?php echo __('Biographic') ?>
     <?php endif; ?>
       <?php echo __('history') ?></th></tr>
       <tr><td><?php echo nl2br($history) ?></td></tr>

Modified: 
trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php    
Fri Aug 28 16:42:19 2009        (r3108)
+++ trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php    
Fri Aug 28 17:12:06 2009        (r3109)
@@ -52,8 +52,7 @@
   <?php foreach ($nameAccessPoints as $name): ?>
     <tr><th><?php echo __('name') ?></th>
       <td>
-        <?php echo link_to(render_title($name->actor), array('module' => 
'actor', 'action' => 'show', 'id' => $name->actor->id)) ?>
-        <?php echo ' ('.$name->getType()->getRole().')' ?>
+        <?php echo link_to(render_title($name->actor), array('module' => 
'actor', 'action' => 'show', 'id' => $name->actor->id)) ?> (<?php echo 
$name->getType()->getRole() ?>)
       </td>
     </tr>
   <?php endforeach; ?>
@@ -135,12 +134,12 @@
 <?php if ($repository = $informationObject->getRepository()): ?>
   <tr><th><?php echo __('Physical Location') ?></th>
   <td><?php if ($repository->getIdentifier()):?>
-    <?php echo $repository->getIdentifier().' - ' ?>
+    <?php echo $repository->getIdentifier() ?> -
   <?php endif; ?>
   <?php echo link_to($repository->__toString(), array('module' => 
'repository', 'action' => 'show', 'id' => $repository->id)) ?>
   <?php if ($contactInformation = $repository->getPrimaryContact()): ?>
-     <br /><?php echo $contactInformation->getCity() ?><?php if 
($contactInformation->getCity()): ?><?php echo ', '?><?php endif; ?>
-    <?php echo $contactInformation->getRegion() ?><?php if 
($contactInformation->getRegion() && $contactInformation->getCountryCode()): 
?><?php echo ', ' ?><?php endif; ?>
+     <br /><?php echo $contactInformation->getCity() ?><?php if 
($contactInformation->getCity()): ?>, <?php endif; ?>
+    <?php echo $contactInformation->getRegion() ?><?php if 
($contactInformation->getRegion() && $contactInformation->getCountryCode()): 
?>, <?php endif; ?>
     <?php echo format_country($contactInformation->getCountryCode()) ?>
   <?php endif; ?>
   </td></tr>

Modified: 
trunk/apps/qubit/modules/informationobject/templates/showRadSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showRadSuccess.php     
Fri Aug 28 16:42:19 2009        (r3108)
+++ trunk/apps/qubit/modules/informationobject/templates/showRadSuccess.php     
Fri Aug 28 17:12:06 2009        (r3109)
@@ -195,7 +195,7 @@
   <tr>
   <th><?php echo __('name of creator') ?></th>
   <td><?php echo link_to(render_title($creator), array('module' => 'actor', 
'action' => 'show', 'id' => $creator->id)) ?>
-    <?php if ($existence = 
$creator->getDatesOfExistence(array('cultureFallback' => true))) echo ' 
('.$existence.')' ?>
+    <?php if ($existence = 
$creator->getDatesOfExistence(array('cultureFallback' => true))): ?> (<?php 
echo $existence ?>)<?php endif; ?>
   <?php if ($history = $creator->getHistory(array('cultureFallback' => 
true))): ?>
     <table class="detail" style="margin-top: 5px;">
       <tr><th style="text-align: left; padding: 1px;">
@@ -399,7 +399,7 @@
     <th><?php echo __('other notes') ?></th>
     <td>
       <?php foreach ($radNotes as $note): ?>
-        <?php echo $note->getType().': 
'.nl2br($note->getContent(array('cultureFallback' => true))) ?><br />
+        <?php echo $note->getType() ?>: <?php echo 
nl2br($note->getContent(array('cultureFallback' => true))) ?><br />
       <?php endforeach; ?>
     </td>
   </tr>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to