summaryrefslogtreecommitdiff
path: root/rt/share/html/Ticket/Elements
diff options
context:
space:
mode:
Diffstat (limited to 'rt/share/html/Ticket/Elements')
-rw-r--r--rt/share/html/Ticket/Elements/AddCustomers52
-rw-r--r--rt/share/html/Ticket/Elements/EditCustomers63
-rw-r--r--rt/share/html/Ticket/Elements/ShowCustomers38
-rwxr-xr-xrt/share/html/Ticket/Elements/ShowSummary115
-rw-r--r--rt/share/html/Ticket/Elements/ShowTransactionAttachments17
-rwxr-xr-xrt/share/html/Ticket/Elements/Tabs28
6 files changed, 233 insertions, 80 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/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/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/ShowSummary b/rt/share/html/Ticket/Elements/ShowSummary
index 21c53c594..28a296579 100755
--- a/rt/share/html/Ticket/Elements/ShowSummary
+++ b/rt/share/html/Ticket/Elements/ShowSummary
@@ -45,82 +45,79 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<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 &>
- </&>
+ <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 &>
+ </&>
% 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 &>
+ </&>
- <&| /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 &>
- </&>
+ <&| /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 &>
+ </&>
- <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &>
+ <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &>
- <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &>
+ <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &>
% $m->callback( %ARGS, CallbackName => 'LeftColumn' );
-
- </td>
- <td valign="top" class="boxcontainer">
-
-% $m->callback( %ARGS, CallbackName => 'RightColumnTop' );
-
+ </td>
+ <td valign="top" class="boxcontainer">
% 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/ShowTransactionAttachments b/rt/share/html/Ticket/Elements/ShowTransactionAttachments
index a8cdfc11c..51c4aa47c 100644
--- a/rt/share/html/Ticket/Elements/ShowTransactionAttachments
+++ b/rt/share/html/Ticket/Elements/ShowTransactionAttachments
@@ -67,10 +67,7 @@ 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>
% }
-
-% $m->callback(CallbackName => 'AfterDownloadLinks', ARGSRef => \%ARGS, Ticket => $Ticket, Transaction => $Transaction, Attachment => $message);
-
-<br />
+<br />
<span class="downloadcontenttype"><% $message->ContentType %> <% $size_to_str->( $size ) %></span>
</div>
% }
@@ -79,7 +76,7 @@ foreach my $message ( grep $_->__Value('Parent') == $Parent, @$Attachments ) {
% if ( scalar ( grep $_->__Value('Parent') == $message->id, @$Attachments ) ) {
<div class="messageattachments">
% } else {
-<div class="messagebody">
+<div class="messagebody <% RT->Config->Get('PlainTextMono', $session{'CurrentUser'}) ? ' plain-text-white-space' : ''%>">
% }
<%PERL>
@@ -210,8 +207,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 a9e697a9f..a99f2190f 100755
--- a/rt/share/html/Ticket/Elements/Tabs
+++ b/rt/share/html/Ticket/Elements/Tabs
@@ -75,13 +75,11 @@ if ($Ticket) {
# Don't display prev links if we're on the first ticket
if ( $item_map->{ $Ticket->Id }->{prev} ) {
- if ( $item_map->{first} ) {
- $searchtabs->{'_a'} = {
- class => "nav",
- path => "Ticket/Display.html?id=" . $item_map->{first},
- title => '<< ' . loc('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="
@@ -98,13 +96,11 @@ if ($Ticket) {
. $item_map->{ $Ticket->Id }->{next},
title => loc('Next') . ' >'
};
- if ( $item_map->{last} ) {
- $searchtabs->{'e'} = {
- class => "nav",
- path => "Ticket/Display.html?id=" . $item_map->{last},
- title => loc('Last') . ' >>'
- };
- }
+ $searchtabs->{'e'} = {
+ class => "nav",
+ path => "Ticket/Display.html?id=" . $item_map->{last},
+ title => loc('Last') . ' >>'
+ };
}
}
@@ -142,6 +138,10 @@ if ($Ticket) {
title => loc('Links'),
path => "Ticket/ModifyLinks.html?id=" . $id,
},
+ _Eb=> {
+ title => loc('Customers'),
+ path => "Ticket/ModifyCustomers.html?id=" . $id,
+ },
_X => {
title => loc('Jumbo'),
path => "Ticket/ModifyAll.html?id=" . $id,