Disabled option in account menu
authorKathy Lussier <klussier@masslnc.org>
Fri, 20 Sep 2013 04:52:28 +0000 (00:52 -0400)
committerDan Wells <dbw2@calvin.edu>
Wed, 25 Sep 2013 22:42:10 +0000 (18:42 -0400)
Instead of hiding the active page in the My Account select box navigation,
let's disable it so that the menu remains consistent from page to page.

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/templates/opac/parts/myopac/base.tt2

index 630a5a0..7f87968 100644 (file)
                     class="[% cls_which %]">[% page.name; %]</a>
                 [% END %]
             </div>
                     class="[% cls_which %]">[% page.name; %]</a>
                 [% END %]
             </div>
-            <div id="acct_select">
+            <!- Select box navigation for media view ->
+           <div id="acct_select">
               <form name="acct_nav">
                 <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">
                    <option value="" selected="selected">Go to...</option>
                [% FOREACH page IN myopac_pages;
                   IF page.url != myopac_page; %]
                     <option value="[% mkurl(ctx.opac_root _ '/myopac/' _ page.url, {}, ['bbid', 'offset', 'limit']) %]">[% page.name; %]</option>
               <form name="acct_nav">
                 <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">
                    <option value="" selected="selected">Go to...</option>
                [% FOREACH page IN myopac_pages;
                   IF page.url != myopac_page; %]
                     <option value="[% mkurl(ctx.opac_root _ '/myopac/' _ page.url, {}, ['bbid', 'offset', 'limit']) %]">[% page.name; %]</option>
-                 [% END;
+                [% ELSE; %]
+                  <option value="" disabled>[% page.name; %]</option>
+              [% END;
                END; %] 
               </select>
            </div>
                END; %] 
               </select>
            </div>