Author: peter
Date: 2008-10-20 17:34:52 -0700 (Mon, 20 Oct 2008)
New Revision: 1480

Added:
   trunk/qubit/apps/qubit/lib/QubitRAD.class.php
Modified:
   trunk/qubit/apps/qubit/modules/informationobject/templates/editRADSuccess.php
Log:
add class to provide RAD specific functions. update (unfinished) RAD edit 
template

Added: trunk/qubit/apps/qubit/lib/QubitRAD.class.php
===================================================================
--- trunk/qubit/apps/qubit/lib/QubitRAD.class.php                               
(rev 0)
+++ trunk/qubit/apps/qubit/lib/QubitRAD.class.php       2008-10-21 00:34:52 UTC 
(rev 1480)
@@ -0,0 +1,35 @@
+<?php
+
+/*
+ * This file is part of the Qubit Toolkit.
+ * Copyright (C) 2006-2008 Peter Van Garderen <[EMAIL PROTECTED]>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+/**
+ * @package    Qubit
+ * @author     Peter Van Garderen <[EMAIL PROTECTED]>
+ * @version    svn:$Id$
+ */  
+class QubitRAD
+{
+  public static function getLabel()
+  {
+  //returns RAD compliant label
+  
+  return 'TODO: create RAD label';
+  }
+}

Modified: 
trunk/qubit/apps/qubit/modules/informationobject/templates/editRADSuccess.php
===================================================================
--- 
trunk/qubit/apps/qubit/modules/informationobject/templates/editRADSuccess.php   
    2008-10-21 00:32:39 UTC (rev 1479)
+++ 
trunk/qubit/apps/qubit/modules/informationobject/templates/editRADSuccess.php   
    2008-10-21 00:34:52 UTC (rev 1480)
@@ -1,15 +1,15 @@
 <?php use_helper('DateForm') ?>
 <?php use_helper('Javascript') ?>
 
-<div class="pageTitle"><?php echo __('edit %1%', array('%1%' => 
sfConfig::get('app_ui_label_informationobject'))); ?></div>
+<div class="pageTitle"><?php echo __('edit archival description'); ?></div>
 
 <?php echo form_tag('informationobject/update', 'multipart=true') ?>
   <?php echo object_input_hidden_tag($informationObject, 'getId') ?>
   <?php echo input_hidden_tag('collection_type_id', 
QubitTerm::ARCHIVAL_MATERIAL_ID) ?>
 
-  <?php if ($informationObject->getTitle(array('sourceCulture' => true))): ?>
+  <?php if (QubitRAD::getLabel(array('sourceCulture' => true))): ?>
     <div class="formHeader">
-      <?php echo link_to($informationObject->getLabel(), 
'informationobject/show/?id='.$informationObject->getId()) ?>
+      <?php echo link_to(QubitRAD::getLabel(array('sourceCulture' => true)), 
'informationobject/showRAD/?id='.$informationObject->getId()) ?>
     </div>
   <?php else: ?>
     <table class="list" style="height: 25px;"><thead><tr><th></th></tr></table>
@@ -21,36 +21,9 @@
   <fieldset class="collapsible collapsed">
   <?php endif; ?>
 
-  <legend><?php echo __('Title and statement of responsibility area'); 
?></legend>
+  <legend><?php echo __('1.1 Title and statement of responsibility area'); 
?></legend>
 
-    <?php if ($informationObject->getIdentifier()): ?>
-      <div class="form-item">
-        <label for="reference code"><?php echo __('reference code'); ?></label>
-        <?php echo $informationObject->getReferenceCode(array('standard' => 
'isad')) ?>
-      </div>
-    <?php endif; ?>
-
     <div class="form-item">
-      <label for="identifier"><?php echo __('identifier'); ?></label>
-      <?php echo object_input_tag($informationObject, 'getIdentifier', 
array('size' => 20)) ?>
-    </div>
-
-    <div class="form-item">
-      <label for="level_of_description_id"><?php echo __('level of 
description'); ?></label>
-      <?php echo object_select_tag($informationObject, 
'getLevelOfDescriptionId', array('related_class' => 'QubitTerm', 
'include_blank' => true, 'peer_method' => 'getLevelsOfDescription')) ?>
-    </div>
-
-    <div class="form-item">
-      <label for="parent_id"><?php echo __('next upper level of description'); 
?></label>
-      <?php echo object_select_tree($informationObject, 'getParentId', 
array('disabled' => $informationObject->getDescendants(array('index' => 'id')), 
'include_blank' => true, 'peer_method' => 'getDescendants', 'related_class' => 
QubitInformationObject::getOne(QubitInformationObject::addRootsCriteria(new 
Criteria)))) ?>
-    </div>
-
-     <div class="form-item">
-      <label for="repository_id"><?php echo __('repository'); ?></label>
-      <?php echo object_select_tag($informationObject, 'getRepositoryId', 
array('include_blank' => true,)) ?>
-    </div>
-
-    <div class="form-item">
       <label for="title proper"><?php echo __('title proper'); ?></label>
       <?php if (strlen($sourceCultureValue = 
$informationObject->getTitle(array('sourceCulture' => 'true'))) > 0 && 
$sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
       <div class="default-translation"><?php echo nl2br($sourceCultureValue) 
?></div>
@@ -66,9 +39,25 @@
         <?php endforeach; ?>
       <?php endif; ?>
       <?php echo object_select_tag($newMaterialType, 'getTermId', array('name' 
=> 'material_type_id', 'id' => 'material_type_id', 'include_blank' => true, 
'peer_method' => 'getMaterialTypes', 'class'=>'multiInstance')) ?>
-    </div>    
+    </div> 
+
+    <div class="form-item">
+      <label for="parallel title"><?php echo __('parallel title'); ?></label>
+      <?php if (strlen($sourceCultureValue = 
$informationObject->getAlternateTitle(array('sourceCulture' => 'true'))) > 0 && 
$sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
+      <div class="default-translation"><?php echo nl2br($sourceCultureValue) 
?></div>
+      <?php endif; ?>
+      <?php echo object_input_tag($informationObject, 'getAlternateTitle', 
array('size' => 20)) ?>
+    </div>
     
+    <div class="form-item">
+      <label for="other title information"><?php echo __('other title 
information'); ?></label>
+      <strong>TODO: add QubitProperty</strong>
+    </div>        
 
+    <div class="form-item">
+      <label for="statements of responsibility"><?php echo __('statements of 
responsibility'); ?></label>
+      <strong>TODO: add QubitProperty</strong>
+    </div>  
     
     <div class="form-item">
       <label for="new_title_note"><?php echo __('title note'); ?></label>
@@ -83,24 +72,107 @@
       <?php echo input_tag('new_title_note') ?>
     </div>
 
+    <table style="border: 0; width: 98%; margin: 0; padding: 0;"><tr><td 
style="width: 150px;">
+    <div class="form-item">
+      <label for="level_of_description_id"><?php echo __('level of 
description'); ?></label>
+      <?php echo object_select_tag($informationObject, 
'getLevelOfDescriptionId', array('related_class' => 'QubitTerm', 
'include_blank' => true, 'peer_method' => 'getLevelsOfDescription')) ?>
+    </div>
+
+    </td><td style="padding-left: 10px;">
+
+    <div class="form-item">
+      <label for="parent_id"><?php echo __('parent level'); ?></label>
+      <?php echo object_select_tree($informationObject, 'getParentId', 
array('disabled' => 
$informationObject->getDescendants()->andSelf()->indexBy('id'), 'include_blank' 
=> true, 'peer_method' => 'getDescendants', 'related_class' => 
QubitInformationObject::getOne(QubitInformationObject::addRootsCriteria(new 
Criteria)))) ?>
+    </div>
+
+  </td></tr></table>
+
+     <div class="form-item">
+      <label for="repository_id"><?php echo __('repository'); ?></label>
+      <?php echo object_select_tag($informationObject, 'getRepositoryId', 
array('include_blank' => true,)) ?>
+    </div>
+    
+    <div class="form-item">
+      <label for="identifier"><?php echo __('identifier'); ?></label>
+      <?php echo object_input_tag($informationObject, 'getIdentifier', 
array('size' => 20)) ?>
+    </div>
+
+    <?php if ($informationObject->getIdentifier()): ?>
+      <div class="form-item">
+        <label for="reference code"><?php echo __('reference code'); ?></label>
+        <?php echo $informationObject->getReferenceCode(array('standard' => 
'isad')) ?>
+      </div>
+    <?php endif; ?>
+
+
   </fieldset>
 
 
   <fieldset class="collapsible collapsed">
-    <legend><?php echo __('edition area'); ?></legend>
+    <legend><?php echo __('1.2 Edition area'); ?></legend>
 
+    <div class="form-item">
+      <label for="edition statement"><?php echo __('edition statement'); 
?></label>
+      <?php if (strlen($sourceCultureValue = 
$informationObject->getEdition(array('sourceCulture' => 'true'))) > 0 && 
$sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
+      <div class="default-translation"><?php echo nl2br($sourceCultureValue) 
?></div>
+      <?php endif; ?>
+      <?php echo object_input_tag($informationObject, 'getEdition', 
array('size' => 20)) ?>
+    </div>
+    
+    <div class="form-item">
+      <label for="statements of responsibility"><?php echo __('statements of 
responsibility'); ?></label>
+      <strong>TODO: add QubitProperty</strong>
+    </div> 
+  
+   </fieldset>
+   
+  <fieldset class="collapsible collapsed">
+    <legend><?php echo __('1.3 Class of material specific details area'); 
?></legend>
 
     <div class="form-item">
+      <label for="statement of scale (cartographic)"><?php echo __('statement 
of scale (cartographic)'); ?></label>
+      <strong>TODO: add QubitProperty</strong>
+    </div> 
+    
+    <div class="form-item">
+      <label for="statement of projection"><?php echo __('statement of 
projection'); ?></label>
+      <strong>TODO: add QubitProperty</strong>
+    </div> 
+    
+    <div class="form-item">
+      <label for="statement of coordinates"><?php echo __('statement of 
coordinates'); ?></label>
+      <strong>TODO: add QubitProperty</strong>
+    </div>
+    
+    <div class="form-item">
+      <label for="statement of scale (architectural)"><?php echo __('statement 
of scale (architectural)'); ?></label>
+      <strong>TODO: add QubitProperty</strong>
+    </div>  
+    
+    <div class="form-item">
+      <label for="issuing jurisdiction and denomination"><?php echo 
__('issuing jursdiction and denomination'); ?></label>
+      <strong>TODO: add QubitProperty</strong>
+    </div>     
+  
+   </fieldset>
+   
+   
+   <fieldset class="collapsible collapsed">
+    <legend><?php echo __('1.5 Physical description area'); ?></legend>
+
+    <div class="form-item">
       <label for="extent_and_medium"><?php echo __('extent and medium'); 
?></label>
       <?php if (strlen($sourceCultureValue = 
$informationObject->getExtentAndMedium(array('sourceCulture' => 'true'))) > 0 
&& $sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
       <div class="default-translation"><?php echo nl2br($sourceCultureValue) 
?></div>
       <?php endif; ?>
       <?php echo object_textarea_tag($informationObject, 'getExtentAndMedium', 
array('size' => '30x3')) ?>
     </div>
-   
+  
    </fieldset>
 
+   
 
+
   <fieldset class="collapsible collapsed">
     <legend><?php echo __('context area'); ?></legend>
     
@@ -503,7 +575,7 @@
 </form> 
 
 <div class="menu-extra">
-  <?php echo link_to(__('add new %1%', array('%1%' => 
sfConfig::get('app_ui_label_informationobject'))), 'informationobject/create'); 
?>
-  <?php echo link_to(__('list all %1%', array('%1%' => 
sfConfig::get('app_ui_label_informationobject'))), 'informationobject/list'); ?>
+  <?php echo link_to(__('add new archival description'), 
'informationobject/createRAD'); ?>
+  <?php echo link_to(__('list all'), 'informationobject/list'); ?>
 </div>
 </div>


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