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