torrus skinning improvements, RT#10574
[freeside.git] / torrus / templates / default-dir.html
1 [% PROCESS 'html-incblocks.txt' %]
2 [% thepath=path(token) %]
3 [% INCLUDE htmlstart title=xmlnorm(nodeParam(token,'comment')) printpath=1 %]
4
5 [% INCLUDE legend %]
6
7 <P>Directories you can jump to:</P>
8 <DIV CLASS="Listing">
9 [%   hasLeaves = 0; hasSubtrees = 0;
10      childCounter = 0;
11      evenRow = 0;
12      FOREACH child = sortTokens(children(token));
13        hidden = 0;
14        IF nodeParam(child,'hidden') == 'yes';
15          hidden = 1;
16        END;
17        comment = nodeParam(child,'comment',1);
18        IF not hidden or variables.SHOWHIDDEN;
19          childCounter = childCounter + 1;
20          evenRow = childCounter % 2 == 0;
21          IF isLeaf(child);
22            hasLeaves = hasLeaves + 1;
23          ELSE;
24            IF isAlias(child);
25              thisIsAlias = 1;
26              urlTitle=' TITLE="Symbolic link to ' _ path(isAlias(child)) _'"';
27              IF isLeaf(isAlias(child));
28                hasLeaves = hasLeaves + 1;
29              END;
30            ELSE;
31              hasSubtrees = 1;
32              urlTitle = '';
33            END;
34          END;
35 %]
36   <DIV CLASS="[% evenRow ? 'ListRowEven' : 'ListRow' %]">
37     <SPAN CLASS="NodeName">
38       [% thisIsAlias ? '<EM CLASS="Alias">':'';
39          hidden ? '<EM CLASS="ShowHidden">':'' %]
40       <A HREF="[%url(child)%]"[%urlTitle%]>[% nodeName(child) %]</A>
41       [% hidden ? '</EM>':'';
42          thisIsAlias ? '</EM>':''; %]
43     </SPAN>
44        [% IF comment %]
45     <SPAN CLASS="NodeDescr">
46       [% hidden ? '<EM CLASS="ShowHidden">':'' %]
47       [% xmlnorm(comment) %]
48       [% hidden ? '</EM>':'' %]
49     </SPAN>
50        [% END %]
51   </DIV>
52     [% END %]
53   [% END %]
54 </DIV>
55
56 <DIV CLASS="BottomShortcuts">
57 [% IF hasLeaves > 1;
58     INCLUDE shortcut url=url(token, 'expanded-dir-html')
59                      text="Expand leaves"
60                      title="Show all leaf graphs in one page";
61    END;
62    IF hasSubtrees and nodeParam(token,'show-recursive',1) == 'yes';
63     INCLUDE shortcut url=url(token, 'recursive-dir-html')
64                      text="Recursive view"
65                      title="Show all subtrees and leaves in one page";
66    
67    END;
68    INCLUDE overviewShortcuts %]
69 </DIV>
70
71 [% INCLUDE bottomline %]
72 [% INCLUDE htmlend %]