diff options
author | msquare <msquare@notrademark.de> | 2016-11-14 17:58:15 +0100 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2016-11-14 17:58:15 +0100 |
commit | f5681411642b7da1b175fa153d3c234ba97b472a (patch) | |
tree | 3d474aff97498c834706024b6e0d88be1540c275 /includes/sys_template.php | |
parent | 0ab9f4f9886ca61fe0711ba1ee551394ceda877a (diff) |
add shift legend and fix dark theme
Diffstat (limited to 'includes/sys_template.php')
-rw-r--r-- | includes/sys_template.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/includes/sys_template.php b/includes/sys_template.php index 5d450493..bd53ecaa 100644 --- a/includes/sys_template.php +++ b/includes/sys_template.php @@ -19,6 +19,18 @@ function mute($text) { return '<span class="text-muted">' . $text . '</span>'; } +/** + * Renders a bootstrap label with given content and class. + * + * @param string $content + * The text + * @param string $class + * default, primary, info, success, warning, danger + */ +function label($content, $class = 'default') { + return '<span class="label label-' . $class . '">' . $content . '</span>'; +} + function progress_bar($valuemin, $valuemax, $valuenow, $class = '', $content = '') { return '<div class="progress"><div class="progress-bar ' . $class . '" role="progressbar" aria-valuenow="' . $valuenow . '" aria-valuemin="' . $valuemin . '" aria-valuemax="' . $valuemax . '" style="width: ' . (($valuenow - $valuemin) * 100 / ($valuemax - $valuemin)) . '%">' . $content . '</div></div>'; } |