mirror of
https://github.com/e107inc/e107.git
synced 2025-08-12 17:44:37 +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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user