Author: jablko
Date: Sun Oct 17 12:33:12 2010
New Revision: 8198
Log:
Indentation
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 12:30:42 2010 (r8197)
+++
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedAuthorityRecords.php
Sun Oct 17 12:33:12 2010 (r8198)
@@ -1,61 +1,61 @@
<?php use_helper('Javascript') ?>
- <table class="inline" id="relatedEntityDisplay">
- <caption>
- <?php echo __('Related authority records') ?>
- </caption><thead>
- <tr>
- <th style="width: 25%">
- <?php echo __('Identifier/name') ?>
- </th><th style="width: 30%">
- <?php echo __('Nature of relationship') ?>
- </th><th style="width: 20%">
- <?php echo __('Dates') ?>
- </th><th style="width: 10%; text-align: center">
- <?php echo image_tag('delete', array('align' => 'top', 'class' =>
'deleteIcon')) ?>
- </th>
- </tr>
- </thead><tbody>
- <?php foreach ($actorRelations as $item): ?>
- <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 endif; ?>
- </td><td style="text-align: center">
- <input type="checkbox" name="deleteRelations[<?php echo
$item->id ?>]" value="delete" class="multiDelete" />
- </td>
- </tr>
- <?php endforeach; ?>
- </tbody>
- </table>
-
- <?php
-
- // Template for new display table rows
- $rowTemplate = '<tr id="{relatedEntity[id]}">'
- .' <td>'
- .' {relatedEntity[object]}'
- .' </td><td>'
- .' {relatedEntity[description]}'
- .' </td><td>'
- .' {relatedEntity[dateDisplay]}'
- .' </td><td style="text-align: right">'
- ." $editImage $deleteBtn"
- .' </td>'
- .'</tr>';
+<table class="inline" id="relatedEntityDisplay">
+ <caption>
+ <?php echo __('Related authority records') ?>
+ </caption><thead>
+ <tr>
+ <th style="width: 25%">
+ <?php echo __('Identifier/name') ?>
+ </th><th style="width: 30%">
+ <?php echo __('Nature of relationship') ?>
+ </th><th style="width: 20%">
+ <?php echo __('Dates') ?>
+ </th><th style="width: 10%; text-align: center">
+ <?php echo image_tag('delete', array('align' => 'top', 'class' =>
'deleteIcon')) ?>
+ </th>
+ </tr>
+ </thead><tbody>
+ <?php foreach ($actorRelations as $item): ?>
+ <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 endif; ?>
+ </td><td style="text-align: center">
+ <input type="checkbox" name="deleteRelations[<?php echo $item->id
?>]" value="delete" class="multiDelete" />
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+</table>
+
+<?php
+
+// Template for new display table rows
+$rowTemplate = '<tr id="{relatedEntity[id]}">'
+ .' <td>'
+ .' {relatedEntity[object]}'
+ .' </td><td>'
+ .' {relatedEntity[description]}'
+ .' </td><td>'
+ .' {relatedEntity[dateDisplay]}'
+ .' </td><td style="text-align: right">'
+ ." $editImage $deleteBtn"
+ .' </td>'
+ .'</tr>';
- echo javascript_tag(<<<content
+echo javascript_tag(<<<content
Drupal.behaviors.dialogRelatedEntity = {
attach: function (context)
{
@@ -79,76 +79,76 @@
content
) ?>
- <!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
- <!-- NOTE: The dialog.js script cuts this *entire* table and pastes -->
- <!-- it in a YUI dialog object. -->
- <!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
- <table class="inline" id="relatedEntity">
- <caption>
- <?php echo __('Related authority record') ?>
- </caption><tbody>
- <tr>
- <th colspan="4">
- <?php echo $form['relatedEntity[object]']
- ->label(__('Authorized form of name'))
- ->renderLabel() ?>
- </th>
- </tr><tr>
- <td colspan="4">
- <?php echo $form['relatedEntity[object]']->render(array('class' =>
'form-autocomplete')) ?>
- <input class="list" type="hidden" value="<?php echo
url_for(array('module' => 'actor', 'action' => 'autocomplete', 'showOnlyActors'
=> 'true')) ?>"/>
- <?php echo $form['relatedEntity[object]']
- ->help(__('Select the name from the drop-down menu; enter the
identifier or the first few letters to narrow the choices. (ISDF 6.1)'))
- ->renderHelp() ?>
- </td>
- </tr><tr>
- <th colspan="4">
- <?php echo $form['relatedEntity[description]']
- ->label(__('Nature of relationship'))
- ->renderLabel() ?>
- </th>
- </tr><tr>
- <td colspan="4">
- <?php echo $form['relatedEntity[description]'] ?>
- <?php echo $form['relatedEntity[description]']
- ->help(__('Describe the nature of the relationship between the
function and the related authority record. (ISDF 6.2)'))
- ->renderHelp() ?>
- </td>
- </tr><tr>
- <th style="width: 25%">
- <?php echo $form['relatedEntity[startDate]']
- ->label(__('Date†'))
- ->renderLabel() ?>
- </th><th style="width: 25%">
- <?php echo $form['relatedEntity[endDate]']
- ->label(__('End date†'))
- ->renderLabel() ?>
- </th><th colspan="2" style="width: 50%">
- <?php echo $form['relatedEntity[dateDisplay]']
- ->label(__('Date display†'))
- ->renderLabel() ?>
- </th>
- </tr><tr>
- <td style="width: 25%">
- <?php echo $form['relatedEntity[startDate]'] ?>
- <?php echo $form['relatedEntity[startDate]']
- ->help(__('Enter the start year. Do not use any qualifiers or
typographical symbols to express uncertainty.'))
- ->renderHelp() ?>
- </td><td style="width: 25%">
- <?php echo $form['relatedEntity[endDate]'] ?>
- <?php echo $form['relatedEntity[endDate]']
- ->help(__('Enter the end year. Do not use any qualifiers or
typographical symbols to express uncertainty. If the start and end years are
the same, enter data only in the "Date" field and leave the "End date" blank.'))
- ->renderHelp() ?>
- </td><td colspan="2" style="width: 50%">
- <?php echo $form['relatedEntity[dateDisplay]'] ?>
- <?php echo $form['relatedEntity[dateDisplay]']
- ->help(__('"Record, when relevant, the start and the end date of
the relationship." (ISDF 6.3) Enter the date as you would like it to appear in
the show page for the function, using qualifiers and/or typographical symbols
to express uncertainty if desired.'))
- ->renderHelp() ?>
- </td>
- </tr><tr>
- <td colspan="4">
- <?php echo __('%1% - dates must be specified in ISO-8601 format
(YYYY-MM-DD)', array('%1%' => '†'))?>
- </td>
- </tr>
- </tbody>
- </table>
+<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
+<!-- NOTE: The dialog.js script cuts this *entire* table and pastes -->
+<!-- it in a YUI dialog object. -->
+<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
+<table class="inline" id="relatedEntity">
+ <caption>
+ <?php echo __('Related authority record') ?>
+ </caption><tbody>
+ <tr>
+ <th colspan="4">
+ <?php echo $form['relatedEntity[object]']
+ ->label(__('Authorized form of name'))
+ ->renderLabel() ?>
+ </th>
+ </tr><tr>
+ <td colspan="4">
+ <?php echo $form['relatedEntity[object]']->render(array('class' =>
'form-autocomplete')) ?>
+ <input class="list" type="hidden" value="<?php echo
url_for(array('module' => 'actor', 'action' => 'autocomplete', 'showOnlyActors'
=> 'true')) ?>"/>
+ <?php echo $form['relatedEntity[object]']
+ ->help(__('Select the name from the drop-down menu; enter the
identifier or the first few letters to narrow the choices. (ISDF 6.1)'))
+ ->renderHelp() ?>
+ </td>
+ </tr><tr>
+ <th colspan="4">
+ <?php echo $form['relatedEntity[description]']
+ ->label(__('Nature of relationship'))
+ ->renderLabel() ?>
+ </th>
+ </tr><tr>
+ <td colspan="4">
+ <?php echo $form['relatedEntity[description]'] ?>
+ <?php echo $form['relatedEntity[description]']
+ ->help(__('Describe the nature of the relationship between the
function and the related authority record. (ISDF 6.2)'))
+ ->renderHelp() ?>
+ </td>
+ </tr><tr>
+ <th style="width: 25%">
+ <?php echo $form['relatedEntity[startDate]']
+ ->label(__('Date†'))
+ ->renderLabel() ?>
+ </th><th style="width: 25%">
+ <?php echo $form['relatedEntity[endDate]']
+ ->label(__('End date†'))
+ ->renderLabel() ?>
+ </th><th colspan="2" style="width: 50%">
+ <?php echo $form['relatedEntity[dateDisplay]']
+ ->label(__('Date display†'))
+ ->renderLabel() ?>
+ </th>
+ </tr><tr>
+ <td style="width: 25%">
+ <?php echo $form['relatedEntity[startDate]'] ?>
+ <?php echo $form['relatedEntity[startDate]']
+ ->help(__('Enter the start year. Do not use any qualifiers or
typographical symbols to express uncertainty.'))
+ ->renderHelp() ?>
+ </td><td style="width: 25%">
+ <?php echo $form['relatedEntity[endDate]'] ?>
+ <?php echo $form['relatedEntity[endDate]']
+ ->help(__('Enter the end year. Do not use any qualifiers or
typographical symbols to express uncertainty. If the start and end years are
the same, enter data only in the "Date" field and leave the "End date" blank.'))
+ ->renderHelp() ?>
+ </td><td colspan="2" style="width: 50%">
+ <?php echo $form['relatedEntity[dateDisplay]'] ?>
+ <?php echo $form['relatedEntity[dateDisplay]']
+ ->help(__('"Record, when relevant, the start and the end date of the
relationship." (ISDF 6.3) Enter the date as you would like it to appear in the
show page for the function, using qualifiers and/or typographical symbols to
express uncertainty if desired.'))
+ ->renderHelp() ?>
+ </td>
+ </tr><tr>
+ <td colspan="4">
+ <?php echo __('%1% - dates must be specified in ISO-8601 format
(YYYY-MM-DD)', array('%1%' => '†'))?>
+ </td>
+ </tr>
+ </tbody>
+</table>
Modified:
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunctions.php
==============================================================================
---
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunctions.php
Sun Oct 17 12:30:42 2010 (r8197)
+++
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunctions.php
Sun Oct 17 12:33:12 2010 (r8198)
@@ -1,76 +1,76 @@
<?php use_helper('Javascript') ?>
- <table class="inline" id="relatedFunctions">
- <caption>
- <?php echo __('Related functions') ?>
- </caption><thead>
- <tr>
- <th style="width: 25%">
- <?php echo __('Name') ?>
- </th><th style="width: 15%">
- <?php echo __('Category') ?>
- </th><th style="width: 30%">
- <?php echo __('Description') ?>
- </th><th style="width: 20%">
- <?php echo __('Dates') ?>
- </th><th style="width: 10%; text-align: center">
- <?php echo image_tag('delete', array('align' => 'top', 'class' =>
'deleteIcon')) ?>
- </th>
- </tr>
- </thead><tbody>
- <?php foreach ($relatedFunctions as $item): ?>
- <tr class="related_obj_<?php echo $item->id ?>" id="<?php echo
url_for(array($item, 'module' => 'relation')) ?>">
- <td>
- <?php if ($resource->id == $item->objectId): ?>
- <?php echo render_title($item->subject) ?>
- <?php else: ?>
- <?php echo render_title($item->object) ?>
- <?php endif; ?>
- </td><td>
- <?php echo $item->type ?>
- </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 endif; ?>
- </td><td style="text-align: center">
- <input type="checkbox" name="deleteRelations[<?php echo
$item->id ?>]" value="delete" class="multiDelete"/>
- </td>
- </tr>
- <?php endforeach; ?>
- </tbody>
- </table>
-
- <?php
-
- // Define template for new relation table rows added by dialog
- $editImage = image_tag('pencil', array('alt' => 'edit', 'style' => 'align:
top'));
- $deleteBtn = '<button class="delete-small" name="delete"/>';
-
- $rowTemplate = '<tr id="{relation[id]}">'
- .' <td>'
- .' {relation[authorizedFormOfName]}'
- .' </td><td>'
- .' {relation[category]}'
- .' </td><td>'
- .' {relation[description]}'
- .' </td><td>'
- .' {relation[dateDisplay]}'
- .' </td><td style="text-align: right">'
- ." $editImage $deleteBtn"
- .' </td>'
- .'</tr>';
+<table class="inline" id="relatedFunctions">
+ <caption>
+ <?php echo __('Related functions') ?>
+ </caption><thead>
+ <tr>
+ <th style="width: 25%">
+ <?php echo __('Name') ?>
+ </th><th style="width: 15%">
+ <?php echo __('Category') ?>
+ </th><th style="width: 30%">
+ <?php echo __('Description') ?>
+ </th><th style="width: 20%">
+ <?php echo __('Dates') ?>
+ </th><th style="width: 10%; text-align: center">
+ <?php echo image_tag('delete', array('align' => 'top', 'class' =>
'deleteIcon')) ?>
+ </th>
+ </tr>
+ </thead><tbody>
+ <?php foreach ($relatedFunctions as $item): ?>
+ <tr class="related_obj_<?php echo $item->id ?>" id="<?php echo
url_for(array($item, 'module' => 'relation')) ?>">
+ <td>
+ <?php if ($resource->id == $item->objectId): ?>
+ <?php echo render_title($item->subject) ?>
+ <?php else: ?>
+ <?php echo render_title($item->object) ?>
+ <?php endif; ?>
+ </td><td>
+ <?php echo $item->type ?>
+ </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 endif; ?>
+ </td><td style="text-align: center">
+ <input type="checkbox" name="deleteRelations[<?php echo $item->id
?>]" value="delete" class="multiDelete"/>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+</table>
+
+<?php
+
+// Define template for new relation table rows added by dialog
+$editImage = image_tag('pencil', array('alt' => 'edit', 'style' => 'align:
top'));
+$deleteBtn = '<button class="delete-small" name="delete"/>';
+
+$rowTemplate = '<tr id="{relation[id]}">'
+ .' <td>'
+ .' {relation[authorizedFormOfName]}'
+ .' </td><td>'
+ .' {relation[category]}'
+ .' </td><td>'
+ .' {relation[description]}'
+ .' </td><td>'
+ .' {relation[dateDisplay]}'
+ .' </td><td style="text-align: right">'
+ ." $editImage $deleteBtn"
+ .' </td>'
+ .'</tr>';
- $linkToShow = url_for(array($resource, 'module' => 'function'));
+$linkToShow = url_for(array($resource, 'module' => 'function'));
- echo javascript_tag(<<<content
+echo javascript_tag(<<<content
// Add special rendering rules
var handleFieldRender = function (obj, fname)
{
@@ -160,89 +160,89 @@
content
) ?>
- <!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
- <!-- NOTE: The dialog.js script cuts this *entire* table and pastes -->
- <!-- it in a YUI dialog object. -->
- <!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
- <table class="inline" id="functionRelation">
- <caption>
- <?php echo __('Relationship') ?>
- </caption><tbody>
- <tr>
- <th colspan="4">
- <?php echo $form['relation[authorizedFormOfName]']
- ->label(__('Authorized form of name'))
- ->renderLabel() ?>
- </th>
- </tr><tr>
- <td colspan="4">
- <?php echo
$form['relation[authorizedFormOfName]']->render(array('class' =>
'form-autocomplete')) ?>
- <input class="list" type="hidden" value="<?php echo
url_for(array('module' => 'function', 'action' => 'autocomplete')) ?>"/>
- <?php echo $form['relation[authorizedFormOfName]']
- ->help(__('"Record the authorised form of name and any unique
identifier of the related function." (ISDF 5.3.1)'))
- ->renderHelp() ?>
- </td>
- </tr><tr>
- <th colspan="4">
- <?php echo $form['relation[category]']
- ->label(__('Category'))
- ->renderLabel() ?>
- </th>
- </tr><tr>
- <td colspan="4">
- <?php echo $form['relation[category]'] ?>
- <?php echo $form['relation[category]']
- ->help(__('"Record a general category into which the
relationship being described falls." (ISDF 5.3.2) Select a category from the
drop-down menu: hierarchical, temporal or associative.'))
- ->renderHelp() ?>
- </td>
- </tr><tr>
- <th colspan="4">
- <?php echo $form['relation[description]']
- ->label(__('Description'))
- ->renderLabel() ?>
- </th>
- </tr><tr>
- <td colspan="4">
- <?php echo $form['relation[description]'] ?>
- <?php echo $form['relation[description]']
- ->help(__('"Record a precise description of the nature of the
relationship between the function being described and the related function."
(ISDF 5.3.3) Note that the text entered in this field will also appear in the
related function.'))
- ->renderHelp() ?>
- </td>
- </tr><tr>
- <th style="width: 25%">
- <?php echo $form['relation[startDate]']
- ->label('Date†')
- ->renderLabel() ?>
- </th><th style="width: 25%">
- <?php echo $form['relation[endDate]']
- ->label('End date†')
- ->renderLabel() ?>
- </th><th colspan="2" style="width: 50%">
- <?php echo $form['relation[dateDisplay]']
- ->label('Date display†')
- ->renderLabel() ?>
- </th>
- </tr><tr>
- <td style="width: 25%">
- <?php echo $form['relation[startDate]'] ?>
- <?php echo $form['relation[startDate]']
- ->help(__('Enter the start year. Do not use any qualifiers or
typographical symbols to express uncertainty.'))
- ->renderHelp() ?>
- </td><td style="width: 25%">
- <?php echo $form['relation[endDate]'] ?>
- <?php echo $form['relation[endDate]']
- ->help(__('Enter the end year. Do not use any qualifiers or
typographical symbols to express uncertainty. If the start and end years are
the same, enter data only in the "Date" field and leave the "End date" blank.'))
- ->renderHelp() ?>
- </td><td colspan="2" style="width: 50%">
- <?php echo $form['relation[dateDisplay]'] ?>
- <?php echo $form['relation[dateDisplay]']
- ->help(__('"Record the start and, when relevant, the end date of
the relationship." (ISDF 5.3.4) Enter the date as you would like it to appear
in the show page for the function, using qualifiers and/or typographical
symbols to express uncertainty if desired.'))
- ->renderHelp() ?>
- </td>
- </tr><tr>
- <td colspan="4">
- <?php echo __('%1% - dates must be specified in ISO-8601 format
(YYYY-MM-DD)', array('%1%' => '†'))?>
- </td>
- </tr>
- </tbody>
- </table>
+<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
+<!-- NOTE: The dialog.js script cuts this *entire* table and pastes -->
+<!-- it in a YUI dialog object. -->
+<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
+<table class="inline" id="functionRelation">
+ <caption>
+ <?php echo __('Relationship') ?>
+ </caption><tbody>
+ <tr>
+ <th colspan="4">
+ <?php echo $form['relation[authorizedFormOfName]']
+ ->label(__('Authorized form of name'))
+ ->renderLabel() ?>
+ </th>
+ </tr><tr>
+ <td colspan="4">
+ <?php echo
$form['relation[authorizedFormOfName]']->render(array('class' =>
'form-autocomplete')) ?>
+ <input class="list" type="hidden" value="<?php echo
url_for(array('module' => 'function', 'action' => 'autocomplete')) ?>"/>
+ <?php echo $form['relation[authorizedFormOfName]']
+ ->help(__('"Record the authorised form of name and any unique
identifier of the related function." (ISDF 5.3.1)'))
+ ->renderHelp() ?>
+ </td>
+ </tr><tr>
+ <th colspan="4">
+ <?php echo $form['relation[category]']
+ ->label(__('Category'))
+ ->renderLabel() ?>
+ </th>
+ </tr><tr>
+ <td colspan="4">
+ <?php echo $form['relation[category]'] ?>
+ <?php echo $form['relation[category]']
+ ->help(__('"Record a general category into which the relationship
being described falls." (ISDF 5.3.2) Select a category from the drop-down menu:
hierarchical, temporal or associative.'))
+ ->renderHelp() ?>
+ </td>
+ </tr><tr>
+ <th colspan="4">
+ <?php echo $form['relation[description]']
+ ->label(__('Description'))
+ ->renderLabel() ?>
+ </th>
+ </tr><tr>
+ <td colspan="4">
+ <?php echo $form['relation[description]'] ?>
+ <?php echo $form['relation[description]']
+ ->help(__('"Record a precise description of the nature of the
relationship between the function being described and the related function."
(ISDF 5.3.3) Note that the text entered in this field will also appear in the
related function.'))
+ ->renderHelp() ?>
+ </td>
+ </tr><tr>
+ <th style="width: 25%">
+ <?php echo $form['relation[startDate]']
+ ->label('Date†')
+ ->renderLabel() ?>
+ </th><th style="width: 25%">
+ <?php echo $form['relation[endDate]']
+ ->label('End date†')
+ ->renderLabel() ?>
+ </th><th colspan="2" style="width: 50%">
+ <?php echo $form['relation[dateDisplay]']
+ ->label('Date display†')
+ ->renderLabel() ?>
+ </th>
+ </tr><tr>
+ <td style="width: 25%">
+ <?php echo $form['relation[startDate]'] ?>
+ <?php echo $form['relation[startDate]']
+ ->help(__('Enter the start year. Do not use any qualifiers or
typographical symbols to express uncertainty.'))
+ ->renderHelp() ?>
+ </td><td style="width: 25%">
+ <?php echo $form['relation[endDate]'] ?>
+ <?php echo $form['relation[endDate]']
+ ->help(__('Enter the end year. Do not use any qualifiers or
typographical symbols to express uncertainty. If the start and end years are
the same, enter data only in the "Date" field and leave the "End date" blank.'))
+ ->renderHelp() ?>
+ </td><td colspan="2" style="width: 50%">
+ <?php echo $form['relation[dateDisplay]'] ?>
+ <?php echo $form['relation[dateDisplay]']
+ ->help(__('"Record the start and, when relevant, the end date of the
relationship." (ISDF 5.3.4) Enter the date as you would like it to appear in
the show page for the function, using qualifiers and/or typographical symbols
to express uncertainty if desired.'))
+ ->renderHelp() ?>
+ </td>
+ </tr><tr>
+ <td colspan="4">
+ <?php echo __('%1% - dates must be specified in ISO-8601 format
(YYYY-MM-DD)', array('%1%' => '†'))?>
+ </td>
+ </tr>
+ </tbody>
+</table>
Modified:
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedResources.php
==============================================================================
---
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedResources.php
Sun Oct 17 12:30:42 2010 (r8197)
+++
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedResources.php
Sun Oct 17 12:33:12 2010 (r8198)
@@ -1,61 +1,61 @@
<?php use_helper('Javascript') ?>
- <table class="inline" id="relatedResourceDisplay">
- <caption>
- <?php echo __('Related resources') ?>
- </caption><thead>
- <tr>
- <th style="width: 25%">
- <?php echo __('Identifier/title') ?>
- </th><th style="width: 30%">
- <?php echo __('Nature of relationship') ?>
- </th><th style="width: 20%">
- <?php echo __('Dates') ?>
- </th><th style="width: 10%; text-align: center">
- <?php echo image_tag('delete', array('align' => 'top', 'class' =>
'deleteIcon')) ?>
- </th>
- </tr>
- </thead><tbody>
- <?php foreach ($infoObjectRelations as $item): ?>
- <tr id="<?php echo url_for(array($item, 'module' => 'relation')) ?>"
class="<?php echo 'related_obj_'.$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 endif; ?>
- </td><td style="text-align: center">
- <input type="checkbox" name="deleteRelations[<?php echo
$item->id ?>]" value="delete" class="multiDelete" />
- </td>
- </tr>
- <?php endforeach; ?>
- </tbody>
- </table>
-
- <?php
-
- // Template for new display table rows
- $rowTemplate = '<tr id="{relatedResource[id]}">'
- .' <td>'
- .' {relatedResource[object]}'
- .' </td><td>'
- .' {relatedResource[description]}'
- .' </td><td>'
- .' {relatedResource[dateDisplay]}'
- .' </td><td style="text-align: right">'
- ." $editImage $deleteBtn"
- .' </td>'
- .'</tr>';
+<table class="inline" id="relatedResourceDisplay">
+ <caption>
+ <?php echo __('Related resources') ?>
+ </caption><thead>
+ <tr>
+ <th style="width: 25%">
+ <?php echo __('Identifier/title') ?>
+ </th><th style="width: 30%">
+ <?php echo __('Nature of relationship') ?>
+ </th><th style="width: 20%">
+ <?php echo __('Dates') ?>
+ </th><th style="width: 10%; text-align: center">
+ <?php echo image_tag('delete', array('align' => 'top', 'class' =>
'deleteIcon')) ?>
+ </th>
+ </tr>
+ </thead><tbody>
+ <?php foreach ($infoObjectRelations as $item): ?>
+ <tr id="<?php echo url_for(array($item, 'module' => 'relation')) ?>"
class="<?php echo 'related_obj_'.$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 endif; ?>
+ </td><td style="text-align: center">
+ <input type="checkbox" name="deleteRelations[<?php echo $item->id
?>]" value="delete" class="multiDelete" />
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+</table>
+
+<?php
+
+// Template for new display table rows
+$rowTemplate = '<tr id="{relatedResource[id]}">'
+ .' <td>'
+ .' {relatedResource[object]}'
+ .' </td><td>'
+ .' {relatedResource[description]}'
+ .' </td><td>'
+ .' {relatedResource[dateDisplay]}'
+ .' </td><td style="text-align: right">'
+ ." $editImage $deleteBtn"
+ .' </td>'
+ .'</tr>';
- echo javascript_tag(<<<content
+echo javascript_tag(<<<content
Drupal.behaviors.dialog2 = {
attach: function (context)
{
@@ -79,76 +79,76 @@
content
) ?>
- <!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
- <!-- NOTE: The dialog.js script cuts this *entire* table and pastes -->
- <!-- it in a YUI dialog object. -->
- <!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
- <table class="inline" id="relatedResource">
- <caption>
- <?php echo __('Related resource') ?>
- </caption><tbody>
- <tr>
- <th colspan="4">
- <?php echo $form['relatedResource[object]']
- ->label(__('Title'))
- ->renderLabel() ?>
- </th>
- </tr><tr>
- <td colspan="4">
- <?php echo $form['relatedResource[object]']->render(array('class'
=> 'form-autocomplete')) ?>
- <input class="list" type="hidden" value="<?php echo
url_for(array('module' => 'informationobject', 'action' => 'autocomplete'))
?>"/>
- <?php echo $form['relatedResource[object]']
- ->help(__('Select the title from the drop-down menu; enter the
identifier or the first few letters to narrow the choices. (ISDF 6.1)'))
- ->renderHelp() ?>
- </td>
- </tr><tr>
- <th colspan="4">
- <?php echo $form['relatedResource[description]']
- ->label(__('Nature of relationship'))
- ->renderLabel() ?>
- </th>
- </tr><tr>
- <td colspan="4">
- <?php echo $form['relatedResource[description]'] ?>
- <?php echo $form['relatedResource[description]']
- ->help(__('Describe the nature of the relationship between the
function and the related resource. (ISDF 6.2)'))
- ->renderHelp() ?>
- </td>
- </tr><tr>
- <th style="width: 25%">
- <?php echo $form['relatedResource[startDate]']
- ->label(__('Date†'))
- ->renderLabel() ?>
- </th><th style="width: 25%">
- <?php echo $form['relatedResource[endDate]']
- ->label(__('End date†'))
- ->renderLabel() ?>
- </th><th colspan="2" style="width: 50%">
- <?php echo $form['relatedResource[dateDisplay]']
- ->label(__('Date display†'))
- ->renderLabel() ?>
- </th>
- </tr><tr>
- <td style="width: 25%">
- <?php echo $form['relatedResource[startDate]'] ?>
- <?php echo $form['relatedResource[startDate]']
- ->help(__('Enter the start year. Do not use any qualifiers or
typographical symbols to express uncertainty.'))
- ->renderHelp() ?>
- </td><td style="width: 25%">
- <?php echo $form['relatedResource[endDate]'] ?>
- <?php echo $form['relatedResource[endDate]']
- ->help(__('Enter the end year. Do not use any qualifiers or
typographical symbols to express uncertainty. If the start and end years are
the same, enter data only in the "Date" field and leave the "End date" blank.'))
- ->renderHelp() ?>
- </td><td colspan="2" style="width: 50%">
- <?php echo $form['relatedResource[dateDisplay]'] ?>
- <?php echo $form['relatedResource[dateDisplay]']
- ->help(__('"Record, when relevant, the start and the end date of
the relationship." (ISDF 6.3) Enter the date as you would like it to appear in
the show page for the function, using qualifiers and/or typographical symbols
to express uncertainty if desired.'))
- ->renderHelp() ?>
- </td>
- </tr><tr>
- <td colspan="4">
- <?php echo __('%1% - dates must be specified in ISO-8601 format
(YYYY-MM-DD)', array('%1%' => '†'))?>
- </td>
- </tr>
- </tbody>
- </table>
+<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
+<!-- NOTE: The dialog.js script cuts this *entire* table and pastes -->
+<!-- it in a YUI dialog object. -->
+<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->
+<table class="inline" id="relatedResource">
+ <caption>
+ <?php echo __('Related resource') ?>
+ </caption><tbody>
+ <tr>
+ <th colspan="4">
+ <?php echo $form['relatedResource[object]']
+ ->label(__('Title'))
+ ->renderLabel() ?>
+ </th>
+ </tr><tr>
+ <td colspan="4">
+ <?php echo $form['relatedResource[object]']->render(array('class' =>
'form-autocomplete')) ?>
+ <input class="list" type="hidden" value="<?php echo
url_for(array('module' => 'informationobject', 'action' => 'autocomplete'))
?>"/>
+ <?php echo $form['relatedResource[object]']
+ ->help(__('Select the title from the drop-down menu; enter the
identifier or the first few letters to narrow the choices. (ISDF 6.1)'))
+ ->renderHelp() ?>
+ </td>
+ </tr><tr>
+ <th colspan="4">
+ <?php echo $form['relatedResource[description]']
+ ->label(__('Nature of relationship'))
+ ->renderLabel() ?>
+ </th>
+ </tr><tr>
+ <td colspan="4">
+ <?php echo $form['relatedResource[description]'] ?>
+ <?php echo $form['relatedResource[description]']
+ ->help(__('Describe the nature of the relationship between the
function and the related resource. (ISDF 6.2)'))
+ ->renderHelp() ?>
+ </td>
+ </tr><tr>
+ <th style="width: 25%">
+ <?php echo $form['relatedResource[startDate]']
+ ->label(__('Date†'))
+ ->renderLabel() ?>
+ </th><th style="width: 25%">
+ <?php echo $form['relatedResource[endDate]']
+ ->label(__('End date†'))
+ ->renderLabel() ?>
+ </th><th colspan="2" style="width: 50%">
+ <?php echo $form['relatedResource[dateDisplay]']
+ ->label(__('Date display†'))
+ ->renderLabel() ?>
+ </th>
+ </tr><tr>
+ <td style="width: 25%">
+ <?php echo $form['relatedResource[startDate]'] ?>
+ <?php echo $form['relatedResource[startDate]']
+ ->help(__('Enter the start year. Do not use any qualifiers or
typographical symbols to express uncertainty.'))
+ ->renderHelp() ?>
+ </td><td style="width: 25%">
+ <?php echo $form['relatedResource[endDate]'] ?>
+ <?php echo $form['relatedResource[endDate]']
+ ->help(__('Enter the end year. Do not use any qualifiers or
typographical symbols to express uncertainty. If the start and end years are
the same, enter data only in the "Date" field and leave the "End date" blank.'))
+ ->renderHelp() ?>
+ </td><td colspan="2" style="width: 50%">
+ <?php echo $form['relatedResource[dateDisplay]'] ?>
+ <?php echo $form['relatedResource[dateDisplay]']
+ ->help(__('"Record, when relevant, the start and the end date of the
relationship." (ISDF 6.3) Enter the date as you would like it to appear in the
show page for the function, using qualifiers and/or typographical symbols to
express uncertainty if desired.'))
+ ->renderHelp() ?>
+ </td>
+ </tr><tr>
+ <td colspan="4">
+ <?php echo __('%1% - dates must be specified in ISO-8601 format
(YYYY-MM-DD)', array('%1%' => '†'))?>
+ </td>
+ </tr>
+ </tbody>
+</table>
--
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.