diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-06-07 16:55:45 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-06-07 16:55:45 -0700 |
commit | c24d6e2242ae0e026684b8f95decf156aba6e75e (patch) | |
tree | 8597d00e2e6bf2cf400437b9344f43b1500da412 /rt/share/html/Articles/Article/Elements/EditTopics | |
parent | 6686c29104e555ea23446fe1db330664fa110bc0 (diff) |
rt 4.0.6
Diffstat (limited to 'rt/share/html/Articles/Article/Elements/EditTopics')
-rw-r--r-- | rt/share/html/Articles/Article/Elements/EditTopics | 55 |
1 files changed, 26 insertions, 29 deletions
diff --git a/rt/share/html/Articles/Article/Elements/EditTopics b/rt/share/html/Articles/Article/Elements/EditTopics index 807360bf2..82e907135 100644 --- a/rt/share/html/Articles/Article/Elements/EditTopics +++ b/rt/share/html/Articles/Article/Elements/EditTopics @@ -47,35 +47,32 @@ %# END BPS TAGGED BLOCK }}} <input type="hidden" name="EditTopics" value="1" /> <select multiple size="10" name="Topics"> -<%perl> -if (@Classes) { - $m->print("<optgroup label=\"Current classes (".join (' ',map {$_->Name} @Classes).")\">") - unless $OnlyThisClass; - $inTree->traverse(sub { - my $tree = shift; - my $topic = $tree->getNodeValue; - $m->print("<option value=\"".$topic->Id."\"" - .(exists $topics{$topic->Id} ? " selected" : "").">" - .(" " x ($tree->getDepth*5)).($topic->Name || loc("(no name)"))."</option>\n"); - }); -} -unless ($OnlyThisClass) { - my $class = $Classes[-1]->Id; - $otherTree->traverse(sub { - my $tree = shift; - my $topic = $tree->getNodeValue; - unless ($topic->ObjectId == $class) { - $class = $topic->ObjectId; - $m->print("</optgroup>\n"); - my $c = RT::Class->new($session{'CurrentUser'}); - $c->Load($topic->ObjectId); - $m->print("<optgroup label=\"".$c->Name."\">\n"); - } - $m->print("<option value=\"".$topic->Id."\"" - .(exists $topics{$topic->Id} ? " selected" : "").">" - .(" " x ($tree->getDepth*5)).($topic->Name || loc("(no name)"))."</option>\n"); - }); -</%perl> +% if (@Classes) { +% unless ($OnlyThisClass) { +<optgroup label="Current classes (<% join(" ", map {$_->Name} @Classes) %>)"> +% } +% $inTree->traverse(sub { +% my $tree = shift; +% my $topic = $tree->getNodeValue; +<option value="<% $topic->Id %>" <% exists $topics{$topic->Id} ? "selected" : "" %> >\ +<% " " x ($tree->getDepth*5) |n %><% $topic->Name || loc("(no name)") %></option> +% }); +% } +% unless ($OnlyThisClass) { +% my $class = $Classes[-1]->Id; +% $otherTree->traverse(sub { +% my $tree = shift; +% my $topic = $tree->getNodeValue; +% unless ($topic->ObjectId == $class) { +% $class = $topic->ObjectId; +</optgroup> +% my $c = RT::Class->new($session{'CurrentUser'}); +% $c->Load($topic->ObjectId); +<optgroup label="<% $c->Name %>"> +% } +<option value="<% $topic->Id %>" <% exists $topics{$topic->Id} ? "selected" : "" %> >\ +<% " " x ($tree->getDepth*5) |n %><% $topic->Name || loc("(no name)") %></option> +% }); </optgroup> % } </select> |