Commit 3246beeb authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Add subtabs to detailed stats page


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent ba016b28
......@@ -27,8 +27,7 @@
define('INTERNAL', 1);
define('ADMIN', 1);
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('MENUITEM', 'adminhome');
require(dirname(dirname(__FILE__)).'/init.php');
require(get_config('libroot') . 'registration.php');
......@@ -41,11 +40,19 @@ if (!empty($sitedata['weekly'])) {
$sitedata['dataarray'] = json_encode(array($sitedata['weekly']['view-count'], $sitedata['weekly']['user-count'], $sitedata['weekly']['group-count']));
}
$type = param_alpha('type', 'users');
$subpages = array('users', 'groups', 'views');
if (!in_array($type, $subpages)) {
$type = 'users';
}
$smarty = smarty($jsfiles);
$smarty->assign('PAGEHEADING', hsc(TITLE));
if (isset($sitedata)) {
$smarty->assign('sitedata', $sitedata);
$smarty->assign('type', $type);
$smarty->assign('subpages', $subpages);
}
$smarty->display('admin/statistics.tpl');
......
......@@ -4,6 +4,16 @@
<div class="site-stats">
{include file='admin/stats.tpl' cron=1}
</div>
<ul class="in-page-tabs">
{foreach from=$subpages item=subpage}
<li><a {if $subpage == $type}class="current-tab" {/if}href="{$WWWROOT}admin/statistics.php?type={$subpage}">{str tag=$subpage}</a></li>
{/foreach}
</ul>
<div class="subpage rel">
</div>
{/if}
{include file='footer.tpl'}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment