mirror of
https://github.com/e107inc/e107.git
synced 2025-04-22 13:41:52 +02:00
Added e_dashboard.php for use in adding custom charts (in new tabs). e_status and e_latest should also be included in this single class. Example coming soon.
This commit is contained in:
parent
72e05b933c
commit
cc0c2dde8d
@ -338,31 +338,29 @@ class adminstyle_infopanel
|
||||
</div>
|
||||
*/
|
||||
|
||||
$tab = array();
|
||||
$tab['e-stats'] = array('caption'=>$tp->toGlyph('fa-signal').' Stats', 'text'=>$this->renderChart());
|
||||
$tab['e-online'] = array('caption'=>$tp->toGlyph('fa-user').' Online ('.$this->renderOnlineUsers('count').')', 'text'=>$this->renderOnlineUsers());
|
||||
|
||||
|
||||
|
||||
if($plugs = e107::getAddonConfig('e_dashboard',null, 'chart'))
|
||||
{
|
||||
foreach($plugs as $plug => $val)
|
||||
{
|
||||
foreach($val as $item)
|
||||
{
|
||||
if(!empty($item))
|
||||
{
|
||||
$tab[] = $item;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return e107::getForm()->tabs($tab);
|
||||
|
||||
|
||||
$dashboard = '
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab1" data-toggle="tab">'.$tp->toGlyph('fa-signal').' Stats</a></li>
|
||||
<li ><a href="#tab2" data-toggle="tab">'.$tp->toGlyph('fa-user').' Online ('.$this->renderOnlineUsers('count').')</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" style="min-height:300px">
|
||||
|
||||
<div class="tab-pane active" id="tab1">
|
||||
<div class="separator">
|
||||
'.$this->renderChart().'
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="tab2">
|
||||
<div class="separator">
|
||||
'.$this->renderOnlineUsers().'
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>';
|
||||
|
||||
return $dashboard;
|
||||
}
|
||||
|
||||
|
||||
|
@ -36,19 +36,20 @@ class e107plugin
|
||||
'e_meta',
|
||||
'e_emailprint',
|
||||
'e_frontpage',
|
||||
'e_latest',
|
||||
'e_status',
|
||||
'e_latest', // @TODO Move inside e_dashboard as latest()
|
||||
'e_status', // @TODO Move inside e_dashboard as status()
|
||||
'e_search',
|
||||
'e_shortcode',
|
||||
'e_module',
|
||||
'e_event',
|
||||
'e_comment',
|
||||
'e_sql',
|
||||
'e_dashboard', // Admin Front-Page addon.
|
||||
// 'e_userprofile', @deprecated @see e_user
|
||||
'e_header',
|
||||
// 'e_userinfo', @deprecated @see e_user
|
||||
'e_tagwords',
|
||||
'e_url',
|
||||
'e_url', // simple mod-rewrite.
|
||||
|
||||
'e_mailout',
|
||||
'e_sitelink',
|
||||
|
Loading…
x
Reference in New Issue
Block a user