summaryrefslogtreecommitdiff
path: root/includes/sys_template.php
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2014-09-28 14:50:08 +0200
committerPhilip Häusler <msquare@notrademark.de>2014-09-28 14:50:08 +0200
commit1d9e1c467cf4d3920f9bcf0157481c7ca8ea6d5d (patch)
tree72e815859ba1fc37d82facdabe5ede76f3823ac4 /includes/sys_template.php
parent0f77edc4fb5581eacd0305ec9010b78afc489b55 (diff)
user list rewritten
Diffstat (limited to 'includes/sys_template.php')
-rw-r--r--includes/sys_template.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/includes/sys_template.php b/includes/sys_template.php
index aaa79993..bf0e81fc 100644
--- a/includes/sys_template.php
+++ b/includes/sys_template.php
@@ -8,6 +8,24 @@ $themes = array(
"1" => "Engelsystem dark"
);
+/**
+ * Render glyphicon
+ *
+ * @param string $glyph_name
+ */
+function glyph($glyph_name) {
+ return ' <span class="glyphicon glyphicon-' . $glyph_name . '"></span> ';
+}
+
+/**
+ * Renders a tick or a cross by given boolean
+ *
+ * @param boolean $boolean
+ */
+function glyph_bool($boolean) {
+ return '<span class="text-' . ($boolean ? 'success' : 'danger') . '">' . glyph($boolean ? 'ok' : 'remove') . '</span>';
+}
+
function div($class, $content = array(), $id = "") {
$id = $id != '' ? ' id="' . $id . '"' : '';
return '<div' . $id . ' class="' . $class . '">' . join("\n", $content) . '</div>';
@@ -292,7 +310,11 @@ function button($href, $label, $class = "") {
* Rendert eine Toolbar mit Knöpfen
*/
function buttons($buttons = array ()) {
- return '<div class="form-group"><div class="btn-group">' . join(' ', $buttons) . '</div></div>';
+ return '<div class="form-group">' . table_buttons($buttons) . '</div>';
+}
+
+function table_buttons($buttons = array()) {
+ return '<div class="btn-group">' . join(' ', $buttons) . '</div>';
}
// Load and render template