]> wagnertech.de Git - mfinanz.git/blob - templates/design40_webpages/common/toggle_panel.html
date error in mapping
[mfinanz.git] / templates / design40_webpages / common / toggle_panel.html
1 [% USE T8 %]
2 [% USE LxERP %]
3 [%
4   # Use this include for flip open or shut a filter controlpanel/block.
5   # The source file must contain the BLOCK "filter_toggle_panel"
6
7   # CUSTOM BLOCK NAME
8   # If you want to use MORE THAN ONE filter controlpanel/block
9   # use the variable "block_name" with one of the block names
10   # before the include statement
11
12   # OPEN / CLOSED STATUS
13   # If you want to have the filter block flipped out (open)
14   # then use the optional statement ( SET display_status = 'open' )
15   # before the include statement
16
17   # MINIMAL STATEMENT
18   # At least a BLOCK like the default 'filter_toggle_panel'
19   # and the INCLUDE-Statement are required
20
21   # BLOCK filter_toggle_panel ;          # mandatory, with variable block_name another block name is possible
22   #   <myhtml></myhtml>
23   # END ;                                # END of block filter_toggle_panel
24   # INCLUDE 'common/toggle_panel.html'   #
25   # block_name     = 'this_is_block_2'   # optional / one of all the filter panels, default is 'filter_toggle_panel'
26   # toggle_class   = 'panel_2'           # optional / one of all the button/panel classes, default is 'toggle_panel'
27   # display_status = 'open'              # optional / default/empty is 'closed'
28   # button_closed  = 'Show Filter'       # optional / Term in closed button / default/empty is 'Show Filter' (historical)
29   # button_open    = 'Hide Filter'       # optional / Term in opened button / default/empty is 'Hide Filter' (historical)
30 %]
31
32 [%
33   IF display_status && display_status == 'open' ;
34     SET display_off = 'style="display:none;"' ;
35     SET display_on  = 'style="display:block;"' ;
36   ELSIF ( display_status && ( display_status == 'closed' || display_status == '' ) ) || !display_status  ;
37     SET display_off = 'style="display:block;"' ;
38     SET display_on  = 'style="display:none;"' ;
39   END ;
40   IF !button_closed || button_closed == '' ;
41     SET button_closed = LxERP.t8('Show Filter') ; # Default Term Filter is historical
42   END ;
43   IF !button_open || button_open == '' ;
44     SET button_open   = LxERP.t8('Hide Filter') ; # Default Term Filter is historical
45   END ;
46   IF !toggle_class || toggle_class == '';
47     toggle_class = 'toggle_panel' ; # this is default for one toggle panel per page
48   END ;
49 %]
50
51 <div class="toggle_panel control-panel [% toggle_class %]" [% display_off %]>
52   <a href="#" onClick='javascript:$(".[% toggle_class %]").toggle()' class="button toggle off neutral">[% button_closed %]</a>
53   [% IF SELF.filter_summary %]([% LxERP.t8("Current filter") %]: [% SELF.filter_summary | html %])[% END %]
54 </div>
55
56 <div class="toggle_panel control-panel [% toggle_class %]" [% display_on %]>
57   <a href="#" onClick='javascript:$(".[% toggle_class %]").toggle()' class="button toggle on neutral with-panel">[% button_open %]</a>
58   <div class="toggle_panel_block">
59      [% IF block_name && block_name != ''   %]
60       [%
61         #Dumper.dump_html(block_name) ;
62         IF block_name == 'panel_1' ;
63           PROCESS panel_1 ;
64         ELSIF block_name == 'panel_2' ;
65           PROCESS panel_2 ;
66         ELSIF block_name == 'panel_3' ;
67           PROCESS panel_3 ;
68         END
69       %]
70     [% ELSE %]
71       [% PROCESS filter_toggle_panel %]
72     [% END %]
73
74   </div>
75 </div><!-- /.filter_toggle -->
76 [%
77   # Reset in case of more than one toggle object
78   SET display_status = '' ; SET display_off = '' ; SET display_on = '' ;
79   SET block_name     = '' ;
80   SET button_closed  = '' ;
81   SET button_open    = '' ;
82 %]