summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--admin/menus.php22
-rw-r--r--templates/admin_themes_menus.tpl31
-rw-r--r--templates/menu_themes_admin.tpl2
3 files changed, 54 insertions, 1 deletions
diff --git a/admin/menus.php b/admin/menus.php
new file mode 100644
index 0000000..a772764
--- /dev/null
+++ b/admin/menus.php
@@ -0,0 +1,22 @@
+<?php
+//
+// (c) 2006 bitweaver.org - GNU LGPL
+//
+require_once( '../../bit_setup_inc.php' );
+
+if( !empty( $_REQUEST['update_menus'] ) ) {
+ foreach( array_keys( $gBitSystem->mAppMenu ) as $menuPackage ) {
+ if( empty($_REQUEST["menu_$menuPackage"] ) ) {
+ // the package menu is off - store it off
+ $gBitSystem->storePreference( "menu_$menuPackage", 'n', 'themes' );
+ } elseif( $gBitSystem->getPreference( "menu_$menuPackage" ) == 'n' ) {
+ // the package menu was off and now is on. Just delete the pref since on is the assumed state
+ $gBitSystem->storePreference( "menu_$menuPackage", NULL, 'themes' );
+ }
+ }
+}
+
+$gBitSystem->verifyPermission( 'bit_p_admin' );
+
+$gBitSystem->display( 'bitpackage:themes/admin_themes_menus.tpl', 'Themes Manager' );
+?>
diff --git a/templates/admin_themes_menus.tpl b/templates/admin_themes_menus.tpl
new file mode 100644
index 0000000..74c10f1
--- /dev/null
+++ b/templates/admin_themes_menus.tpl
@@ -0,0 +1,31 @@
+{strip}
+
+<div class="admin themes">
+ <div class="header">
+ <h1> {tr}Active Menus{/tr}</h1>
+ </div>
+
+ <div class="body">
+
+ {form legend="Select menus that are active in the top bar."}
+ <div class="row">
+ {formlabel label="Package Menus" for=""}
+ {forminput}
+
+<ul class="data">
+{foreach from=$gBitSystem->mAppMenu key=pkgName item=menu}
+<li class="item"><input type="checkbox" name="menu_{$pkgName}" {if $gBitSystem->getPreference("menu_`$pkgName`",'y')=='y'}checked="checked"{/if}/>{$menu.title}</li>
+{/foreach}
+</ul>
+ {/forminput}
+ </div>
+
+ <div class="row submit">
+ <input type="submit" name="update_menus" value="{tr}Update Menus{/tr}" />
+ </div>
+ {/form}
+
+ </div> <!-- end .body -->
+</div> <!-- end .themes -->
+
+{/strip}
diff --git a/templates/menu_themes_admin.tpl b/templates/menu_themes_admin.tpl
index c5313e2..9394971 100644
--- a/templates/menu_themes_admin.tpl
+++ b/templates/menu_themes_admin.tpl
@@ -2,8 +2,8 @@
<ul>
<li><a class="item" href="{$smarty.const.THEMES_PKG_URL}admin/admin_themes_manager.php">{tr}Themes Manager{/tr}</a></li>
<li><a class="item" href="{$smarty.const.KERNEL_PKG_URL}admin/index.php?page=layout" >{tr}Layout{/tr}</a></li>
+ <li><a class="item" href="{$smarty.const.THEMES_PKG_URL}admin/menus">{tr}Menus{/tr}</a></li>
<li><a class="item" href="{$smarty.const.KERNEL_PKG_URL}admin/index.php?page=modules">{tr}Module Settings{/tr}</a></li>
<li><a class="item" href="{$smarty.const.KERNEL_PKG_URL}admin/index.php?page=custom_modules">{tr}Custom Modules{/tr}</a></li>
-{* <li><a class="item" href="{$smarty.const.KERNEL_PKG_URL}admin/index.php?page=menus">{tr}Menus{/tr}</a></li>*}
</ul>
{/strip}