[% PROCESS "opac/parts/header.tt2";
WRAPPER "opac/parts/myopac/base.tt2"; %]
+ [% acct_prefs_pages = [
+ {url => "prefs", name => l("Personal Information")},
+ {url => "prefs_notify", name => l("Notification Preferences")},
+ {url => "prefs_settings", name => l("Search and History Preferences")},
+ {url => "prefs_my_lists", name => l("My Lists Preferences")}
+ ];
+ skin_root = "../"
+%]
+
<div id='myopac_prefs_div'>
<div id="acct_prefs_tabs">
<div style="float:left;">
+ [%- FOREACH page IN acct_prefs_pages;
+ IF page.url == prefs_page;
+ cls_select = "align selected";
+ ELSE;
+ cls_select = "align";
+ END -%]
- [% IF prefs_page == 'personal' %]
- <div class="align selected">
- <a href='#'>[% l("Personal Information") %]</a>
- </div>
- <div class="align">
- <a href='[% mkurl('prefs_notify') %]'>[% l("Notification Preferences") %]</a>
- </div>
- <div class="align">
- <a href='[% mkurl('prefs_settings') %]'>[% l("Search and History Preferences") %]</a>
- </div>
- <div class="align">
- <a href='[% mkurl('prefs_my_lists') %]'>[% l("My Lists Preferences") %]</a>
- </div>
- [% ELSIF prefs_page == 'notify' %]
- <div class="align">
- <a href='[% mkurl('prefs') %]'>[% l("Personal Information") %]</a>
- </div>
- <div class="align selected">
- <a href='#'>[% l("Notification Preferences") %]</a>
- </div>
- <div class="align" >
- <a href='[% mkurl('prefs_settings') %]'>[% l("Search and History Preferences") %]</a>
- </div>
- <div class="align">
- <a href='[% mkurl('prefs_my_lists') %]'>[% l("My Lists Preferences") %]</a>
- </div>
- [% ELSIF prefs_page == 'settings' %]
- <div class="align">
- <a href='[% mkurl('prefs') %]'>[% l("Personal Information") %]</a>
+ <div class="[% cls_select %]">
+ <a href="[% mkurl(ctx.opac_root _ '/myopac/' _ page.url, {}, ['bbid', 'offset', 'limit']) %]">[% page.name; %]</a>
</div>
- <div class="align">
- <a href='[% mkurl('prefs_notify') %]'>[% l("Notification Preferences") %]</a>
- </div>
- <div class="align selected" >
- <a href='#'>[% l("Search and History Preferences") %]</a>
- </div>
- <div class="align">
- <a href='[% mkurl('prefs_my_lists') %]'>[% l("My Lists Preferences") %]</a>
- </div>
- [% ELSE %]
- <div class="align">
- <a href='[% mkurl('prefs') %]'>[% l("Personal Information") %]</a>
- </div>
- <div class="align">
- <a href='[% mkurl('prefs_notify') %]'>[% l("Notification Preferences") %]</a>
- </div>
- <div class="align" >
- <a href='[% mkurl('prefs_settings') %]'>[% l("Search and History Preferences") %]</a>
- </div>
- <div class="align selected">
- <a href='#'>[% l("My Lists Preferences") %]</a>
- </div>
- [% END %]
- </div>
- </div>
+ [% END %]
+ </div>
+ </div>
<div class="clear-both"></div> <br/>
<a class="hide_me" href="#">[% l('Export List') %]</a><!-- what does this do? -->
</span>
</div>
+ <!- Select box navigation for mobile view ->
+ <div id="acct_prefs_select">
+ <form name="acct_prefs_nav">
+ <select name="acct_prefs_url" aria-label="Select a preference page" onchange="window.location.href=document.acct_prefs_nav.acct_prefs_url.options[document.acct_prefs_nav.acct_prefs_url.selectedIndex].value">
+ [% FOREACH page IN acct_prefs_pages;
+ IF page.url != prefs_page; %]
+ <option value="[% mkurl(ctx.opac_root _ '/myopac/' _ page.url, {}, ['bbid', 'offset', 'limit']) %]">[% page.name; %]</option>;
+ [% ELSE; %]
+ <option value="" disabled selected>[% page.name; %]</option>;
+ [% END;
+ END; %]
+ </select>
+ </div>
<div class="clear-both normal-height"></div>