diff --git a/application/controllers/dashboard.php b/application/controllers/dashboard.php index e1ef901..c2b113c 100644 --- a/application/controllers/dashboard.php +++ b/application/controllers/dashboard.php @@ -27,7 +27,7 @@ class Dashboard extends CI_Controller { /** - * Constructor. + * Constructor. */ public function __construct() { parent::__construct(); @@ -35,7 +35,46 @@ class Dashboard extends CI_Controller { } public function index() { - $this->load->view('dashboard'); + $tpl['action_buttons'] = array( + array( + 'icon' => 'tango/folder-new.png', + 'text' => _('New project'), + 'target' => site_url('projects/create'), + ), + array( + 'icon' => 'tango/document-open.png', + 'text' => _('Recent results'), + 'target' => site_url('jobs/results'), + ), + ); + + $tpl['recent_buttons'] = array( + array( + 'count' => 4, + 'text' => _('Jobs finished'), + 'title' => sprintf(_('%d jobs finished recently'), 3), + 'target' => '#', + ), + array( + 'count' => 2, + 'text' => _('Newly shared projects'), + 'title' => sprintf(_('You were invited to join %d projects'), 2), + 'target' => '#', + ), + array( + 'count' => 1, + 'text' => _('Job running'), + 'title' => sprintf(_('There is %d job currently running'), 1), + 'target' => '#', + ), + array( + 'count' => 2, + 'text' => _('Jobs pending'), + 'title' => sprintf(_('There are %2 job currently pending'), 1), + 'target' => '#', + ), + ); + $this->load->view('dashboard', $tpl); } } diff --git a/application/views/dashboard.php b/application/views/dashboard.php index 6a4168d..85d9f5d 100644 --- a/application/views/dashboard.php +++ b/application/views/dashboard.php @@ -1,30 +1,63 @@ load->view('header');?>
- -
-

+
+
+

+
+ + +
+

+

+ 0): + $i = 1; + foreach ($action_buttons as $button): + if($i == 1 && (count($action_buttons) == 1)) + $button['class'] = ''; + elseif($i == count($action_buttons)) + $button['class'] = 'right'; + elseif($i == 1) + $button['class'] = 'left'; + else + $button['class'] = 'middle'; +?>
+

+
+
+

+

+ 0): + $i = 1; + foreach ($recent_buttons as $button): + if($i == 1 && (count($recent_buttons) == 1)) + $button['class'] = ''; + elseif($i == count($recent_buttons)) + $button['class'] = 'right'; + elseif($i == 1) + $button['class'] = 'left'; + else + $button['class'] = 'middle'; +?>
+

+
+
+

+

+ +

+
- -
-

-

- -

-
-
-

-

- -

-
-
-

-

- -

-
-
load->view('footer');?> diff --git a/assets/images/tango/document-new.png b/assets/images/tango/document-new.png new file mode 100644 index 0000000..e6d64bb Binary files /dev/null and b/assets/images/tango/document-new.png differ diff --git a/assets/images/tango/document-open.png b/assets/images/tango/document-open.png new file mode 100644 index 0000000..f35f258 Binary files /dev/null and b/assets/images/tango/document-open.png differ diff --git a/assets/images/tango/folder-new.png b/assets/images/tango/folder-new.png new file mode 100644 index 0000000..fcd15c0 Binary files /dev/null and b/assets/images/tango/folder-new.png differ diff --git a/assets/images/tango/folder-remote.png b/assets/images/tango/folder-remote.png new file mode 100644 index 0000000..3e0d9ad Binary files /dev/null and b/assets/images/tango/folder-remote.png differ