Author: jablko
Date: Wed Oct 27 17:36:56 2010
New Revision: 8581

Log:
Add title

Modified:
   trunk/apps/qubit/modules/physicalobject/actions/editAction.class.php
   trunk/apps/qubit/modules/physicalobject/actions/indexAction.class.php

Modified: trunk/apps/qubit/modules/physicalobject/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/physicalobject/actions/editAction.class.php        
Wed Oct 27 17:29:38 2010        (r8580)
+++ trunk/apps/qubit/modules/physicalobject/actions/editAction.class.php        
Wed Oct 27 17:36:56 2010        (r8581)
@@ -40,6 +40,19 @@
     {
       $this->resource = $this->getRoute()->resource;
     }
+
+    $title = $this->context->i18n->__('Add new physical storage');
+    if (isset($this->getRoute()->resource))
+    {
+      if (1 > strlen($title = $this->resource))
+      {
+        $title = $this->context->i18n->__('Untitled');
+      }
+
+      $title = $this->context->i18n->__('Edit %1%', array('%1%' => $title));
+    }
+
+    $this->response->setTitle("$title - {$this->response->getTitle()}");
   }
 
   protected function addField($name)

Modified: trunk/apps/qubit/modules/physicalobject/actions/indexAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/physicalobject/actions/indexAction.class.php       
Wed Oct 27 17:29:38 2010        (r8580)
+++ trunk/apps/qubit/modules/physicalobject/actions/indexAction.class.php       
Wed Oct 27 17:36:56 2010        (r8581)
@@ -22,5 +22,12 @@
   public function execute($request)
   {
     $this->resource = $this->getRoute()->resource;
+
+    if (1 > strlen($title = $this->resource))
+    {
+      $title = $this->context->i18n->__('Untitled');
+    }
+
+    $this->response->setTitle("$title - {$this->response->getTitle()}");
   }
 }

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