Author: jablko
Date: Sat Nov 21 10:51:38 2009
New Revision: 3933
Log:
Skip some intermediate variables
Modified:
trunk/apps/qubit/modules/menu/actions/mainMenuComponent.class.php
trunk/apps/qubit/modules/menu/templates/_mainMenu.php
Modified: trunk/apps/qubit/modules/menu/actions/mainMenuComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/menu/actions/mainMenuComponent.class.php Sat Nov
21 10:46:03 2009 (r3932)
+++ trunk/apps/qubit/modules/menu/actions/mainMenuComponent.class.php Sat Nov
21 10:51:38 2009 (r3933)
@@ -30,9 +30,6 @@
{
public function execute($request)
{
- // get the current page context
- $this->versionNumber = sfConfig::get('app_version');
-
$currentModule = $this->getContext()->getModuleName();
$currentAction = $this->getContext()->getActionName();
$currentUrl = url_for($currentModule.'/'.$currentAction);
@@ -41,8 +38,6 @@
$this->mainMenu = QubitMenu::getById(QubitMenu::MAIN_MENU_ID);
$this->adminMenu = QubitMenu::getById(QubitMenu::ADMIN_ID);
- // Set visibility
- $this->versionNumberVisibility =
($this->adminMenu->isDescendantSelected()) ? 'visible' : 'hidden';
$this->showSecondaryMenu = ($currentUrl != url_for('')) ? true : false;
// Yucky Hack: Don't display secondary menu options when displaying search
results
if ($currentModule == 'search' && $currentAction == 'search')
Modified: trunk/apps/qubit/modules/menu/templates/_mainMenu.php
==============================================================================
--- trunk/apps/qubit/modules/menu/templates/_mainMenu.php Sat Nov 21
10:46:03 2009 (r3932)
+++ trunk/apps/qubit/modules/menu/templates/_mainMenu.php Sat Nov 21
10:51:38 2009 (r3933)
@@ -1,6 +1,6 @@
<div id="menu-main">
- <div class="versionNumber" style="visibility: <?php echo
$versionNumberVisibility ?>">
- <?php echo $versionNumber ?>
+ <div class="versionNumber"<?php if (!$adminMenu->isDescendantSelected()): ?>
style="visibility: hidden"<?php endif; ?>>
+ <?php echo sfConfig::get('app_version') ?>
</div>
<?php echo QubitMenu::displayHierarchyAsList($mainMenu, 0,
$sf_data->getRaw('options')) ?>
</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=.