Author: david
Date: Thu Sep 24 12:40:45 2009
New Revision: 3498

Log:
Add new hack to menuing system for digital object upload form.

Modified:
   trunk/lib/model/QubitMenu.php

Modified: trunk/lib/model/QubitMenu.php
==============================================================================
--- trunk/lib/model/QubitMenu.php       Thu Sep 24 11:13:32 2009        (r3497)
+++ trunk/lib/model/QubitMenu.php       Thu Sep 24 12:40:45 2009        (r3498)
@@ -141,14 +141,6 @@
     $currentUrl = url_for($currentModule.'/'.$currentAction);
     $isSelected = false;
 
-    // If passed $url matches the url for this menu AND is not the base url
-    // for the application (url_for()), return true
-    $menuUrl = $this->getPath(array('getUrl' => true, 'resolveAlias' => true));
-    if ($menuUrl == $currentUrl && $currentUrl != url_for(''))
-    {
-      $isSelected = true;
-    }
-
     // Yucky Hack: Don't display "static" menu as selected when displaying a
     // staticpage (See FIXME below)
     if ($currentModule == 'staticpage' && $currentAction == 'static')
@@ -156,12 +148,28 @@
 
       return false;
     }
-    // Yucky Hack, Part Deux: Don't display any active menu options when 
displaying search results
+    // Yucky Hack, Part Deux: Don't display any active menu options when
+    // displaying search results
     if ($currentModule == 'search' && $currentAction == 'search')
     {
 
       return false;
     }
+    // 'Hacks 3: Return of the Hack' Select the 'archival description' button
+    // when uploading digital object
+    if ($currentModule == 'digitalobject' && $currentAction == 'edit')
+    {
+
+      return ($this->getPath() == 'informationobject/list');
+    }
+
+    // If passed $url matches the url for this menu AND is not the base url
+    // for the application (url_for()), return true
+    $menuUrl = $this->getPath(array('getUrl' => true, 'resolveAlias' => true));
+    if ($menuUrl == $currentUrl && $currentUrl != url_for(''))
+    {
+      $isSelected = true;
+    }
 
     /***
      * FIXME Implement a better way to determine if a menu is selected than

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