summaryrefslogtreecommitdiff
path: root/torrus/templates/default-dir.html
diff options
context:
space:
mode:
authorivan <ivan>2010-12-27 00:04:44 +0000
committerivan <ivan>2010-12-27 00:04:44 +0000
commit74e058c8a010ef6feb539248a550d0bb169c1e94 (patch)
tree6e8d3efb218dd0f41970b62c7f29758d1ae9a937 /torrus/templates/default-dir.html
parent35359a73152b3d7a9ad5e3d37faf81f6fedb76e8 (diff)
import torrus 1.0.9
Diffstat (limited to 'torrus/templates/default-dir.html')
-rw-r--r--torrus/templates/default-dir.html74
1 files changed, 74 insertions, 0 deletions
diff --git a/torrus/templates/default-dir.html b/torrus/templates/default-dir.html
new file mode 100644
index 000000000..ef6358d1e
--- /dev/null
+++ b/torrus/templates/default-dir.html
@@ -0,0 +1,74 @@
+[% PROCESS 'html-incblocks.txt' %]
+[% thepath=path(token) %]
+[% INCLUDE htmlstart title=thepath printpath=1 %]
+
+<H1>[% xmlnorm(nodeParam(token,'comment')) %]</H1>
+
+[% INCLUDE legend %]
+
+<P>Directories you can jump to:</P>
+<DIV CLASS="Listing">
+[% hasLeaves = 0; hasSubtrees = 0;
+ childCounter = 0;
+ evenRow = 0;
+ FOREACH child = sortTokens(children(token));
+ hidden = 0;
+ IF nodeParam(child,'hidden') == 'yes';
+ hidden = 1;
+ END;
+ comment = nodeParam(child,'comment',1);
+ IF not hidden or variables.SHOWHIDDEN;
+ childCounter = childCounter + 1;
+ evenRow = childCounter % 2 == 0;
+ IF isLeaf(child);
+ hasLeaves = hasLeaves + 1;
+ ELSE;
+ IF isAlias(child);
+ thisIsAlias = 1;
+ urlTitle=' TITLE="Symbolic link to ' _ path(isAlias(child)) _'"';
+ IF isLeaf(isAlias(child));
+ hasLeaves = hasLeaves + 1;
+ END;
+ ELSE;
+ hasSubtrees = 1;
+ urlTitle = '';
+ END;
+ END;
+%]
+ <DIV CLASS="[% evenRow ? 'ListRowEven' : 'ListRow' %]">
+ <SPAN CLASS="NodeName">
+ [% thisIsAlias ? '<EM CLASS="Alias">':'';
+ hidden ? '<EM CLASS="ShowHidden">':'' %]
+ <A HREF="[%url(child)%]"[%urlTitle%]>[% nodeName(child) %]</A>
+ [% hidden ? '</EM>':'';
+ thisIsAlias ? '</EM>':''; %]
+ </SPAN>
+ [% IF comment %]
+ <SPAN CLASS="NodeDescr">
+ [% hidden ? '<EM CLASS="ShowHidden">':'' %]
+ [% xmlnorm(comment) %]
+ [% hidden ? '</EM>':'' %]
+ </SPAN>
+ [% END %]
+ </DIV>
+ [% END %]
+ [% END %]
+</DIV>
+
+<DIV CLASS="BottomShortcuts">
+[% IF hasLeaves > 1;
+ INCLUDE shortcut url=url(token, 'expanded-dir-html')
+ text="Expand leaves"
+ title="Show all leaf graphs in one page";
+ END;
+ IF hasSubtrees and nodeParam(token,'show-recursive',1) == 'yes';
+ INCLUDE shortcut url=url(token, 'recursive-dir-html')
+ text="Recursive view"
+ title="Show all subtrees and leaves in one page";
+
+ END;
+ INCLUDE overviewShortcuts %]
+</DIV>
+
+[% INCLUDE bottomline %]
+[% INCLUDE htmlend %]