mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 21:57:51 +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>
|
</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());
|
||||||
|
|
||||||
|
|
||||||
$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">
|
if($plugs = e107::getAddonConfig('e_dashboard',null, 'chart'))
|
||||||
|
{
|
||||||
|
foreach($plugs as $plug => $val)
|
||||||
|
{
|
||||||
|
foreach($val as $item)
|
||||||
|
{
|
||||||
|
if(!empty($item))
|
||||||
|
{
|
||||||
|
$tab[] = $item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
<div class="tab-pane active" id="tab1">
|
return e107::getForm()->tabs($tab);
|
||||||
<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_meta',
|
||||||
'e_emailprint',
|
'e_emailprint',
|
||||||
'e_frontpage',
|
'e_frontpage',
|
||||||
'e_latest',
|
'e_latest', // @TODO Move inside e_dashboard as latest()
|
||||||
'e_status',
|
'e_status', // @TODO Move inside e_dashboard as status()
|
||||||
'e_search',
|
'e_search',
|
||||||
'e_shortcode',
|
'e_shortcode',
|
||||||
'e_module',
|
'e_module',
|
||||||
'e_event',
|
'e_event',
|
||||||
'e_comment',
|
'e_comment',
|
||||||
'e_sql',
|
'e_sql',
|
||||||
|
'e_dashboard', // Admin Front-Page addon.
|
||||||
// 'e_userprofile', @deprecated @see e_user
|
// 'e_userprofile', @deprecated @see e_user
|
||||||
'e_header',
|
'e_header',
|
||||||
// 'e_userinfo', @deprecated @see e_user
|
// 'e_userinfo', @deprecated @see e_user
|
||||||
'e_tagwords',
|
'e_tagwords',
|
||||||
'e_url',
|
'e_url', // simple mod-rewrite.
|
||||||
|
|
||||||
'e_mailout',
|
'e_mailout',
|
||||||
'e_sitelink',
|
'e_sitelink',
|
||||||
|
Reference in New Issue
Block a user