[Rt-commit] r3228 - in rtfm/branches/2.1-TESTING: . html/RTFM
alexmv at bestpractical.com
alexmv at bestpractical.com
Mon Jun 20 14:17:49 EDT 2005
Author: alexmv
Date: Mon Jun 20 14:17:47 2005
New Revision: 3228
Modified:
rtfm/branches/2.1-TESTING/ (props changed)
rtfm/branches/2.1-TESTING/html/RTFM/Topics.html
Log:
r4358 at zoq-fot-pik: chmrr | 2005-06-20 14:18:57 -0400
* HTML cleanups; proper nesting of topic levels, lost in r4214
Modified: rtfm/branches/2.1-TESTING/html/RTFM/Topics.html
==============================================================================
--- rtfm/branches/2.1-TESTING/html/RTFM/Topics.html (original)
+++ rtfm/branches/2.1-TESTING/html/RTFM/Topics.html Mon Jun 20 14:17:47 2005
@@ -29,23 +29,24 @@
% }
<br />
<h1><&|/l&>Browse by topic</&></h1>
-<ul>
<%perl>
if (defined $class) {
- $m->print('<li><h2>'.'<a href="'.
- $RT::WebPath."/RTFM/Topics.html?class=" . $currclass->Id
- .'">'.$currclass->Name.'</a></h2></li>');
- ProduceTree(\@Actions, $currclass, 0, $id);
+ $m->print('<h2>'.'<a href="'.
+ $RT::WebPath."/RTFM/Topics.html?class=" . $currclass->Id
+ .'">'.$currclass->Name."</a></h2>\n");
+ ProduceTree(\@Actions, $currclass, 0, $id);
} else {
+ $m->print("<ul>\n");
while (my $c = $Classes->Next) {
$m->print('<li><h2>'.'<a href="'.
$RT::WebPath."/RTFM/Topics.html?class=" . $c->Id
- .'">'.$c->Name.'</a></h2></li>');
+ .'">'.$c->Name."</a></h2>\n");
ProduceTree(\@Actions, $c, 0, $id);
+ $m->print("\n</li>\n");
}
+ $m->print("</ul>\n");
}
</%perl>
-</ul>
% if ($id || $showall) {
%# TODO: Eventually it would be nice to show all for classes too. Thus
@@ -129,30 +130,31 @@
}
# List the topics.
+ my $indents = @showtopics;
while (my $t = pop @showtopics) {
print "<ul>";
print &MakeLinks($t, $c, $t->Children->Count);
if ($t->Id == $restrictid) {
&ProduceTree($Actions, $c, $restrictid, undef);
}
- print "</ul>";# x scalar(@showtopics);
}
+ print "</ul>" x $indents;
}
} else {
# No restriction in place. Build the entire tree.
my $topics = RT::FM::TopicCollection->new($session{'CurrentUser'});
$topics->LimitToObject($c);
$topics->LimitToKids($parentid);
+ print "<ul>" if $topics->Count;
while (my $t = $topics->Next) {
- print "<ul>";
if ($t->Children->Count) {
print &MakeLinks($t, $c, 1);
&ProduceTree($Actions, $c, $t->Id);
} else {
print &MakeLinks($t, $c, 0);
}
- print "</ul>\n";
}
+ print "</ul>\n" if $topics->Count;
}
}
More information about the Rt-commit
mailing list