TPac: Respect OU opac_visible flags
authorThomas Berezansky <tsbere@mvlc.org>
Mon, 26 Sep 2011 14:04:35 +0000 (10:04 -0400)
committerDan Scott <dscott@laurentian.ca>
Mon, 26 Sep 2011 20:47:06 +0000 (16:47 -0400)
Unless we appear to be in staff mode. Then continue to ignore them.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/templates/opac/parts/org_selector.tt2

index 1485679..96bdcbf 100644 (file)
@@ -7,16 +7,18 @@
         ELSIF walker.id == value;
             selected = 'selected="selected"';
         END;
+        IF ctx.is_staff || walker.opac_visible == 't';
 %]
-        <option value='[% walker.id | uri %]' [% selected %] [% disabled %]>
-            [%
-                pad = walker.ou_type.depth * 2;
-                FOR idx IN [0..pad]; '&nbsp;'; END;
-                walker.name | html;
-            %]
-        </option>
-        [%  FOR child IN walker.children;
-            PROCESS build_org_selector_options walker=child value=value;
+            <option value='[% walker.id | uri %]' [% selected %] [% disabled %]>
+                [%
+                    pad = walker.ou_type.depth * 2;
+                    FOR idx IN [0..pad]; '&nbsp;'; END;
+                    walker.name | html;
+                %]
+            </option>
+            [% FOR child IN walker.children;
+                PROCESS build_org_selector_options walker=child value=value;
+            END;
         END;
     END;