Author: jablko
Date: Wed Oct 13 07:45:00 2010
New Revision: 8079

Log:
Use ->renderName()

Modified:
   
trunk/apps/qubit/modules/informationobject/actions/eventFormComponent.class.php
   trunk/apps/qubit/modules/informationobject/templates/_eventForm.php

Modified: 
trunk/apps/qubit/modules/informationobject/actions/eventFormComponent.class.php
==============================================================================
--- 
trunk/apps/qubit/modules/informationobject/actions/eventFormComponent.class.php 
    Wed Oct 13 00:03:11 2010        (r8078)
+++ 
trunk/apps/qubit/modules/informationobject/actions/eventFormComponent.class.php 
    Wed Oct 13 07:45:00 2010        (r8079)
@@ -54,7 +54,7 @@
       }
 
       $event = new QubitEvent;
-      if (!isset($this->request->sourceId) && isset($item['id']))
+      if (!isset($this->request->source) && isset($item['id']))
       {
         $params = $this->context->routing->parse(Qubit::pathInfo($item['id']));
         $event = $params['_sf_route']->resource;
@@ -113,11 +113,11 @@
       }
     }
 
-    if (!isset($this->request->sourceId) && 
is_array($this->request->deleteEvents))
+    if (!isset($this->request->source) && 
is_array($this->request->deleteEvents))
     {
       foreach ($this->request->deleteEvents as $item)
       {
-        QubitEvent::getById($deleteId)->delete();
+        QubitEvent::getById($item)->delete();
       }
     }
   }

Modified: trunk/apps/qubit/modules/informationobject/templates/_eventForm.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/_eventForm.php Wed Oct 
13 00:03:11 2010        (r8078)
+++ trunk/apps/qubit/modules/informationobject/templates/_eventForm.php Wed Oct 
13 07:45:00 2010        (r8079)
@@ -3,16 +3,16 @@
 use_helper('Javascript');
 
 // Define template for new relation table rows added by dialog
-$editImage = image_tag('pencil', array('style' => 'align: top', 'alt' => 
'edit'));
+$editImage = image_tag('pencil', array('alt' => 'edit', 'style' => 'align: 
top'));
 $deleteBtn = '<button class="delete-small" name="delete"/>';
 
 $rowTemplate = '<tr id="{updateEvent[id]}">'
   .'  <td>'
-  .'    {updateEvent[actor]}'
+  ."    {{$form->actor->renderName()}}"
   .'  </td><td>'
-  .'    {updateEvent[type]}'
+  ."    {{$form->type->renderName()}}"
   .'  </td><td>'
-  .'    {updateEvent[dateDisplay]}'
+  ."    {{$form->dateDisplay->renderName()}}"
   .'  </td><td style="text-align: right">'
   ."    $editImage $deleteBtn"
   .'  </td>'
@@ -20,7 +20,7 @@
 
 // Omit edit button if object is being duplicated
 $addEditButtonJsCode = null;
-if (false == isset($sf_request->source))
+if (!isset($sf_request->source))
 {
   $addEditButtonJsCode = <<<addEditButtonJsCode
 // Add edit link/icon to 'relatedFunctions' rows

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