File: tabsbox

package info (click to toggle)
libtemplate-perl 2.14-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 5,496 kB
  • ctags: 667
  • sloc: perl: 15,349; makefile: 62; xml: 7; sh: 5
file content (76 lines) | stat: -rw-r--r-- 2,149 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!-- tt2.splash.tabsbox -->  
[%
  # splash/tabsbox: a box with a row of tabs
  #
  # ARGS:
  #	tabs	    # list of { text => '...', link => '...' } tabs
  #     select	    # tab to select (1 - n, 0: none)
  #     content     # box content
  #     width       # box width (default: 0, grow to fit content)
  # The following default to values set in the select style
  #     fill        # fill colour
  #     border      # border width
  #     pad	    # box padding
  #     tabalign    # alignment of tab texts
  #     tablocate   # tab location ('left', 'center', 'right')
  # + all configuration values for splash/text

    SET
        default = splash.style.default
    ;
    DEFAULT 
        style     = default
        col       = style.col.fore   or default.col.fore
        bgcol     = style.col.bgcol  or default.col.bgcol
        fill      = style.col.fill   or default.col.fill
        tablocate = style.tab.locate or default.tab.locate
    ;
    SET
#	rgbcol  = splash.rgb.$edge
#	imgdir  = "$splash.images/$edge"
#        imgsize = splash.imgsize
        border  = border.defined ? border 
			: (style.border.defined ? style.border : default.border)
        pad     = pad.defined ? pad 
			: (style.pad.defined ? style.pad : default.pad)
-%]
[% IF 1 %]
<table border="0" cellpadding="0" cellspacing="0"
  [%- IF width  %] width="[% width %]"[% END %]>
[% INCLUDE tabset UNLESS invert -%]
  <tr> 
    <td>
[%- WRAPPER splash/box width='100%' 
	    pad   = 0   
            space = 0 
	    col   = select ? splash.style.select.col.fore 
		           : splash.style.default.col.fore;
    INCLUDE splash/box
	    width = '100%'
	    bgcol = fill
	    border=0;
    END;
-%]
    </td>
  </tr>
[% INCLUDE tabset IF invert -%]
</table>
<!-- /splash.tabsbox -->
[% BLOCK tabset -%]
  <tr>
    <td align="[% tablocate %]">
[% INCLUDE splash/tabset col='' %]</td>
  </tr>
[% END -%]

[% ELSE %]
[% WRAPPER splash/frame border=0 -%]
[% WRAPPER splash/panel width=width ? '100%' : 0 -%]
[% INCLUDE tabset UNLESS invert -%]
[% END -%]
[% WRAPPER splash/frame;
    INCLUDE splash/panel col=fill width=width ? '100%' : 0;
   END -%]
[% END %]

[% END %]