summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-01-24 14:34:13 +0100
committerAleksander Machniak <alec@alec.pl>2012-01-24 14:34:13 +0100
commita1919c9f1787b7703b63e0b021539bbe7ab02923 (patch)
tree3caa299cf3f5c2f591675b89db8b5699eccf74de
parent28f02a50f47d942510efe377e3781638f7747aa1 (diff)
downloadwebadmin-a1919c9f1787b7703b63e0b021539bbe7ab02923.tar.gz
Dashboard
-rw-r--r--lib/client/kolab_client_task_main.php4
-rw-r--r--lib/kolab_client_task.php19
-rw-r--r--public_html/skins/default/images/README6
-rw-r--r--public_html/skins/default/images/about.pngbin0 -> 12258 bytes
-rw-r--r--public_html/skins/default/images/users.pngbin0 -> 11952 bytes
-rw-r--r--public_html/skins/default/style.css40
-rw-r--r--public_html/skins/default/templates/main.html11
7 files changed, 75 insertions, 5 deletions
diff --git a/lib/client/kolab_client_task_main.php b/lib/client/kolab_client_task_main.php
index 1ce0fb7..63735c2 100644
--- a/lib/client/kolab_client_task_main.php
+++ b/lib/client/kolab_client_task_main.php
@@ -20,6 +20,10 @@ class kolab_client_task_main extends kolab_client_task
// assign default set of translations
$this->output->add_translation('loading', 'servererror', 'search');
+ // Create list of tasks for dashboard
+ // @TODO: check capabilities
+ $this->output->assign('tasks', $this->menu);
+
$this->output->assign('main_menu', $this->menu());
$this->output->assign('user', $_SESSION['user']);
}
diff --git a/lib/kolab_client_task.php b/lib/kolab_client_task.php
index df6fb84..5a3218e 100644
--- a/lib/kolab_client_task.php
+++ b/lib/kolab_client_task.php
@@ -392,8 +392,8 @@ class kolab_client_task
$class = $idx;
}
- $menu[$idx] = sprintf('<li class="%s"><a href="#%s" '
- .'onclick="return kadm.command(\'%s\', \'\', this)">%s</a></li>',
+ $menu[$idx] = sprintf('<li class="%s">'
+ .'<a href="#%s" onclick="return kadm.command(\'%s\', \'\', this)">%s</a></li>',
$class, $idx, $action, $this->translate($label));
}
@@ -427,7 +427,6 @@ class kolab_client_task
return $_SESSION['user_types'];
}
-
/**
* Returns list of system capabilities.
*
@@ -450,6 +449,20 @@ class kolab_client_task
}
/**
+ * Returns system capability
+ *
+ * @param string $name Capability (key) name
+ *
+ * @return array Capability value if supported, NULL otherwise
+ */
+ protected function get_capability($name)
+ {
+ $caps = $this->capabilities();
+
+ return $caps[$name];
+ }
+
+ /**
* Returns execution time in seconds
*
* @param string Execution time
diff --git a/public_html/skins/default/images/README b/public_html/skins/default/images/README
index 0d7d2fc..a180527 100644
--- a/public_html/skins/default/images/README
+++ b/public_html/skins/default/images/README
@@ -3,4 +3,8 @@ logout.png Cologne (CC)
error.png Humility (GPL)
info.png Humility (GPL)
delete.png UIDesign Icons (free)
-settings.png UIDesign Icons (free) \ No newline at end of file
+settings.png UIDesign Icons (free)
+
+tasks:
+ users.png Futurosoft (GPL)
+ about.png Futurosoft (GPL)
diff --git a/public_html/skins/default/images/about.png b/public_html/skins/default/images/about.png
new file mode 100644
index 0000000..82e56a1
--- /dev/null
+++ b/public_html/skins/default/images/about.png
Binary files differ
diff --git a/public_html/skins/default/images/users.png b/public_html/skins/default/images/users.png
new file mode 100644
index 0000000..23fa5d3
--- /dev/null
+++ b/public_html/skins/default/images/users.png
Binary files differ
diff --git a/public_html/skins/default/style.css b/public_html/skins/default/style.css
index 7ea263c..73412be 100644
--- a/public_html/skins/default/style.css
+++ b/public_html/skins/default/style.css
@@ -578,6 +578,46 @@ fieldset.tabbed
margin-top: 5px;
}
+/**** Main screen elements ****/
+#main {
+ padding: 30px;
+}
+
+#main div {
+ float: left;
+ margin: 10px;
+ width: 150px;
+ height: 150px;
+ text-align: center;
+ cursor: pointer;
+ background-color: #f0f0f0;
+ border: 1px solid #d0d0d0;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+}
+
+#main div:hover {
+ background-color: #d6efff;
+}
+
+#main div span.image {
+ display: block;
+ margin: 15px 27px 10px;
+ height: 96px;
+ width: 96px;
+ background: url(images/about.png) center center no-repeat;
+}
+
+#main div.user span.image {
+ background: url(images/users.png) center center no-repeat;
+}
+
+#main div span.label {
+ font-weight: bold;
+
+}
+
/**** User task elements ****/
#userlist table {
diff --git a/public_html/skins/default/templates/main.html b/public_html/skins/default/templates/main.html
index 5fa0aea..ace14be 100644
--- a/public_html/skins/default/templates/main.html
+++ b/public_html/skins/default/templates/main.html
@@ -17,7 +17,16 @@
</div>
<div id="navigation">{$main_menu}</div>
<div id="task_navigation">{$task_menu}</div>
- <div id="content">{$content}</div>
+ <div id="content">
+ <div id="main">
+ {foreach $tasks as $link => $label}
+ <div class="{preg_replace('/\..*$/', '', $link)}" onclick="kadm.command('{$link}', '', this)">
+ <span class="image"></span>
+ <span class="label">{$engine->translate($label)}</span>
+ </div>
+ {/foreach}
+ </div>
+ </div>
<div id="footer">
<span id="request_time">{$engine->gentime()}</span>
</div>