Author: david
Date: Thu Dec  3 12:03:19 2009
New Revision: 4062

Log:
Add section links/headings.

Modified:
   trunk/apps/qubit/modules/function/templates/showIsdfSuccess.php

Modified: trunk/apps/qubit/modules/function/templates/showIsdfSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/function/templates/showIsdfSuccess.php     Thu Dec 
 3 11:48:07 2009        (r4061)
+++ trunk/apps/qubit/modules/function/templates/showIsdfSuccess.php     Thu Dec 
 3 12:03:19 2009        (r4062)
@@ -3,24 +3,34 @@
 <table class="detail">
 <tbody>
 
-<tr>
-  <td colspan="2" class="headerCell">
-    <?php echo link_to_if(QubitAcl::check($func, QubitAclAction::UPDATE_ID), 
render_title($func), array('module' => 'function', 'action' => 'edit', 'id' => 
$func->id), array('title' => __('Edit function'))) ?>
-  </td>
-</tr>
+  <tr>
+    <td colspan="2" class="headerCell">
+      <?php echo link_to_if(QubitAcl::check($func, QubitAclAction::UPDATE_ID), 
render_title($func), array('module' => 'function', 'action' => 'edit', 'id' => 
$func->id), array('title' => __('Edit function'))) ?>
+    </td>
+  </tr>
 
 <?php if (isset($errorSchema)): ?>
-<tr>
-  <td colspan="2">
-    <div class="messages error">
-      <ul>
-        <?php foreach ($errorSchema as $error): ?>
-          <li><?php echo $error ?></li>
-        <?php endforeach; ?>
-      </ul>
-    </div>
-  </td>
-</tr>
+  <tr>
+    <td colspan="2">
+      <div class="messages error">
+        <ul>
+          <?php foreach ($errorSchema as $error): ?>
+            <li><?php echo $error ?></li>
+          <?php endforeach; ?>
+        </ul>
+      </div>
+    </td>
+  </tr>
+<?php endif; ?>
+
+<?php if (null !== $func->typeId
+  || 0 < strlen($func->getAuthorizedFormOfName(array('cultureFallback' => 
true)))
+  || 0 < strlen(0 < count($parallelNames))
+  || 0 < strlen(0 < count($otherNames))
+  || 0 < strlen($func->getClassification(array('cultureFallback' => true)))): 
?>
+  <tr id="identityArea"><td colspan="2" class="subHeaderCell">
+    <?php echo link_to_if(QubitAcl::check($func, QubitAclAction::UPDATE_ID), 
__('identity area'), array('module' => 'function', 'action' => 'edit', 'id' => 
$func->id), array('anchor' => 'identityArea', 'title' => __('Edit identity 
area'))) ?>
+  </td></tr>
 <?php endif; ?>
 
 <?php if (null !== $func->typeId): ?>
@@ -67,6 +77,18 @@
   </td></tr>
 <?php endif; ?>
 
+<!-- Context area -->
+<?php if (0 < strlen($func->getDates(array('cultureFallback' => true)))
+  || 0 < strlen($func->getDescription(array('cultureFallback' => true)))
+  || 0 < strlen($func->getHistory(array('cultureFallback' => true)))
+  || 0 < strlen($func->getLegislation(array('cultureFallback' => true)))): ?>
+  <tr id="contextArea">
+    <td colspan="2" class="subHeaderCell">
+      <?php echo link_to_if(QubitAcl::check($func, QubitAclAction::UPDATE_ID), 
__('context area'), array('module' => 'function', 'action' => 'edit', 'id' => 
$func->id), array('anchor' => 'contextArea', 'title' => __('Edit context 
area'))) ?>
+    </td>
+  </tr>
+<?php endif; ?>
+
 <?php if (0 < strlen($value = $func->getDates(array('cultureFallback' => 
true)))): ?>
   <tr><th><?php echo __('dates') ?></th>
   <td><?php echo $value ?>
@@ -90,8 +112,15 @@
   <td><?php echo nl2br($value) ?></td></tr>
 <?php endif; ?>
 
-<?php if (0 < count($funcRelations)): ?>
-  <?php foreach ($funcRelations as $funcRelation): ?>
+<!-- Relationships area -->
+<?php if (0 < count($relations)): ?>
+  <tr id="relationshipsArea">
+    <td colspan="2" class="subHeaderCell">
+      <?php echo link_to_if(QubitAcl::check($func, QubitAclAction::UPDATE_ID), 
__('relationships area'), array('module' => 'function', 'action' => 'edit', 
'id' => $func->id), array('anchor' => 'relationshipsArea', 'title' => __('Edit 
relationships area'))) ?>
+    </td>
+  </tr>
+
+  <?php foreach ($relations as $relation): ?>
   <tr>
     <th><?php echo __('related entity') ?></th>
     <td>
@@ -157,6 +186,25 @@
   <?php endforeach; ?>
 <?php endif; ?>
 
+
+<!-- Control area -->
+<?php if (null !== $func->getDescriptionIdentifier()
+  || 0 < strlen($func->getInstitutionIdentifier(array('cultureFallback' => 
true)))
+  || 0 < strlen($func->getRules(array('cultureFallback' => true)))
+  || null !== $func->descriptionStatusId
+  || null !== $func->descriptionDetailId
+  || 0 < strlen($func->getRevisionHistory(array('cultureFallback' => true)))
+  || 0 < count($func->language)
+  || 0 < count($func->script)
+  || 0 < strlen($func->getSources(array('cultureFallback' => true)))
+  || 0 < count($maintenanceNotes)): ?>
+  <tr id="controlArea">
+    <td colspan="2" class="subHeaderCell">
+      <?php echo link_to_if(QubitAcl::check($func, QubitAclAction::UPDATE_ID), 
__('control area'), array('module' => 'function', 'action' => 'edit', 'id' => 
$func->id), array('anchor' => 'controlArea', 'title' => __('Edit control 
area'))) ?>
+    </td>
+  </tr>
+<?php endif; ?>
+
 <?php if (null !== $func->getDescriptionIdentifier()): ?>
   <tr><th><?php echo __('function description identifier')?></th>
   <td><?php echo $func->getDescriptionIdentifier() ?></td></tr>
@@ -230,7 +278,6 @@
     <td><?php echo $note->getContent(array('cultureFallback' => true)) ?></td>
   </tr>
 <?php endif; ?>
-
 </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.


Reply via email to