From 52a2dbebe522c0866e18f09a169d39a0cbd4d7b8 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 27 Nov 2004 19:09:47 +0000 Subject: ticket system integration framework and skin RT --- rt/html/Elements/Footer | 2 + rt/html/Elements/Header | 34 +++++++++++++++-- rt/html/Elements/PageLayout | 17 +++++---- rt/html/Elements/SimpleSearch | 2 +- rt/html/Elements/Tabs | 7 +++- rt/html/NoAuth/images/small-logo.png | Bin 0 -> 4887 bytes rt/html/NoAuth/webrt.css | 69 ++++++++++++++++++++++++++++++----- 7 files changed, 107 insertions(+), 24 deletions(-) create mode 100644 rt/html/NoAuth/images/small-logo.png (limited to 'rt/html') diff --git a/rt/html/Elements/Footer b/rt/html/Elements/Footer index 5c833f886..052bf87e9 100644 --- a/rt/html/Elements/Footer +++ b/rt/html/Elements/Footer @@ -28,9 +28,11 @@ % } <& /Elements/Callback, %ARGS &> + % if ($Debug) {
<&|/l&>Time to display: <%Time::HiRes::tv_interval( $m->{'rt_base_time'} )%> diff --git a/rt/html/Elements/Header b/rt/html/Elements/Header index 23ab5f781..92c186bd5 100644 --- a/rt/html/Elements/Header +++ b/rt/html/Elements/Header @@ -42,10 +42,9 @@ ONLOAD=" > - - - - + + + + + + + +
   + freesideTicketing % if ($session{'CurrentUser'} && $session{'CurrentUser'}->Id && $LoggedIn) { <&|/l&>Skip Menu | <&|/l&>Preferences @@ -59,6 +58,33 @@ ONLOAD=" <&|/l&>Not logged in. % }
+ + + + + + + +
+ + Freeside <% $FS::VERSION %>
+ Freeside home page
+ Documentation
+
+
+ + RT <% $RT::VERSION %>
+ RT home page
+ Documentation
+
+
+
<%INIT> diff --git a/rt/html/Elements/PageLayout b/rt/html/Elements/PageLayout index 685317581..86b6b565e 100644 --- a/rt/html/Elements/PageLayout +++ b/rt/html/Elements/PageLayout @@ -21,12 +21,12 @@ %# %# %# END LICENSE BLOCK - -
<%$AppName%> + + % foreach my $action (sort keys %{$topactions}) { - % } @@ -35,18 +35,18 @@
<%$AppName%> + <%$topactions->{"$action"}->{'html'} |n %>
%# Vertical menu -
+ <& /Elements/Menu, toptabs => $toptabs, current_toptab => $current_toptab &> - -
+ <%$title%>
+ % if ($actions) { % my @actions; @@ -57,7 +57,8 @@ % push @actions, "{$action}->{'path'}."\">".$actions->{$action}->{'title'}.""; % } % } -<% join(" | ", @actions) | n %> +%#<% join(" | ", @actions) | n %> +<% '['. join("] [", @actions). ']' | n %> % if ($subactions) { % my @actions; % foreach my $action (sort keys %{$subactions}) { @@ -95,5 +96,5 @@ $tabs => undef $actions => undef $subactions => undef $title => $m->callers(-1)->path -$AppName => undef +$AppName => '' diff --git a/rt/html/Elements/SimpleSearch b/rt/html/Elements/SimpleSearch index 4a0d10656..85f37403f 100644 --- a/rt/html/Elements/SimpleSearch +++ b/rt/html/Elements/SimpleSearch @@ -23,5 +23,5 @@ %# END LICENSE BLOCK
-  + 
diff --git a/rt/html/Elements/Tabs b/rt/html/Elements/Tabs index 4db3849c6..6791e5062 100644 --- a/rt/html/Elements/Tabs +++ b/rt/html/Elements/Tabs @@ -40,7 +40,12 @@ my $basetopactions = { B => { html => $m->scomp('/Elements/SimpleSearch') } }; -my $basetabs = { A => { title => loc('Homepage'), +my $basetabs = { + ' A'=> { title => 'Billing Main', + path => '..', + }, + A => { #title => loc('Homepage'), + title => 'Ticketing Main', path => '', }, B => { title => loc('Tickets'), diff --git a/rt/html/NoAuth/images/small-logo.png b/rt/html/NoAuth/images/small-logo.png new file mode 100644 index 000000000..1e415e6d8 Binary files /dev/null and b/rt/html/NoAuth/images/small-logo.png differ diff --git a/rt/html/NoAuth/webrt.css b/rt/html/NoAuth/webrt.css index 159e79cd6..3e8e3f928 100644 --- a/rt/html/NoAuth/webrt.css +++ b/rt/html/NoAuth/webrt.css @@ -23,15 +23,18 @@ %# END LICENSE BLOCK SPAN.nav { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; - color: #FFFFFF; +%# color: #FFFFFF; + color: #000000; text-decoration: none; white-space: nowrap} .nav2 { font-size: 10px; white-space: nowrap} .nav { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; - font-weight: normal; - color: #FFFFFF; +%# font-weight: normal; + font-weight: bold; +%# color: #FFFFFF; + color: #000000; text-decoration: none; white-space: nowrap} .currentnav { font-family: Verdana, Arial, Helvetica, sans-serif; @@ -43,13 +46,15 @@ SPAN.nav { font-family: Verdana, Arial, Helvetica, sans-serif; .topnav { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px; font-weight: normal; - color: #FFFFFF; +%# color: #FFFFFF; + color: #000000; text-decoration: none; white-space: nowrap} .currenttopnav { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold; - color: #FFFF66; +%# color: #FFFF66; + color: #000000; background-color: #cccccc; text-decoration: none; white-space: nowrap} .topactions { font-family: Verdana, Arial, Helvetica, sans-serif; @@ -79,12 +84,16 @@ SPAN.nav { font-family: Verdana, Arial, Helvetica, sans-serif; vertical-align: top; text-align: left; } -.blue { background-color: #4682B4; +.blue { + background-color: #4682B4; +%# background-color: #eeeeee; background-position: left top; vertical-align: top; text-align: left; } -.blueright { background-color: #4682B4; +.blueright { + background-color: #4682B4; +%# background-color: #eeeeee; background-position: left top; vertical-align: top; text-align: right; @@ -94,12 +103,50 @@ SPAN.nav { font-family: Verdana, Arial, Helvetica, sans-serif; vertical-align: top; text-align: left; } -.darkblue { background-color: #000080; +.darkblue { + background-color: #000080; + background-position: left top; + vertical-align: top; + text-align: left; + } +.darkblueright { + background-color: #000080; + background-position: left top; + vertical-align: top; + text-align: right; + } +.lightgray { + background-color: #eeeeee; + background-position: left top; + vertical-align: top; + text-align: left; + } +.lightgrayright { + background-color: #eeeeee; + background-position: left top; + vertical-align: top; + text-align: right; + } +.mediumgray { + background-color: #cccccc; + background-position: left top; + vertical-align: top; + text-align: left; + } +.mediumgrayright { + background-color: #cccccc; + background-position: left top; + vertical-align: top; + text-align: right; + } +.white { + background-color: #ffffff; background-position: left top; vertical-align: top; text-align: left; } -.darkblueright { background-color: #000080; +.whiteright { + background-color: #ffffff; background-position: left top; vertical-align: top; text-align: right; @@ -266,7 +313,9 @@ SPAN.date { font-size: 0.8em } span.title { font-size: 1.6em; vertical-align: middle; - color: #ffffff;} +%# color: #ffffff; + color: #000000; + } span.productname { font-size: 2em; color: #0066cc;} SPAN.titleboxtitle { -- cgit v1.2.1 From 0d1d2630e726ab4ce32bab9c3e4a889eee43fcb4 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 2 Dec 2004 09:59:48 +0000 Subject: second big RT integration checkin, customer linking/delinking interface --- rt/html/Elements/Header | 8 ++-- rt/html/Elements/PageLayout | 2 +- rt/html/Ticket/Elements/AddCustomers | 65 ++++++++++++++++++++++++++++ rt/html/Ticket/Elements/EditCustomers | 79 +++++++++++++++++++++++++++++++++++ rt/html/Ticket/Elements/ShowCustomers | 40 ++++++++++++++++++ rt/html/Ticket/Elements/ShowSummary | 9 ++++ rt/html/Ticket/Elements/Tabs | 2 + rt/html/Ticket/ModifyCustomers.html | 49 ++++++++++++++++++++++ 8 files changed, 248 insertions(+), 6 deletions(-) create mode 100644 rt/html/Ticket/Elements/AddCustomers create mode 100644 rt/html/Ticket/Elements/EditCustomers create mode 100644 rt/html/Ticket/Elements/ShowCustomers create mode 100644 rt/html/Ticket/ModifyCustomers.html (limited to 'rt/html') diff --git a/rt/html/Elements/Header b/rt/html/Elements/Header index 92c186bd5..38cb4bd6b 100644 --- a/rt/html/Elements/Header +++ b/rt/html/Elements/Header @@ -43,7 +43,7 @@ ONLOAD=" - + diff --git a/rt/html/Elements/PageLayout b/rt/html/Elements/PageLayout index 86b6b565e..6146b807c 100644 --- a/rt/html/Elements/PageLayout +++ b/rt/html/Elements/PageLayout @@ -46,7 +46,7 @@ -
freesideTicketing<% FS::Conf->new->config('company_name') %> Ticketing % if ($session{'CurrentUser'} && $session{'CurrentUser'}->Id && $LoggedIn) { <&|/l&>Skip Menu | @@ -67,16 +67,14 @@ ONLOAD="
- Freeside <% $FS::VERSION %>
- Freeside home page
+ Freeside v<% $FS::VERSION %>
Documentation
- RT <% $RT::VERSION %>
- RT home page
+ RT v<% $RT::VERSION %>
Documentation
+ % if ($actions) { % my @actions; diff --git a/rt/html/Ticket/Elements/AddCustomers b/rt/html/Ticket/Elements/AddCustomers new file mode 100644 index 000000000..b26b3a638 --- /dev/null +++ b/rt/html/Ticket/Elements/AddCustomers @@ -0,0 +1,65 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# 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. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +
+<%$msg%>
+ +% if (@Customers) { + +
(Check box to link) + +% foreach my $customer (@Customers) { + + + +% } + +% } + +<%INIT> +my ($msg); + +my @Customers = (); +if ( $CustomerString ) { + @Customers = smart_search( 'search' => $CustomerString ); + warn scalar(@Customers); +} + +my @Services = (); +if ($ServiceString) { + @Services = (); #service_search(); +} + +eval { use FS::CGI qw( popurl small_custview ); }; +my $p = eval { popurl(3); }; + + + +<%ARGS> +$CustomerString => undef +$ServiceString => undef + diff --git a/rt/html/Ticket/Elements/EditCustomers b/rt/html/Ticket/Elements/EditCustomers new file mode 100644 index 000000000..49edb27b3 --- /dev/null +++ b/rt/html/Ticket/Elements/EditCustomers @@ -0,0 +1,79 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# 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. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +
+ > +%# <% $customer->name %> + <% small_custview( $customer, scalar(FS::Conf->new->config('countrydefault')), 1 ) |n %> +
+ + + + + +
+

<&|/l&>Current Customers

+ + + + + + + + +
<&|/l&>(Check box to disassociate)
+% #while (my $link = $Ticket->MemberOf->Next) { +% foreach my $link ( +% grep { $_->TargetURI->Resolver->{'fstable'} eq 'cust_main' } +% grep { $_->TargetURI->Scheme eq 'freeside' } +% @{ $Ticket->_Links('Base')->ItemsArrayRef } +% ) { + + +%# <& ShowLink, URI => $link->TargetURI &>
+ <% $link->TargetURI->Resolver->AsStringLong |n %> +
+% } +
+ +
+

<&|/l&>New Customer Links

+<&|/l&>Find customer
+ + +
cust #, last name, or company +
+%#
+%#<&|/l&>Find service
+%# +%# +%#
username, username@domain, domain, or IP address +%#
+ +<& AddCustomers, Ticket => $Ticket, + CustomerString => $CustomerString, + ServiceString => $ServiceString, &> + +
+ +<%ARGS> +$CustomerString => undef +$ServiceString => undef +$Ticket => undef + diff --git a/rt/html/Ticket/Elements/ShowCustomers b/rt/html/Ticket/Elements/ShowCustomers new file mode 100644 index 000000000..5519d24cf --- /dev/null +++ b/rt/html/Ticket/Elements/ShowCustomers @@ -0,0 +1,40 @@ +%# Copyright (c) 2004 Ivan Kohler +%# +%# 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. + +% my $cust = 0; +% foreach my $customerURI ( +% grep { $_->Resolver->{'fstable'} eq 'cust_main' } +% grep { $_->Scheme eq 'freeside' } +% map { $_->TargetURI } +% @{ $Ticket->_Links('Base')->ItemsArrayRef } +% ) { +% $cust++; +% my $cust_main = ''; + + + +% } +% unless ( $cust ) { + + + + +% } +
+ <% $customerURI->Resolver->AsStringLong |n %> +
+ (none) +
+<%ARGS> +$Ticket => undef + + diff --git a/rt/html/Ticket/Elements/ShowSummary b/rt/html/Ticket/Elements/ShowSummary index 5bcc94b41..1b9f62908 100644 --- a/rt/html/Ticket/Elements/ShowSummary +++ b/rt/html/Ticket/Elements/ShowSummary @@ -47,6 +47,15 @@ color => "#333399" &> <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &> <& /Elements/TitleBoxEnd &> +
+ + <& /Elements/TitleBoxStart, title => loc('Customers'), + title_href =>"$RT::WebPath/Ticket/ModifyCustomers.html?id=".$Ticket->Id, + title_class=> 'inverse', + color => "#7f007b" &> + <& /Ticket/Elements/ShowCustomers, Ticket => $Ticket &> + <& /Elements/TitleBoxEnd &> +
diff --git a/rt/html/Ticket/Elements/Tabs b/rt/html/Ticket/Elements/Tabs index cba45df91..26b252707 100644 --- a/rt/html/Ticket/Elements/Tabs +++ b/rt/html/Ticket/Elements/Tabs @@ -101,6 +101,8 @@ my $ticket_page_tabs = { { title => loc('People'), path => "Ticket/ModifyPeople.html?id=" . $id, }, _E => { title => loc('Links'), path => "Ticket/ModifyLinks.html?id=" . $id, }, + _Eb=> { title => loc('Customers'), + path => "Ticket/ModifyCustomers.html?id=" . $id, }, _F => { title => loc('Jumbo'), path => "Ticket/ModifyAll.html?id=" . $id, seperator => 1 diff --git a/rt/html/Ticket/ModifyCustomers.html b/rt/html/Ticket/ModifyCustomers.html new file mode 100644 index 000000000..72d103b23 --- /dev/null +++ b/rt/html/Ticket/ModifyCustomers.html @@ -0,0 +1,49 @@ +%# Copyright (c) 2004 Ivan Kohler +%# +%# 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. +<& /Elements/Header, Title => loc("Customers for ticket #[_1]", $Ticket->Id) &> +<& /Ticket/Elements/Tabs, + Ticket => $Ticket, + current_tab => "Ticket/ModifyCustomers.html?id=".$Ticket->Id, + Title => loc("Customers for ticket #[_1]", $Ticket->Id) &> + +<& /Elements/ListActions, actions => \@results &> + +
+ + +<& /Elements/TitleBoxStart, title => loc('Edit Customer Links'), color => "#7f007b"&> +<& Elements/EditCustomers, Ticket => $Ticket, CustomerString => $CustomerString, ServiceString => $ServiceString &> +<& /Elements/TitleBoxEnd &> +<& /Elements/Submit, color => "#7f007b", Label => loc('Save Changes') &> +
+ + +<%INIT> + +my @results = (); +my $Ticket = LoadTicket($id); + +# if we're trying to search for customers/services and nothing else +unless ( $OnlySearchForCustomers || $OnlySearchForServices) { + @results = ProcessTicketCustomers( TicketObj => $Ticket, ARGSRef => \%ARGS); +} + + + + +<%ARGS> +$OnlySearchForCustomers => undef +$OnlySearchForServices => undef +$CustomerString => undef +$ServiceString => undef +$id => undef + -- cgit v1.2.1 From 2e01e767e3ec53eca7193e4498a449d9d92b4f89 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 2 Dec 2004 10:18:35 +0000 Subject: fix license boilerplate and search sorting --- rt/html/Ticket/Elements/AddCustomers | 14 +------------- rt/html/Ticket/Elements/EditCustomers | 14 +------------- 2 files changed, 2 insertions(+), 26 deletions(-) (limited to 'rt/html') diff --git a/rt/html/Ticket/Elements/AddCustomers b/rt/html/Ticket/Elements/AddCustomers index b26b3a638..66480e2f1 100644 --- a/rt/html/Ticket/Elements/AddCustomers +++ b/rt/html/Ticket/Elements/AddCustomers @@ -1,8 +1,4 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent -%# -%# (Except where explictly superceded by other copyright notices) +%# Copyright (c) 2004 Ivan Kohler %# %# 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 @@ -13,14 +9,6 @@ %# 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. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK
<%$msg%>
diff --git a/rt/html/Ticket/Elements/EditCustomers b/rt/html/Ticket/Elements/EditCustomers index 49edb27b3..10b9c5baf 100644 --- a/rt/html/Ticket/Elements/EditCustomers +++ b/rt/html/Ticket/Elements/EditCustomers @@ -1,8 +1,4 @@ -%# BEGIN LICENSE BLOCK -%# -%# Copyright (c) 1996-2003 Jesse Vincent -%# -%# (Except where explictly superceded by other copyright notices) +%# Copyright (c) 2004 Ivan Kohler %# %# 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 @@ -13,14 +9,6 @@ %# 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. -%# -%# Unless otherwise specified, all modifications, corrections or -%# extensions to this work which alter its source code become the -%# property of Best Practical Solutions, LLC when submitted for -%# inclusion in the work. -%# -%# -%# END LICENSE BLOCK
-- cgit v1.2.1