/
menuBar.php
77 lines (74 loc) · 3.4 KB
/
menuBar.php
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
<?php
/* ----------------------------------------------------------------------
* views/pageFormat/menuBar.php :
* ----------------------------------------------------------------------
* CollectiveAccess
* Open-source collections management software
* ----------------------------------------------------------------------
*
* Software by Whirl-i-Gig (http://www.whirl-i-gig.com)
* Copyright 2008-2021 Whirl-i-Gig
*
* For more information visit http://www.CollectiveAccess.org
*
* This program is free software; you may redistribute it and/or modify it under
* the terms of the provided license as published by Whirl-i-Gig
*
* CollectiveAccess is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTIES whatsoever, including any implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* This source code is free and modifiable under the terms of
* GNU General Public License. (http://www.gnu.org/copyleft/gpl.html). See
* the "license.txt" file for details, or visit the CollectiveAccess web site at
* http://www.CollectiveAccess.org
*
* ----------------------------------------------------------------------
*/
$menu_color = $this->request->config->get('menu_color');
?>
<div><div id="topNavContainer">
<div id="topNav" style="background-color:#<?= $menu_color; ?>;">
<div class="roundedNav" >
<div id="logo" onclick='document.location="<?= $this->request->getBaseUrlPath().'/'; ?>";'><?= caGetMenuBarLogo(); ?>></div>
<div id="navWrapper">
<?php
if ($this->request->isLoggedIn()) {
if ($this->request->user->canDoAction('can_quicksearch')) {
?>
<div class="sf-menu sf-menu-search" >
<!-- Quick search -->
<?php
if ($target_table = $this->request->config->get('one_table_search')) {
print caFormTag($this->request, 'Index', 'caQuickSearchForm', 'find/'.$target_table, 'post', 'multipart/form-data', '_top', array('noCSRFToken' => true, 'disableUnsavedChangesWarning' => true));
} else {
print caFormTag($this->request, 'Index', 'caQuickSearchForm', 'find/QuickSearch', 'post', 'multipart/form-data', '_top', array('noCSRFToken' => true, 'disableUnsavedChangesWarning' => true));
}
if ($this->request->isLoggedIn() && ($this->request->user->getPreference('clear_quicksearch') == 'auto_clear')) {
?>
<input type="text" name="search" length="15" id="caQuickSearchFormText" value="<?= htmlspecialchars(Session::getVar('quick_search_last_search'), ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?>" onfocus="this.value='';"/>
<?php
} else {
?>
<input type="text" name="search" length="15" id="caQuickSearchFormText" value="<?= htmlspecialchars(Session::getVar('quick_search_last_search'), ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?>"/>
<?php
}
print caFormSubmitLink($this->request, caNavIcon(__CA_NAV_ICON_SEARCH__, 1, array('style' => 'float: right; margin: 5px 3px 0 0; color: #777',)), 'caQuickSearchFormSubmit', 'caQuickSearchForm', null, ['aria-label' => _t('Perform a quick search')]);
?>
</form>
</div>
<?php
}
?>
<ul class="sf-menu" style="background-color:#<?= $menu_color; ?>;">
<?= $this->getVar('nav')->getHTMLMenuBar('menuBar', $this->request); ?>
</ul>
<?php
}
?>
</div><!-- END navWrapper -->
</div><!-- END roundedNav -->
<div style="clear:both;"><!--EMPTY--></div>
</div><!-- END topNav -->
</div><!-- END topNavContainer --></div>
<div id="main" class="width">