630a5a0732513360df35b4a6825ebdc45e538ebf
[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 => "circs", name => l("Items Checked Out")},
6         {url => "holds", name => l("Holds")},
7         {url => "prefs", name => l("Account Preferences")},
8         {url => "lists", name => l("My Lists")}
9     ];
10     skin_root = "../"
11 %]
12     [% INCLUDE "opac/parts/topnav.tt2" %]
13     [% INCLUDE "opac/parts/searchbar.tt2" %]
14     <div id="content-wrapper">
15         <div id="myopac_tabs">
16             <div id="acct_tabs">
17                 [%- FOREACH page IN myopac_pages;
18                     IF page.url == myopac_page;
19                         cls_which = "acct-tab-on";
20                         ctx.page_title = l("My Account - [_1]", page.name);
21                     ELSE;
22                         cls_which = "acct-tab-off";
23                     END -%]
24                 <a href="[% mkurl(ctx.opac_root _ '/myopac/' _ page.url, {}, ['bbid', 'offset', 'limit']) %]"
25                     class="[% cls_which %]">[% page.name; %]</a>
26                 [% END %]
27             </div>
28             <div id="acct_select">
29                <form name="acct_nav">
30                  <select name="acct_url" aria-label="Select an account page" onchange="window.location.href=document.acct_nav.acct_url.options[document.acct_nav.acct_url.selectedIndex].value">
31                    <option value="" selected="selected">Go to...</option>
32                [% FOREACH page IN myopac_pages;
33                   IF page.url != myopac_page; %]
34                     <option value="[% mkurl(ctx.opac_root _ '/myopac/' _ page.url, {}, ['bbid', 'offset', 'limit']) %]">[% page.name; %]</option>
35                   [% END;
36                END; %] 
37                </select>
38             </div>
39            </form>
40         </div>
41         <div id="main-content">
42             [% content %]
43             <div class="common-full-pad"></div>
44         </div>
45     </div>
46 [% END %]