*/ class Dashboard extends MY_Controller { /** * Constructor. */ public function __construct() { parent::__construct(); $this->load->model('job'); } public function index() { $tpl['action_buttons'] = array( array( 'icon' => 'icons-big/blue-folder-new.png', 'text' => _('New project'), 'target' => site_url('projects/create'), ), array( 'icon' => 'icons-big/blue-folder-open-document.png', 'text' => _('Recent results'), 'target' => site_url('jobs/results'), ), ); $tpl['recent_buttons'] = array( array( 'count' => $this->job->countUnseenResults(), 'text' => _('Jobs finished'), 'id' => 'jobs_finished', 'title' => sprintf(_('%d jobs finished recently'), 3), 'target' => '#', ), array( 'count' => 0, 'text' => _('Newly shared projects'), 'id' => 'shared_projects', 'title' => sprintf(_('You were invited to join %d projects'), 2), 'target' => '#', ), array( 'count' => $this->job->countRunning(), 'text' => _('Job running'), 'id' => 'jobs_running', 'title' => sprintf(_('There is %d job currently running'), 1), 'target' => '#', ), array( 'count' => $this->job->countPending(), 'text' => _('Jobs pending'), 'id' => 'jobs_pending', 'title' => sprintf(_('There are %2 job currently pending'), 1), 'target' => '#', ), ); $this->load->view('dashboard', $tpl); } } /* End of file dashboard.php */ /* Location: ./application/controllers/dashboard.php */