[Rt-commit] r2595 - rtfm/branches/2.1-TESTING/html/RTFM
tla at bestpractical.com
tla at bestpractical.com
Wed Apr 6 22:15:02 EDT 2005
Author: tla
Date: Wed Apr 6 22:15:02 2005
New Revision: 2595
Modified:
rtfm/branches/2.1-TESTING/html/RTFM/Topics.html
Log:
Now the non-"Show all" links work like they ought, too.
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 Wed Apr 6 22:15:02 2005
@@ -44,7 +44,9 @@
</ul>
<& /Elements/TitleBoxEnd &>
-% if ($display) {
+% if ($id || $showall) {
+%# TODO: Eventually it would be nice to show all for classes too. Thus
+%# the condition above.
<br/>
<& /Elements/TitleBoxStart, title => loc('Articles') &>
<%perl>
@@ -52,10 +54,12 @@
$Articles->Limit(FIELD => 'ObjectType', VALUE => 'RT::FM::Article');
if ($id) {
$Articles->Limit(FIELD => 'Topic', VALUE => $id, ENTRYAGGREGATOR => 'OR');
- my $kids = $currtopic->Children;
- while (my $k = $kids->Next) {
- $Articles->Limit(FIELD => 'Topic', VALUE => $k->Id,
- ENTRYAGGREGATOR => 'OR');
+ if ($showall) {
+ my $kids = $currtopic->Children;
+ while (my $k = $kids->Next) {
+ $Articles->Limit(FIELD => 'Topic', VALUE => $k->Id,
+ ENTRYAGGREGATOR => 'OR');
+ }
}
}
if ($Articles->Count) {
@@ -159,7 +163,7 @@
$query = "Topics.html?id=" . $topic->Id . "&class=" . $c->Id;
} else {
$query = "Topics.html?id=" . $topic->Id . "&class=" . $c->Id .
- "&display=1";
+ "&showall=1";
}
$output = "<li><a href=\"$query\">" . $topic->Name();
@@ -167,7 +171,7 @@
$output .= "</a>";
if ($haschild) {
- $output .= " [ <a href=\"$query&display=1\">Show all articles</a> ]";
+ $output .= " [ <a href=\"$query&showall=1\">Show all articles</a> ]";
}
$output .= "</li>\n";
@@ -188,5 +192,5 @@
<%args>
$id => 0
$class => undef
-$display => undef
+$showall => undef
</%args>
More information about the Rt-commit
mailing list