Author: jablko
Date: Sun Oct 17 17:16:55 2010
New Revision: 8203
Log:
Simplify condition
Modified:
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedAuthorityRecords.php
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunctions.php
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedResources.php
Modified:
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedAuthorityRecords.php
==============================================================================
---
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedAuthorityRecords.php
Sun Oct 17 17:03:30 2010 (r8202)
+++
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedAuthorityRecords.php
Sun Oct 17 17:16:55 2010 (r8203)
@@ -11,7 +11,7 @@
<?php echo __('Nature of relationship') ?>
</th><th style="width: 20%">
<?php echo __('Dates') ?>
- </th><th style="width: 10%; text-align: center">
+ </th><th style="text-align: center; width: 10%">
<?php echo image_tag('delete', array('align' => 'top', 'class' =>
'deleteIcon')) ?>
</th>
</tr>
@@ -23,14 +23,12 @@
</td><td>
<?php echo
$item->getNoteByTypeId(QubitTerm::RELATION_NOTE_DESCRIPTION_ID) ?>
</td><td>
- <?php if (0 < strlen($dateDisplay =
$item->getNoteByTypeId(QubitTerm::RELATION_NOTE_DATE_DISPLAY_ID)) || 0 <
count($dateArray = $item->getDates())): ?>
- <?php if (0 < strlen($dateDisplay)): ?>
- <?php echo $dateDisplay ?>
- <?php elseif (2 == count($dateArray)): ?>
- <?php echo __('%1% - %2%', array('%1%' =>
Qubit::renderDate($dateArray['start']), '%2%' =>
Qubit::renderDate($dateArray['end']))) ?>
- <?php else: ?>
- <?php echo Qubit::renderDate(array_shift($dateArray)) ?>
- <?php endif; ?>
+ <?php if (0 < strlen($dateDisplay =
$item->getNoteByTypeId(QubitTerm::RELATION_NOTE_DATE_DISPLAY_ID))): ?>
+ <?php echo $dateDisplay ?>
+ <?php elseif (1 < count($dateArray = $item->getDates())): ?>
+ <?php echo __('%1% - %2%', array('%1%' =>
Qubit::renderDate($dateArray['start']), '%2%' =>
Qubit::renderDate($dateArray['end']))) ?>
+ <?php else: ?>
+ <?php echo Qubit::renderDate(array_shift($dateArray)) ?>
<?php endif; ?>
</td><td style="text-align: center">
<input type="checkbox" name="deleteRelations[<?php echo $item->id
?>]" value="delete" class="multiDelete" />
Modified:
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunctions.php
==============================================================================
---
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunctions.php
Sun Oct 17 17:03:30 2010 (r8202)
+++
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunctions.php
Sun Oct 17 17:16:55 2010 (r8203)
@@ -13,7 +13,7 @@
<?php echo __('Description') ?>
</th><th style="width: 20%">
<?php echo __('Dates') ?>
- </th><th style="width: 10%; text-align: center">
+ </th><th style="text-align: center; width: 10%">
<?php echo image_tag('delete', array('align' => 'top', 'class' =>
'deleteIcon')) ?>
</th>
</tr>
@@ -31,14 +31,12 @@
</td><td>
<?php echo
$item->getNoteByTypeId(QubitTerm::RELATION_NOTE_DESCRIPTION_ID) ?>
</td><td>
- <?php if (0 < strlen($dateDisplay =
$item->getNoteByTypeId(QubitTerm::RELATION_NOTE_DATE_DISPLAY_ID)) || 0 <
count($dateArray = $item->getDates())): ?>
- <?php if (0 < strlen($dateDisplay)): ?>
- <?php echo $dateDisplay ?>
- <?php elseif (2 == count($dateArray)): ?>
- <?php echo __('%1% - %2%', array('%1%' =>
Qubit::renderDate($dateArray['start']), '%2%' =>
Qubit::renderDate($dateArray['end']))) ?>
- <?php else: ?>
- <?php echo Qubit::renderDate(array_shift($dateArray)) ?>
- <?php endif; ?>
+ <?php if (0 < strlen($dateDisplay =
$item->getNoteByTypeId(QubitTerm::RELATION_NOTE_DATE_DISPLAY_ID))): ?>
+ <?php echo $dateDisplay ?>
+ <?php elseif (1 < count($dateArray = $item->getDates())): ?>
+ <?php echo __('%1% - %2%', array('%1%' =>
Qubit::renderDate($dateArray['start']), '%2%' =>
Qubit::renderDate($dateArray['end']))) ?>
+ <?php else: ?>
+ <?php echo Qubit::renderDate(array_shift($dateArray)) ?>
<?php endif; ?>
</td><td style="text-align: center">
<input type="checkbox" name="deleteRelations[<?php echo $item->id
?>]" value="delete" class="multiDelete"/>
Modified:
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedResources.php
==============================================================================
---
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedResources.php
Sun Oct 17 17:03:30 2010 (r8202)
+++
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedResources.php
Sun Oct 17 17:16:55 2010 (r8203)
@@ -11,26 +11,24 @@
<?php echo __('Nature of relationship') ?>
</th><th style="width: 20%">
<?php echo __('Dates') ?>
- </th><th style="width: 10%; text-align: center">
+ </th><th style="text-align: center; width: 10%">
<?php echo image_tag('delete', array('align' => 'top', 'class' =>
'deleteIcon')) ?>
</th>
</tr>
</thead><tbody>
<?php foreach ($relations as $item): ?>
- <tr id="<?php echo url_for(array($item, 'module' => 'relation')) ?>"
class="<?php echo 'related_obj_'.$item->id ?>">
+ <tr id="<?php echo url_for(array($item, 'module' => 'relation')) ?>"
class="related_obj_<?php echo $item->id ?>">
<td>
<?php echo render_title($item->object) ?>
</td><td>
<?php echo
$item->getNoteByTypeId(QubitTerm::RELATION_NOTE_DESCRIPTION_ID) ?>
</td><td>
- <?php if (0 < strlen($dateDisplay =
$item->getNoteByTypeId(QubitTerm::RELATION_NOTE_DATE_DISPLAY_ID)) || 0 <
count($dateArray = $item->getDates())): ?>
- <?php if (0 < strlen($dateDisplay)): ?>
- <?php echo $dateDisplay ?>
- <?php elseif (2 == count($dateArray)): ?>
- <?php echo __('%1% - %2%', array('%1%' =>
Qubit::renderDate($dateArray['start']), '%2%' =>
Qubit::renderDate($dateArray['end']))) ?>
- <?php else: ?>
- <?php echo Qubit::renderDate(array_shift($dateArray)) ?>
- <?php endif; ?>
+ <?php if (0 < strlen($dateDisplay =
$item->getNoteByTypeId(QubitTerm::RELATION_NOTE_DATE_DISPLAY_ID))): ?>
+ <?php echo $dateDisplay ?>
+ <?php elseif (1 < count($dateArray = $item->getDates())): ?>
+ <?php echo __('%1% - %2%', array('%1%' =>
Qubit::renderDate($dateArray['start']), '%2%' =>
Qubit::renderDate($dateArray['end']))) ?>
+ <?php else: ?>
+ <?php echo Qubit::renderDate(array_shift($dateArray)) ?>
<?php endif; ?>
</td><td style="text-align: center">
<input type="checkbox" name="deleteRelations[<?php echo $item->id
?>]" value="delete" class="multiDelete" />
--
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.