$final_title[] = '</li>'; } if ($wide_view && (isset($title['staff']) or isset($title['location']))) { $final_title[] = '<li>'; $final_title[] = '<ul class="list-inline">'; list($this_title_title, $this_title_icon) = Hc_lib::parse_icon($title['time']); $final_title[] = '<li class="squeeze-in pull-left" style="width: 50%;" title="' . $this_title_title . '">'; $final_title[] = $title['time']; $final_title[] = '</li>'; $this_title = ' '; if (isset($title['staff'])) { $this_title = $title['staff']; } elseif (isset($title['location'])) { $this_title = $title['location']; } list($this_title_title, $this_title_icon) = Hc_lib::parse_icon($this_title); if ($trade_label) { $this_title_title = $trade_label; } $final_title[] = '<li class="squeeze-in pull-right" style="width: 50%;" title="' . $this_title_title . '">'; $final_title[] = $this_title; $final_title[] = '</li>'; $final_title[] = '</ul>'; $final_title[] = '<div class="clearfix"></div>'; $final_title[] = '</li>'; } else { if (isset($title['time'])) { $final_title[] = '<li>'; $final_title[] = $title['time']; $final_title[] = '</li>'; }
<div class="collapse navbar-collapse nts-navbar-collapse"> <ul class="nav navbar-nav"> <?php foreach ($menu as $m) { ?> <?php $current_one = isset($m['active']) && $m['active'] ? TRUE : FALSE; $li_class = array(); if (isset($m['children']) && $m['children']) { $li_class[] = 'dropdown'; } if ($current_one) { $li_class[] = 'active'; } $li_class = join(' ', $li_class); list($link_title, $link_icon) = Hc_lib::parse_icon($m['title']); ?> <li class="<?php echo $li_class; ?> "> <?php if (isset($m['children']) && $m['children']) { ?> <a class="dropdown-toggle" data-toggle="dropdown" href="#" title="<?php echo $link_title; ?> ">
if (!$is_my) { ?> <li> <i class="fa-fw fa fa-user"></i> <?php echo $sh->user->get()->title(); ?> </li> <?php } ?> <?php if (count($menu) == 1) { ?> <?php list($title, $title_icon) = Hc_lib::parse_icon($menu[0]['title']); ?> <li> <?php echo $title_icon; ?> <a class="btn btn-default btn-sm" title="<?php echo $title; ?> " href="<?php echo $menu[0]['href']; ?> "> <?php echo $title; ?>
static function nav_tabs($tabs, $shown = '', $field = '', $id = '', $extra = '') { if (!$shown) { $all_tabs = array_keys($tabs); $shown = $all_tabs[0]; } $id = $id ? $id : hc_random(); $out = array(); $startup = '<ul class="nav nav-tabs" id="' . $id . '"'; if ($extra) { $startup .= ' ' . $extra; } $startup .= '>'; $out[] = $startup; reset($tabs); reset($tabs); foreach ($tabs as $tab_id => $t) { if ($tab_id == $shown) { $out[] = '<li class="active">'; } else { $out[] = '<li>'; } if (is_array($t)) { $t1 = array_shift($t); $title = trim(strip_tags($t1['title'])); $out[] = '<a title="' . $title . '" class="dropdown-toggle" data-toggle="dropdown" href="#">'; $out[] = $t1['title']; $out[] = ' <span class="caret"></span>'; $out[] = '</a>'; $out[] = '<ul class="dropdown-menu">'; foreach ($t as $t2) { list($link_title, $link_icon) = Hc_lib::parse_icon($t2['title']); $title = trim(strip_tags($t2['title'])); $out[] = '<li>'; $out[] = '<a title="' . $link_title . '" href="' . $t2['href'] . '">'; $out[] = $link_icon . $link_title; $out[] = '</a>'; $out[] = '</li>'; } $out[] = '</ul>'; } else { $title = trim(strip_tags($t)); if (substr($tab_id, 0, 1) == '_') { $out[] = '<a title="' . $title . '">' . $t . '</a>'; } else { $out[] = '<a href="#' . $tab_id . '" data-toggle="tab" title="' . $title . '">' . $t . '</a>'; } } $out[] = '</li>'; } $out[] = '</ul>'; if ($field) { $out[] = '<script language="JavaScript">'; $out[] = <<<EOT jQuery('#{$id} a[data-toggle="tab"]').on('shown.bs.tab', function (e) { \tvar active_tab = e.target.hash.substr(1); // strip the starting # \tjQuery(this).closest('form').find('[name={$field}]').val( active_tab ); }); EOT; if ($shown) { $out[] = <<<EOT \tjQuery('#{$id}').closest('form').find('[name={$field}]').val( "{$shown}" ); EOT; } $out[] = '</script>'; } $out = join("\n", $out); return $out; }
if (is_array($link_slug)) { $link_slug = join('/', $link_slug); } $this_disabled = FALSE; reset($disabled_panels); foreach ($disabled_panels as $dp) { if (substr($link_slug, 0, strlen($dp)) == $dp) { $this_disabled = TRUE; break; } } if ($this_disabled) { continue; } $link_title = $v[1]; list($link_title, $link_icon) = Hc_lib::parse_icon($link_title); $link_view = ci_anchor($link_slug, $link_icon . $link_title); } else { $link_view = $v; } ?> <?php if (substr($k, 0, strlen('_header')) == '_header') { ?> <li class="dropdown-header"> <?php } elseif (substr($k, 0, strlen('_divider')) == '_divider') { ?> <li class="divider"> <?php