From 8103c1fc1b2c27a6855feadf26f91b980a54bc52 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 2 Mar 2008 04:11:51 +0000 Subject: import rt 3.6.6 --- rt/html/Ticket/Attachment/dhandler | 6 +- rt/html/Ticket/Create.html | 409 +++++++++++++-------- rt/html/Ticket/Display.html | 47 ++- rt/html/Ticket/Elements/AddWatchers | 18 +- rt/html/Ticket/Elements/BulkLinks | 66 ++-- rt/html/Ticket/Elements/EditBasics | 75 ++-- rt/html/Ticket/Elements/EditCustomField | 6 +- rt/html/Ticket/Elements/EditCustomFields | 54 +-- rt/html/Ticket/Elements/EditDates | 50 +-- rt/html/Ticket/Elements/EditPeople | 32 +- rt/html/Ticket/Elements/EditWatchers | 17 +- rt/html/Ticket/Elements/FindAttachments | 6 +- rt/html/Ticket/Elements/LoadTextAttachments | 10 +- rt/html/Ticket/Elements/PreviewScrips | 21 +- rt/html/Ticket/Elements/ShowAttachments | 17 +- rt/html/Ticket/Elements/ShowBasics | 14 +- rt/html/Ticket/Elements/ShowCustomFields | 6 +- rt/html/Ticket/Elements/ShowDates | 68 ++-- rt/html/Ticket/Elements/ShowDependencies | 14 +- rt/html/Ticket/Elements/ShowGroupMembers | 13 +- rt/html/Ticket/Elements/ShowHistory | 74 ++-- rt/html/Ticket/Elements/ShowMembers | 19 +- rt/html/Ticket/Elements/ShowMessageHeaders | 42 ++- rt/html/Ticket/Elements/ShowMessageStanza | 29 +- rt/html/Ticket/Elements/ShowPeople | 14 +- rt/html/Ticket/Elements/ShowQueue | 9 + rt/html/Ticket/Elements/ShowRequestor | 29 +- rt/html/Ticket/Elements/ShowSummary | 91 ++--- rt/html/Ticket/Elements/ShowTransaction | 62 ++-- rt/html/Ticket/Elements/ShowTransactionAttachments | 23 +- rt/html/Ticket/Elements/ShowUserEntry | 12 +- rt/html/Ticket/Elements/Tabs | 94 +++-- rt/html/Ticket/History.html | 10 +- rt/html/Ticket/Modify.html | 22 +- rt/html/Ticket/ModifyAll.html | 71 ++-- rt/html/Ticket/ModifyDates.html | 19 +- rt/html/Ticket/ModifyLinks.html | 22 +- rt/html/Ticket/ModifyPeople.html | 16 +- rt/html/Ticket/ShowEmailRecord.html | 8 +- rt/html/Ticket/Update.html | 76 ++-- 40 files changed, 1006 insertions(+), 685 deletions(-) create mode 100644 rt/html/Ticket/Elements/ShowQueue (limited to 'rt/html/Ticket') diff --git a/rt/html/Ticket/Attachment/dhandler b/rt/html/Ticket/Attachment/dhandler index 584fd721d..4872ef2a7 100644 --- a/rt/html/Ticket/Attachment/dhandler +++ b/rt/html/Ticket/Attachment/dhandler @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Ticket/Create.html b/rt/html/Ticket/Create.html index fc4cc20ef..2061b3be3 100644 --- a/rt/html/Ticket/Create.html +++ b/rt/html/Ticket/Create.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,203 +45,286 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<& /Elements/Header, Title => loc("Create a new ticket") &> +<& /Elements/Header, + Title => loc("Create a new ticket"), + onload => "hide(document.getElementById('Ticket-Create-details'));" &> <& /Elements/Tabs, current_toptab => "Ticket/Create.html", - Title => loc("Create a new ticket") &> -
- - - - -[<&|/l&>Show basics] [<&|/l&>Show details] -
-<& /Elements/TitleBoxStart, contentbg => "#cccccc", title => loc("Create a new ticket") &> - - - - - + + + + +
<&|/l&>Queue:<% $QueueObj->Name %> - -<&|/l&>Status: - + Title => loc("Create a new ticket"), + actions => $actions &> +<& /Elements/ListActions, actions => \@results &> + + +<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &> + +
+ +<&| /Widgets/TitleBox, title => loc("Create a new ticket") &> + + + + + - + - + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - + + % if ($TxnCFs->Count) { % while (my $CF = $TxnCFs->Next()) { - - - - + + + + % } % } - + % if (exists $session{'Attachments'}) { - - + - - + + + % } # end of if - - - - - + + + + - - - - -
<&|/l&>Queue:<& Elements/ShowQueue, QueueObj => $QueueObj &> + +<&|/l&>Status: + <& /Elements/SelectStatus, Name => "Status", Default => $ARGS{Status}||'new', DefaultValue => 0 &> - + <&|/l&>Owner: - + <& /Elements/SelectOwner, Name => "Owner", QueueObj => $QueueObj, Default => $ARGS{Owner}||$RT::Nobody->Id, DefaultValue => 0 &> -
+
<&|/l&>Requestors: - - -
+ + +
<&|/l&>Cc: - -
- -<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. These people will receive future updates.) -
+ +
+ +<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. These people will receive future updates.) +
<&|/l&>Admin Cc: - -
- -<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of administrative email addresses. These people will receive future updates.) -
+ +
+ +<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of administrative email addresses. These people will receive future updates.) +
<&|/l&>Subject: - - -
+ + +
<& /Ticket/Elements/EditCustomFields, QueueObj => $QueueObj &> -
<% $CF->Name %>:<& /Elements/EditCustomField, CustomField => $CF, NamePrefix => - "Object-RT::Transaction--CustomField-" &><% $CF->FriendlyType %>
<% $CF->Name %>:<& /Elements/EditCustomField, CustomField => $CF, NamePrefix => + "Object-RT::Transaction--CustomField-" &><% $CF->FriendlyType %>
+ <&|/l&>Attached file: - -<&|/l&>Check box to delete
+
+<&|/l&>Check box to delete
% foreach my $attach_name (keys %{$session{'Attachments'}}) { -<%$attach_name%>
+<%$attach_name%>
% } # end of foreach -
+ <&|/l&>Attach file: - - - -
-<&|/l&>Describe the issue below:
+
+ + +
+<&|/l&>Describe the issue below:
% if (exists $ARGS{Content}) { <& /Elements/MessageBox, Default => $ARGS{Content}, IncludeSignature => 0 &> % } else { <& /Elements/MessageBox, QuoteTransaction => $QuoteTransaction &> %} -
-
-
-<& /Elements/TitleBoxEnd &> +
+
+
+ <& /Elements/Submit, Label => loc("Create")&> + -










-










-










-










-










- - - [<&|/l&>Show basics] [<&|/l&>Show details] -
- - - -
+
+ + + + +
- <& /Elements/TitleBoxStart, title => loc('The Basics'), + <&| /Widgets/TitleBox, title => loc('The Basics'), title_class=> 'inverse', color => "#993333" &> - - - - - -
<&|/l&>Priority:
<&|/l&>Final Priority:
<&|/l&>Time Worked:<&|/l,''&>[_1] min
<&|/l&>Time Left:<&|/l,''&>[_1] min
-<& /Elements/TitleBoxEnd &> -
-<& /Elements/TitleBoxStart, title => loc("Dates"), + + + + + + + + + + +
<&|/l&>Priority:
<&|/l&>Final Priority:
<&|/l&>Time Estimated: + +<& /Elements/SelectTimeUnits, Name =>'TimeEstimated' &> + +
<&|/l&>Time Worked: + +<& /Elements/SelectTimeUnits, Name =>'TimeWorked' &> + +
<&|/l&>Time Left: +<& /Elements/SelectTimeUnits, Name =>'TimeLeft' &> +
+ +
+<&|/Widgets/TitleBox, title => loc("Dates"), title_class=> 'inverse', color => "#663366" &> - - - -
<&|/l&>Starts:
<&|/l&>Due:
-<& /Elements/TitleBoxEnd &> -
-
+ + +
<&|/l&>Starts:<& /Elements/SelectDate, Name => "Starts", Default => $ARGS{Starts} || '' &>
<&|/l&>Due:<& /Elements/SelectDate, Name => "Due", Default => $ARGS{Due} || '' &>
+ +
+
-<& /Elements/TitleBoxStart, title => loc('Links'), - title_class=> 'inverse', - titleright => '', color=> "#336633" &> + +<&| /Widgets/TitleBox, title => loc('Links'), title_class=> 'inverse' &> -<&|/l&>(Enter ticket ids or URLs, separated with spaces) - - - - - - - +<&|/l&>(Enter ticket ids or URLs, separated with spaces) +
<&|/l&>Depends on
<&|/l&>Depended on by
<&|/l&>Parents
<&|/l&>Children
<&|/l&>Refers to
<&|/l&>Referred to by
+ + + + + + -
<&|/l&>Depends on
<&|/l&>Depended on by
<&|/l&>Parents
<&|/l&>Children
<&|/l&>Refers to
<&|/l&>Referred to by
-<& /Elements/TitleBoxEnd &> -
+
+ +
- - - + + + <& /Elements/Submit, Label => loc("Create") &> -
-









-










-










-










-










+ + <%INIT> +my $CloneTicketObj; +if ( $CloneTicket ) { + $CloneTicketObj = RT::Ticket->new( $session{CurrentUser} ); + $CloneTicketObj->Load($CloneTicket) or Abort(loc("Ticket could not be loaded")); + + my $clone = { + Requestors => join( ',', $CloneTicketObj->RequestorAddresses ), + Cc => join( ',', $CloneTicketObj->CcAddresses), + AdminCc => join( ',', $CloneTicketObj->AdminCcAddresses), + InitialPriority => $CloneTicketObj->Priority, + }; + + $clone->{$_} = $CloneTicketObj->$_() + for qw/Owner Subject FinalPriority TimeEstimated TimeWorked + Status TimeLeft Starts Started Due Resolved/; + + my $members = $CloneTicketObj->Members; + my ( @members, @members_of, @refers, @refers_by, @depends, @depends_by ); + while ( my $member = $members->Next ) { + push @members, $member->LocalBase; + } + $clone->{'MemberOf-new'} = join ' ', @members; + + my $members_of = $CloneTicketObj->MemberOf; + while ( my $member_of = $members_of->Next ) { + push @members_of, $member_of->LocalTarget; + } + $clone->{'new-MemberOf'} = join ' ', @members_of; + + my $refers = $CloneTicketObj->RefersTo; + while ( my $refer = $refers->Next ) { + push @refers, $refer->LocalTarget; + } + $clone->{'new-RefersTo'} = join ' ', @refers; + + my $refers_by = $CloneTicketObj->ReferredToBy; + while ( my $refer_by = $refers_by->Next ) { + push @refers_by, $refer_by->LocalBase; + } + $clone->{'RefersTo-new'} = join ' ', @refers_by; + + my $depends = $CloneTicketObj->DependsOn; + while ( my $depend = $depends->Next ) { + push @depends, $depend->LocalTarget; + } + $clone->{'new-DependsOn'} = join ' ', @depends; + + my $depends_by = $CloneTicketObj->DependedOnBy; + while ( my $depend_by = $depends_by->Next ) { + push @depends_by, $depend_by->LocalBase; + } + $clone->{'DependsOn-new'} = join ' ', @depends_by; + + + + my $cfs = $CloneTicketObj->QueueObj->TicketCustomFields(); + while ( my $cf = $cfs->Next ) { + my $cf_id = $cf->id; + my $cf_values = $CloneTicketObj->CustomFieldValues( $cf->id ); + my @cf_values; + while ( my $cf_value = $cf_values->Next ) { + push @cf_values, $cf_value->Content; + } + $clone->{"Object-RT::Ticket--CustomField-$cf_id-Value"} + = join "\n", @cf_values; + } + + for ( keys %$clone ) { + $ARGS{$_} = $clone->{$_} if not defined $ARGS{$_}; + } +} +my @results; my $QueueObj = new RT::Queue($session{'CurrentUser'}); $QueueObj->Load($Queue) || Abort(loc("Queue could not be loaded.")); my $CFs = $QueueObj->TicketCustomFields(); my $TxnCFs = $QueueObj->TicketTransactionCustomFields(); +my $ValidCFs = $m->comp( + '/Elements/ValidateCustomFields', + CustomFields => $CFs, + ARGSRef => \%ARGS +); + # if no due date has been set explicitly, then use the # queue's default if it exists if ($QueueObj->DefaultDueIn && !$ARGS{'Due'}) { @@ -285,10 +370,29 @@ unless (keys %{$session{'Attachments'}} and $ARGS{'id'} eq 'new') { # }}} -if ((!exists $ARGS{'AddMoreAttach'}) && ($ARGS{'id'} eq 'new')) { # new ticket? - $m->comp('Display.html', %ARGS); - return(); +if ((!exists $ARGS{'AddMoreAttach'}) and ($ARGS{'id'} eq 'new')) { # new ticket? + if ($ValidCFs) { + $m->comp('Display.html', %ARGS); + $RT::Logger->crit("After display call; error is $@"); + $m->abort(); + } + else { + # Invalid CFs + while (my $CF = $CFs->Next) { + my $msg = $m->notes('InvalidField-' . $CF->Id) or next; + push @results, $CF->Name . ': ' . $msg; + } + } } + +my $actions = { + A => { + html => q[] . loc('Show basics') . q[], + }, + B => { + html => q[] . loc('Show details') . q[], + }, +}; <%ARGS> @@ -297,4 +401,5 @@ $DependedOnBy => undef $MemberOf => undef $QuoteTransaction => undef $Queue => undef +$CloneTicket => undef diff --git a/rt/html/Ticket/Display.html b/rt/html/Ticket/Display.html index 908a7a93a..17d00a00c 100644 --- a/rt/html/Ticket/Display.html +++ b/rt/html/Ticket/Display.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -51,13 +53,12 @@ Title => loc("#[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject) &> <& /Elements/ListActions, actions => \@Actions &> - -<& /Elements/TitleBoxStart, title => loc('Ticket metadata'), contentbg => -'#ffffff' &> +<& /Elements/Callback, _CallbackName => 'BeforeShowSummary', Ticket => $TicketObj, %ARGS &> +<&| /Widgets/TitleBox, title => loc('Ticket metadata') &> <& /Ticket/Elements/ShowSummary, Ticket => $TicketObj, Attachments => $attachments &> -<& /Elements/TitleBoxEnd &> + -
+
<& /Elements/Callback, _CallbackName => 'BeforeShowHistory', Ticket => $TicketObj, %ARGS &> @@ -71,7 +72,9 @@ &> - +<& /Elements/Callback, _CallbackName => 'AfterShowHistory', Ticket => $TicketObj, +current_tab => 'Ticket/Display.html?id=' . $TicketObj->id, %ARGS &> + <%ARGS> $id => undef $Create => undef @@ -119,6 +122,10 @@ if ($ARGS{'id'} eq 'new') { } } + $m->comp('/Elements/Callback', _CallbackName => 'BeforeProcessArguments', + TicketObj => $TicketObj, Tickets => $Tickets, + ActionsRef => \@Actions, ARGSRef => \%ARGS); + if (defined $ARGS{'Action'}) { if ($ARGS{'Action'} =~ /^(Steal|Kill|Take|SetTold)$/) { my $action = $1; @@ -143,17 +150,31 @@ if ($ARGS{'id'} eq 'new') { delete $session{'Attachments'}; } #Process status updates + my @PeopleActions = ProcessTicketWatchers(ARGSRef => \%ARGS, TicketObj=>$TicketObj); my @BasicActions = ProcessTicketBasics(ARGSRef => \%ARGS, TicketObj=>$TicketObj); my @results = ProcessTicketLinks( TicketObj => $TicketObj, ARGSRef => \%ARGS); - push (@Actions, @BasicActions, @results); + push (@Actions, @PeopleActions, @BasicActions, @results); } - - $m->comp('/Elements/Callback', _CallbackName => 'BeforeDisplay', - TicketObj => \$TicketObj, Tickets => \$Tickets, ARGSRef => \%ARGS); - + TicketObj => \$TicketObj, + Tickets => \$Tickets, + Actions => \@Actions, + ARGSRef => \%ARGS, +); + +# This code does automatic redirection if any updates happen. + +if (@Actions) { + # We've done something, so we need to clear the decks to avoid + # resubmission on refresh. + # But we need to store Actions somewhere too, so we don't lose them. + $session{"Actions"} = \@Actions; + RT::Interface::Web::Redirect($RT::WebURL."Ticket/Display.html?id=".$TicketObj->id); +} else { + @Actions = @{ delete $session{"Actions"} || [] }; +} my $attachments = $m->comp('Elements/FindAttachments', Ticket => $TicketObj, Tickets => $Tickets); my $attachment_content = $m->comp('Elements/LoadTextAttachments', Ticket => $TicketObj); diff --git a/rt/html/Ticket/Elements/AddWatchers b/rt/html/Ticket/Elements/AddWatchers index 98314b9d2..891ff95b5 100644 --- a/rt/html/Ticket/Elements/AddWatchers +++ b/rt/html/Ticket/Elements/AddWatchers @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,10 +45,10 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -
-<%$msg%>
+
+<%$msg%>
-<&|/l&>Add new watchers:
+<&|/l&>Add new watchers:
% if ($Users and $Users->Count) { @@ -79,17 +81,17 @@
<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail1" &> - +
<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail2" &> - +
<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail3" &> - +
diff --git a/rt/html/Ticket/Elements/BulkLinks b/rt/html/Ticket/Elements/BulkLinks index 6a3859aa3..e449b18d8 100644 --- a/rt/html/Ticket/Elements/BulkLinks +++ b/rt/html/Ticket/Elements/BulkLinks @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,33 +45,33 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
<&|/l&>Merge into: <&|/l&>(only one ticket)
<&|/l&>Depends on:
<&|/l&>Depended on by:
<&|/l&>Parents:
<&|/l&>Children:
<&|/l&>Refers to:
<&|/l&>Referred to by:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
<&|/l&>Merge into: <&|/l&>(only one ticket)
<&|/l&>Depends on:
<&|/l&>Depended on by:
<&|/l&>Parents:
<&|/l&>Children:
<&|/l&>Refers to:
<&|/l&>Referred to by:
diff --git a/rt/html/Ticket/Elements/EditBasics b/rt/html/Ticket/Elements/EditBasics index 715685153..d68fe6522 100644 --- a/rt/html/Ticket/Elements/EditBasics +++ b/rt/html/Ticket/Elements/EditBasics @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,44 +45,65 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - - +
+ - - + + - + - - + + - - + + + + + + + - - - + + + - - - + + + + - - + + - + - - + + - + - - + + + + + <& /Elements/Callback, _CallbackName => 'EndOfList', TicketObj => $TicketObj, %ARGS &> -
<&|/l&>Subject:
<&|/l&>Status: <%$SelectStatus|n%>
<&|/l&>Queue: <%$SelectQueue|n%>
<&|/l&>Owner:<& /Elements/SelectOwner, + Name => 'Owner', + QueueObj => $TicketObj->QueueObj, + TicketObj => $TicketObj, + Default => $TicketObj->OwnerObj->Id, + DefaultValue => 0, + &>
<&|/l&>Time Estimated:
+ <& /Elements/SelectTimeUnits, Name =>'TimeEstimated' &> +
<&|/l&>Time Worked:
+ <& /Elements/SelectTimeUnits, Name =>'TimeWorked' &> +
<&|/l&>Time Left:
+ <& /Elements/SelectTimeUnits, Name =>'TimeLeft' &> +
<&|/l&>Priority:
<&|/l&>Final Priority:
+ <%INIT> #It's hard to do this inline, so we'll preload the html of the selectstatus in here. diff --git a/rt/html/Ticket/Elements/EditCustomField b/rt/html/Ticket/Elements/EditCustomField index 63687acd7..fff3925aa 100644 --- a/rt/html/Ticket/Elements/EditCustomField +++ b/rt/html/Ticket/Elements/EditCustomField @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Ticket/Elements/EditCustomFields b/rt/html/Ticket/Elements/EditCustomFields index 78da71201..04d7180af 100644 --- a/rt/html/Ticket/Elements/EditCustomFields +++ b/rt/html/Ticket/Elements/EditCustomFields @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -44,39 +46,47 @@ %# %# END BPS TAGGED BLOCK }}} - - - +% } + +
- - % my $i = 0; -% my $cfcount = $CustomFields->Count; -% $cfcount++ if ($cfcount % 2) ; # if we have an odd number of -% #custom fields, fudge it so we know where to put in the table break -% while (my $CustomField = $CustomFields->Next()) { -% if ($cfcount == 2 * $i) { -
-
- -% } +% while ( my $CustomField = $CustomFields->Next ) { +% next unless $CustomField->CurrentUserHasRight('ModifyCustomField'); % $i++; - +% if ( $i % 2 ) { + +% } + + +% unless ( $i % 2 ) { -
+ + + NamePrefix => $NamePrefix , + Default => $m->notes('Field-' . $CustomField->Id), + &> +% if (my $msg = $m->notes('InvalidField-' . $CustomField->Id)) { +
+ <% $msg %> +% } + -% }
- <%$CustomField->Name%>
+ <%$CustomField->Name%>
<%$CustomField->FriendlyType%>
<& /Elements/EditCustomField, Object => $TicketObj, CustomField => $CustomField, - NamePrefix => $NamePrefix - &>
+% } + +% } +%# close row if required +% if ( $i % 2 ) { +
<%INIT> my $CustomFields; my $NamePrefix; diff --git a/rt/html/Ticket/Elements/EditDates b/rt/html/Ticket/Elements/EditDates index a19774192..f694506d0 100644 --- a/rt/html/Ticket/Elements/EditDates +++ b/rt/html/Ticket/Elements/EditDates @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,32 +45,32 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - - - - - - - - - +
<&|/l&>Starts:<& /Elements/SelectDate, menu_prefix => 'Starts', current => 0 &> - (<% $TicketObj->StartsObj->AsString %>)
<&|/l&>Started:<& /Elements/SelectDate, menu_prefix => 'Started', current => 0 &> (<%$TicketObj->StartedObj->AsString %>)
+ + + + + + + + - - + - + - - - - + + + + - -
<&|/l&>Starts:<& /Elements/SelectDate, menu_prefix => 'Starts', current => 0 &> + (<% $TicketObj->StartsObj->AsString %>)
<&|/l&>Started:<& /Elements/SelectDate, menu_prefix => 'Started', current => 0 &> (<%$TicketObj->StartedObj->AsString %>)
+
<&|/l&>Last Contact: - + <& /Elements/SelectDate, menu_prefix => 'Told', current => 0 &> (<% $TicketObj->ToldObj->AsString %>) -
<&|/l&>Due: +
<&|/l&>Due: <& /Elements/SelectDate, menu_prefix => 'Due', current => 0 &> (<% $TicketObj->DueObj->AsString %>) -
+ + + <%ARGS> $TicketObj => undef diff --git a/rt/html/Ticket/Elements/EditPeople b/rt/html/Ticket/Elements/EditPeople index 055d7ba20..fd23ae0d6 100644 --- a/rt/html/Ticket/Elements/EditPeople +++ b/rt/html/Ticket/Elements/EditPeople @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,28 +45,28 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - - - + +
+ + + - -

<&|/l&>New watchers

-<&|/l&>Find people whose
+<&|/l&>Find people whose
<& /Elements/SelectUsers &> - -
-<&|/l&>Find groups whose
+ +
+<&|/l&>Find groups whose
<& /Elements/SelectGroups &> - + <& AddWatchers, Ticket => $Ticket, UserString => $UserString, UserOp => $UserOp, UserField => $UserField, GroupString => $GroupString, GroupOp => $GroupOp, GroupField => $GroupField, PrivilegedOnly => $PrivilegedOnly &> -
+

<&|/l&>Owner

<&|/l&>Owner: <& /Elements/SelectOwner, Name => 'Owner', QueueObj => $Ticket->QueueObj, TicketObj => $Ticket, Default => $Ticket->OwnerObj->Id, DefaultValue => 0&>

<&|/l&>Current watchers

-<&|/l&>(Check box to delete)
+<&|/l&>(Check box to delete)
<&|/l&>Requestors: <& EditWatchers, TicketObj => $Ticket, Watchers => $Ticket->Requestors &> @@ -75,9 +77,9 @@ <&|/l&>Administrative Cc: <& EditWatchers, TicketObj => $Ticket, Watchers => $Ticket->AdminCc &> -
+
<%ARGS> $UserField => undef diff --git a/rt/html/Ticket/Elements/EditWatchers b/rt/html/Ticket/Elements/EditWatchers index 0089932f4..918dddb68 100644 --- a/rt/html/Ticket/Elements/EditWatchers +++ b/rt/html/Ticket/Elements/EditWatchers @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -46,20 +48,25 @@
    %# Print out a placeholder if there are none. %if ($Members->Count == 0 ) { -
  • <&|/l&>none +
  • <&|/l&>none
  • % } %while (my $watcher=$Members->Next) {
  • - + %if ($watcher->MemberObj->IsUser) { -<%$watcher->MemberObj->Object->Name%> +<%$watcher->MemberObj->Object->Name%> +% if ($TicketObj and grep { $_->Content eq $watcher->MemberObj->Object->EmailAddress } $TicketObj->SquelchMailTo) { +<&|/l&>(Will not be sent email) +% } + %} else { <%$watcher->MemberObj->Object->Name%> %} +
  • % }
<%INIT> diff --git a/rt/html/Ticket/Elements/FindAttachments b/rt/html/Ticket/Elements/FindAttachments index 017c77288..a9d698d31 100755 --- a/rt/html/Ticket/Elements/FindAttachments +++ b/rt/html/Ticket/Elements/FindAttachments @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Ticket/Elements/LoadTextAttachments b/rt/html/Ticket/Elements/LoadTextAttachments index 943568fb3..fc83d6605 100755 --- a/rt/html/Ticket/Elements/LoadTextAttachments +++ b/rt/html/Ticket/Elements/LoadTextAttachments @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -80,7 +82,9 @@ if ( $Ticket->CurrentUserHasRight('ShowTicket') ) { $attachments->Limit ( FIELD => 'ContentType', OPERATOR => '=', VALUE => 'text/plain'); $attachments->Limit ( FIELD => 'ContentType', OPERATOR => 'STARTSWITH', VALUE => 'message/'); $attachments->Limit ( FIELD => 'ContentType', OPERATOR => '=', VALUE => 'text'); - + if ($RT::SuppressInlineTextFiles) { + $attachments->Limit ( FIELD => 'Filename', OPERATOR => 'IS', VALUE => 'NULL'); + } } return ($attachments); diff --git a/rt/html/Ticket/Elements/PreviewScrips b/rt/html/Ticket/Elements/PreviewScrips index 491f8e3f3..423040c8e 100755 --- a/rt/html/Ticket/Elements/PreviewScrips +++ b/rt/html/Ticket/Elements/PreviewScrips @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -94,23 +96,24 @@ unless ( $Transaction ) { my @non_recipients = $TicketObj->SquelchMailTo;

<&|/l&>This message will be sent to...

+ % if ( $Object ) { -<&|/l&>(Check boxes to disable notifications to the listed recipients)
+<&|/l&>(Check boxes to disable notifications to the listed recipients)
% foreach my $scrip (@{$Object->Scrips->Prepared}) { % next unless $scrip->ActionObj->Action->isa('RT::Action::SendEmail'); -<% $scrip->Description %>
+<% $scrip->Description %>
<&|/l, loc($scrip->ConditionObj->Name), loc($scrip->ActionObj->Name), loc($scrip->TemplateObj->Name)&>[_1] [_2] with template [_3] -
+
%foreach my $type qw(To Cc Bcc) { %my @addresses = $scrip->ActionObj->Action->$type();
    %foreach my $addr (@addresses) { -
  • <%loc($type)%>: <%$addr->address%> +
  • <%loc($type)%>: <%$addr->address%> % }
% } % if ($RT::PreviewScripMessages) { - % } @@ -120,10 +123,10 @@ my @non_recipients = $TicketObj->SquelchMailTo;

<&|/l&>Messages about this ticket will not be sent to...

<&|/l&>(Check boxes to enable notifications to the listed recipients) -
+
    % foreach my $recipient (@non_recipients) { -
  • +
  • <% $recipient->Content %> % }
diff --git a/rt/html/Ticket/Elements/ShowAttachments b/rt/html/Ticket/Elements/ShowAttachments index 82028dd28..6f1de620a 100644 --- a/rt/html/Ticket/Elements/ShowAttachments +++ b/rt/html/Ticket/Elements/ShowAttachments @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -44,13 +46,13 @@ %# %# END BPS TAGGED BLOCK }}} % if (keys %documents) { -<& /Elements/TitleBoxStart, title => loc('Attachments'), +<&| /Widgets/TitleBox, title => loc('Attachments'), title_class=> 'inverse', color => "#336699" &> % foreach my $key (keys %documents) { -<%$key%>
+<%$key%>
% } -<& /Elements/TitleBoxEnd &> -
+ + +
% } <%INIT> diff --git a/rt/html/Ticket/Elements/ShowBasics b/rt/html/Ticket/Elements/ShowBasics index e5f09f693..631b90927 100644 --- a/rt/html/Ticket/Elements/ShowBasics +++ b/rt/html/Ticket/Elements/ShowBasics @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -55,18 +57,18 @@ % if ($Ticket->TimeEstimated) { <&|/l&>Estimated: - <&|/l, $Ticket->TimeEstimated &>[_1] min + <& ShowTime, minutes => $Ticket->TimeEstimated &> % } % if ($Ticket->TimeWorked) { <&|/l&>Worked: - <&|/l, $Ticket->TimeWorked &>[_1] min + <& ShowTime, minutes => $Ticket->TimeWorked &> % } <&|/l&>Left: - <&|/l, $Ticket->TimeLeft &>[_1] min + <& ShowTime, minutes => $Ticket->TimeLeft &> <&|/l&>Priority: @@ -74,7 +76,7 @@ <&|/l&>Queue: - <%$Ticket->QueueObj->Name%> + <& ShowQueue, QueueObj => $Ticket->QueueObj &> <& /Elements/Callback, _CallbackName => 'EndOfList', TicketObj => $Ticket, %ARGS &> diff --git a/rt/html/Ticket/Elements/ShowCustomFields b/rt/html/Ticket/Elements/ShowCustomFields index eb49212c5..f307d9dd2 100644 --- a/rt/html/Ticket/Elements/ShowCustomFields +++ b/rt/html/Ticket/Elements/ShowCustomFields @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Ticket/Elements/ShowDates b/rt/html/Ticket/Elements/ShowDates index 322fafd99..e00b5ee80 100644 --- a/rt/html/Ticket/Elements/ShowDates +++ b/rt/html/Ticket/Elements/ShowDates @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,41 +45,41 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - - - - - - - - - - - - - - - - - - - - - - - - - - - +
<&|/l&>Created:<% $Ticket->CreatedObj->AsString %>
<&|/l&>Starts:<% $Ticket->StartsObj->AsString %>
<&|/l&>Started:<% $Ticket->StartedObj->AsString %>
<&|/l&>Last Contact:<% $Ticket->ToldObj->AsString %>
<&|/l&>Due:<% $Ticket->DueObj->AsString %>
<&|/l&>Closed:<% $Ticket->ResolvedObj->AsString %>
<&|/l&>Updated:
+ + + + + + + + + + + + + + + + + + + + + + + + + + % my $UpdatedString = $Ticket->LastUpdated ? loc("[_1] by [_2]", $Ticket->LastUpdatedAsString, $Ticket->LastUpdatedByObj->Name) : loc("Never"); % if ($UpdatedLink) { - + % } else { - + % } - -
<&|/l&>Created:<% $Ticket->CreatedObj->AsString %>
<&|/l&>Starts:<% $Ticket->StartsObj->AsString %>
<&|/l&>Started:<% $Ticket->StartedObj->AsString %>
<&|/l&>Last Contact:<% $Ticket->ToldObj->AsString %>
<&|/l&>Due:<% $Ticket->DueObj->AsString %>
<&|/l&>Closed:<% $Ticket->ResolvedObj->AsString %>
<&|/l&>Updated:<% $UpdatedString | h %><% $UpdatedString | h %><% $UpdatedString | h %><% $UpdatedString | h %>
+ + <%ARGS> $Ticket => undef $UpdatedLink => 1 diff --git a/rt/html/Ticket/Elements/ShowDependencies b/rt/html/Ticket/Elements/ShowDependencies index f276bc949..b2f4d298d 100644 --- a/rt/html/Ticket/Elements/ShowDependencies +++ b/rt/html/Ticket/Elements/ShowDependencies @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,19 +45,19 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<&|/l&>Depends on:
+<&|/l&>Depends on:
% while (my $Link = $Ticket->DependsOn->Next) { % my $member = $Link->TargetObj; <%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>] -
+
% } -<&|/l&>Depended on by:
+<&|/l&>Depended on by:
% while (my $Link = $Ticket->DependedOnBy->Next) { % my $member = $Link->TargetObj; <%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>] -
+
% } <%ARGS> diff --git a/rt/html/Ticket/Elements/ShowGroupMembers b/rt/html/Ticket/Elements/ShowGroupMembers index 1fdb79aab..e39bc690e 100644 --- a/rt/html/Ticket/Elements/ShowGroupMembers +++ b/rt/html/Ticket/Elements/ShowGroupMembers @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -47,14 +49,15 @@ % my $UserMembers = $Group->UserMembersObj; % while (my $member = $UserMembers->Next()) { -<& ShowUserEntry, User => $member &>
+<& ShowUserEntry, User => $member, Ticket => $Ticket &>
% } % my $GroupMembers = $Group->MembersObj; % $GroupMembers->LimitToGroups(); % while (my $member = $GroupMembers->Next()) { -<&|/l&>Group: <%$member->MemberObj->Object->Name%>
+<&|/l&>Group: <%$member->MemberObj->Object->Name%>
% } <%ARGS> $Group => undef - \ No newline at end of file +$Ticket => undef + diff --git a/rt/html/Ticket/Elements/ShowHistory b/rt/html/Ticket/Elements/ShowHistory index 878e2535c..45cd5122f 100644 --- a/rt/html/Ticket/Elements/ShowHistory +++ b/rt/html/Ticket/Elements/ShowHistory @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,47 +45,45 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} +<%doc> +# This is (ab)used in Admin/(Users|Groups)/History.html and should probably +# be generalized at some point. + <%perl> - if ($ShowDisplayModes or $ShowTitle) { -my $title; -my $titleright; -if ($ShowTitle) { - $title = loc('History'); -} -else { - $title = ' '; -} -$titleright = loc('Display mode') . ":"; -if ($ShowHeaders) { - $titleright .= "[" - . loc("Brief headers") - . "] [" - . loc("Full headers") . "]"; -} -else { - $titleright .= "[" - . loc("Brief headers") - . "] [" - . loc("Full headers") . "]"; -} +if ($ShowDisplayModes or $ShowTitle) { + my $title = $ShowTitle + ? loc('History') + : ' '; + + my $titleright; + + if ($ShowDisplayModes) { + $titleright = q[] . loc('Display mode') . ': '; + + if ($ShowHeaders) { + $titleright .= qq{} . + loc("Brief headers") . + qq{ — }; + $titleright .= q[] . loc("Full headers") . ""; + } + else { + $titleright .= q[] . loc("Brief headers") . " — "; + $titleright .= qq{} . + loc("Full headers") . + qq{}; + } + } -<& /Elements/TitleBoxStart, title => $title, titleright => $titleright, bodyclass=> ''&> +<& /Widgets/TitleBoxStart, title => $title, titleright => $titleright &> % } - +
<%perl> my @attachments = @{$Attachments->ItemsArrayRef()}; my @attachment_content = @{$AttachmentContent->ItemsArrayRef()}; - - - - while ( my $Transaction = $Transactions->Next ) { my $skip = 0; $m->comp( '/Elements/Callback', @@ -123,9 +123,9 @@ $m->flush_buffer(); } -
+ % if ($ShowDisplayModes or $ShowTitle) { -<& /Elements/TitleBoxEnd &> +<& /Widgets/TitleBoxEnd &> % } <%INIT> my $Transactions = new RT::Transactions($session{'CurrentUser'}); diff --git a/rt/html/Ticket/Elements/ShowMembers b/rt/html/Ticket/Elements/ShowMembers index f4fec1c7c..f87ce8fc9 100644 --- a/rt/html/Ticket/Elements/ShowMembers +++ b/rt/html/Ticket/Elements/ShowMembers @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,21 +45,20 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -% if ($members->Count) { -
    +
      % while (my $link = $members->Next) { -% my $member= $link->BaseObj; -
    • <%$member->Id%>: <%$member->Subject%> [<%loc($member->Status)%>]
      +
    • <& /Elements/ShowLink, URI => $link->BaseURI &>
      % if ($depth < 8) { -<&/Ticket/Elements/ShowMembers, Ticket => $member, depth => ($depth+1) &> +<& /Ticket/Elements/ShowMembers, Ticket => $link->BaseObj, depth => ($depth+1) &> % } +
    • % } -
    -% } +
<%INIT> my $members = $Ticket->Members; +return unless $members->Count; diff --git a/rt/html/Ticket/Elements/ShowMessageHeaders b/rt/html/Ticket/Elements/ShowMessageHeaders index 8dc76bae3..81c56375d 100644 --- a/rt/html/Ticket/Elements/ShowMessageHeaders +++ b/rt/html/Ticket/Elements/ShowMessageHeaders @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,14 +45,15 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -% use Data::Dumper; % foreach my $header (@headers) { -% next unless ($display_headers{'_all'} || $display_headers{lc($header->{'Tag'})}); - - - - +% next unless $display_headers{_all} +% or ($display_headers{ lc $header->{Tag} } +% and length $header->{Value}); + + + + % }
<%$header->{'Tag'}%>:<%$header->{'Value'} | n%>
<%$header->{'Tag'}%>:<%$header->{'Value'} | n%>
<%INIT> @@ -61,23 +64,24 @@ $m->comp('/Elements/Callback', content => \$content, %ARGS); # we'll display the value without escaping later (for MakeClicky et al.) $content = $m->interp->apply_escapes($content, 'h'); -my @lines = split (/\n/,$content); +my @lines = split /\n/, $content; my $in_header = 0; -my @headers =(); -foreach (@lines) { +my @headers; + +for (@lines) { if (/^(\S+):\s+(.*)$/) { - push (@headers, { Tag => $1, Value => $2} ); - } elsif ($headers[-1]) { + push @headers, { Tag => $1, Value => $2 }; + } + elsif (/^\s+/) { $headers[-1]->{'Value'} .= $_; - } else { - - push (@headers, { Tag => $_, Value => ''} ); + } + else { + s/:$//; + push @headers, { Tag => $_, Value => '' }; } } -my %display_headers; - -map { $display_headers{lc($_)} = 1 } @$DisplayHeaders; +my %display_headers = map { lc($_) => 1 } @$DisplayHeaders; $m->comp('/Elements/Callback', _CallbackName => 'Headers', content => \$content, headers => \@headers, display_headers => \%display_headers, %ARGS); diff --git a/rt/html/Ticket/Elements/ShowMessageStanza b/rt/html/Ticket/Elements/ShowMessageStanza index eaf551de9..8040096f1 100644 --- a/rt/html/Ticket/Elements/ShowMessageStanza +++ b/rt/html/Ticket/Elements/ShowMessageStanza @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -44,7 +46,7 @@ %# %# END BPS TAGGED BLOCK }}} % if (ref($Message)) { - +
<%perl> foreach my $stanza (@$Message) { if ( ref $stanza eq "ARRAY" ) { @@ -57,24 +59,23 @@ foreach my $stanza (@$Message) { my $content = $stanza->{raw}; RT::Interface::Web::EscapeUTF8(\$content); $m->comp('/Elements/Callback', content => \$content, %ARGS); - $content =~ s/\n/
/gi if defined $content; + $content =~ s{$}{
}mg + if defined $content; -<%$content |n%>
-% } +<%$content |n%> +% } % } # end foreach -
+
% } else { -% my $content = $Message; -% RT::Interface::Web::EscapeUTF8(\$content); -% $m->comp('/Elements/Callback', content => \$content, %ARGS); -% $content =~ s/\n/
/gi; -<%$content |n%>
+% my $content = $Message; +% RT::Interface::Web::EscapeUTF8(\$content); +% $m->comp('/Elements/Callback', content => \$content, %ARGS); +% $content =~ s{$}{
}mg; +<%$content |n%> % } <%INIT> use URI::URL; -my $server = 'fsck.com'; -my @colors = ('#000000', '#660000', '#006600', '#000066', '#cc0000', '#00cc00', '#0000cc', '#ff0000', '#00ff00', '#0000ff'); <%ARGS> $Message => undef diff --git a/rt/html/Ticket/Elements/ShowPeople b/rt/html/Ticket/Elements/ShowPeople index dbec93928..76336ecdc 100644 --- a/rt/html/Ticket/Elements/ShowPeople +++ b/rt/html/Ticket/Elements/ShowPeople @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -46,19 +48,19 @@ - + - + - + - +
<&|/l&>Owner:<& ShowUserEntry, User => $Ticket->OwnerObj &><& ShowUserEntry, User => $Ticket->OwnerObj, Ticket => $Ticket &>
<&|/l&>Requestors:<& ShowGroupMembers, Group => $Ticket->Requestors &><& ShowGroupMembers, Group => $Ticket->Requestors, Ticket => $Ticket &>
<&|/l&>Cc:<& ShowGroupMembers, Group => $Ticket->Cc &><& ShowGroupMembers, Group => $Ticket->Cc, Ticket => $Ticket &>
<&|/l&>AdminCc:<& ShowGroupMembers, Group => $Ticket->AdminCc &><& ShowGroupMembers, Group => $Ticket->AdminCc, Ticket => $Ticket &>
<%ARGS> diff --git a/rt/html/Ticket/Elements/ShowQueue b/rt/html/Ticket/Elements/ShowQueue new file mode 100644 index 000000000..484760244 --- /dev/null +++ b/rt/html/Ticket/Elements/ShowQueue @@ -0,0 +1,9 @@ +<% $QueueObj->Name %> +<%ARGS> +$QueueObj + +<%INIT> +my $value = $QueueObj->Name; +$value = '#'. $QueueObj->id + unless defined $value && length $value; + diff --git a/rt/html/Ticket/Elements/ShowRequestor b/rt/html/Ticket/Elements/ShowRequestor index 57bfa0e55..d7fe6b185 100644 --- a/rt/html/Ticket/Elements/ShowRequestor +++ b/rt/html/Ticket/Elements/ShowRequestor @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,6 +47,7 @@ %# END BPS TAGGED BLOCK }}} <%PERL> my $rows = 10; +my $has_right_adminusers = $session{'CurrentUser'}->HasRight(Object => $RT::System, Right => 'AdminUsers'); my $people = $Ticket->Requestors->UserMembersObj; while (my $requestor=$people->Next) { next if $requestor->Privileged; @@ -55,27 +58,29 @@ $tickets->RowsPerPage($rows); $tickets->OrderBy(FIELD => 'Priority', ORDER => 'DESC'); -<& /Elements/TitleBoxStart, - title => "id."\">".loc("More about [_1]", $name)."" &> +<&| /Widgets/TitleBox, + title_href => $has_right_adminusers ? "$RT::WebPath/Admin/Users/Modify.html?id=".$requestor->id : undef, + title=> loc("More about [_1]", $name), +&> %# Additional information about this user. Empty by default. <& /Elements/Callback, _CallbackName => 'AboutThisUser', requestor => $requestor, %ARGS &> -<&|/l&>Comments about this user:
-<% ($requestor->Comments || loc("No comment entered about this user")) %>
+<&|/l&>Comments about this user:
+<% ($requestor->Comments || loc("No comment entered about this user")) %>
-<&|/l, $rows &>This user's [_1] highest priority tickets:
- -<&|/l&>Groups this user belongs to:
+<&|/l&>Groups this user belongs to:
<& /Elements/ShowMemberships, UserObj => $requestor &> -<& /Elements/TitleBoxEnd &> + %} <%ARGS> diff --git a/rt/html/Ticket/Elements/ShowSummary b/rt/html/Ticket/Elements/ShowSummary index b3e59edb3..ffd71d3f9 100644 --- a/rt/html/Ticket/Elements/ShowSummary +++ b/rt/html/Ticket/Elements/ShowSummary @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,62 +45,65 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - - - + +
- <& /Elements/TitleBoxStart, title => loc('The Basics'), + + + - + - -
+ <&| /Widgets/TitleBox, title => loc('The Basics'), title_href =>"$RT::WebPath/Ticket/Modify.html?id=".$Ticket->Id, - title_class=> 'inverse', - color => "#993333" &> + class => 'ticket-info-basics' &> <& /Ticket/Elements/ShowBasics, Ticket => $Ticket &> - <& /Elements/TitleBoxEnd &> -
+ + % if ($Ticket->QueueObj->TicketCustomFields->First) { - <& /Elements/TitleBoxStart, title => loc('Custom Fields'), + <&| /Widgets/TitleBox, title => loc('Custom Fields'), title_href =>"$RT::WebPath/Ticket/Modify.html?id=".$Ticket->Id, - title_class=> 'inverse', - color => "#993333" &> + class => 'ticket-info-cfs' &> <& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &> - <& /Elements/TitleBoxEnd &> - -
+ % } - <& /Elements/TitleBoxStart, title => loc('People'), + <&| /Widgets/TitleBox, title => loc('People'), title_href =>"$RT::WebPath/Ticket/ModifyPeople.html?id=".$Ticket->Id, - title_class=> 'inverse', - color => "#333399" &> - <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &> - <& /Elements/TitleBoxEnd &> -
+ class => 'ticket-info-people' &> + <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &> + - <& /Elements/Callback, %ARGS, _CallbackName => 'LeftColumn' &> - -
+ <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &> +
+ <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &> - <& /Elements/TitleBoxStart, title => loc("Dates"), + <& /Elements/Callback, %ARGS, _CallbackName => 'LeftColumn' &> +
+ <&|/Widgets/TitleBox, title => loc("Reminders"), + title_href =>"$RT::WebPath/Ticket/Reminders.html?id=".$Ticket->Id, + class => 'ticket-info-reminders' &> + + + + +
+
+ <& /Ticket/Elements/Reminders, Ticket => $Ticket, ShowCompleted => 0 &> +
+
+
+ + <&| /Widgets/TitleBox, title => loc("Dates"), title_href =>"$RT::WebPath/Ticket/ModifyDates.html?id=".$Ticket->Id, - title_class=> 'inverse', - color => "#663366" &> + class => 'ticket-info-dates' &> <& /Ticket/Elements/ShowDates, Ticket => $Ticket &> - <& /Elements/TitleBoxEnd &> -
- <& /Elements/TitleBoxStart, title => loc('Links'), + + + <&| /Widgets/TitleBox, title => loc('Links'), title_href => "$RT::WebPath/Ticket/ModifyLinks.html?id=".$Ticket->Id, - title_class=> 'inverse', - titleright => '', color=> "#336633" &> + class => 'ticket-info-links' &> <& /Elements/ShowLinks, Ticket => $Ticket &> - <& /Elements/TitleBoxEnd &> -
- <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &> - - <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &> - + <& /Elements/Callback, %ARGS, _CallbackName => 'RightColumn' &> -
+
<%ARGS> $Ticket => undef $Attachments => undef diff --git a/rt/html/Ticket/Elements/ShowTransaction b/rt/html/Ticket/Elements/ShowTransaction index 8bf589d45..f6d73c2f5 100644 --- a/rt/html/Ticket/Elements/ShowTransaction +++ b/rt/html/Ticket/Elements/ShowTransaction @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,25 +45,33 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - -#<% $LastTransaction ? ' ' : ' ' |n %> -   -<% $transdate|n %>  +
<% $RowNum % 2 ? ' odd' : ' even' %>"> + + + + % my $desc = $Transaction->BriefDescription; % $m->comp('/Elements/Callback', _CallbackName => 'ModifyDisplay', text => \$desc, Transaction => $Transaction, %ARGS); - - - - - + + + + + + - + + +
+ # + <% $LastTransaction ? ' ' : ' ' |n %> + <% $transdate|n %><%$Transaction->CreatorObj->Name%> - <%$TicketString%> <%$desc%> - -<%$TimeTaken%> <%$titlebar_commands|n%>
+ + <%$Transaction->CreatorObj->Name%> - <%$TicketString%> <%$desc%> + <%$TimeTaken%><%$titlebar_commands|n%>
% if ($Transaction->CustomFieldValues->Count) { -<& /Elements/ShowCustomFields, Object => $Transaction &> + <& /Elements/ShowCustomFields, Object => $Transaction &> % } % $m->comp('ShowTransactionAttachments', %ARGS, Parent => 0) unless ($Collapsed ||!$ShowBody); -
+
<%ARGS> $Ticket => undef @@ -82,37 +92,37 @@ $LastTransaction => 0 <%INIT> -my ( $TimeTaken, $TicketString, $bgcolor ); +my ( $TimeTaken, $TicketString, $type_class ); my $transdate = $Transaction->CreatedAsString(); $transdate =~ s/\s/ /g; if ( $Transaction->Type =~ /^(Create|Correspond|Comment$)/ ) { if ( $Transaction->IsInbound ) { - $bgcolor = "#336699"; + $type_class = 'message'; } else { - $bgcolor = "#339999"; + $type_class = 'message'; } } elsif ( ( $Transaction->Field =~ /^Owner$/ ) or ( $Transaction->Type =~ /^(AddWatcher|DelWatcher)$/ ) ) { - $bgcolor = "#333399"; + $type_class = 'people'; } elsif ( $Transaction->Type =~ /^(AddLink|DeleteLink)$/ ) { - $bgcolor = "#336633"; + $type_class = 'links'; } elsif ( $Transaction->Type =~ /^(Status|Set|Told)$/ ) { if ( $Transaction->Field =~ /^(Told|Starts|Started|Due)$/ ) { - $bgcolor = "#663366"; + $type_class = 'dates'; } else { - $bgcolor = "#993333"; + $type_class = 'basics'; } } else { - $bgcolor = "#cccccc"; + $type_class = 'other'; } if ( $Ticket->Id != $Transaction->Ticket ) { @@ -144,9 +154,7 @@ if ( $Transaction->Type =~ /EmailRecord$/ ) { . "&Transaction=" . $Transaction->Id . "&Attachment=" - . ( $Transaction->Attachments->First - && $Transaction->Attachments->First->Id ) - + . ( $Attachments->[0] && $Attachments->[0]->id ) . '">' . loc('Show') . "] "; $ShowBody = 0; } diff --git a/rt/html/Ticket/Elements/ShowTransactionAttachments b/rt/html/Ticket/Elements/ShowTransactionAttachments index d9e94ffa2..958123714 100644 --- a/rt/html/Ticket/Elements/ShowTransactionAttachments +++ b/rt/html/Ticket/Elements/ShowTransactionAttachments @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -79,10 +81,10 @@ foreach my $message ( grep { $_->Parent == $Parent } @$Attachments ) { } -<&|/l&>Download <%$message->Filename || loc('(untitled)') %> -
-<%$message->ContentType%> <% $size %> -
+<&|/l&>Download <%$message->Filename || loc('(untitled)') %> + +[<%$message->ContentType%> <% $size %>] + % } % # }}} @@ -95,6 +97,7 @@ unless ( ($message->GetHeader('Content-Disposition')||"") =~ /attachment/i ) { # If it's text if ( $message->ContentType =~ m{^(text|message)}i + && !($RT::SuppressInlineTextFiles && $message->Filename) && $message->ContentLength <= $RT::MaxInlineBody ) { @@ -136,7 +139,7 @@ unless ( ($message->GetHeader('Content-Disposition')||"") =~ /attachment/i ) { # if it's a text/plain show the body elsif ( $message->ContentType =~ m{^(text|message|text)}i ) { - eval { $content = Text::Quoted::extract($content); }; + eval { require Text::Quoted; $content = Text::Quoted::extract($content); }; if ($@) { 1; } $m->comp( @@ -151,12 +154,12 @@ unless ( ($message->GetHeader('Content-Disposition')||"") =~ /attachment/i ) { } # if it's an image, show it as an image - elsif ( $message->ContentType =~ /^image\//i ) { + elsif ( $RT::ShowTransactionImages and $message->ContentType =~ /^image\//i ) { $m->out('' ); + . '/" />' ); } elsif ( $message->ContentLength > 0 ) { $m->out( @@ -173,9 +176,9 @@ $m->comp( ParentObj => $message ); -} +% } <%ARGS> $Ticket => undef $Transaction => undef diff --git a/rt/html/Ticket/Elements/ShowUserEntry b/rt/html/Ticket/Elements/ShowUserEntry index 163bcbdb1..8481c143b 100644 --- a/rt/html/Ticket/Elements/ShowUserEntry +++ b/rt/html/Ticket/Elements/ShowUserEntry @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -49,7 +51,11 @@ % if ($User->EmailAddress && $User->EmailAddress ne $User->Name) { <<%$User->EmailAddress%>> % } +% if ($Ticket and grep { $_->Content eq $User->EmailAddress } $Ticket->SquelchMailTo) { +<&|/l&>(Will not be sent email) +% } <%ARGS> $User => undef - \ No newline at end of file +$Ticket => undef + diff --git a/rt/html/Ticket/Elements/Tabs b/rt/html/Ticket/Elements/Tabs index 1a5058691..1eb2aa8cf 100644 --- a/rt/html/Ticket/Elements/Tabs +++ b/rt/html/Ticket/Elements/Tabs @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -119,9 +121,11 @@ my $ticket_page_tabs = { { title => loc('People'), path => "Ticket/ModifyPeople.html?id=" . $id, }, _E => { title => loc('Links'), path => "Ticket/ModifyLinks.html?id=" . $id, }, - _F => { title => loc('Jumbo'), - path => "Ticket/ModifyAll.html?id=" . $id, - separator => 1 + _F => { title => loc('Reminders'), + path => "Ticket/Reminders.html?id=" . $id, + separator => 1, }, + _X => { title => loc('Jumbo'), + path => "Ticket/ModifyAll.html?id=" . $id, }, }; @@ -136,76 +140,102 @@ foreach my $tab ( sort keys %{$ticket_page_tabs} ) { $tabs->{'this'}->{"subtabs"} = $ticket_page_tabs; $current_tab = "Ticket/Display.html?id=" . $id; +my %can = ( + ModifyTicket => $Ticket->CurrentUserHasRight('ModifyTicket'), +); - - - -if ( $Ticket->CurrentUserHasRight('ModifyTicket') - or $Ticket->CurrentUserHasRight('ReplyToTicket') ) { - $actions->{'A'} = { title => loc('Reply'), - path => "Ticket/Update.html?Action=Respond&id=" . $id, +if ( $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('ReplyToTicket') ) { + $actions->{'F'} = { + title => loc('Reply'), + path => "Ticket/Update.html?Action=Respond&id=" . $id, }; } -if ( $Ticket->CurrentUserHasRight('ModifyTicket') ) { +if ( $can{'ModifyTicket'} ) { if ( $Ticket->Status ne 'resolved' ) { - $actions->{'B'} = { - + $actions->{'G'} = { path => "Ticket/Update.html?Action=Comment&DefaultStatus=resolved&id=" . $id, title => loc('Resolve') }; } if ( $Ticket->Status ne 'open' ) { - $actions->{'C'} = { path => "Ticket/Display.html?Status=open&id=" . $id, + $actions->{'A'} = { path => "Ticket/Display.html?Status=open&id=" . $id, title => loc('Open it') }; } } if ( $Ticket->CurrentUserHasRight('OwnTicket') ) { - if ( $Ticket->OwnerObj->id == $RT::Nobody->id ) { - $actions->{'D'} = { path => "Ticket/Display.html?Action=Take&id=" . $id, - title => loc('Take') }; + if ( $Ticket->OwnerObj->Id == $RT::Nobody->id + and ( $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('TakeTicket') ) ) + { + $actions->{'B'} = { + path => "Ticket/Display.html?Action=Take&id=" . $id, + title => loc('Take'), + }; } - elsif ( $Ticket->OwnerObj->id != $session{CurrentUser}->id ) { - $actions->{'E'} = {path => "Ticket/Display.html?Action=Steal&id=" . $id, - title => loc('Steal') }; + elsif ( $Ticket->OwnerObj->id != $session{CurrentUser}->id + and ( $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('StealTicket') ) ) + { + $actions->{'C'} = { + path => "Ticket/Display.html?Action=Steal&id=" . $id, + title => loc('Steal'), + }; } } -if ( $Ticket->CurrentUserHasRight('ModifyTicket') - or $Ticket->CurrentUserHasRight('CommentOnTicket') ) { - $actions->{'F'} = { title => loc('Comment'), - path => "Ticket/Update.html?Action=Comment&id=" . $id, +if ( $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('CommentOnTicket') ) { + $actions->{'E'} = { + title => loc('Comment'), + path => "Ticket/Update.html?Action=Comment&id=" . $id, }; } } -my $args = "?" . $m->comp( +if ( (defined $actions->{A} || defined $actions->{B} || defined $actions->{C}) + && (defined $actions->{E} || defined $actions->{F} || defined $actions->{G}) ) { + + if (defined $actions->{C}) { $actions->{C}->{separator} = 1 } + elsif (defined $actions->{B}) { $actions->{B}->{separator} = 1 } + elsif (defined $actions->{A}) { $actions->{A}->{separator} = 1 } +} + +my $args; +$args= "?" . $m->comp( '/Elements/QueryString', Query => $ARGS{'Query'} || $session{'CurrentSearchHash'}->{'Query'}, Format => $ARGS{'Format'} || $session{'CurrentSearchHash'}->{'Format'}, OrderBy => $ARGS{'OrderBy'} || $session{'CurrentSearchHash'}->{'OrderBy'}, Order => $ARGS{'Order'} || $session{'CurrentSearchHash'}->{'Order'}, + Page => $ARGS{'Page'} || $session{'CurrentSearchHash'}->{'Page'}, Rows => $ARGS{'Rows'}, ) if ($ARGS{'Query'} or $session{'CurrentSearchHash'}->{'Query'}); $args ||= ''; $tabs->{"f"} = { path => "Search/Build.html?NewQuery=1", - title => loc('New Query')}; + title => loc('New Search')}; $tabs->{"g"} = { path => "Search/Build.html$args", - title => loc('Query Builder')}; + title => loc('Edit Search')}; $tabs->{"h"} = { path => "Search/Edit.html$args", title => loc('Advanced'), separator => 1 }; -if (defined $session{'tickets'} and $session{'tickets'}->Count) { +if ($args) { $tabs->{"i"} = { path => "Search/Results.html$args", title => loc('Show Results'), - separator => 1, - subtabs => $searchtabs }; + }; if ($current_tab =~ "Search/Results.html") { $current_tab = "Search/Results.html$args"; } + $tabs->{"j"} = { path => "Search/Bulk.html$args", + title => loc('Bulk Update'), + }; + if ($current_tab =~ "Search/Bulk.html") { + $current_tab = "Search/Bulk.html$args"; + } + foreach my $searchtab (keys %{$searchtabs}) { + ($searchtab =~ /^_/) ? $tabs->{"s".$searchtab} = $searchtabs->{$searchtab} : $tabs->{"z_".$searchtab} = $searchtabs->{$searchtab}; + } } + diff --git a/rt/html/Ticket/History.html b/rt/html/Ticket/History.html index a80cd0002..bf533b304 100644 --- a/rt/html/Ticket/History.html +++ b/rt/html/Ticket/History.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -48,7 +50,7 @@ Ticket => $Ticket, current_tab => 'Ticket/History.html?id='.$Ticket->id, Title => loc("Ticket History # [_1] [_2]", $Ticket->Id, $Ticket->Subject) &> -
+
<& /Ticket/Elements/ShowHistory , Ticket => $Ticket, @@ -58,6 +60,8 @@ AttachmentContent => $attachment_content &> +<& /Elements/Callback, _CallbackName => 'AfterShowHistory', Ticket => $Ticket, +current_tab => 'Ticket/History.html?id=' . $Ticket->id, %ARGS &> <%ARGS> $id => undef diff --git a/rt/html/Ticket/Modify.html b/rt/html/Ticket/Modify.html index a6c316141..488e0ad46 100644 --- a/rt/html/Ticket/Modify.html +++ b/rt/html/Ticket/Modify.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -49,13 +51,13 @@ Title => loc('Modify ticket #[_1]', $TicketObj->Id) &> <& /Elements/ListActions, actions => \@results &> -
- - -<& /Elements/TitleBoxStart, title => loc('Modify ticket #[_1]',$TicketObj->Id), color=> "#993333", width => "100%" &> + +<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &> + +<&| /Widgets/TitleBox, title => loc('Modify ticket #[_1]',$TicketObj->Id) &> <& Elements/EditBasics, TicketObj => $TicketObj &> <& Elements/EditCustomFields, TicketObj => $TicketObj &> -<& /Elements/TitleBoxEnd &> + <& /Elements/Submit, Label => loc('Save Changes'), Caption => loc("If you've updated anything above, be sure to"), color => "#993333" &>
@@ -65,12 +67,16 @@ my $TicketObj = LoadTicket($id); my $CustomFields = $TicketObj->QueueObj->TicketCustomFields(); # Now let callbacks have a chance at editing %ARGS -$m->comp('/Elements/Callback', TicketObj => $TicketObj, CustomFields => $CustomFields, %ARGS); +$m->comp('/Elements/Callback', TicketObj => $TicketObj, CustomFields => $CustomFields, ARGSRef => \%ARGS); my @results = ProcessTicketBasics(TicketObj => $TicketObj, ARGSRef => \%ARGS); my @cf_results = ProcessObjectCustomFieldUpdates(Object => $TicketObj, ARGSRef => \%ARGS); push (@results, @cf_results); +# undef so that TransactionBatch scrips run and update the ticket +$TicketObj = undef; +$TicketObj = LoadTicket($id); + # TODO: display the results, even if we can't display the ticket unless ($TicketObj->CurrentUserHasRight('ShowTicket')) { diff --git a/rt/html/Ticket/ModifyAll.html b/rt/html/Ticket/ModifyAll.html index 23cd93570..7f7ae30bd 100644 --- a/rt/html/Ticket/ModifyAll.html +++ b/rt/html/Ticket/ModifyAll.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -51,37 +53,37 @@ <& /Elements/ListActions, actions => \@results &> -
- + +<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &> + - -<& /Elements/TitleBoxStart, title => loc('Modify ticket # [_1]', $Ticket->Id), color=> "#993333", width => "100%" &> +<&| /Widgets/TitleBox, title => loc('Modify ticket # [_1]', $Ticket->Id) &> <& Elements/EditBasics, TicketObj => $Ticket &> <& Elements/EditCustomFields, TicketObj => $Ticket &> -<& /Elements/TitleBoxEnd &> + -
+
-<& /Elements/TitleBoxStart, title => loc('Dates'), width => "100%", color => "#663366" &> +<&| /Widgets/TitleBox, title => loc('Dates') &> <& Elements/EditDates, TicketObj => $Ticket &> -<& /Elements/TitleBoxEnd &> + -
+
-<& /Elements/TitleBoxStart, title => loc('People'),width => "100%", color=> "#333399" &> +<&| /Widgets/TitleBox, title => loc('People') &> <& Elements/EditPeople, Ticket => $Ticket, UserField => $UserField, UserString => $UserString, UserOp => $UserOp &> -<& /Elements/TitleBoxEnd &> + -
+
-<& /Elements/TitleBoxStart, title => loc('Links'), color => "#336633"&> +<&| /Widgets/TitleBox, title => loc('Links') &> <& /Elements/EditLinks, Object => $Ticket, Merge => 1 &> -<& /Elements/TitleBoxEnd &> + -
+
-<& /Elements/TitleBoxStart, title => loc('Update ticket') &> +<&| /Widgets/TitleBox, title => loc('Update ticket') &> @@ -98,29 +100,29 @@ - + % if (my $TxnCFs = $Ticket->TransactionCustomFields) { % while (my $CF = $TxnCFs->Next()) { - - - + + - + &><% $CF->FriendlyType %> + % } # end if while % } # end of if - +
<&|/l&>Update Type:
<&|/l&>Subject:
<% $CF->Name %>:<& /Elements/EditCustomField, +
<% $CF->Name %>:<& /Elements/EditCustomField, CustomField => $CF, NamePrefix => "Object-RT::Transaction--CustomField-" - &><% $CF->FriendlyType %>
<&|/l&>Attach:
<&|/l&>Content: <& /Elements/MessageBox, Name=>"UpdateContent", QuoteTransaction=>$ARGS{QuoteTransaction} &>
-<& /Elements/TitleBoxEnd &> + <& /Elements/Submit, @@ -145,9 +147,20 @@ $CanComment = 1 if ( $Ticket->CurrentUserHasRight('CommentOnTicket') or $Ticket->CurrentUserHasRight('ModifyTicket') ); +$m->comp('/Elements/Callback', TicketObj => $Ticket, ARGSRef => \%ARGS); my (@wresults, @results, @dresults, @lresults, @cf_results); unless ($OnlySearchForPeople) { + # There might be two owners. + if ( ref ($ARGS{'Owner'} )) { + my @owners =@{$ARGS{'Owner'}}; + delete $ARGS{'Owner'}; + foreach my $owner(@owners){ + $ARGS{'Owner'} = $owner unless ($Ticket->OwnerObj->id == $owner); + } + + } + @wresults = ProcessTicketWatchers( TicketObj => $Ticket, ARGSRef => \%ARGS); @cf_results = ProcessObjectCustomFieldUpdates( Object => $Ticket, ARGSRef => \%ARGS); @dresults = ProcessTicketDates( TicketObj => $Ticket, ARGSRef => \%ARGS); @@ -169,7 +182,7 @@ unless ($OnlySearchForPeople) { $ARGS{'UpdateAttachments'}->{ $subject } = $attachment; } - $ARGS{'UpdateContent'} =~ s/\r+\n/\n/g; + $ARGS{'UpdateContent'} =~ s/\r+\n/\n/g if $ARGS{'UpdateContent'}; if ($ARGS{'UpdateAttachments'} || ( $ARGS{'UpdateContent'} && $ARGS{'UpdateContent'} ne "-- \n" . $session{'CurrentUser'}->UserObj->Signature)) { @@ -182,6 +195,10 @@ push @results, @dresults; push @results, @lresults; push @results, @cf_results; +# undef so that TransactionBatch scrips run and update the ticket +$Ticket = undef; +$Ticket = LoadTicket($id); + # If they've gone and moved the ticket to somewhere they can't see, etc... # TODO: display the results, even if we can't display the ticket. diff --git a/rt/html/Ticket/ModifyDates.html b/rt/html/Ticket/ModifyDates.html index a4f68f2f5..d12619002 100644 --- a/rt/html/Ticket/ModifyDates.html +++ b/rt/html/Ticket/ModifyDates.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -51,19 +53,20 @@ <& /Elements/ListActions, actions => \@results &> - - -<& /Elements/TitleBoxStart, title => loc('Modify dates for ticket # [_1]', $TicketObj->Id), width => "100%", color => "#663366" &> - + +<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &> + +<&| /Widgets/TitleBox,title => loc('Modify dates for ticket # [_1]', $TicketObj->Id) &> <& Elements/EditDates, TicketObj => $TicketObj &> -<& /Elements/TitleBoxEnd &> -<& /Elements/Submit, Label => loc('Save Changes'), color => "#663366" &> + +<& /Elements/Submit, Label => loc('Save Changes') &> <%INIT> my $TicketObj = LoadTicket($id); +$m->comp('/Elements/Callback', TicketObj => $TicketObj, ARGSRef => \%ARGS); my @results = ProcessTicketDates( TicketObj => $TicketObj, ARGSRef => \%ARGS); diff --git a/rt/html/Ticket/ModifyLinks.html b/rt/html/Ticket/ModifyLinks.html index 150597d89..93c80db18 100644 --- a/rt/html/Ticket/ModifyLinks.html +++ b/rt/html/Ticket/ModifyLinks.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -52,21 +54,25 @@ <& /Elements/ListActions, actions => \@results &>
- + +<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &> +<&| /Widgets/TitleBox, title => loc('Edit Links') &> -<& /Elements/TitleBoxStart, title => loc('Edit Links'), color => "#336633"&> <& /Elements/EditLinks, Object => $Ticket, Merge => 1 &> -<& /Elements/TitleBoxEnd &> -<& /Elements/Submit, color => "#336633", Label => loc('Save Changes') &> + +<& /Elements/Submit, Label => loc('Save Changes') &>
<%INIT> - + my $Ticket = LoadTicket($id); -my @results = ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS); + +my @results; +$m->comp('/Elements/Callback', TicketObj => $Ticket, ARGSRef => \%ARGS, Results => \@results ); +push @results, ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS ); diff --git a/rt/html/Ticket/ModifyPeople.html b/rt/html/Ticket/ModifyPeople.html index 61cbe6c27..aa3811269 100644 --- a/rt/html/Ticket/ModifyPeople.html +++ b/rt/html/Ticket/ModifyPeople.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -51,11 +53,12 @@ <& /Elements/ListActions, actions => \@results &> -
- -<& /Elements/TitleBoxStart, title => loc('Modify people related to ticket #[_1]', $Ticket->Id), width => "100%", color=> "#333399" &> + + +<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &> +<&| /Widgets/TitleBox, title => loc('Modify people related to ticket #[_1]', $Ticket->Id), width => "100%", color=> "#333399" &> <& Elements/EditPeople, Ticket => $Ticket, UserField => $UserField, UserString => $UserString, UserOp => $UserOp, GroupString => $GroupString, GroupOp => $GroupOp, GroupField => $GroupField &> -<& /Elements/TitleBoxEnd &> + <& /Elements/Submit, Label => loc('Save Changes'), Caption => loc("If you've updated anything above, be sure to"), color => "#333399" &>
@@ -64,6 +67,7 @@ my (@results, @wresults); my $Ticket = LoadTicket($id); +$m->comp('/Elements/Callback', TicketObj => $Ticket, ARGSRef => \%ARGS); # if we're trying to search for watchers and nothing else unless ($OnlySearchForPeople or $OnlySearchForGroup) { diff --git a/rt/html/Ticket/ShowEmailRecord.html b/rt/html/Ticket/ShowEmailRecord.html index 38eddd3d2..f77406c77 100644 --- a/rt/html/Ticket/ShowEmailRecord.html +++ b/rt/html/Ticket/ShowEmailRecord.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -61,7 +63,7 @@ $Transaction => undef <& /Elements/Header, ShowBar => 0 &> -
+
 <%$AttachmentObj->Headers%>
 
 <%$AttachmentObj->Content%>
diff --git a/rt/html/Ticket/Update.html b/rt/html/Ticket/Update.html
index df739c9c7..3824873b5 100644
--- a/rt/html/Ticket/Update.html
+++ b/rt/html/Ticket/Update.html
@@ -2,7 +2,7 @@
 %# 
 %# COPYRIGHT:
 %#  
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC 
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC 
 %#                                          
 %# 
 %# (Except where explicitly superseded by other copyright notices)
@@ -22,7 +22,9 @@
 %# 
 %# You should have received a copy of the GNU General Public License
 %# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
 %# 
 %# 
 %# CONTRIBUTION SUBMISSION POLICY:
@@ -48,26 +50,28 @@
     Ticket => $TicketObj, 
     Title=> $title &>
 
-
- - - + +<& /Elements/Callback, _CallbackName => 'FormStart',ARGSRef =>\%ARGS &> + + + + -
- - + +<&|/l&>Worked: +<& /Elements/SelectTimeUnits, Name => 'UpdateTimeWorked'&> + % my $skip; <& /Elements/Callback, _CallbackName => 'BeforeUpdateType', skip => \$skip, %ARGS &> % if (!$skip) { -
+
% } - + - - + - % if (exists $session{'Attachments'}) { - - + - - + + + % } # end of if % if (my $TxnCFs = $TicketObj->TransactionCustomFields) { % while (my $CF = $TxnCFs->Next()) { - - - - + + + + % } # end if while % } # end of if -
<&|/l&>Status:
<&|/l&>Status: <& /Elements/SelectStatus, Name=>"Status", DefaultLabel => loc("[_1] (Unchanged)", loc($TicketObj->Status)), Default => $ARGS{'Status'} || ($TicketObj->Status eq $DefaultStatus ? undef : $DefaultStatus)&> <&|/l&>Owner: <& /Elements/SelectOwner, Name=>"Owner", DefaultLabel => loc("[_1] (Unchanged)", $TicketObj->OwnerObj->Name()), QueueObj => $TicketObj->QueueObj, TicketObj => $TicketObj, Default => $ARGS{'Owner'} &> -<&|/l&>Worked: <&|/l&>minutes
<&|/l&>Update Type:
<&|/l&>Update Type:
<&|/l&>Subject:
<&|/l&>Cc:
- -<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. Does not change who will receive future updates.) +
<&|/l&>Subject:
<&|/l&>Cc: " />
+ +<&|/l&>(Sends a carbon-copy of this update to a comma-delimited list of email addresses. Does not change who will receive future updates.)
<&|/l&>Bcc:
- -<&|/l&>(Sends a blind carbon-copy of this update to a comma-delimited list of email addresses. Does not change who will receive future updates.) +
<&|/l&>Bcc: " />
+ +<&|/l&>(Sends a blind carbon-copy of this update to a comma-delimited list of email addresses. Does not change who will receive future updates.)
+ <&|/l&>Attached file: - -<&|/l&>Check box to delete
+
+<&|/l&>Check box to delete
% foreach my $attach_name (keys %{$session{'Attachments'}}) { -<%$attach_name%>
+<%$attach_name%>
% } # end of foreach -
<% $CF->Name %>:<& /Elements/EditCustomField, CustomField => $CF, NamePrefix => - "Object-RT::Transaction--CustomField-" &><% $CF->FriendlyType %>
<% $CF->Name %>:<& /Elements/EditCustomField, CustomField => $CF, NamePrefix => + "Object-RT::Transaction--CustomField-" &><% $CF->FriendlyType %>
<&|/l&>Attach: +
<&|/l&>Attach:
<&|/l&>Message: <& /Elements/Callback, _CallbackName => 'BeforeMessageBox', %ARGS &> @@ -134,7 +138,7 @@ value="<% $ARGS{UpdateCc} %>">
% if ($TicketObj->CurrentUserHasRight('ShowOutgoingEmail')) { <& /Ticket/Elements/PreviewScrips, TicketObj => $TicketObj, %ARGS &> % } - + <%INIT> my $CanRespond = 0; my $CanComment = 0; -- cgit v1.2.1