enable CardFortress in test database, #71513
[freeside.git] / httemplate / elements / tablebreak-tabs.html
1 <%doc>
2 <& /elements/tablebreak-tabs.html,
3    tabs => [                              #required
4      'Foo' => ';mode=foo',
5      'Bar' => ';mode=bar',
6      'Other' => '',
7    ],
8    selected => 'Foo',                     #required
9    url_base => $p.'edit/something.html',  #optional
10    table_id => 'OneTrueTable',            #optional
11    always_show_tabs => 0, #optional, 
12                           #controls whether this will show only one tab
13 &>
14
15 For use in edit/elements/edit.html 'fields' hashes.
16
17 </%doc>
18 % if (scalar(@$tabs) >= 2 or $opt{'always_show_tabs'}) {
19 </TABLE><BR>
20 <& /elements/menubar.html,
21     { newstyle => 1, %opt },
22     @$tabs &>
23 <DIV CLASS="fstabcontainer">
24 <TABLE <% $id %> BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0>
25 % }
26 <%init>
27
28 my %opt = @_;
29 my $tabs = delete $opt{'tabs'} || []; # must be an arrayref
30
31 my $id = '';
32 $id = 'ID="'. $opt{'table_id'}. '"' if $opt{'table_id'};
33
34 </%init>