From 74647e16d37fac9425a4561b49618b52cdc3e75c Mon Sep 17 00:00:00 2001 From: Philip Häusler Date: Fri, 22 Aug 2014 22:34:13 +0200 Subject: add basic bootstrap theme --- includes/sys_template.php | 87 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 70 insertions(+), 17 deletions(-) (limited to 'includes/sys_template.php') diff --git a/includes/sys_template.php b/includes/sys_template.php index 409ecbe1..bb3d5731 100644 --- a/includes/sys_template.php +++ b/includes/sys_template.php @@ -4,7 +4,8 @@ * Liste der verfügbaren Themes */ $themes = array( - "1" => "Engelsystem default" + "0" => "Engelsystem light", + "1" => "Engelsystem dark" ); /** @@ -14,20 +15,47 @@ $themes = array( * @return string */ function toolbar($items = array()) { - return '
' . join("\n", $items) . '
'; + return ''; } /** * Render a link for a toolbar. * * @param string $href - * @param string $class + * @param string $glyphicon * @param string $label * @param bool $selected * @return string */ -function toolbar_item_link($href, $class, $label, $selected = false) { - return '' . $label . ''; +function toolbar_item_link($href, $glyphicon, $label, $selected = false) { + return '
  • ' . ($glyphicon != '' ? ' ' : '') . $label . '
  • '; +} + +/** + * Rendert ein Zahlenfeld mit Buttons zum verstellen + */ +function form_spinner($name, $label, $value) { + return form_element($label, ' +
    + +
    + + +
    +
    + + '); } /** @@ -43,6 +71,12 @@ function toolbar_item_link($href, $class, $label, $selected = false) { * selected Array mit den Keys, die ausgewählt sind */ function form_checkboxes($name, $label, $items, $selected) { + $html = form_element($label, ''); + foreach ($items as $key => $item) + $html .= form_checkbox($name . '_' . $key, $item, array_search($key, $selected) !== false); + + return $html; + $html = "