LP#1879983: Restrict top-level curbside tab display
[Evergreen.git] / Open-ILS / src / templates / opac / parts / myopac / base.tt2
1 [%  WRAPPER "opac/parts/base.tt2" %]
2
3 [% myopac_pages = [
4         {url => "main", name => l("Account Summary")},
5         {url => "messages", name => l("Messages")},
6         {url => "circs", name => l("Items Checked Out")},
7         {url => "holds", name => l("Holds")},
8         {url => "prefs", name => l("Account Preferences")},
9         {url => "lists", name => l("My Lists")}
10     ];
11     IF (ctx.show_reservations_tab == 'true');
12         myopac_pages.push({url => "reservations", name => l("Reservations")});
13     END;
14     IF ctx.curbside_pickup_libs.size;
15         myopac_pages.push({url => "holds_curbside", name => l("Curbside Pickup")});
16     END;
17     skin_root = "../"
18 %]
19     <h2 class="sr-only">[% l('My Account') %]</h2>
20     [% INCLUDE "opac/parts/topnav.tt2" %]
21     <div class="mobile_hide">
22     [% INCLUDE "opac/parts/searchbar.tt2" %]
23     </div>
24
25      <!-- Added so search available from my account pages -->
26     <div class="mobile_view" id="mobile_acct_search_links">
27       <span class="adv_search_catalog_lbl mobile_search_lbl_clr"><strong>[% l('Search:') %]</strong></span>
28       <span class="adv_search_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/home', {locg => CGI.param('locg')}, 1) %]"
29                     id="home_adv_search_link" class="mobile_search_lbl_clr">[%l('Basic')%]</a> &nbsp;</span>
30                 <span class="adv_search_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/advanced', {$loc_name => loc_value}, 1) %]"
31             id="home_adv_search_link" class="mobile_search_lbl_clr">[% l('Advanced') %]</a> &nbsp;</span>
32        <span class="browse_the_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/browse', {}, ['fi:has_browse_entry']) %]" 
33             class="mobile_search_lbl_clr">[% l('Browse') %]</a>&nbsp;</span>
34     </div><!-- End Mobile search view -->
35
36     <div id="content-wrapper">
37         <div id="myopac_tabs">
38             <div id="acct_tabs">
39                 [%- FOREACH page IN myopac_pages;
40                     IF page.url == myopac_page;
41                         cls_which = "acct-tab-on";
42                         ctx.page_title = l("My Account - [_1]", page.name);
43                     ELSE;
44                         cls_which = "acct-tab-off";
45                     END -%]
46                 <a href="[% mkurl(ctx.opac_root _ '/myopac/' _ page.url, {}, ['bbid', 'offset', 'limit','sort','sort_type', 'hid']) %]"
47                     class="[% cls_which %]">[% page.name; %]</a>
48                 [% END %]
49             </div>
50
51             <!-- Select box navigation for media view -->
52             <div id="acct_select">
53                <form name="acct_nav">
54
55                  <select name="acct_url" 
56                     title="[% l('Select an account page') %]" 
57                     onchange="window.location.href=document.acct_nav.acct_url.options[document.acct_nav.acct_url.selectedIndex].value">
58                     <option value="" selected="selected">[% l('Go to...') %]</option>
59                     [% FOREACH page IN myopac_pages;
60                       IF page.url != myopac_page; %]
61                         <option value="[% mkurl(ctx.opac_root _ '/myopac/' _ page.url, {}, ['bbid', 'offset', 'limit', 'hid']) %]">[% page.name; %]</option>
62                     [% ELSE; %]
63                         <option value="" disabled>[% page.name; %]</option>
64                     [% END;
65                    END; %] 
66                  </select>
67                     </form>
68             </div>
69             </div><!-- myopac_tabs -->
70         <div id="main-content">
71             [% content %]
72             <div class="common-full-pad"></div>
73         </div>
74     </div> <!-- content-wrapper -->
75 [% END %]