view.phtml
2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
if ($fixTo) {
?>
<script type="text/javascript">
nextend.ready(
function ($) {
var topOffset = $('#wpadminbar:visible, .navbar-fixed-top:visible').height(),
topOffsetLightbox = 0;
$('.<?php echo $snapClass; ?>').each(function () {
var bar = $(this);
bar.fixTo(bar.parent(), {
top: (bar.closest('.n2-lightbox').length > 0 ? topOffsetLightbox : topOffset)
});
});
}
);
</script>
<?php
}
?>
<div class="n2-top-bar n2-sidebar-list-bg <?php echo $snapClass; ?>">
<?php
if ($back):
?>
<div class="n2-back n2-top-bar-menu">
<?php echo $back; ?>
</div>
<?php endif; ?>
<?php
if (!empty($menu)):
?>
<div class="n2-top-bar-menu">
<?php
foreach ($menu AS $m):
echo $m;
endforeach;
?>
</div>
<?php
endif;
?>
<?php
if (!empty($middle)):
?>
<div class="n2-top-bar-middle"><?php echo $middle; ?></div>
<?php
endif;
?>
<?php
if ($notification) {
array_unshift($actions, N2Html::tag('a', array(
'class' => 'n2-button n2-button-icon n2-button-grey n2-button-blue-active n2-button-l n2-h3 n2-notification-button n2-radius-s n2-h32',
'href' => '#'
), N2Html::tag('i', array('class' => 'n2-i n2-it n2-i-32 n2-i-notification'))));
}
if ($expert) {
array_unshift($actions, N2Html::tag('a', array(
'class' => 'n2-expert-switch',
'href' => '#'
), N2Html::tag('span', array(
'class' => 'n2-expert-expert n2-uc n2-h5'
), n2_('Expert')) . '<br>' . N2Html::tag('span', array(
'class' => 'n2-expert-simple n2-uc n2-h5'
), n2_('Simple')) . N2Html::tag('div', array(
'class' => 'n2-expert-bar'
), N2Html::tag('div', array(
'class' => 'n2-expert-dot'
), ''))));
}
if (count($actions)):
?>
<div class="n2-top-bar-actions">
<?php
foreach ($actions AS $action):
echo $action;
endforeach;
?>
</div>
<?php
endif;
?>
</div>