summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspiderr <spider@viovio.com>2013-04-03 23:31:15 -0400
committerspiderr <spider@viovio.com>2013-04-03 23:31:15 -0400
commit75d3889e3819b1af8bb1405464202f211706e931 (patch)
treedaaa3c0614160d9705bf096078ea219f2138c3ef
parenta070f075d173d9a515dbe98b69dd672f156169b9 (diff)
downloadkernel-75d3889e3819b1af8bb1405464202f211706e931.tar.gz
kernel-75d3889e3819b1af8bb1405464202f211706e931.tar.bz2
kernel-75d3889e3819b1af8bb1405464202f211706e931.zip
lots of clean up for bootstrap menus, headers, and footer; purge some ancient defaults
-rw-r--r--admin/schema_inc.php19
-rw-r--r--bit_error_inc.php4
-rw-r--r--config_defaults_inc.php4
-rw-r--r--modules/mod_bottom_bar.tpl2
-rw-r--r--templates/bitweaver.tpl6
-rw-r--r--templates/bot_bar.tpl57
-rw-r--r--templates/menu_top_admin_inc.tpl2
-rw-r--r--templates/top.tpl29
-rw-r--r--templates/top_bar.tpl68
9 files changed, 89 insertions, 102 deletions
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index b7aec84..dec7a3e 100644
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -91,25 +91,6 @@ $moduleHash = array(
'module_rsrc' => 'bitpackage:kernel/mod_package_menu.tpl',
),
array(
- 'title' => 'bitweaver',
- 'pos' => 5,
- 'layout_area' => 'r',
- 'module_rsrc' => 'bitpackage:kernel/mod_bitweaver_info.tpl',
- ),
- array(
- 'title' => 'Server Statistics',
- 'groups' => array( 'Admin' ),
- 'pos' => 10,
- 'layout_area' => 'r',
- 'module_rsrc' => 'bitpackage:kernel/mod_server_stats.tpl',
- ),
- array(
- 'title' => 'Powered by',
- 'pos' => 15,
- 'layout_area' => 'r',
- 'module_rsrc' => 'bitpackage:kernel/mod_powered_by.tpl',
- ),
- array(
'title' => NULL,
'pos' => 5,
'layout_area' => 'b',
diff --git a/bit_error_inc.php b/bit_error_inc.php
index 8cb8028..1159079 100644
--- a/bit_error_inc.php
+++ b/bit_error_inc.php
@@ -243,12 +243,12 @@ function bt( $levels=9999, $iPrint=TRUE ) {
}
}
}
- $s .= "\n ".$indent;
- $s .= @sprintf(" LINE: %4d, %s", $arr['line'],$arr['file']);
if( !preg_match( "*include*", $arr['function'] ) && !preg_match( "*silentlog*", strtolower( $arr['function'] ) ) ) {
$s .= "\n ".$indent.' -> ';
$s .= $sClass.$arr['function'].'('.implode(', ',$args).')';
}
+ $s .= "\n ".$indent;
+ $s .= @sprintf(" LINE: %4d, %s", $arr['line'],$arr['file']);
$indent = '';
}
$s .= "\n";
diff --git a/config_defaults_inc.php b/config_defaults_inc.php
index bcab5b3..91a4fb3 100644
--- a/config_defaults_inc.php
+++ b/config_defaults_inc.php
@@ -156,8 +156,8 @@ if( substr_count( $_SERVER['HTTP_HOST'], '.' ) >= 2 ) {
// set the currect version of bitweaver
// if this version of bitweaver needs a visit to the installer, update the number in /bit_setup_inc.php
if( !defined( 'BIT_MAJOR_VERSION' ) ) {
- define( 'BIT_MAJOR_VERSION', '3' );
- define( 'BIT_MINOR_VERSION', '1' );
+ define( 'BIT_MAJOR_VERSION', '4' );
+ define( 'BIT_MINOR_VERSION', '0' );
define( 'BIT_SUB_VERSION', '0' );
define( 'BIT_LEVEL', 'alpha' ); // dev < alpha < beta < RC# < '' < pl
}
diff --git a/modules/mod_bottom_bar.tpl b/modules/mod_bottom_bar.tpl
index 0ac78b3..2094d3a 100644
--- a/modules/mod_bottom_bar.tpl
+++ b/modules/mod_bottom_bar.tpl
@@ -1 +1 @@
-{include file="bitpackage:kernel/bot_bar.tpl"} \ No newline at end of file
+{include file="bitpackage:kernel/bot_bar.tpl"}
diff --git a/templates/bitweaver.tpl b/templates/bitweaver.tpl
index 3a92af6..410d4bc 100644
--- a/templates/bitweaver.tpl
+++ b/templates/bitweaver.tpl
@@ -21,11 +21,11 @@
{/if}
</header>
- <section class="row maincontent">
- <div class="container">
+ <section class="container maincontent">
+ <div class="row">
{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='container' serviceHash=$gContent->mInfo}
- <div id="wrapper" class="container span{math equation="12-x*3" x=$extraColumns}">
+ <div id="wrapper" class="span{math equation="12-x*3" x=$extraColumns}">
{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='wrapper' serviceHash=$gContent->mInfo}
<div id="content">
{include file="bitpackage:liberty/display_structure.tpl"}
diff --git a/templates/bot_bar.tpl b/templates/bot_bar.tpl
index a00eb61..2aafde5 100644
--- a/templates/bot_bar.tpl
+++ b/templates/bot_bar.tpl
@@ -1,9 +1,50 @@
-<div id="bitbottom">
- {if $gBitSystem->isFeatureActive( 'messages_site_contact' )}
- <a href="{$smarty.const.MESSAGES_PKG_URL}contact.php">{booticon iname="icon-envelope" ilocation=menu iexplain="Contact Us"}</a> &bull;
- {/if}
- <a id="poweredby" class="external" href="http://www.bitweaver.org">Powered by bitweaver</a>
- {if $gBitSystem->isFeatureActive( 'babelfish' )}
- {include file="bitpackage:languages/babelfish.tpl"}
- {/if}
+<div class="container">
+ <section>
+ <div class="row stats">
+ <div class="span12">
+ {if $gBitSystem->isFeatureActive( 'messages_site_contact' )}
+ <a href="{$smarty.const.MESSAGES_PKG_URL}contact.php">{booticon iname="icon-envelope" ilocation=menu iexplain="Contact Us"}</a>
+ {/if}
+ {if $gBitSystem->isFeatureActive( 'babelfish' )}
+ {include file="bitpackage:languages/babelfish.tpl"}
+ {/if}
+ <div>
+ <a id="poweredby" class="external" href="http://www.bitweaver.org"><img src="/liberty/icons/bitweaver/bitweaver.gif" alt="Bitweaver" title="Bitweaver" class="icon"></a> <strong>{$gBitSystem->getBitVersion()}</strong>
+ {if $gBitUser->isAdmin()}
+ {assign var=version_info value=$gBitSystem->checkBitVersion()}
+ {if $version_info.compare lt 0}
+ {tr}Upgrade to{/tr} <strong>{$version_info.upgrade}</strong>
+ {elseif $version_info.compare gt 0}
+ {tr}Latest Version{/tr} <strong>{$version_info.upgrade}</strong>
+ {/if}
+
+ {if $version_info.release}
+ {tr}Latest Release{/tr} <strong>{$version_info.release}</strong>
+ {/if}
+
+ {if $version_info.error.number ne 0}
+ {$version_info.error.string}
+ {elseif $version_info.compare eq 0 and !$version_info.release}
+ {tr}Your version is up to date.{/tr}
+ {elseif $version_info.compare lt 0 or $version_info.release}
+ {tr}Your version is not up to date.{/tr}
+ {elseif $version_info.compare gt 0 or $version_info.release}
+ {tr}Seems you are using a test version.{/tr}
+ {/if}
+ </div>
+ <div>
+ <ul class="inline">
+ <li>{tr}Execution time:&nbsp;{elapsed}s{/tr}</li>
+ <li>{tr}Memory usage:{/tr}&nbsp;{memusage}</li>
+ <li>{tr}Database queries:{/tr}&nbsp;{$gBitSystem->mDb->mNumQueries}</li>
+ <li>{tr}Database time:{/tr}&nbsp;{$gBitSystem->mDb->mQueryTime|string_format:"%.3f"}s / {$gBitSystem->mDb->mQueryTime/$gBitSystem->mTimer->elapsed()*100|round}%</li>
+ <li>{tr}Compression:{/tr}&nbsp;{$output_compression|default:"0"}</li>
+ {if $server_load}
+ <li>{tr}Server load:{/tr}&nbsp;{$server_load|default:"&#8211;"}</li>
+ {/if}
+ </ul>
+ {/if}
+ </div>
+ </div>
+ </section>
</div>
diff --git a/templates/menu_top_admin_inc.tpl b/templates/menu_top_admin_inc.tpl
index b1f0dfd..b00a24f 100644
--- a/templates/menu_top_admin_inc.tpl
+++ b/templates/menu_top_admin_inc.tpl
@@ -1,7 +1,7 @@
<a tabindex="-1" accesskey="A" class="{if $smarty.const.ACTIVE_PACKAGE eq 'kernel'} active{/if}" href="{if $gBitUser->isAdmin()}{$smarty.const.KERNEL_PKG_URL}admin/index.php{else}#{/if}">
<i class="icon-cog"></i> {tr}Administration{/tr}
</a>
-<ul class="dropdown-menu sub-menu">
+<ul class="dropdown-menu sub-menu pull-right">
{foreach key=key item=menu from=$adminMenu}
{if $key eq 'kernel' or $key eq 'liberty' or $key eq 'users' or $key eq 'themes'}
{include file=`$menu.tpl`}
diff --git a/templates/top.tpl b/templates/top.tpl
index 4765194..f7bdc6d 100644
--- a/templates/top.tpl
+++ b/templates/top.tpl
@@ -1,24 +1,27 @@
<div class="container" id="bittop">
<div class="navbar">
- <div class="floatright alignright">
+ <a class="brand" href="{$smarty.const.BIT_ROOT_URL}" {if $gBitSystem->getConfig('site_slogan')} title="{$gBitSystem->getConfig('site_slogan')|escape}" {/if}>{$gBitSystem->getConfig('site_title')}</a>
+ <div class="pull-right">
{if $gBitUser->isRegistered()}
- {tr}Welcome{/tr}, <strong>{displayname hash=$gBitUser->mInfo}</strong>
- &bull; <a href="{$smarty.const.USERS_PKG_URL}my.php">{tr}My Account{/tr}</a>
- &bull; <a href="{$smarty.const.USERS_PKG_URL}logout.php">{tr}logout{/tr}</a>
+ <ul class="nav nav-pills">
+ <li class="active dropdown">
+ <a class="dropdown-toggle" id="dLabel" role="button" data-toggle="dropdown" data-target="#"><i class="icon-user"></i> {displayname hash=$gBitUser->mInfo nolink=1} <b class="caret"></b></a>
+ <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
+ <li><a href="{$gBitUser->getDisplayUrl()}">{tr}My Profile{/tr}</a></li>
+ <li><a href="{$smarty.const.USERS_PKG_URL}my.php">{tr}My Account{/tr}</a></li>
+ <li><a href="{$smarty.const.USERS_PKG_URL}logout.php">{tr}Logout{/tr}</a></li>
+ {if $adminMenu}
+ <li class="dropdown-submenu menu-admin">{include file="bitpackage:kernel/menu_top_admin_inc.tpl"}</li>
+ {/if}
+ </ul>
+ </li>
+ </ul>
{else}
<a href="{$smarty.const.USERS_PKG_URL}login.php">{tr}login{/tr}</a>
{if $gBitSystem->isFeatureActive( 'users_allow_register' )}
- &bull; <a href="{$smarty.const.USERS_PKG_URL}register.php">{tr}register{/tr}</a>
+ {tr}or{/tr} <a href="{$smarty.const.USERS_PKG_URL}register.php">{tr}register{/tr}</a>
{/if}
{/if}
-
- <br />
-
- {if $gBitSystem->isFeatureActive( 'feature_calendar' ) and $gBitUser->hasPermission( 'p_calendar_view' )}
- <a href="{$smarty.const.CALENDAR_PKG_URL}index.php">{$smarty.now|bit_short_datetime}</a>
- {/if}
</div>
- <a class="brand" href="{$smarty.const.BIT_ROOT_URL}" {if $gBitSystem->getConfig('site_slogan')} title="{$gBitSystem->getConfig('site_slogan')|escape}" {/if}>{$gBitSystem->getConfig('site_title')}</a>
-
</div>
</div>
diff --git a/templates/top_bar.tpl b/templates/top_bar.tpl
index 8b686d1..c1205fe 100644
--- a/templates/top_bar.tpl
+++ b/templates/top_bar.tpl
@@ -3,60 +3,22 @@
<div class="navbar navbar-static-top">
<div class="navbar-inner">
<div class="nav-collapse collapse clear width100p">
- <ul class="nav dropmenu">
- {if $adminMenu}
- <li class="m-admin{if $smarty.const.ACTIVE_PACKAGE eq 'kernel'} current{/if}">
- {if $gBitUser->isAdmin()}<a accesskey="A" class="{if $gBitSystem->isFeatureActive( 'site_top_bar_dropdown' )}head{else}item{/if}{if $smarty.const.ACTIVE_PACKAGE eq 'kernel'} selected{/if}" href="{$smarty.const.KERNEL_PKG_URL}admin/index.php">{/if}
- <strong>{tr}Administration{/tr}</strong>
- {if $gBitUser->isAdmin()}</a>{/if}
- {if $gBitSystem->isFeatureActive( 'site_top_bar_dropdown' )}
- <ul>
- {foreach key=key item=menu from=$adminMenu}
- {if $key eq 'kernel' or $key eq 'liberty' or $key eq 'languages' or $key eq 'users' or $key eq 'themes'}
- <li>
- <a class="head cursordefault" href="{$smarty.const.KERNEL_PKG_URL}admin/index.php">
- <strong>{tr}{$key|capitalize}{/tr}</strong>
- </a>
- {include file=`$menu.tpl`}
- </li>
- {/if}
- {/foreach}
- {foreach key=key item=menu from=$adminMenu}
- {if $key neq 'kernel' and $key neq 'liberty' and $key neq 'languages' and $key neq 'users' and $key neq 'themes'}
- <li>
- <a class="head cursordefault" href="{$smarty.const.KERNEL_PKG_URL}admin/index.php">
- {tr}{$key|capitalize}{/tr}
- </a>
- {include file=`$menu.tpl`}
- </li>
- {/if}
- {/foreach}
- </ul>
- {/if}
- </li>
- {/if}
-
- {foreach key=key item=menu from=$gBitSystem->mAppMenu}
- {if $menu.menu_title && $menu.index_url && $menu.menu_template && !$menu.is_disabled}
- <li class="nav m-{$key}{if $smarty.const.ACTIVE_PACKAGE eq $menu.package_name} active{/if}">
- <a accesskey="{$key|truncate:1:""}" class="{if $gBitSystem->isFeatureActive( 'site_top_bar_dropdown' )}head{else}item{/if}{if $smarty.const.ACTIVE_PACKAGE eq $menu.package_name} selected{/if}" href="{$menu.index_url}">{tr}{$menu.menu_title}{/tr}</a>
- {if $gBitSystem->isFeatureActive( 'site_top_bar_dropdown' )}
- {include file="`$menu.menu_template`"}
- {/if}
- </li>
- {/if}
- {/foreach}
- </ul>
-</div>
+ <ul class="nav dropmenu">
+ {foreach key=key item=menu from=$gBitSystem->mAppMenu}
+ {if $menu.menu_title && $menu.index_url && $menu.menu_template && !$menu.is_disabled}
+ <li class="nav m-{$key}{if $smarty.const.ACTIVE_PACKAGE eq $menu.package_name} active{/if}">
+ <a accesskey="{$key|truncate:1:""}" class="{if $gBitSystem->isFeatureActive( 'site_top_bar_dropdown' )}head{else}item{/if}{if $smarty.const.ACTIVE_PACKAGE eq $menu.package_name} selected{/if}" href="{$menu.index_url}">{tr}{$menu.menu_title}{/tr}</a>
+ {if $gBitSystem->isFeatureActive( 'site_top_bar_dropdown' )}
+ {include file="`$menu.menu_template`"}
+ {/if}
+ </li>
+ {/if}
+ {/foreach}
+ </ul>
+ </div>
+ </div>
+ </div>
</div>
-</div>
-</div>
-
-<!--[if lt IE 8]>
-<script type="text/javascript">
- BitBase.fixIEDropMenu( 'nav' );
-</script>
-<![endif]-->
{if $gBitSystem->isFeatureActive('site_top_bar_js') && $gBitSystem->isFeatureActive('site_top_bar_dropdown')}
<script type="text/javascript"> /*<![CDATA[*/