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