LP1797934: follow-up: make the reservations tab in MyOpac optional
[working/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     skin_root = "../"
15 %]
16     <h2 class="sr-only">[% l('My Account') %]</h2>
17     [% INCLUDE "opac/parts/topnav.tt2" %]
18     <div class="mobile_hide">
19     [% INCLUDE "opac/parts/searchbar.tt2" %]
20     </div>
21
22      <!-- Added so search available from my account pages -->
23     <div class="mobile_view" id="mobile_acct_search_links">
24       <span class="adv_search_catalog_lbl mobile_search_lbl_clr"><strong>[% l('Search:') %]</strong></span>
25       <span class="adv_search_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/home', {locg => CGI.param('locg')}, 1) %]"
26                     id="home_adv_search_link" class="mobile_search_lbl_clr">[%l('Basic')%]</a> &nbsp;</span>
27                 <span class="adv_search_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/advanced', {$loc_name => loc_value}, 1) %]"
28             id="home_adv_search_link" class="mobile_search_lbl_clr">[% l('Advanced') %]</a> &nbsp;</span>
29        <span class="browse_the_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/browse', {}, ['fi:has_browse_entry']) %]" 
30             class="mobile_search_lbl_clr">[% l('Browse') %]</a>&nbsp;</span>
31     </div><!-- End Mobile search view -->
32
33     <div id="content-wrapper">
34         <div id="myopac_tabs">
35             <div id="acct_tabs">
36                 [%- FOREACH page IN myopac_pages;
37                     IF page.url == myopac_page;
38                         cls_which = "acct-tab-on";
39                         ctx.page_title = l("My Account - [_1]", page.name);
40                     ELSE;
41                         cls_which = "acct-tab-off";
42                     END -%]
43                 <a href="[% mkurl(ctx.opac_root _ '/myopac/' _ page.url, {}, ['bbid', 'offset', 'limit','sort','sort_type', 'hid']) %]"
44                     class="[% cls_which %]">[% page.name; %]</a>
45                 [% END %]
46             </div>
47
48             <!-- Select box navigation for media view -->
49             <div id="acct_select">
50                <form name="acct_nav">
51
52                  <select name="acct_url" 
53                     title="[% l('Select an account page') %]" 
54                     onchange="window.location.href=document.acct_nav.acct_url.options[document.acct_nav.acct_url.selectedIndex].value">
55                     <option value="" selected="selected">[% l('Go to...') %]</option>
56                     [% FOREACH page IN myopac_pages;
57                       IF page.url != myopac_page; %]
58                         <option value="[% mkurl(ctx.opac_root _ '/myopac/' _ page.url, {}, ['bbid', 'offset', 'limit', 'hid']) %]">[% page.name; %]</option>
59                     [% ELSE; %]
60                         <option value="" disabled>[% page.name; %]</option>
61                     [% END;
62                    END; %] 
63                  </select>
64                     </form>
65             </div>
66             </div><!-- myopac_tabs -->
67         <div id="main-content">
68             [% content %]
69             <div class="common-full-pad"></div>
70         </div>
71     </div> <!-- content-wrapper -->
72 [% END %]