summaryrefslogtreecommitdiff
path: root/includes/sys_template.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-11-24 12:09:28 +0100
committermsquare <msquare@notrademark.de>2017-11-24 12:09:28 +0100
commite54a10b81679bae9d19337617d6c58310d2f7a58 (patch)
treeffad7e3b0cbbc6d1d87c3f37310dec971ba36e3e /includes/sys_template.php
parent928e707015fa5b9b3e2dd52c9493552ae1218911 (diff)
add shift calendar to angeltype view fix tab jumps
Diffstat (limited to 'includes/sys_template.php')
-rw-r--r--includes/sys_template.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/sys_template.php b/includes/sys_template.php
index 96290062..819b7d1c 100644
--- a/includes/sys_template.php
+++ b/includes/sys_template.php
@@ -4,15 +4,16 @@
* Renders tabs from the array. Array key is tab name, array value is tab content.
*
* @param array $tabs
+ * @param int $selected The selected tab, default 0
* @return string HTML
*/
-function tabs($tabs)
+function tabs($tabs, $selected = 0)
{
$tab_header = [];
$tab_content = [];
foreach($tabs as $header => $content) {
$class = '';
- if(count($tab_header) == 0) {
+ if(count($tab_header) == $selected) {
$class = 'active';
}
$tab_header[] = '<li role="presentation" class="' . $class . '">