torrus, add router UI, RT10574
[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 [% IF matches(thepath,'Interface_Counters/$') %]
8    [% freesideComponent('/elements/init_overlib.html') %]
9 [% END %]
10 [% IF matches(thepath,'Routers/$') %]
11    [% freesideComponent('/elements/init_overlib.html') %]
12    [% popup_link('nms-add_router.html') %]
13 [% END %]
14
15 <P>Directories you can jump to:</P>
16 <DIV CLASS="Listing">
17 [%   hasLeaves = 0; hasSubtrees = 0;
18      childCounter = 0;
19      evenRow = 0;
20      FOREACH child = sortTokens(children(token));
21        hidden = 0;
22        IF nodeParam(child,'hidden') == 'yes';
23          hidden = 1;
24        END;
25        comment = nodeParam(child,'comment',1);
26        IF not hidden or variables.SHOWHIDDEN;
27          childCounter = childCounter + 1;
28          evenRow = childCounter % 2 == 0;
29          IF isLeaf(child);
30            hasLeaves = hasLeaves + 1;
31          ELSE;
32            IF isAlias(child);
33              thisIsAlias = 1;
34              urlTitle=' TITLE="Symbolic link to ' _ path(isAlias(child)) _'"';
35              IF isLeaf(isAlias(child));
36                hasLeaves = hasLeaves + 1;
37              END;
38            ELSE;
39              hasSubtrees = 1;
40              urlTitle = '';
41            END;
42          END;
43 %]
44   <DIV CLASS="[% evenRow ? 'ListRowEven' : 'ListRow' %]">
45     <SPAN CLASS="NodeName">
46       [% thisIsAlias ? '<EM CLASS="Alias">':'';
47          hidden ? '<EM CLASS="ShowHidden">':'' %]
48       <A HREF="[%url(child)%]"[%urlTitle%]>[% nodeName(child) %]</A>
49       [% hidden ? '</EM>':'';
50          thisIsAlias ? '</EM>':''; %]
51       [% IF matches(thepath,'Interface_Counters/$') %]
52         <FONT SIZE="-1">
53         [% popup_link('nms-add_iface.html',nodeName(parent(token)),uri_escape(nodeName(child))) %]
54         </FONT>
55       [% END %]
56     </SPAN>
57        [% IF comment %]
58     <SPAN CLASS="NodeDescr">
59       [% hidden ? '<EM CLASS="ShowHidden">':'' %]
60       [% xmlnorm(comment) %]
61       [% hidden ? '</EM>':'' %]
62     </SPAN>
63        [% END %]
64   </DIV>
65     [% END %]
66   [% END %]
67 </DIV>
68
69 <DIV CLASS="BottomShortcuts">
70 [% IF hasLeaves > 1;
71     INCLUDE shortcut url=url(token, 'expanded-dir-html')
72                      text="Expand leaves"
73                      title="Show all leaf graphs in one page";
74    END;
75    IF hasSubtrees and nodeParam(token,'show-recursive',1) == 'yes';
76     INCLUDE shortcut url=url(token, 'recursive-dir-html')
77                      text="Recursive view"
78                      title="Show all subtrees and leaves in one page";
79    
80    END;
81    INCLUDE overviewShortcuts %]
82 </DIV>
83
84 [% INCLUDE bottomline %]
85 [% INCLUDE htmlend %]