Author: david
Date: Fri Oct 14 15:36:34 2011
New Revision: 10111

Log:
Return to Criteria template if validation fails, like revision 10096

Added:
   trunk/apps/qubit/modules/informationobject/templates/itemListError.php
      - copied, changed from r10109, 
trunk/apps/qubit/modules/informationobject/templates/fileListError.php
Modified:
   trunk/apps/qubit/modules/informationobject/actions/fileListAction.class.php
   trunk/apps/qubit/modules/informationobject/actions/itemListAction.class.php

Modified: 
trunk/apps/qubit/modules/informationobject/actions/fileListAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/fileListAction.class.php 
Fri Oct 14 15:32:56 2011        (r10110)
+++ trunk/apps/qubit/modules/informationobject/actions/fileListAction.class.php 
Fri Oct 14 15:36:34 2011        (r10111)
@@ -82,17 +82,18 @@
       {
         $this->generateReport($request);
 
-        if (0 == count($this->results))
+        if (0 < count($this->results))
+        {
+          return sfView::SUCCESS;
+        }
+        else
         {
           return sfView::ERROR;
         }
       }
     }
 
-    else
-    {
-      return 'Criteria';
-    }
+    return 'Criteria';
   }
 
   public function generateReport($request)

Modified: 
trunk/apps/qubit/modules/informationobject/actions/itemListAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/itemListAction.class.php 
Fri Oct 14 15:32:56 2011        (r10110)
+++ trunk/apps/qubit/modules/informationobject/actions/itemListAction.class.php 
Fri Oct 14 15:36:34 2011        (r10111)
@@ -99,6 +99,11 @@
       {
         $this->generateReport($request);
 
+        if (0 == count($this->results))
+        {
+          return sfView::ERROR;
+        }
+
         return sfView::SUCCESS;
       }
     }

Copied and modified: 
trunk/apps/qubit/modules/informationobject/templates/itemListError.php (from 
r10109, trunk/apps/qubit/modules/informationobject/templates/fileListError.php)
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/fileListError.php      
Fri Oct 14 15:30:36 2011        (r10109, copy source)
+++ trunk/apps/qubit/modules/informationobject/templates/itemListError.php      
Fri Oct 14 15:36:34 2011        (r10111)
@@ -1,9 +1,9 @@
 <div class="content">
-    <h1><?php echo __('File list') ?></h1>
+    <h1><?php echo __('Item list') ?></h1>
 
     <h1 class="label"><?php echo __('No results') ?></h1>
 
-    <p><?php echo __('Oops, we couldn\'t find any file level descriptions.') 
?></p>
+    <p><?php echo __('Oops, we couldn\'t find any item level descriptions.') 
?></p>
 
     <p><?php echo link_to(__('Back'), array($resource, 'module' => 
'informationobject', 'action' => 'reports')); ?></p>
   </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