[freeside-commits] freeside/rt/share/html/Ticket/Elements AddCustomers, NONE, 1.1 EditCustomers, NONE, 1.1 ShowCustomers, NONE, 1.1 ShowSummary, 1.1.1.1, 1.2 ShowTransactionAttachments, 1.1.1.1, 1.2 Tabs, 1.1.1.1, 1.2

Ivan,,, ivan at wavetail.420.am
Sun Jan 3 00:04:35 PST 2010


Update of /home/cvs/cvsroot/freeside/rt/share/html/Ticket/Elements
In directory wavetail.420.am:/tmp/cvs-serv6285/Ticket/Elements

Modified Files:
	ShowSummary ShowTransactionAttachments Tabs 
Added Files:
	AddCustomers EditCustomers ShowCustomers 
Log Message:
port skinning, customer display/edit from RT 3.6 integration to RT 3.8 integration

Index: Tabs
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/share/html/Ticket/Elements/Tabs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- Tabs	31 Dec 2009 13:16:28 -0000	1.1.1.1
+++ Tabs	3 Jan 2010 08:04:33 -0000	1.2
@@ -138,6 +138,10 @@
             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,

--- NEW FILE: EditCustomers ---
%# Copyright (c) 2004 Ivan Kohler <ivan-rt at 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 at 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>

--- NEW FILE: ShowCustomers ---
%# Copyright (c) 2004 Ivan Kohler <ivan-rt at 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>


--- NEW FILE: AddCustomers ---
%# Copyright (c) 2004 Ivan Kohler <ivan-rt at 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>

Index: ShowSummary
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/share/html/Ticket/Elements/ShowSummary,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- ShowSummary	31 Dec 2009 13:16:27 -0000	1.1.1.1
+++ ShowSummary	3 Jan 2010 08:04:33 -0000	1.2
@@ -67,6 +67,12 @@
             <& /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/ShowRequestor, Ticket => $Ticket &>

Index: ShowTransactionAttachments
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/share/html/Ticket/Elements/ShowTransactionAttachments,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- ShowTransactionAttachments	31 Dec 2009 13:16:28 -0000	1.1.1.1
+++ ShowTransactionAttachments	3 Jan 2010 08:04:33 -0000	1.2
@@ -207,8 +207,14 @@
             # 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 at 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',



More information about the freeside-commits mailing list