Author: jablko
Date: Wed Oct 27 17:00:37 2010
New Revision: 8576

Log:
s/$physicalObject/$resource

Modified:
   trunk/apps/qubit/modules/physicalobject/actions/boxListAction.class.php
   trunk/apps/qubit/modules/physicalobject/actions/deleteAction.class.php
   trunk/apps/qubit/modules/physicalobject/actions/editAction.class.php
   trunk/apps/qubit/modules/physicalobject/actions/indexAction.class.php
   trunk/apps/qubit/modules/physicalobject/config/security.yml
   trunk/apps/qubit/modules/physicalobject/templates/boxListSuccess.php
   trunk/apps/qubit/modules/physicalobject/templates/deleteSuccess.php
   trunk/apps/qubit/modules/physicalobject/templates/editSuccess.php
   trunk/apps/qubit/modules/physicalobject/templates/indexSuccess.php

Modified: 
trunk/apps/qubit/modules/physicalobject/actions/boxListAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/physicalobject/actions/boxListAction.class.php     
Wed Oct 27 16:53:37 2010        (r8575)
+++ trunk/apps/qubit/modules/physicalobject/actions/boxListAction.class.php     
Wed Oct 27 17:00:37 2010        (r8576)
@@ -26,9 +26,9 @@
       $request->limit = sfConfig::get('app_hits_per_page');
     }
 
-    $this->physicalObject = QubitPhysicalObject::getById($request->id);
+    $this->resource = QubitPhysicalObject::getById($request->id);
 
-    if (!isset($this->physicalObject))
+    if (!isset($this->resource))
     {
       $this->forward404();
     }

Modified: trunk/apps/qubit/modules/physicalobject/actions/deleteAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/physicalobject/actions/deleteAction.class.php      
Wed Oct 27 16:53:37 2010        (r8575)
+++ trunk/apps/qubit/modules/physicalobject/actions/deleteAction.class.php      
Wed Oct 27 17:00:37 2010        (r8576)
@@ -31,15 +31,15 @@
   {
     $this->form = new sfForm;
 
-    $this->physicalObject = QubitPhysicalObject::getById($request->id);
+    $this->resource = QubitPhysicalObject::getById($request->id);
 
-    if (!isset($this->physicalObject))
+    if (!isset($this->resource))
     {
       $this->forward404();
     }
 
     $criteria = new Criteria;
-    $criteria->add(QubitRelation::SUBJECT_ID, $this->physicalObject->id);
+    $criteria->add(QubitRelation::SUBJECT_ID, $this->resource->id);
     $criteria->addJoin(QubitRelation::OBJECT_ID, QubitInformationObject::ID);
     $this->informationObjects = QubitInformationObject::get($criteria);
 
@@ -52,7 +52,7 @@
     {
       $this->form->bind($request->getPostParameters());
 
-      $this->physicalObject->delete();
+      $this->resource->delete();
 
       if (null !== $next = $this->form->getValue('next'))
       {

Modified: trunk/apps/qubit/modules/physicalobject/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/physicalobject/actions/editAction.class.php        
Wed Oct 27 16:53:37 2010        (r8575)
+++ trunk/apps/qubit/modules/physicalobject/actions/editAction.class.php        
Wed Oct 27 17:00:37 2010        (r8576)
@@ -39,14 +39,14 @@
     {
       case 'location':
       case 'name':
-        $this->form->setDefault($name, $this->physicalObject[$name]);
+        $this->form->setDefault($name, $this->resource[$name]);
         $this->form->setValidator($name, new sfValidatorString);
         $this->form->setWidget($name, new sfWidgetFormInput);
 
         break;
 
       case 'type':
-        $this->form->setDefault('type', 
$this->context->routing->generate(null, array($this->physicalObject->type, 
'module' => 'term')));
+        $this->form->setDefault('type', 
$this->context->routing->generate(null, array($this->resource->type, 'module' 
=> 'term')));
         $this->form->setValidator('type', new sfValidatorString);
 
         $choices = QubitTerm::getIndentedChildTree(QubitTerm::CONTAINER_ID, 
' ', array('returnObjectInstances' => true));
@@ -62,17 +62,17 @@
     {
       case 'location':
       case 'name':
-        $this->physicalObject[$name] = $this->form->getValue($name);
+        $this->resource[$name] = $this->form->getValue($name);
 
         break;
 
       case 'type':
-        unset($this->physicalObject->type);
+        unset($this->resource->type);
 
         $params = 
$this->context->routing->parse(Qubit::pathInfo($this->form->getValue('type')));
         if (isset($params['id']))
         {
-          $this->physicalObject->typeId = $params['id'];
+          $this->resource->typeId = $params['id'];
         }
 
         break;
@@ -94,13 +94,13 @@
   {
     $this->form = new sfForm;
 
-    $this->physicalObject = new QubitPhysicalObject;
+    $this->resource = new QubitPhysicalObject;
 
     if (isset($request->id))
     {
-      $this->physicalObject = QubitPhysicalObject::getById($request->id);
+      $this->resource = QubitPhysicalObject::getById($request->id);
 
-      if (!isset($this->physicalObject))
+      if (!isset($this->resource))
       {
         $this->forward404();
       }
@@ -122,14 +122,14 @@
       {
         $this->processForm();
 
-        $this->physicalObject->save();
+        $this->resource->save();
 
         if (null !== $next = $this->form->getValue('next'))
         {
           $this->redirect($next);
         }
 
-        $this->redirect(array($this->physicalObject, 'module' => 
'physicalobject'));
+        $this->redirect(array($this->resource, 'module' => 'physicalobject'));
       }
     }
   }

Modified: trunk/apps/qubit/modules/physicalobject/actions/indexAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/physicalobject/actions/indexAction.class.php       
Wed Oct 27 16:53:37 2010        (r8575)
+++ trunk/apps/qubit/modules/physicalobject/actions/indexAction.class.php       
Wed Oct 27 17:00:37 2010        (r8576)
@@ -21,9 +21,9 @@
 {
   public function execute($request)
   {
-    $this->physicalObject = QubitPhysicalObject::getById($request->id);
+    $this->resource = QubitPhysicalObject::getById($request->id);
 
-    if (!isset($this->physicalObject))
+    if (!isset($this->resource))
     {
       $this->forward404();
     }

Modified: trunk/apps/qubit/modules/physicalobject/config/security.yml
==============================================================================
--- trunk/apps/qubit/modules/physicalobject/config/security.yml Wed Oct 27 
16:53:37 2010        (r8575)
+++ trunk/apps/qubit/modules/physicalobject/config/security.yml Wed Oct 27 
17:00:37 2010        (r8576)
@@ -5,7 +5,3 @@
 edit:
   credentials: [[ contributor, editor, administrator, translator ]]
   is_secure: true
-
-update:
-  credentials: [[ contributor, editor, administrator, translator ]]
-  is_secure: true

Modified: trunk/apps/qubit/modules/physicalobject/templates/boxListSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/physicalobject/templates/boxListSuccess.php        
Wed Oct 27 16:53:37 2010        (r8575)
+++ trunk/apps/qubit/modules/physicalobject/templates/boxListSuccess.php        
Wed Oct 27 17:00:37 2010        (r8576)
@@ -1,9 +1,9 @@
 <h1><?php echo __('Box list') ?></h1>
 
-<h1 class="label"><?php echo render_title($physicalObject) ?></h1>
+<h1 class="label"><?php echo render_title($resource) ?></h1>
 
 <div class="section">
-  <?php echo $physicalObject->location ?>
+  <?php echo $resource->location ?>
 </div>
 
 <table class="sticky-enabled">

Modified: trunk/apps/qubit/modules/physicalobject/templates/deleteSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/physicalobject/templates/deleteSuccess.php Wed Oct 
27 16:53:37 2010        (r8575)
+++ trunk/apps/qubit/modules/physicalobject/templates/deleteSuccess.php Wed Oct 
27 17:00:37 2010        (r8576)
@@ -1,4 +1,4 @@
-<h1><?php echo __('Are you sure you want to delete %1%?', array('%1%' => 
render_title($physicalObject))) ?></h1>
+<h1><?php echo __('Are you sure you want to delete %1%?', array('%1%' => 
render_title($resource))) ?></h1>
 
 <?php if (0 < count($informationObjects)): ?>
   <h2><?php echo __('Click Confirm to delete this physical storage from the 
system. This will also remove the physical storage location from the following 
records:') ?></h2>
@@ -9,7 +9,7 @@
   </ul>
 <?php endif; ?>
 
-<?php echo $form->renderFormTag(url_for(array($physicalObject, 'module' => 
'physicalobject', 'action' => 'delete')), array('method' => 'delete')) ?>
+<?php echo $form->renderFormTag(url_for(array($resource, 'module' => 
'physicalobject', 'action' => 'delete')), array('method' => 'delete')) ?>
 
   <?php echo $form->renderHiddenFields() ?>
 
@@ -17,7 +17,7 @@
     <h2 class="element-invisible"><?php echo __('Actions') ?></h2>
     <div class="content">
       <ul class="clearfix links">
-        <li><?php echo link_to(__('Cancel'), array($physicalObject, 'module' 
=> 'physicalobject')) ?></li>
+        <li><?php echo link_to(__('Cancel'), array($resource, 'module' => 
'physicalobject')) ?></li>
         <li><input class="form-submit" type="submit" value="<?php echo 
__('Confirm') ?>"/></li>
       </ul>
     </div>

Modified: trunk/apps/qubit/modules/physicalobject/templates/editSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/physicalobject/templates/editSuccess.php   Wed Oct 
27 16:53:37 2010        (r8575)
+++ trunk/apps/qubit/modules/physicalobject/templates/editSuccess.php   Wed Oct 
27 17:00:37 2010        (r8576)
@@ -1,20 +1,20 @@
 <h1><?php echo __('Edit %1%', array('%1%' => 
sfConfig::get('app_ui_label_physicalobject'))) ?></h1>
 
-<h1 class="label"><?php echo render_title($physicalObject) ?></h1>
+<h1 class="label"><?php echo render_title($resource) ?></h1>
 
 <?php echo $form->renderGlobalErrors() ?>
 
 <?php if (isset($sf_request->id)): ?>
-  <?php echo $form->renderFormTag(url_for(array($physicalObject, 'module' => 
'physicalobject', 'action' => 'edit'))) ?>
+  <?php echo $form->renderFormTag(url_for(array($resource, 'module' => 
'physicalobject', 'action' => 'edit'))) ?>
 <?php else: ?>
   <?php echo $form->renderFormTag(url_for(array('module' => 'physicalobject', 
'action' => 'add'))) ?>
 <?php endif; ?>
 
   <?php echo $form->renderHiddenFields() ?>
 
-  <?php echo render_field($form->name, $physicalObject) ?>
+  <?php echo render_field($form->name, $resource) ?>
 
-  <?php echo render_field($form->location, $physicalObject) ?>
+  <?php echo render_field($form->location, $resource) ?>
 
   <?php echo $form->type->renderRow() ?>
 
@@ -28,7 +28,7 @@
         <?php if (null !== $next = $form->getValue('next')): ?>
           <li><?php echo link_to(__('Cancel'), $next) ?></li>
         <?php else: ?>
-          <li><?php echo link_to(__('Cancel'), array($physicalObject, 'module' 
=> 'physicalobject')) ?></li>
+          <li><?php echo link_to(__('Cancel'), array($resource, 'module' => 
'physicalobject')) ?></li>
         <?php endif; ?>
 
         <li><input class="form-submit" type="submit" value="<?php echo 
__('Save') ?>"/></li>

Modified: trunk/apps/qubit/modules/physicalobject/templates/indexSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/physicalobject/templates/indexSuccess.php  Wed Oct 
27 16:53:37 2010        (r8575)
+++ trunk/apps/qubit/modules/physicalobject/templates/indexSuccess.php  Wed Oct 
27 17:00:37 2010        (r8576)
@@ -1,18 +1,18 @@
 <h1><?php echo __('View %1%', array('%1%' => 
sfConfig::get('app_ui_label_physicalobject'))) ?></h1>
 
-<h1 class="label"><?php echo render_title($physicalObject) ?></h1>
+<h1 class="label"><?php echo render_title($resource) ?></h1>
 
 <div class="section">
 
-  <?php echo render_show(__('Type'), $physicalObject->type) ?>
+  <?php echo render_show(__('Type'), $resource->type) ?>
 
-  <?php echo render_show(__('Location'), 
$physicalObject->getLocation(array('cultureFallback' => true))) ?>
+  <?php echo render_show(__('Location'), 
$resource->getLocation(array('cultureFallback' => true))) ?>
 
   <div class="field">
     <h3><?php echo __('Related resources') ?></h3>
     <div>
       <ul>
-        <?php foreach 
(QubitRelation::getRelatedObjectsBySubjectId('QubitInformationObject', 
$physicalObject->id, array('typeId' => QubitTerm::HAS_PHYSICAL_OBJECT_ID)) as 
$informationObject): ?>
+        <?php foreach 
(QubitRelation::getRelatedObjectsBySubjectId('QubitInformationObject', 
$resource->id, array('typeId' => QubitTerm::HAS_PHYSICAL_OBJECT_ID)) as 
$informationObject): ?>
           <li><?php echo link_to(render_title($informationObject), 
array($informationObject, 'module' => 'informationobject')) ?></li>
         <?php endforeach; ?>
       </ul>
@@ -27,8 +27,8 @@
 
   <div class="content">
     <ul class="clearfix links">
-      <li><?php echo link_to(__('Edit'), array($physicalObject, 'module' => 
'physicalobject', 'action' => 'edit')) ?></li>
-      <li><?php echo link_to(__('Delete'), array($physicalObject, 'module' => 
'physicalobject', 'action' => 'delete', 'next' => $sf_request->getReferer())) 
?></li>
+      <li><?php echo link_to(__('Edit'), array($resource, 'module' => 
'physicalobject', 'action' => 'edit')) ?></li>
+      <li><?php echo link_to(__('Delete'), array($resource, 'module' => 
'physicalobject', 'action' => 'delete', 'next' => $sf_request->getReferer())) 
?></li>
     </ul>
   </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.com/group/qubit-commits?hl=en.

Reply via email to