[Rt-commit] [svn] r1128 - rt/branches/rt-3.1/html/Admin/Elements
jesse at pallas.eruditorum.org
jesse at pallas.eruditorum.org
Tue Jun 22 15:40:42 EDT 2004
Author: jesse
Date: Tue Jun 22 15:40:41 2004
New Revision: 1128
Modified:
rt/branches/rt-3.1/html/Admin/Elements/EditScrips
rt/branches/rt-3.1/html/Admin/Elements/EditTemplates
Log:
RT-Ticket: 2584
RT-Status: open
The previous patch wasn't valid mason. I'd also like to do something a little more elegant. (Perhaps we should do it at the API level, not the UI level)
Modified: rt/branches/rt-3.1/html/Admin/Elements/EditScrips
==============================================================================
--- rt/branches/rt-3.1/html/Admin/Elements/EditScrips (original)
+++ rt/branches/rt-3.1/html/Admin/Elements/EditScrips Tue Jun 22 15:40:41 2004
@@ -34,11 +34,6 @@
<P><i><&|/l&>(Check box to delete)</&></i></P>
% while (my $scrip = $Scrips->Next ) {
-% my $scrips = new RT::Scrips($session{'CurrentUser'});
- $self->Limit (ENTRYAGGREGATOR => 'OR',
- FIELD => 'Queue',
- VALUE => "$queue")
- if defined $queue;
<TR>
<TD>
<input type="checkbox" name="DeleteScrip-<%$scrip->Id%>">
Modified: rt/branches/rt-3.1/html/Admin/Elements/EditTemplates
==============================================================================
--- rt/branches/rt-3.1/html/Admin/Elements/EditTemplates (original)
+++ rt/branches/rt-3.1/html/Admin/Elements/EditTemplates Tue Jun 22 15:40:41 2004
@@ -31,26 +31,21 @@
% } else {
<TABLE>
<TR>
-<TD>
+<TH>
<i><&|/l&>(Check box to delete)</&></i>
-</TD>
-<TD>
-</TD>
+</TH>
+<TH>
+</TH>
</TR>
% my $count;
% while (my $TemplateObj = $Templates->Next) {
-% my $scrips = new RT::Scrips($session{'CurrentUser'});
-% $scrips->Limit (ENTRYAGGREGATOR => 'OR',
-% FIELD => 'Template',
-% VALUE => $TemplateObj->Id);
<TR>
<TD>
<input type="checkbox" name="DeleteTemplate-<%$TemplateObj->Id%>">
</TD>
<TD>
<A HREF="Template.html?Queue=<%$id%>&Template=<%$TemplateObj->id()%>">
-<B><% loc($TemplateObj->Name) %></B></A> <i>(<% loc('Used by [quant,_1,script]', $scrips->Count) %>)</i>
-
+<B><% loc($TemplateObj->Name) %></B></A>
<br><% loc($TemplateObj->Description) %>
</TD>
</TR>
@@ -88,15 +83,8 @@
my $id = $1;
my $TemplateObj = RT::Template->new($session{'CurrentUser'});
$TemplateObj->Load($id);
- my $scrips = new RT::Scrips($session{'CurrentUser'});
- $scrips->Limit (ENTRYAGGREGATOR => 'OR',
- FIELD => 'Template',
- VALUE => $TemplateObj->Id);
my ($retval, $msg) = $TemplateObj->Delete;
if ($retval) {
- if ($scrips->Count) {
- push @actions, loc('WARNING: Deleted template was used by [quant,_1,script]', $scrips->Count);
- }
push @actions, loc("Template deleted");
}
else {
More information about the Rt-commit
mailing list