Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sample PHP for AdminLTE UCM Dashboard Widget
// this sample widget will show how many jobs were started in the last 7 days:
if(class_exists('module_job',false) && module_job::can_i('view','Jobs')){
$jobs = module_job::get_jobs(array(
'date_start_after'=>date('Y-m-d',strtotime('-7 days'))
// icons from
<div class="small-box bg-aqua">
<div class="inner">
<?php echo count($jobs); ?>
<?php _e('Incomplete Jobs');?>
<div class="icon">
<i class="ion ion-document-text"></i>
<a href="<?php echo module_job::link_open(false);?>" class="small-box-footer">
<?php _e('View Jobs');?> <i class="fa fa-arrow-circle-right"></i>
$widgets[] = array(
'id' => 'jobs_started',
'columns' => 4, // 1, 2, 3 or 4 - which column group to add this widget to
'raw' => true, // output the raw HTML above as the widget. If this is false then the widget will get wrapped in a default box with a title.
'content' => ob_get_clean(),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment