diff options
Diffstat (limited to 'rt/share/html/Ticket/Elements')
20 files changed, 349 insertions, 79 deletions
diff --git a/rt/share/html/Ticket/Elements/AddCustomers b/rt/share/html/Ticket/Elements/AddCustomers new file mode 100644 index 000000000..e04c07702 --- /dev/null +++ b/rt/share/html/Ticket/Elements/AddCustomers @@ -0,0 +1,52 @@ +%# Copyright (c) 2004 Ivan Kohler <ivan-rt@420.am> +%# Copyright (c) 2008 Freeside Internet Services, Inc. +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +<BR> +<%$msg%><br> + +% if (@Customers) { + +<br><i>(Check box to link)<i> +<table> +% foreach my $customer (@Customers) { +<tr> + <td> + <input type="checkbox" name="Ticket-AddCustomer-<% $customer->{'custnum'} %>" VALUE="1" <% scalar(@Customers) == 1 ? 'CHECKED' : '' %>> + <A HREF="<%$freeside_url%>/view/cust_main.cgi?<% $customer->{'custnum'} %>"><% &RT::URI::freeside::small_custview($customer->{'custnum'}, &RT::URI::freeside::FreesideGetConfig('countrydefault'), 1) |n %> + </td> +</tr> +% } +</table> + +% } + +<%INIT> +my ($msg); + +my $freeside_url = &RT::URI::freeside::FreesideURL(); + +my @Customers = (); +if ( $CustomerString ) { + @Customers = &RT::URI::freeside::smart_search( 'search' => $CustomerString ); +} + +my @Services = (); +if ($ServiceString) { + @Services = (); #service_search(); +} + +</%INIT> + +<%ARGS> +$CustomerString => undef +$ServiceString => undef +</%ARGS> diff --git a/rt/share/html/Ticket/Elements/BulkLinks b/rt/share/html/Ticket/Elements/BulkLinks index 7f87cefb8..d04eba426 100755 --- a/rt/share/html/Ticket/Elements/BulkLinks +++ b/rt/share/html/Ticket/Elements/BulkLinks @@ -163,7 +163,7 @@ $Tickets => undef <%INIT> my %hash; if ( $Tickets && $Tickets->Count ) { - my $first_ticket = $Tickets->Next; + my $first_ticket = $Tickets->Next or last; #avoid errors on bulk delete # we only show current links that eixst on all the tickets for my $type ( qw/DependsOn DependedOnBy Members MemberOf RefersTo ReferredToBy/ ) { diff --git a/rt/share/html/Ticket/Elements/CheckMandatoryFields b/rt/share/html/Ticket/Elements/CheckMandatoryFields new file mode 100644 index 000000000..3d0324f98 --- /dev/null +++ b/rt/share/html/Ticket/Elements/CheckMandatoryFields @@ -0,0 +1,9 @@ +<%init> + +my $TicketObj = $ARGS{'Ticket'} or return (); +my $ARGSRef = $ARGS{'ARGSRef'}; +my @fields = grep { $_->Required } + @{ $TicketObj->CustomFields->ItemsArrayRef }; +return grep { !defined($TicketObj->FirstCustomFieldValue($_->id)) } @fields; + +</%init> diff --git a/rt/share/html/Ticket/Elements/EditCustomFields b/rt/share/html/Ticket/Elements/EditCustomFields index c3a44ee22..5478c7871 100755 --- a/rt/share/html/Ticket/Elements/EditCustomFields +++ b/rt/share/html/Ticket/Elements/EditCustomFields @@ -45,6 +45,7 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} +% $m->callback( %ARGS, CallbackName => 'BeforeCustomFields' ); <table> % my $i = 0; % while ( my $CustomField = $CustomFields->Next ) { @@ -85,6 +86,7 @@ % } </table> +% $m->callback( %ARGS, CallbackName => 'AfterCustomFields', TicketObj => $TicketObj, QueueObj => $QueueObj ); <%INIT> my $CustomFields; diff --git a/rt/share/html/Ticket/Elements/EditCustomers b/rt/share/html/Ticket/Elements/EditCustomers new file mode 100644 index 000000000..0ba6e447b --- /dev/null +++ b/rt/share/html/Ticket/Elements/EditCustomers @@ -0,0 +1,63 @@ +%# Copyright (c) 2004 Ivan Kohler <ivan-rt@420.am> +%# Copyright (c) 2008 Freeside Internet Services, Inc. +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +<TABLE width=100%> + <TR> + <TD VALIGN=TOP WIDTH=50%> + <h3><&|/l&>Current Customers</&></h3> + +<table> + <tr> + <td><i><&|/l&>(Check box to disassociate)</&></i></td> + </tr> + <tr> + <td class="value"> +% foreach my $link ( @{ $Ticket->Customers->ItemsArrayRef } ) { + + <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>"> +%# <& ShowLink, URI => $link->TargetURI &><br> + <A HREF="<% $link->TargetURI->Resolver->HREF %>"><% $link->TargetURI->Resolver->AsStringLong |n %></A> + <BR> +% } + </td> + </tr> +</table> + +</TD> + +<TD VALIGN=TOP> +<h3><&|/l&>New Customer Links</&></h3> +<&|/l&>Find customer</&><BR> +<input name="CustomerString"> +<input type=submit name="OnlySearchForCustomers" value="<&|/l&>Go!</&>"> +<br><i>cust #, name, company or phone</i> +<BR> +%#<BR> +%#<&|/l&>Find service</&><BR> +%#<input name="ServiceString"> +%#<input type=submit name="OnlySearchForServices" value="<&|/l&>Go!</&>"> +%#<br><i>username, username@domain, domain, or IP address</i> +%#<BR> + +<& AddCustomers, Ticket => $Ticket, + CustomerString => $CustomerString, + ServiceString => $ServiceString, &> + +</TD> +</TR> +</TABLE> + +<%ARGS> +$CustomerString => undef +$ServiceString => undef +$Ticket => undef +</%ARGS> diff --git a/rt/share/html/Ticket/Elements/EditDates b/rt/share/html/Ticket/Elements/EditDates index fc17cdbd4..e6f724f7b 100755 --- a/rt/share/html/Ticket/Elements/EditDates +++ b/rt/share/html/Ticket/Elements/EditDates @@ -70,6 +70,7 @@ <& /Elements/SelectDate, menu_prefix => 'Due', current => 0 &> (<% $TicketObj->DueObj->AsString %>) </td> </tr> +% $m->callback( %ARGS, CallbackName => 'EndOfList', Ticket => $TicketObj ); </table> <%ARGS> $TicketObj => undef diff --git a/rt/share/html/Ticket/Elements/EditTransactionCustomFields b/rt/share/html/Ticket/Elements/EditTransactionCustomFields index 8bf939db6..a58dded9b 100644 --- a/rt/share/html/Ticket/Elements/EditTransactionCustomFields +++ b/rt/share/html/Ticket/Elements/EditTransactionCustomFields @@ -45,6 +45,7 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} +% $m->callback( CallbackName => 'BeforeTransactionCustomFields', TicketObj => $TicketObj, QueueObj => $QueueObj, NamePrefix => $NamePrefix ); % if ($CustomFields->Count) { % while (my $CF = $CustomFields->Next()) { % next unless $CF->CurrentUserHasRight('ModifyCustomField'); @@ -60,6 +61,7 @@ </td></tr> % } % } +% $m->callback( CallbackName => 'AfterTransactionCustomFields', TicketObj => $TicketObj, QueueObj => $QueueObj, NamePrefix => $NamePrefix ); <%INIT> my $CustomFields; diff --git a/rt/share/html/Ticket/Elements/PreviewScrips b/rt/share/html/Ticket/Elements/PreviewScrips index 7480adecf..d376f5d08 100755 --- a/rt/share/html/Ticket/Elements/PreviewScrips +++ b/rt/share/html/Ticket/Elements/PreviewScrips @@ -69,7 +69,11 @@ my @non_recipients = @{ $squelch{'EmailAddresses'} }; %my @addresses = $scrip->ActionObj->Action->$type(); <ul> %foreach my $addr (@addresses) { -<li> <b><%loc($type)%></b>: <input type="checkbox" class="checkbox" name="Ticket-<%$TicketObj->id%>-SquelchMailTo" value="<%$addr->address%>" /> <%$addr->address%> +<li> + <b><%loc($type)%></b>: <input type="checkbox" class="checkbox" name="Ticket-<%$TicketObj->id%>-SquelchMailTo" value="<%$addr->address%>" /> <%$addr->address%> + +% $m->callback(CallbackName => 'AfterAddress', Ticket => $TicketObj, Address => $addr, Type => $type); +</li> % } </ul> % } diff --git a/rt/share/html/Ticket/Elements/ShowAttachments b/rt/share/html/Ticket/Elements/ShowAttachments index 72298d79f..ab0d92112 100755 --- a/rt/share/html/Ticket/Elements/ShowAttachments +++ b/rt/share/html/Ticket/Elements/ShowAttachments @@ -61,11 +61,22 @@ my $size = $rev->ContentLength; if ($size) { - if ($size > 1024) { - $size = int($size/102.4)/10 . "k"; + my $kb = int($size/102.4) / 10; + my $units = RT->Config->Get('AttachmentUnits'); + + if (!defined($units)) { + if ($size > 1024) { + $size = $kb . "k"; + } + else { + $size = $size . "b"; + } + } + elsif ($units eq 'k') { + $size = $kb . "k"; } else { - $size = $size ."b"; + $size = $size . "b"; } </%PERL> diff --git a/rt/share/html/Ticket/Elements/ShowCustomers b/rt/share/html/Ticket/Elements/ShowCustomers new file mode 100644 index 000000000..3acf92dd4 --- /dev/null +++ b/rt/share/html/Ticket/Elements/ShowCustomers @@ -0,0 +1,38 @@ +%# Copyright (c) 2004 Ivan Kohler <ivan-rt@420.am> +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +<table> +% my $cust = 0; +% foreach my $custResolver ( map { $_->TargetURI->Resolver } +% @{ $Ticket->Customers->ItemsArrayRef } +% ) +% { +% $cust++; +% my $cust_main = ''; + <tr> + <td class="value"> + <A HREF="<% $custResolver->HREF %>"><% $custResolver->AsStringLong |n %></A> + </td> + </tr> +% } +% unless ( $cust ) { + <tr> + <td class="labeltop"> + <i>(none)<i> + </td> + </tr> + +% } +</table> +<%ARGS> +$Ticket => undef +</%ARGS> + diff --git a/rt/share/html/Ticket/Elements/ShowDates b/rt/share/html/Ticket/Elements/ShowDates index d309907dc..07140c2e4 100755 --- a/rt/share/html/Ticket/Elements/ShowDates +++ b/rt/share/html/Ticket/Elements/ShowDates @@ -84,6 +84,7 @@ <td class="value date updated"><% $UpdatedString | h %></td> % } </tr> +% $m->callback( %ARGS, CallbackName => 'EndOfList', TicketObj => $Ticket ); </table> <%ARGS> $Ticket => undef diff --git a/rt/share/html/Ticket/Elements/ShowGroupMembers b/rt/share/html/Ticket/Elements/ShowGroupMembers index a15f850b4..6597cc543 100644 --- a/rt/share/html/Ticket/Elements/ShowGroupMembers +++ b/rt/share/html/Ticket/Elements/ShowGroupMembers @@ -50,7 +50,9 @@ % my $Users = $Group->UserMembersObj( Recursively => $Recursively ); % while ( my $user = $Users->Next ) { <& /Elements/ShowUser, User => $user, Ticket => $Ticket &> -<& /Elements/ShowUserEmailFrequency, User => $user, Ticket => $Ticket &><br /> +<& /Elements/ShowUserEmailFrequency, User => $user, Ticket => $Ticket &> +% $m->callback( User => $user, Ticket => $Ticket, %ARGS, CallbackName => 'AboutThisUser' ); +<br /> % } % my $Groups = $Group->GroupMembersObj( Recursively => $Recursively ); % $Groups->LimitToUserDefinedGroups; diff --git a/rt/share/html/Ticket/Elements/ShowMembers_Checklist b/rt/share/html/Ticket/Elements/ShowMembers_Checklist new file mode 100644 index 000000000..68fb3b2c5 --- /dev/null +++ b/rt/share/html/Ticket/Elements/ShowMembers_Checklist @@ -0,0 +1,29 @@ + +<style type="text/css"> +ul.checklist { + list-style-type: none +} +</style> + +<ul class="checklist"> +% while (my $link = $members->Next) { +<li><& /Elements/ShowLink_Checklist, URI => $link->BaseURI &><br /> +% if ($depth < 8) { #why only 8? +<& /Ticket/Elements/ShowMembers_Checklist, Ticket => $link->BaseObj, depth => ($depth+1) &> +% } +</li> +% } +</ul> + +<%INIT> + +return unless $Ticket; +my $members = $Ticket->Members; +return unless $members->Count; + +</%INIT> + +<%ARGS> +$Ticket => undef +$depth => 1 +</%ARGS> diff --git a/rt/share/html/Ticket/Elements/ShowMessageStanza b/rt/share/html/Ticket/Elements/ShowMessageStanza index 0d4fe6154..9d2f21120 100755 --- a/rt/share/html/Ticket/Elements/ShowMessageStanza +++ b/rt/share/html/Ticket/Elements/ShowMessageStanza @@ -48,7 +48,8 @@ <%perl> if ( ref $Message ) { $m->out('<pre>') if $plain_text_pre && !$Depth && !$plain_text_mono; - $m->out( qq{<div class="message-stanza-depth-$Depth">} ); + $m->out( qq{<div class="message-stanza-depth-$Depth } .($plain_text_mono ? "plain-text-white-space" : "") .qq{">} ); + my @stack; my $para = ''; diff --git a/rt/share/html/Ticket/Elements/ShowPeople b/rt/share/html/Ticket/Elements/ShowPeople index ddd2e3c6f..1f0e5319e 100755 --- a/rt/share/html/Ticket/Elements/ShowPeople +++ b/rt/share/html/Ticket/Elements/ShowPeople @@ -50,7 +50,9 @@ <td class="label"><&|/l&>Owner</&>:</td> % my $owner = $Ticket->OwnerObj; <td class="value"><& /Elements/ShowUser, User => $owner, Ticket => $Ticket &> - <& /Elements/ShowUserEmailFrequency, User => $owner, Ticket => $Ticket &></td> + <& /Elements/ShowUserEmailFrequency, User => $owner, Ticket => $Ticket &> +% $m->callback( User => $owner, Ticket => $Ticket, %ARGS, CallbackName => 'AboutThisUser' ); + </td> </tr> <tr> <td class="labeltop"><&|/l&>Requestors</&>:</td> diff --git a/rt/share/html/Ticket/Elements/ShowSummary b/rt/share/html/Ticket/Elements/ShowSummary index 4c2d54e5e..295ac6d56 100755 --- a/rt/share/html/Ticket/Elements/ShowSummary +++ b/rt/share/html/Ticket/Elements/ShowSummary @@ -45,73 +45,89 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - <table width="100%" class="ticket-summary"> - <tr> - <td valign="top" class="boxcontainer"> - <&| /Widgets/TitleBox, title => loc('The Basics'), - title_href => RT->Config->Get('WebPath')."/Ticket/Modify.html?id=".$Ticket->Id, - class => 'ticket-info-basics' &> - <& /Ticket/Elements/ShowBasics, Ticket => $Ticket &> - </&> +<table width="100%" class="ticket-summary"> +<tr> + <td valign="top" class="boxcontainer"> +% $m->callback( %ARGS, CallbackName => 'LeftColumnTop' ); + + <&| /Widgets/TitleBox, title => loc('The Basics'), + title_href => RT->Config->Get('WebPath')."/Ticket/Modify.html?id=".$Ticket->Id, + class => 'ticket-info-basics', + &> + <& /Ticket/Elements/ShowBasics, Ticket => $Ticket &> + </&> % if ($Ticket->CustomFields->First) { - <&| /Widgets/TitleBox, title => loc('Custom Fields'), - title_href => RT->Config->Get('WebPath')."/Ticket/Modify.html?id=".$Ticket->Id, - class => 'ticket-info-cfs' &> - <& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &> - </&> + <&| /Widgets/TitleBox, title => loc('Custom Fields'), + title_href => RT->Config->Get('WebPath')."/Ticket/Modify.html?id=".$Ticket->Id, + class => 'ticket-info-cfs', + &> + <& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &> + </&> % } - <&| /Widgets/TitleBox, title => loc('People'), - title_href => RT->Config->Get('WebPath')."/Ticket/ModifyPeople.html?id=".$Ticket->Id, - class => 'ticket-info-people' &> - <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &> - </&> - <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &> + <&| /Widgets/TitleBox, title => loc('Customers'), + title_href => RT->Config->Get('WebPath')."/Ticket/ModifyCustomers.html?id=".$Ticket->Id, + class => 'ticket-info-customers' + &> + <& /Ticket/Elements/ShowCustomers, Ticket => $Ticket &> + </&> + + <&| /Widgets/TitleBox, title => loc('People'), + title_href => RT->Config->Get('WebPath')."/Ticket/ModifyPeople.html?id=".$Ticket->Id, + class => 'ticket-info-people', + &> + <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &> + </&> - <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &> + <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &> + + <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &> % $m->callback( %ARGS, CallbackName => 'LeftColumn' ); - </td> - <td valign="top" class="boxcontainer"> + + </td> + <td valign="top" class="boxcontainer"> + +% $m->callback( %ARGS, CallbackName => 'RightColumnTop' ); + % if ( RT->Config->Get('EnableReminders') ) { - <&|/Widgets/TitleBox, title => loc("Reminders"), - title_href => RT->Config->Get('WebPath')."/Ticket/Reminders.html?id=".$Ticket->Id, - class => 'ticket-info-reminders' &> - <table> - <tr> - <td> + <&|/Widgets/TitleBox, title => loc("Reminders"), + title_href => RT->Config->Get('WebPath')."/Ticket/Reminders.html?id=".$Ticket->Id, + class => 'ticket-info-reminders', + &> + <table><tr><td> <form action="<%RT->Config->Get('WebPath')%>/Ticket/Display.html" method="post"> - <& /Ticket/Elements/Reminders, Ticket => $Ticket, ShowCompleted => 0 &> - <div align="right"><input type="submit" class="button" value="<&|/l&>Save</&>" /></div> + <& /Ticket/Elements/Reminders, Ticket => $Ticket, ShowCompleted => 0 &> + <div align="right"><input type="submit" class="button" value="<&|/l&>Save</&>" /></div> </form> - </td> - </tr> - </table> - </&> + </td></tr></table> + </&> % } - <&| /Widgets/TitleBox, title => loc("Dates"), - title_href => RT->Config->Get('WebPath')."/Ticket/ModifyDates.html?id=".$Ticket->Id, - class => 'ticket-info-dates' &> - <& /Ticket/Elements/ShowDates, Ticket => $Ticket &> - </&> + + <&| /Widgets/TitleBox, title => loc("Dates"), + title_href => RT->Config->Get('WebPath')."/Ticket/ModifyDates.html?id=".$Ticket->Id, + class => 'ticket-info-dates', + &> + <& /Ticket/Elements/ShowDates, Ticket => $Ticket &> + </&> + % my (@extra); % push @extra, titleright_raw => '<a href="'. RT->Config->Get('WebPath'). '/Ticket/Graphs/index.html?id='.$Ticket->id.'">'.loc('Graph').'</a>' unless RT->Config->Get('DisableGraphViz'); - <&| /Widgets/TitleBox, title => loc('Links'), - title_href => RT->Config->Get('WebPath')."/Ticket/ModifyLinks.html?id=".$Ticket->Id, - class => 'ticket-info-links', @extra &> - <& /Elements/ShowLinks, Ticket => $Ticket &> - </&> + <&| /Widgets/TitleBox, title => loc('Links'), + title_href => RT->Config->Get('WebPath')."/Ticket/ModifyLinks.html?id=".$Ticket->Id, + class => 'ticket-info-links', + @extra, + &> + <& /Elements/ShowLinks, Ticket => $Ticket &> + </&> + % $m->callback( %ARGS, CallbackName => 'RightColumn' ); - </td> - </tr> - </table> + </td> +</tr> +</table> <%ARGS> $Ticket => undef $Attachments => undef </%ARGS> - - - - diff --git a/rt/share/html/Ticket/Elements/ShowTransaction b/rt/share/html/Ticket/Elements/ShowTransaction index a533323a9..6ccbb0c89 100755 --- a/rt/share/html/Ticket/Elements/ShowTransaction +++ b/rt/share/html/Ticket/Elements/ShowTransaction @@ -55,11 +55,13 @@ <a name="txn-<% $Transaction->Id %>" href="<% $DisplayPath %>#txn-<% $Transaction->Id %>">#</a> <% $LastTransaction ? '<a id="lasttrans" name="lasttrans"></a>' : ''|n %> </span> +% $m->callback( Transaction => $Transaction, %ARGS, CallbackName => 'AfterAnchor' ); <span class="date"><% $transdate|n %></span> % my $desc = $Transaction->BriefDescription; % $m->callback( text => \$desc, Transaction => $Transaction, %ARGS, CallbackName => 'ModifyDisplay' ); <span class="description"> <& /Elements/ShowUser, User => $Transaction->CreatorObj &> - <% $TicketString %> <% $desc %> +% $m->callback( Transaction => $Transaction, %ARGS, CallbackName => 'AfterDescription' ); </span> % $m->callback( TimeTaken => \$TimeTaken, Transaction => $Transaction, %ARGS, CallbackName => 'ModifyTimeTaken' ); <span class="time-taken"><% $TimeTaken %></span> diff --git a/rt/share/html/Ticket/Elements/ShowTransactionAttachments b/rt/share/html/Ticket/Elements/ShowTransactionAttachments index 9c40b28da..95ffcbd64 100644 --- a/rt/share/html/Ticket/Elements/ShowTransactionAttachments +++ b/rt/share/html/Ticket/Elements/ShowTransactionAttachments @@ -67,7 +67,10 @@ foreach my $message ( grep $_->__Value('Parent') == $Parent, @$Attachments ) { % if ( $DownloadableHeaders && !$message->Filename && $message->ContentType =~ /text/ ) { / <a href="<% $AttachPath %>/WithHeaders/<% $message->Id %>"><% loc('with headers') %></a> % } -<br /> + +% $m->callback(CallbackName => 'AfterDownloadLinks', ARGSRef => \%ARGS, Ticket => $Ticket, Transaction => $Transaction, Attachment => $message); + +<br /> <span class="downloadcontenttype"><% $message->ContentType %> <% $size_to_str->( $size ) %></span> </div> % } @@ -76,7 +79,7 @@ foreach my $message ( grep $_->__Value('Parent') == $Parent, @$Attachments ) { % if ( scalar ( grep $_->__Value('Parent') == $message->id, @$Attachments ) ) { <div class="messageattachments"> % } else { -<div class="messagebody <% RT->Config->Get('PlainTextMono', $session{'CurrentUser'}) ? ' plain-text-white-space' : ''%>"> +<div class="messagebody"> % } <%PERL> @@ -207,8 +210,14 @@ my $render_attachment = sub { # if it's a text/plain show the body elsif ( $message->ContentType =~ m{^(text|message)}i ) { - eval { require Text::Quoted; $content = Text::Quoted::extract($content); }; - if ($@) { $RT::Logger->warning( "Text::Quoted failed: $@" ) } + #don't want to use this even if it is installed, its + #segfaulting on weird characters and silently truncating the + #ticket history output + #see: + # r44838@pinglin: jesse | 2006-11-14 15:53:18 -0500 + # * Move Text::Quoted back to being a run-time require. So that it's possible to turn off the feature if it causes your perl to segfault. (Text::Tabs is...not robust in the face of perl bugs) + #eval { require Text::Quoted; $content = Text::Quoted::extract($content); }; + #if ($@) { $RT::Logger->warning( "Text::Quoted failed: $@" ) } $m->comp( 'ShowMessageStanza', diff --git a/rt/share/html/Ticket/Elements/Tabs b/rt/share/html/Ticket/Elements/Tabs index 7deb8c18d..6943a2703 100755 --- a/rt/share/html/Ticket/Elements/Tabs +++ b/rt/share/html/Ticket/Elements/Tabs @@ -75,11 +75,13 @@ if ($Ticket) { # Don't display prev links if we're on the first ticket if ( $item_map->{ $Ticket->Id }->{prev} ) { - $searchtabs->{'_a'} = { - class => "nav", - path => "Ticket/Display.html?id=" . $item_map->{first}, - title => '<< ' . loc('First') - }; + if ( $item_map->{first} ) { + $searchtabs->{'_a'} = { + class => "nav", + path => "Ticket/Display.html?id=" . $item_map->{first}, + title => '<< ' . loc('First') + }; + } $searchtabs->{"_b"} = { class => "nav", path => "Ticket/Display.html?id=" @@ -96,11 +98,13 @@ if ($Ticket) { . $item_map->{ $Ticket->Id }->{next}, title => loc('Next') . ' >' }; - $searchtabs->{'e'} = { - class => "nav", - path => "Ticket/Display.html?id=" . $item_map->{last}, - title => loc('Last') . ' >>' - }; + if ( $item_map->{last} ) { + $searchtabs->{'e'} = { + class => "nav", + path => "Ticket/Display.html?id=" . $item_map->{last}, + title => loc('Last') . ' >>' + }; + } } } @@ -138,6 +142,14 @@ if ($Ticket) { title => loc('Links'), path => "Ticket/ModifyLinks.html?id=" . $id, }, + _Ea => { + title => loc('Checklist'), + path => "Ticket/Checklist.html?id=" . $id, + }, + _Eb=> { + title => loc('Customers'), + path => "Ticket/ModifyCustomers.html?id=" . $id, + }, _X => { title => loc('Jumbo'), path => "Ticket/ModifyAll.html?id=" . $id, diff --git a/rt/share/html/Ticket/Elements/UpdateCc b/rt/share/html/Ticket/Elements/UpdateCc index 2538c82df..2559e5652 100644 --- a/rt/share/html/Ticket/Elements/UpdateCc +++ b/rt/share/html/Ticket/Elements/UpdateCc @@ -49,24 +49,32 @@ <input type="hidden" id="UpdateIgnoreAddressCheckboxes" name="UpdateIgnoreAddressCheckboxes" value="0"> <br /> -%foreach my $addr ( keys %txn_addresses) { -% next if ( grep {$addr eq $_} @req_addresses ); +%if (scalar @one_time_Ccs) { +<i class="label">(<&|/l&>check to add</&>)</i> +%} +%foreach my $addr ( @one_time_Ccs ) { <input id="UpdateCc-<%$addr%>" name="UpdateCc-<%$addr%>" type="checkbox" - onClick="checkboxToInput('UpdateCc', 'UpdateCc-<%$addr%>','<%$txn_addresses{$addr}->format%>' ); $(UpdateIgnoreAddressCheckboxes).value=1" +% my $clean_addr = $txn_addresses{$addr}->format; +% $clean_addr =~ s/'/\\'/g; + onClick="checkboxToInput('UpdateCc', 'UpdateCc-<%$addr%>','<%$clean_addr%>' ); $(UpdateIgnoreAddressCheckboxes).value=1" <% $ARGS{'UpdateCc-'.$addr} ? 'checked="checked"' : ''%> > <& /Elements/ShowUser, Address => $txn_addresses{$addr}&> %} </td></tr> <tr><td class="label"><&|/l&>One-time Bcc</&>:</td><td><& /Elements/EmailInput, Name => 'UpdateBcc', Size => '60', Default => $ARGS{UpdateBcc} &><br /> -%foreach my $addr ( keys %txn_addresses) { -% next if ( grep {$addr eq $_} @req_addresses ); +%if (scalar @one_time_Ccs) { +<i class="label">(<&|/l&>check to add</&>)</i> +%} +%foreach my $addr ( @one_time_Ccs ) { <input id="UpdateBcc-<%$addr%>" name="UpdateBcc-<%$addr%>" type="checkbox" - onClick="checkboxToInput('UpdateBcc', 'UpdateBcc-<%$addr%>','<%$txn_addresses{$addr}->format%>' ); $(UpdateIgnoreAddressCheckboxes).value=1" +% my $clean_addr = $txn_addresses{$addr}->format; +% $clean_addr =~ s/'/\\'/g; + onClick="checkboxToInput('UpdateBcc', 'UpdateBcc-<%$addr%>','<%$clean_addr%>' ); $(UpdateIgnoreAddressCheckboxes).value=1" <% $ARGS{'UpdateBcc-'.$addr} ? 'checked="checked"' : ''%>> <& /Elements/ShowUser, Address => $txn_addresses{$addr}&> %} @@ -77,4 +85,10 @@ $TicketObj <%init> my %txn_addresses = %{$TicketObj->TransactionAddresses}; my @req_addresses = split /,/, $TicketObj->RequestorAddresses; +my @one_time_Ccs; + +foreach my $addr ( keys %txn_addresses) { + next if ( grep {$addr eq $_} @req_addresses ); + push @one_time_Ccs,$addr; +} </%init> |