Advertisement
Guest User

Attempt to remove hardcoded values from prefs_base.tt2

a guest
Sep 20th, 2013
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. [% PROCESS "opac/parts/header.tt2";
  2. WRAPPER "opac/parts/myopac/base.tt2"; %]
  3.  
  4. [% acct_prefs_pages = [
  5. {url => "prefs", name => l("Personal Information")},
  6. {url => "prefs_notify", name => l("Notification Preferences")},
  7. {url => "prefs_settings", name => l("Search and History Preferences")},
  8. {url => "prefs_my_lists", name => l("My Lists Preferences")}
  9. ];
  10. skin_root = "../"
  11. %]
  12.  
  13. <div id='myopac_prefs_div'>
  14. <div id="acct_prefs_tabs">
  15. <div style="float:left;">
  16. [%- FOREACH page IN acct_prefs_pages;
  17. IF page.url == acct_prefs_page;
  18. cls_select = "align selected";
  19. ELSE;
  20. cls_select = "align";
  21. END -%]
  22. <div class="[% cls_select %]">
  23. <a href="[% mkurl(ctx.opac_root _ '/myopac/' _ page.url, {}, ['bbid', 'offset', 'limit']) %]">[% page.name; %]</a>
  24. </div>
  25. [% END %]
  26. </div>
  27. </div>
  28. <div class="clear-both"></div> <br/>
  29. <div class="header_middle">
  30. <span id="acct_prefs_header">[% l('Account Information and Preferences') %]</span>
  31. <span class="float-right">
  32. <a class="hide_me" href="#">[% l('Export List') %]</a><!-- what does this do? -->
  33. </span>
  34. </div>
  35. <!- Select box navigation for mobile view ->
  36. <div id="acct_prefs_select">
  37. <form name="acct_prefs_nav">
  38. <select name="acct_prefs_url" aria-label="Select a preferences
  39. page" onchange="window.location.href=document.acct_prefs_nav.acct_prefs_url.options[document.acct_prefs_nav.acct_prefs_url.selectedIndex].value">
  40. [% FOREACH page IN acct_prefs_pages;
  41. IF page.url != acct_prefs_page; %]
  42. <option value="[% mkurl(ctx.opac_root _ '/myopac/' _ page.url, {}, ['bbid', 'offset', 'limit']) %]">[% page.name; %]</option>;
  43. [% ELSE; %]
  44. <option value="" disabled selected>[% page.name; %]</option>;
  45. [% END;
  46. END; %]
  47. </select>
  48. </div>
  49.  
  50. <div class="clear-both normal-height"></div>
  51.  
  52. [% content; %]
  53.  
  54. </div>
  55. [% END %]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement