From 945721f48f74d5cfffef7c7cf3a3d6bc2521f5dd Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 15 Jul 2003 13:16:32 +0000 Subject: import of rt 3.0.4 --- rt/html/Elements/BevelBoxRaisedEnd | 26 ++++++++ rt/html/Elements/BevelBoxRaisedStart | 26 ++++++++ rt/html/Elements/Callback | 65 +++++++++++++++++++ rt/html/Elements/Checkbox | 39 +++++++++++ rt/html/Elements/CreateTicket | 26 ++++++++ rt/html/Elements/Error | 62 ++++++++++++++++++ rt/html/Elements/Footer | 60 +++++++++++++++++ rt/html/Elements/GotoTicket | 24 +++++++ rt/html/Elements/Header | 82 +++++++++++++++++++++++ rt/html/Elements/ListActions | 43 ++++++++++++ rt/html/Elements/Login | 101 +++++++++++++++++++++++++++++ rt/html/Elements/Menu | 84 ++++++++++++++++++++++++ rt/html/Elements/MessageBox | 47 ++++++++++++++ rt/html/Elements/MyRequests | 78 ++++++++++++++++++++++ rt/html/Elements/MyTickets | 81 +++++++++++++++++++++++ rt/html/Elements/PageLayout | 99 ++++++++++++++++++++++++++++ rt/html/Elements/Quicksearch | 61 +++++++++++++++++ rt/html/Elements/Refresh | 45 +++++++++++++ rt/html/Elements/Section | 34 ++++++++++ rt/html/Elements/SelectAttachmentField | 31 +++++++++ rt/html/Elements/SelectBoolean | 46 +++++++++++++ rt/html/Elements/SelectCustomFieldOperator | 40 ++++++++++++ rt/html/Elements/SelectCustomFieldValue | 41 ++++++++++++ rt/html/Elements/SelectDate | 48 ++++++++++++++ rt/html/Elements/SelectDateRelation | 36 ++++++++++ rt/html/Elements/SelectDateType | 36 ++++++++++ rt/html/Elements/SelectEqualityOperator | 40 ++++++++++++ rt/html/Elements/SelectGroups | 29 +++++++++ rt/html/Elements/SelectLinkType | 37 +++++++++++ rt/html/Elements/SelectMatch | 53 +++++++++++++++ rt/html/Elements/SelectNewTicketQueue | 56 ++++++++++++++++ rt/html/Elements/SelectOwner | 59 +++++++++++++++++ rt/html/Elements/SelectQueue | 59 +++++++++++++++++ rt/html/Elements/SelectResultsPerPage | 43 ++++++++++++ rt/html/Elements/SelectSortOrder | 41 ++++++++++++ rt/html/Elements/SelectStatus | 37 +++++++++++ rt/html/Elements/SelectTicketSortBy | 38 +++++++++++ rt/html/Elements/SelectTicketTypes | 34 ++++++++++ rt/html/Elements/SelectUsers | 31 +++++++++ rt/html/Elements/SelectWatcherType | 44 +++++++++++++ rt/html/Elements/SetupSessionCookie | 77 ++++++++++++++++++++++ rt/html/Elements/ShadedBox | 33 ++++++++++ rt/html/Elements/ShadedInputRow | 35 ++++++++++ rt/html/Elements/ShadedRow | 31 +++++++++ rt/html/Elements/SimpleSearch | 27 ++++++++ rt/html/Elements/Submit | 62 ++++++++++++++++++ rt/html/Elements/Tabs | 82 +++++++++++++++++++++++ rt/html/Elements/TitleBoxEnd | 31 +++++++++ rt/html/Elements/TitleBoxStart | 60 +++++++++++++++++ rt/html/Elements/ViewUser | 51 +++++++++++++++ 50 files changed, 2451 insertions(+) create mode 100644 rt/html/Elements/BevelBoxRaisedEnd create mode 100644 rt/html/Elements/BevelBoxRaisedStart create mode 100644 rt/html/Elements/Callback create mode 100644 rt/html/Elements/Checkbox create mode 100644 rt/html/Elements/CreateTicket create mode 100644 rt/html/Elements/Error create mode 100644 rt/html/Elements/Footer create mode 100644 rt/html/Elements/GotoTicket create mode 100644 rt/html/Elements/Header create mode 100644 rt/html/Elements/ListActions create mode 100644 rt/html/Elements/Login create mode 100644 rt/html/Elements/Menu create mode 100644 rt/html/Elements/MessageBox create mode 100644 rt/html/Elements/MyRequests create mode 100644 rt/html/Elements/MyTickets create mode 100644 rt/html/Elements/PageLayout create mode 100644 rt/html/Elements/Quicksearch create mode 100644 rt/html/Elements/Refresh create mode 100644 rt/html/Elements/Section create mode 100644 rt/html/Elements/SelectAttachmentField create mode 100644 rt/html/Elements/SelectBoolean create mode 100644 rt/html/Elements/SelectCustomFieldOperator create mode 100644 rt/html/Elements/SelectCustomFieldValue create mode 100644 rt/html/Elements/SelectDate create mode 100644 rt/html/Elements/SelectDateRelation create mode 100644 rt/html/Elements/SelectDateType create mode 100644 rt/html/Elements/SelectEqualityOperator create mode 100644 rt/html/Elements/SelectGroups create mode 100644 rt/html/Elements/SelectLinkType create mode 100644 rt/html/Elements/SelectMatch create mode 100644 rt/html/Elements/SelectNewTicketQueue create mode 100644 rt/html/Elements/SelectOwner create mode 100644 rt/html/Elements/SelectQueue create mode 100644 rt/html/Elements/SelectResultsPerPage create mode 100644 rt/html/Elements/SelectSortOrder create mode 100644 rt/html/Elements/SelectStatus create mode 100644 rt/html/Elements/SelectTicketSortBy create mode 100644 rt/html/Elements/SelectTicketTypes create mode 100644 rt/html/Elements/SelectUsers create mode 100644 rt/html/Elements/SelectWatcherType create mode 100644 rt/html/Elements/SetupSessionCookie create mode 100644 rt/html/Elements/ShadedBox create mode 100644 rt/html/Elements/ShadedInputRow create mode 100644 rt/html/Elements/ShadedRow create mode 100644 rt/html/Elements/SimpleSearch create mode 100644 rt/html/Elements/Submit create mode 100644 rt/html/Elements/Tabs create mode 100644 rt/html/Elements/TitleBoxEnd create mode 100644 rt/html/Elements/TitleBoxStart create mode 100644 rt/html/Elements/ViewUser (limited to 'rt/html/Elements') diff --git a/rt/html/Elements/BevelBoxRaisedEnd b/rt/html/Elements/BevelBoxRaisedEnd new file mode 100644 index 000000000..ebf45df0f --- /dev/null +++ b/rt/html/Elements/BevelBoxRaisedEnd @@ -0,0 +1,26 @@ +%# 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 + + + diff --git a/rt/html/Elements/BevelBoxRaisedStart b/rt/html/Elements/BevelBoxRaisedStart new file mode 100644 index 000000000..c4e6c55bc --- /dev/null +++ b/rt/html/Elements/BevelBoxRaisedStart @@ -0,0 +1,26 @@ +%# 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 + + + + + + + +
diff --git a/rt/html/Elements/Callback b/rt/html/Elements/Callback new file mode 100644 index 000000000..93ac4c01b --- /dev/null +++ b/rt/html/Elements/Callback @@ -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 +<%once> +my (%cache, $check); + +<%init> +# checks for inode change time for each callback directory +my $new_check = join( + $;, map { $_->[1] => (stat("$_->[1]/Callbacks"))[10] } $m->interp->resolver->comp_root_array +) or return; + +$Page = $m->callers(1)->path unless ($Page); + +my $callbacks; +if ($new_check eq $check) { + $callbacks = $cache{$Page,$_CallbackName}; +} +else { + $check = $new_check; +} + +if (!$callbacks) { + my $path = "/Callbacks/*$Page/$_CallbackName"; + $callbacks = [ $m->interp->resolver->glob_path($path) ]; + @$callbacks = grep !/^\.|~$/, @$callbacks; #skip backup files + + #skip files without a package + my $invalid_base = "/Callbacks/$Page/$_CallbackName"; + @$callbacks = grep !/^$invalid_base$/, @$callbacks; + + + + $cache{$Page,$_CallbackName} = $callbacks; +} + +foreach my $comp (@$callbacks) { + $m->comp($comp, %ARGS) if $m->comp_exists($comp); +} +return(1); + +<%args> +$_CallbackName => 'Default' +$Page => undef + diff --git a/rt/html/Elements/Checkbox b/rt/html/Elements/Checkbox new file mode 100644 index 000000000..ae3d765c2 --- /dev/null +++ b/rt/html/Elements/Checkbox @@ -0,0 +1,39 @@ +%# 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 +> + +<%ARGS> +$Name => undef +$Default => undef +$True => undef +$False => undef +$IsChecked => undef + + +<%INIT> +$IsChecked = + ($Default && $Default =~ /checked/i) + ? " CHECKED " : ""; +1; + diff --git a/rt/html/Elements/CreateTicket b/rt/html/Elements/CreateTicket new file mode 100644 index 000000000..7e1025d0a --- /dev/null +++ b/rt/html/Elements/CreateTicket @@ -0,0 +1,26 @@ +%# 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 +
+<&|/l, $m->scomp('/Elements/SelectNewTicketQueue')&> [_1] +
diff --git a/rt/html/Elements/Error b/rt/html/Elements/Error new file mode 100644 index 000000000..dc44f125e --- /dev/null +++ b/rt/html/Elements/Error @@ -0,0 +1,62 @@ +%# 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 +<& /Elements/Callback, %ARGS, error => $error &> +<& /Elements/Header, Code => $Code, Why => $Why &> +<& /Elements/Tabs &> +<& /Elements/TitleBoxStart, class=> "error", title => $Title &> +<%$Why%> +
+ +<%$Details%> + +<& /Elements/TitleBoxEnd &> + + + + +<%args> +$Code => undef +$Details => undef +$Title => loc("RT Error") +$Why => loc("the calling component did not specify why") + + +<%INIT> +my $error = "WebRT: $Why ($Details)"; + +# TODO: Log::Dispatch isn't UTF-8 safe. Autrijus needs to talk to dave rolsky about getting this fixed +if ($] >= 5.007001) { + require Encode; + Encode::_utf8_off($error); +} + +$RT::Logger->error($error); + +if ( $session{'SessionType'} eq 'REST' ) { + $r->content_type('text/plain'); + $m->out( "Error: " . $Why . "\n" ); + $m->out( $Details . "\n" ); + $m->abort(); +} + diff --git a/rt/html/Elements/Footer b/rt/html/Elements/Footer new file mode 100644 index 000000000..5c833f886 --- /dev/null +++ b/rt/html/Elements/Footer @@ -0,0 +1,60 @@ +%# 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 +% if ($Menu) { +
+% } +<& /Elements/Callback, %ARGS &> +
+»|« <&|/l, $RT::VERSION &>RT [_1] from Best Practical Solutions, LLC. +
+% if ($Debug) { +
+<&|/l&>Time to display: <%Time::HiRes::tv_interval( $m->{'rt_base_time'} )%> +% } +% if ($Debug >= 2 ) { +% require Data::Dumper; +% my $d = Data::Dumper->new([\%ARGS], [qw(%ARGS)]); +
+<%$d->Dump() %>
+
+% } +% if ($Menu) { +
+ + + +% } + + +% $m->abort(); + +<%ARGS> +$Debug => 0 +$Menu => 1 + diff --git a/rt/html/Elements/GotoTicket b/rt/html/Elements/GotoTicket new file mode 100644 index 000000000..bb0c04dd1 --- /dev/null +++ b/rt/html/Elements/GotoTicket @@ -0,0 +1,24 @@ +%# 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 +
 
diff --git a/rt/html/Elements/Header b/rt/html/Elements/Header new file mode 100644 index 000000000..0fd91a2e2 --- /dev/null +++ b/rt/html/Elements/Header @@ -0,0 +1,82 @@ +%# 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 + + + +<%$Title%> +% if ($Refresh > 0) { + +% } + + + + + + + + + + + + +
   +% if ($session{'CurrentUser'} && $session{'CurrentUser'}->Id && $LoggedIn) { +<&|/l&>Skip Menu | +<&|/l&>Preferences +<& /Elements/Callback, %ARGS &> +% unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) { +| <&|/l&>Logout +% } +
+<&|/l, "".$session{'CurrentUser'}->Name."" &>Logged in as [_1] +% } else { +<&|/l&>Not logged in. +% } + +
+<%INIT> + +$r->header_out('Pragma' => 'no-cache'); +$r->header_out('Cache-control' => 'no-cache'); + + +<%ARGS> +$Prefs => '/User/Prefs.html' +$Focus => 'focus' +$Title => undef +$Code => undef +$Refresh => 0 +$Why => undef +$BgColor => '#ffffff' +$ShowBar => 1 +$LoggedIn => 1 +$URL => undef + diff --git a/rt/html/Elements/ListActions b/rt/html/Elements/ListActions new file mode 100644 index 000000000..ffa09e283 --- /dev/null +++ b/rt/html/Elements/ListActions @@ -0,0 +1,43 @@ +%# 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 +% if ($actions[0] ) { +<& /Elements/TitleBoxStart, title => loc('Results') &> +
    +% foreach my $action (@actions) { +% next unless ($action); +% my $skip = 0; +% $m->comp('/Elements/Callback', _CallbackName => 'ModifyRow', row => \$action, skip => \$skip, %ARGS); +% next if $skip; +
  • <%$action%>
  • +% } +
+<& /Elements/TitleBoxEnd &> +
+% } +<%init> +@actions = grep (/./,@actions); + +<%ARGS> +@actions => undef + diff --git a/rt/html/Elements/Login b/rt/html/Elements/Login new file mode 100644 index 000000000..42c49c4af --- /dev/null +++ b/rt/html/Elements/Login @@ -0,0 +1,101 @@ +%# 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 +<%INIT> +if ($m->request_comp->path =~ '^/REST/\d+\.\d+/') { + $r->content_type("text/plain"); + $m->error_format("text"); + $m->out("RT/$RT::VERSION 401 Credentials required\n"); + $m->out("\n$Error\n") if $Error; + $m->abort; +} + + +<& /Elements/Callback, %ARGS, _CallbackName => 'Header' &> +<& /Elements/Header, Title => loc('Login'), Focus => 'user' &> + +
+% if ($Error) { +<& /Elements/TitleBoxStart, title => loc('Error') &> +<% $Error %> +<& /Elements/TitleBoxEnd &> +% } +
+<& /Elements/TitleBoxStart, width=> "40%", titleright => loc("RT [_1]", $RT::VERSION), title => loc('Login') , +contentbg=>"#cccccc" &> + +% unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) { +
+ + + + + +
<&|/l&>Username:
<&|/l&>Password:
+ +
+ +%# Give callbacks a chance to add more control elements +<& /Elements/Callback, %ARGS &> + +<&/Elements/TitleBoxEnd&> +% # From mason 1.0.1 forward, this doesn't work. in fact, it breaks things. +% # But on Mason 1.15 it's fixed again, so we still use it. +% # The code below iterates through everything in the passed in arguments +% # Preserving all the old parameters +% # This would be easier, except mason is 'smart' and calls multiple values +% # arrays rather than multiple hash keys +% my $key; my $val; +% foreach $key (keys %ARGS) { +% if (($key ne 'user') and ($key ne 'pass')) { +% if (ref($ARGS{$key}) =~ /ARRAY/) { +% foreach $val (@{$ARGS{$key}}) { + +% } +% } +% else { + +% } +% } +% } +
+% } +
+ +
+ +
+
+
+
+<&|/l, '2003'&>RT is © Copyright 1996-[_1] Jesse Vincent <jesse@bestpractical.com>. It is distributed under Version 2 of the GNU General Public License. + +<%ARGS> +$user => "" +$pass => undef +$goto => undef +$Error => undef + diff --git a/rt/html/Elements/Menu b/rt/html/Elements/Menu new file mode 100644 index 000000000..963be13bf --- /dev/null +++ b/rt/html/Elements/Menu @@ -0,0 +1,84 @@ +%# 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 +%# font size depends on level +% if ($level ge 3) { +% $size = $basesize-(6); +% } elsif ($level gt 0) { +% $size = $basesize-($level * 2); +% $padding = 2; +% } +% else { +% $size = $basesize; +% $padding = 5; +% } +
    +% my $sep=0; +% my $accesskey="1"; +% foreach $tab (sort keys %{$toptabs}) { +% my $current = $current_toptab || ""; +% my $path = $toptabs->{$tab}->{'path'} || ""; +% $path =~ s#/index.html$##gi; +% $current =~ s#/index.html$##gi; +% if ( $path eq $current) { +% $class="currenttopnav" +% } else { +% $class="topnav" +% } +% my $style=""; +% if ($sep) { +% $style="border-top: solid #999 1px; padding-top: .1em; margin-top: .5em;"; +% } elsif ($level == 0 ) { +% $style="border-bottom: solid white 1px; padding-top: .25em; padding-bottom: .5em;" ; +% } +% if ($toptabs->{$tab}->{'separator'}) { +% $sep=1; +% } else { +% $sep=0; +% } +
  • +<% !$level && "accesskey='".$accesskey++."'" |n%>><% $toptabs->{$tab}->{'title'}%> +%# Second-level items +%# if ($current_toptab eq $toptabs->{$tab}->{'path'}) { +%# commented out by jesse on 4 jan 2003 so that tickets/search and ticket/# can +%# both have menu items +% if ($toptabs->{$tab}->{'subtabs'}) { + <& /Elements/Menu, level => $level+1, + current_toptab => $toptabs->{$tab}->{'current_subtab'}, + toptabs => $toptabs->{$tab}->{'subtabs'} &>
  • +% } +%# } +% } +
+ +<%INIT> +my ($tab, $subtab, $class, $size, $padding); +my $basesize=16; + + +<%ARGS> +$current_toptab => "" +$toptabs => undef +$level => 0 + diff --git a/rt/html/Elements/MessageBox b/rt/html/Elements/MessageBox new file mode 100644 index 000000000..64fdf38b7 --- /dev/null +++ b/rt/html/Elements/MessageBox @@ -0,0 +1,47 @@ +%# 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 + +<%INIT> + +my ($message); + +if ($QuoteTransaction) { + my $transaction=RT::Transaction->new($session{'CurrentUser'}); + $transaction->Load($QuoteTransaction); + $message=$transaction->Content(Quote => 1); +} + +my $signature = ''; +if ($session{'CurrentUser'}->UserObj->Signature) { + $signature = "-- \n".$session{'CurrentUser'}->UserObj->Signature; +} + + +<%ARGS> +$QuoteTransaction => undef +$Name => 'Content' +$Default => '' +$Width => 72 + + diff --git a/rt/html/Elements/MyRequests b/rt/html/Elements/MyRequests new file mode 100644 index 000000000..05ae62445 --- /dev/null +++ b/rt/html/Elements/MyRequests @@ -0,0 +1,78 @@ +%# 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 +<& /Elements/TitleBoxStart, title => loc("[_1] highest priority tickets I requested...", $rows), bodyclass=> '' &> + + + + + + + + +% my $i; +% while (my $Ticket = $MyTickets->Next) { +% $i++; + + + + + + + +% } +
<&|/l&>#<&|/l&>Subject<&|/l&>Queue<&|/l&>Status<&|/l&>Owner
+<%$Ticket->Id%> + + +<%$Ticket->Subject || loc('(no subject)')%> + + +<%$Ticket->QueueObj->Name%> + +% if ($Ticket->HasUnresolvedDependencies ) { +% if ($Ticket->HasUnresolvedDependencies( Type => 'approval' )) { +<&|/l&>(pending approval) +% } else { +<&|/l&>(pending other tickets) +% } +% } else { +<%loc($Ticket->Status)%> +% } + +<%$Ticket->OwnerObj->Name%> +
+<& /Elements/TitleBoxEnd &> + + +<%INIT> +my $rows = 10; +my $MyTickets; +$MyTickets = new RT::Tickets ($session{'CurrentUser'}); +$MyTickets->LimitWatcher(TYPE => 'Requestor', VALUE => $session{'CurrentUser'}->EmailAddress); +$MyTickets->LimitStatus(VALUE => "open"); +$MyTickets->LimitStatus(VALUE => "new"); +$MyTickets->RowsPerPage($rows); +$MyTickets->OrderBy(FIELD => 'Priority', ORDER => 'DESC'); + + diff --git a/rt/html/Elements/MyTickets b/rt/html/Elements/MyTickets new file mode 100644 index 000000000..6e2ddc6c3 --- /dev/null +++ b/rt/html/Elements/MyTickets @@ -0,0 +1,81 @@ +%# 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 +<& /Elements/TitleBoxStart, title => loc("[_1] highest priority tickets I own...", $rows), bodyclass=> '' &> + + + + + + + + + +% my $i; +% while (my $Ticket = $MyTickets->Next) { +% next if $Ticket->HasUnresolvedDependencies( Type => 'approval' ); +% last if $i++ >= $rows; + + + + + + + +% } +
<&|/l&>#<&|/l&>Subject<&|/l&>Queue<&|/l&>Status 
+<%$Ticket->Id%> + + +<%$Ticket->Subject || loc('(no subject)')%> + + +<%$Ticket->QueueObj->Name%> + +% if ($Ticket->HasUnresolvedDependencies ) { +% if ($Ticket->HasUnresolvedDependencies( Type => 'approval' ) or +% $Ticket->HasUnresolvedDependencies( Type => 'code' )) { +<&|/l&>(pending approval) +% } else { +<&|/l&>(pending other tickets) +% } +% } else { +<%loc($Ticket->Status)%> +% } + +[<&|/l&>Update] +
+<& /Elements/TitleBoxEnd &> + + +<%INIT> +my $rows = 10; +my $MyTickets; +$MyTickets = new RT::Tickets ($session{'CurrentUser'}); +$MyTickets->LimitOwner(VALUE => $session{'CurrentUser'}->Id); +$MyTickets->LimitStatus(VALUE => "open"); +$MyTickets->LimitStatus(VALUE => "new"); +$MyTickets->RowsPerPage($rows); +$MyTickets->OrderBy(FIELD => 'Priority', ORDER => 'DESC'); + + diff --git a/rt/html/Elements/PageLayout b/rt/html/Elements/PageLayout new file mode 100644 index 000000000..685317581 --- /dev/null +++ b/rt/html/Elements/PageLayout @@ -0,0 +1,99 @@ +%# 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 + + + +% foreach my $action (sort keys %{$topactions}) { + +% } + +
<%$AppName%> + + <%$topactions->{"$action"}->{'html'} |n %> +
+ +%# Vertical menu + + + + +
+ <& /Elements/Menu, toptabs => $toptabs, current_toptab => $current_toptab &> + + + + + + + + + + + + + +<%ARGS> +$title => undef +$content => " " +$name => undef +$size => undef + diff --git a/rt/html/Elements/ShadedRow b/rt/html/Elements/ShadedRow new file mode 100644 index 000000000..8947fcd82 --- /dev/null +++ b/rt/html/Elements/ShadedRow @@ -0,0 +1,31 @@ +%# 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 + + + + +<%ARGS> +$title => undef +$content => " " + diff --git a/rt/html/Elements/SimpleSearch b/rt/html/Elements/SimpleSearch new file mode 100644 index 000000000..69541f801 --- /dev/null +++ b/rt/html/Elements/SimpleSearch @@ -0,0 +1,27 @@ +%# 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 +
+ +  + diff --git a/rt/html/Elements/Submit b/rt/html/Elements/Submit new file mode 100644 index 000000000..2c35ca0f4 --- /dev/null +++ b/rt/html/Elements/Submit @@ -0,0 +1,62 @@ +%# 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 +
+ <%$title%> +
+ +% if ($actions) { +% my @actions; +% foreach my $action (sort keys %{$actions}) { +% if ($actions->{"$action"}->{'html'}) { +% push @actions, $actions->{"$action"}->{'html'}; +% } else { +% push @actions, "{$action}->{'path'}."\">".$actions->{$action}->{'title'}.""; +% } +% } +<% join(" | ", @actions) | n %> +% if ($subactions) { +% my @actions; +% foreach my $action (sort keys %{$subactions}) { +% push @actions, $subactions->{"$action"}->{'html'}; +% } +<% join(" | ", @actions) | n %> +% } +% } + +
+ +<%INIT> + + foreach my $tab (sort keys %{$toptabs}) { + if ($toptabs->{$tab}->{'path'} eq $current_toptab) { + $toptabs->{$tab}->{"subtabs"} = $tabs; + $toptabs->{$tab}->{"current_subtab"} = $current_tab; + } + } + +if (! defined($AppName)) { + $AppName = loc("RT for [_1]", $RT::rtname); +} + + +<%ARGS> +$current_toptab => undef +$current_tab => undef +$toptabs => undef +$topactions => undef +$tabs => undef +$actions => undef +$subactions => undef +$title => $m->callers(-1)->path +$AppName => undef + diff --git a/rt/html/Elements/Quicksearch b/rt/html/Elements/Quicksearch new file mode 100644 index 000000000..b1a67ab29 --- /dev/null +++ b/rt/html/Elements/Quicksearch @@ -0,0 +1,61 @@ +%# 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 +<& /Elements/TitleBoxStart, title => loc("Quick search"), bodyclass => "" &> + + + + + + + + +<%PERL> +my $i; +while (my $queue = $Queues->Next) { + $Tickets->ClearRestrictions; + $Tickets->LimitStatus(VALUE => "open"); + $Tickets->LimitQueue(VALUE => $queue->Name, OPERATOR => '='); + my $open = $Tickets->Count(); + + $Tickets->ClearRestrictions; + $Tickets->LimitStatus(VALUE => "new"); + $Tickets->LimitQueue(VALUE => $queue->Name, OPERATOR => '='); + my $new = $Tickets->Count(); + + +% $i++; + + + + + +% } +
<&|/l&>Queue<&|/l&>New<&|/l&>Open
<%$queue->Name%><%$new%><%$open%>
+<& /Elements/TitleBoxEnd &> + +<%INIT> +my $Queues = RT::Queues->new($session{'CurrentUser'}); +$Queues->UnLimit(); +my $Tickets = RT::Tickets->new($session{'CurrentUser'}); + diff --git a/rt/html/Elements/Refresh b/rt/html/Elements/Refresh new file mode 100644 index 000000000..2b5376fee --- /dev/null +++ b/rt/html/Elements/Refresh @@ -0,0 +1,45 @@ +%# 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 + + +<%INIT> +my @refreshevery = qw(120 300 600 1200 3600 7200); + +<%ARGS> +$Name => undef +$Default => 0 + diff --git a/rt/html/Elements/Section b/rt/html/Elements/Section new file mode 100644 index 000000000..691235846 --- /dev/null +++ b/rt/html/Elements/Section @@ -0,0 +1,34 @@ +%# 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 + + + + +
+<%$title%> +
+ +<%ARGS> +$title => undef + diff --git a/rt/html/Elements/SelectAttachmentField b/rt/html/Elements/SelectAttachmentField new file mode 100644 index 000000000..47bc53211 --- /dev/null +++ b/rt/html/Elements/SelectAttachmentField @@ -0,0 +1,31 @@ +%# 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 + +<%ARGS> +$Name => 'AttachmentField' + diff --git a/rt/html/Elements/SelectBoolean b/rt/html/Elements/SelectBoolean new file mode 100644 index 000000000..8cf60dc33 --- /dev/null +++ b/rt/html/Elements/SelectBoolean @@ -0,0 +1,46 @@ +%# 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 + + +<%ARGS> +$Name => undef +$True => loc("is") +$Default => 'true' +$TrueVal => 1 +$FalseVal => 0 +$False => loc("isn't") + + +<%INIT> +my ($TrueDefault, $FalseDefault); +if ($Default && $Default !~ /true/i) { + $FalseDefault = "SELECTED"; +} +else { + $TrueDefault = "SELECTED"; +} + diff --git a/rt/html/Elements/SelectCustomFieldOperator b/rt/html/Elements/SelectCustomFieldOperator new file mode 100644 index 000000000..e886cbe37 --- /dev/null +++ b/rt/html/Elements/SelectCustomFieldOperator @@ -0,0 +1,40 @@ +%# 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 + + +<%ARGS> +$Name => undef +@Options => ( loc('contains'), loc("doesn't contain"), loc('is'), loc("isn't"), loc('less than'), loc('greater than')) +@Values => ('LIKE', 'NOT LIKE', '=', '!=', '<', '>') +$Default => undef + diff --git a/rt/html/Elements/SelectCustomFieldValue b/rt/html/Elements/SelectCustomFieldValue new file mode 100644 index 000000000..60f65bcf2 --- /dev/null +++ b/rt/html/Elements/SelectCustomFieldValue @@ -0,0 +1,41 @@ +%# 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 +<& /Elements/Callback, %ARGS &> +% if ($CustomField->Type =~ /Select/i) { +% my $values = $CustomField->Values; + +% } +% else { + +% } +<%args> +$Name => undef +$CustomField =>undef + diff --git a/rt/html/Elements/SelectDate b/rt/html/Elements/SelectDate new file mode 100644 index 000000000..5f169fc0a --- /dev/null +++ b/rt/html/Elements/SelectDate @@ -0,0 +1,48 @@ +%# 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 + + +<%init> +unless ((defined $Default) or + ($current <= 0)) { + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = + localtime($current); + $Default = sprintf("%04d-%02d-%02d %02d:%02d", + $year+1900,$mon+1,$mday, + $hour,$min); +} + +unless ($Name) { + $Name = $menu_prefix. "_Date"; +} + + +<%args> + +$ShowTime => undef +$menu_prefix=>'' +$current=>time +$Default => undef +$Name => undef + diff --git a/rt/html/Elements/SelectDateRelation b/rt/html/Elements/SelectDateRelation new file mode 100644 index 000000000..ee26efeaa --- /dev/null +++ b/rt/html/Elements/SelectDateRelation @@ -0,0 +1,36 @@ +%# 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 + + +<%ARGS> +$Name => undef +$Default => undef +$Before => loc('Before') +$On => loc('On') +$After => loc('After') + diff --git a/rt/html/Elements/SelectDateType b/rt/html/Elements/SelectDateType new file mode 100644 index 000000000..afb9a70e9 --- /dev/null +++ b/rt/html/Elements/SelectDateType @@ -0,0 +1,36 @@ +%# 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 + +<%ARGS> +$Name => 'DateType' + diff --git a/rt/html/Elements/SelectEqualityOperator b/rt/html/Elements/SelectEqualityOperator new file mode 100644 index 000000000..99c60d554 --- /dev/null +++ b/rt/html/Elements/SelectEqualityOperator @@ -0,0 +1,40 @@ +%# 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 + + +<%ARGS> +$Name => undef +@Options => (loc('less than'), loc('equal to'), loc('greater than'), loc('not equal to')) +@Values => qw(< = > !=) +$Default => undef + diff --git a/rt/html/Elements/SelectGroups b/rt/html/Elements/SelectGroups new file mode 100644 index 000000000..8f33c1eb3 --- /dev/null +++ b/rt/html/Elements/SelectGroups @@ -0,0 +1,29 @@ +%# 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 + +<& /Elements/SelectMatch, Name=> 'GroupOp' &> + diff --git a/rt/html/Elements/SelectLinkType b/rt/html/Elements/SelectLinkType new file mode 100644 index 000000000..9ebefda14 --- /dev/null +++ b/rt/html/Elements/SelectLinkType @@ -0,0 +1,37 @@ +%# 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 + + +<%ARGS> +$Name => "LinkType" +$Default => undef + + +<%INIT> +# TODO handle Default + diff --git a/rt/html/Elements/SelectMatch b/rt/html/Elements/SelectMatch new file mode 100644 index 000000000..d58a9633a --- /dev/null +++ b/rt/html/Elements/SelectMatch @@ -0,0 +1,53 @@ +%# 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 + + +<%ARGS> +$Name => undef +$Like => loc('contains') +$NotLike => loc("doesn't contain") +$True => loc('is') +$False => loc("isn't") +$Default => undef + +<%INIT> +my ($TrueDefault, $FalseDefault, $LikeDefault, $NotLikeDefault); +if ($Default && $Default !~ /true/i) { + $FalseDefault = "SELECTED"; +} +elsif ($Default && $Default !~ /false/i) { + $TrueDefault = "SELECTED"; +} +elsif ($Default && $Default !~ /notlike/i) { + $NotLikeDefault = "SELECTED"; +} +else { + $LikeDefault = "SELECTED"; +} + diff --git a/rt/html/Elements/SelectNewTicketQueue b/rt/html/Elements/SelectNewTicketQueue new file mode 100644 index 000000000..a629b7bca --- /dev/null +++ b/rt/html/Elements/SelectNewTicketQueue @@ -0,0 +1,56 @@ +%# 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 + + +<%INIT> +unless ($session{'create_in_queues'}) { + +@{$session{'create_in_queues'}} = (); +my $q=new RT::Queues($session{'CurrentUser'}); +$q->UnLimit; +while (my $queue=$q->Next) { + if ($queue->CurrentUserHasRight('CreateTicket')) { + my $ds = { Name => $queue->Name, Description => $queue->Description, id => $queue->id }; + push (@{$session{'create_in_queues'}}, $ds); + } +} +} + + + +<%ARGS> +$Name => 'Queue' +$Verbose => undef +$Default => undef + diff --git a/rt/html/Elements/SelectOwner b/rt/html/Elements/SelectOwner new file mode 100644 index 000000000..04b078d20 --- /dev/null +++ b/rt/html/Elements/SelectOwner @@ -0,0 +1,59 @@ +%# 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 + + +<%INIT> +my $Users = RT::Users->new($session{CurrentUser}); +my $object; + + +if ($TicketObj) { + $object = $TicketObj; +} +elsif ($QueueObj) { + $object = $QueueObj; +} +if ($object) { + $Users->WhoHaveRight(Right => 'OwnTicket', + Object => $object, + IncludeSystemRights => 1, + IncludeSuperusers => 1); +} else { + $Users->LimitToPrivileged; +} + + +<%ARGS> +$QueueObj => undef +$Name => undef +$Default => undef +$User => undef +$TicketObj => undef + diff --git a/rt/html/Elements/SelectQueue b/rt/html/Elements/SelectQueue new file mode 100644 index 000000000..c45b9b532 --- /dev/null +++ b/rt/html/Elements/SelectQueue @@ -0,0 +1,59 @@ +%# 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 +% if ($Lite) { + +% } else { + +% } +<%ARGS> +$ShowNullOption => 1 +$ShowAllQueues => 1 +$Name => undef +$Verbose => undef +$Default => 0 +$Lite => 0 + + +<%INIT> + +my $q=new RT::Queues($session{'CurrentUser'}); +$q->UnLimit; + +my $d = new RT::Queue($session{'CurrentUser'}); +$d->Load($Default); + + diff --git a/rt/html/Elements/SelectResultsPerPage b/rt/html/Elements/SelectResultsPerPage new file mode 100644 index 000000000..1bde71306 --- /dev/null +++ b/rt/html/Elements/SelectResultsPerPage @@ -0,0 +1,43 @@ +%# 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 +%# TODO: Better default handling + + + +<%INIT> +my @values = qw(0 10 25 50 100); +my @labels = (loc('Unlimited'), qw(10 25 50 100)); + +<%ARGS> + +$Name => undef +$Default => 50 + + diff --git a/rt/html/Elements/SelectSortOrder b/rt/html/Elements/SelectSortOrder new file mode 100644 index 000000000..0ad999a7a --- /dev/null +++ b/rt/html/Elements/SelectSortOrder @@ -0,0 +1,41 @@ +%# 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 + + +<%INIT> +my @orders = qw (ASC DESC); +my @order_names = (loc('Ascending'), loc('Descending')); + + + +<%ARGS> +$Name => 'SortOrder' +$Default => 'ASC' + diff --git a/rt/html/Elements/SelectStatus b/rt/html/Elements/SelectStatus new file mode 100644 index 000000000..2c1ffad39 --- /dev/null +++ b/rt/html/Elements/SelectStatus @@ -0,0 +1,37 @@ +%# 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 + +<%ONCE> +my $queue = new RT::Queue($session{'CurrentUser'}); +my @status = $queue->StatusArray(); + +<%ARGS> +$Name => undef +$Default => undef + diff --git a/rt/html/Elements/SelectTicketSortBy b/rt/html/Elements/SelectTicketSortBy new file mode 100644 index 000000000..1d0b3942a --- /dev/null +++ b/rt/html/Elements/SelectTicketSortBy @@ -0,0 +1,38 @@ +%# 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 + + +<%INIT> +my $tickets = new RT::Tickets($session{'CurrentUser'}); +my @sortfields = $tickets->SortFields(); + + +<%ARGS> +$Name => 'SortTicketsBy' +$Default => 'id' + diff --git a/rt/html/Elements/SelectTicketTypes b/rt/html/Elements/SelectTicketTypes new file mode 100644 index 000000000..80aecac67 --- /dev/null +++ b/rt/html/Elements/SelectTicketTypes @@ -0,0 +1,34 @@ +%# 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 + + +<%ARGS> +$Name => 'TickType' +$Default => undef +@Types => qw(Approval Ticket) + diff --git a/rt/html/Elements/SelectUsers b/rt/html/Elements/SelectUsers new file mode 100644 index 000000000..7ed3835b6 --- /dev/null +++ b/rt/html/Elements/SelectUsers @@ -0,0 +1,31 @@ +%# 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 + +<& /Elements/SelectMatch, Name=> 'UserOp' &> + diff --git a/rt/html/Elements/SelectWatcherType b/rt/html/Elements/SelectWatcherType new file mode 100644 index 000000000..26de8f7b9 --- /dev/null +++ b/rt/html/Elements/SelectWatcherType @@ -0,0 +1,44 @@ +%# 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 + + +<%INIT> +my @types; +if ($Scope =~ 'queue') { + @types = qw(Cc AdminCc); +} +else { + @types = qw(Requestor Cc AdminCc); +} + +<%ARGS> +$Default=>undef +$Scope => 'ticket' +$Name => 'WatcherType' + diff --git a/rt/html/Elements/SetupSessionCookie b/rt/html/Elements/SetupSessionCookie new file mode 100644 index 000000000..4d728ce70 --- /dev/null +++ b/rt/html/Elements/SetupSessionCookie @@ -0,0 +1,77 @@ +%# 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 +<%init> +my %cookies = CGI::Cookie->fetch(); +my %backends = ( + mysql => 'Apache::Session::MySQL', + Pg => 'Apache::Session::Postgres', + Oracle => 'Apache::Session::Oracle', +) unless $RT::WebSessionClass; +my $session_class = $RT::WebSessionClass || $backends{$RT::DatabaseType} || 'Apache::Session::File'; +my $pm = "$session_class.pm"; $pm =~ s|::|/|g; require $pm; + + eval { + tie %session, $session_class, + $SessionCookie || ( $cookies{'RT_SID'} ? $cookies{'RT_SID'}->value() : undef ), + $backends{$RT::DatabaseType} ? { + Handle => $RT::Handle->dbh, + LockHandle => $RT::Handle->dbh, + } : { + Directory => $RT::MasonSessionDir, + LockDirectory => $RT::MasonSessionDir, + }; + }; + if ($@) { + + # If the session is invalid, create a new session. + if ( $@ =~ /Object does not/i ) { + tie %session, $session_class, undef, + $backends{$RT::DatabaseType} ? { + Handle => $RT::Handle->dbh, + LockHandle => $RT::Handle->dbh, + } : { + Directory => $RT::MasonSessionDir, + LockDirectory => $RT::MasonSessionDir, + }; + undef $cookies{'RT_SID'}; + } + else { + die "RT Couldn't write to session directory '$RT::MasonSessionDir': $@. Check that this dir ectory's permissions are correct."; + } + } + + if ( !$cookies{'RT_SID'} ) { + my $cookie = new CGI::Cookie( + -name => 'RT_SID', + -value => $session{_session_id}, + -path => '/', + ); + $r->header_out('Set-Cookie', $cookie->as_string); + + } + return(); + +<%args> +$SessionCookie => '' + diff --git a/rt/html/Elements/ShadedBox b/rt/html/Elements/ShadedBox new file mode 100644 index 000000000..36b9cae7c --- /dev/null +++ b/rt/html/Elements/ShadedBox @@ -0,0 +1,33 @@ +%# 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 + + + + + +
<%$title |n %>:<%$content |n %>
+<%ARGS> +$title => undef +$content => " " + diff --git a/rt/html/Elements/ShadedInputRow b/rt/html/Elements/ShadedInputRow new file mode 100644 index 000000000..e9fb69e5f --- /dev/null +++ b/rt/html/Elements/ShadedInputRow @@ -0,0 +1,35 @@ +%# 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 +
<%$title |n %>: + value="<%$content|h%>" SIZE=<%$size%>> +
<%$title |n %>:<%$content |n %>
+ +% if ($Reset) { + +%} + + + +
+ + + + +  + +% if ($AlternateLabel) { +<%$AlternateCaption%> + +% } +<%$Caption%> +
+<%ARGS> +$color => "#336699" +$Caption => undef +$AlternateCaption => undef +$AlternateLabel => undef +$Label => loc('Submit') +$Name => undef +$Reset => undef +$ResetLabel => loc('Reset') + diff --git a/rt/html/Elements/Tabs b/rt/html/Elements/Tabs new file mode 100644 index 000000000..4db3849c6 --- /dev/null +++ b/rt/html/Elements/Tabs @@ -0,0 +1,82 @@ +%# 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 +<& /Elements/PageLayout, + current_toptab => $current_toptab, + current_tab => $current_tab, + toptabs => $toptabs, + topactions => $topactions, + tabs => $tabs, + actions => $actions, + subactions => $subactions, + title => $Title +&> + +<%INIT> +my $action; +my $basetopactions = { + A => { html => $m->scomp('/Elements/CreateTicket') + }, + B => { html => $m->scomp('/Elements/SimpleSearch') + } + }; +my $basetabs = { A => { title => loc('Homepage'), + path => '', + }, + B => { title => loc('Tickets'), + path => 'Search/Listing.html' + }, + E => { title => loc('Configuration'), + path => 'Admin/' + }, + K => { title => loc('Preferences'), + path => 'User/Prefs.html' + }, + P => { title => loc('Approval'), + path => 'Approvals/' + }, + }; + +if (!defined $toptabs) { + $toptabs = $basetabs; +} +if (!defined $topactions) { + $topactions = $basetopactions; +} + + # Now let callbacks add their extra tabs + $m->comp('/Elements/Callback', + topactions => $topactions, + toptabs => $toptabs, %ARGS); + + +<%ARGS> +$current_toptab => undef +$current_tab => undef +$toptabs => undef +$topactions => undef +$tabs => undef +$actions => undef +$subactions => undef +$Title => undef + diff --git a/rt/html/Elements/TitleBoxEnd b/rt/html/Elements/TitleBoxEnd new file mode 100644 index 000000000..37f374466 --- /dev/null +++ b/rt/html/Elements/TitleBoxEnd @@ -0,0 +1,31 @@ +%# 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 +
+<%ARGS> +$title => undef +$content => undef + + diff --git a/rt/html/Elements/TitleBoxStart b/rt/html/Elements/TitleBoxStart new file mode 100644 index 000000000..02c76a75e --- /dev/null +++ b/rt/html/Elements/TitleBoxStart @@ -0,0 +1,60 @@ +%# 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 + + + + + + + +
+ <%$class ? "class=\"$class\"" : "class=\"titlebox\""|n%>> + + + <% $title_href && ""|n%><%$title |n %><% $title_href && "" |n%> + + + <%$class ? "class=\"$class\"": "class=\"titleboxright\""|n%>> + <%$titleright ? $titleright : ' ' |n %> +
+<%ARGS> +$width => "100%" +$class => undef +$bodyclass => undef +$title_href => undef +$title => undef +$title_class => undef + +$titleright_href => undef +$titleright => undef +$contentbg => "#dddddd" +$color => "#336699" + diff --git a/rt/html/Elements/ViewUser b/rt/html/Elements/ViewUser new file mode 100644 index 000000000..657272496 --- /dev/null +++ b/rt/html/Elements/ViewUser @@ -0,0 +1,51 @@ +%# 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 +<& /Elements/TitleBoxStart, + title => "id."\">".loc("Tickets from [_1]", $name)."", + titleright=> "id."\">".loc("Comments about [_1]", $name)."" &> + + + + +
+%while (my $w=$tickets->Next) { +<%$w->Id%>: <%$w->Subject%> (<%$w->Status%>)
+%} +
+ <% ($User->Comments || loc("No comment entered about this user")) %> +
+<& /Elements/TitleBoxEnd &> + +<%ARGS> +$User=>undef + + +<%INIT> +my $name=$User->RealName || $User->EmailAddress; + +my $tickets = new RT::Tickets($session{'CurrentUser'}); +$tickets->LimitWatcher(TYPE => 'Requestor', VALUE => $User->EmailAddress); + + + -- cgit v1.2.1 From 289340780927b5bac2c7604d7317c3063c6dd8cc Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 11 Mar 2004 02:05:38 +0000 Subject: import of rt 3.0.9 --- rt/html/Elements/Callback | 7 +++-- rt/html/Elements/MessageBox | 6 ++-- rt/html/Elements/MyTickets | 2 +- rt/html/Elements/SelectLang | 56 +++++++++++++++++++++++++++++++++++++ rt/html/Elements/SelectStatus | 2 ++ rt/html/Elements/SelectWatcherType | 3 ++ rt/html/Elements/SetupSessionCookie | 18 ++++++++---- rt/html/Elements/SimpleSearch | 2 +- 8 files changed, 84 insertions(+), 12 deletions(-) create mode 100644 rt/html/Elements/SelectLang (limited to 'rt/html/Elements') diff --git a/rt/html/Elements/Callback b/rt/html/Elements/Callback index 93ac4c01b..79157e751 100644 --- a/rt/html/Elements/Callback +++ b/rt/html/Elements/Callback @@ -54,10 +54,11 @@ if (!$callbacks) { $cache{$Page,$_CallbackName} = $callbacks; } -foreach my $comp (@$callbacks) { - $m->comp($comp, %ARGS) if $m->comp_exists($comp); +my @rv; +foreach my $comp (sort @$callbacks) { + push @rv, $m->comp($comp, %ARGS) if $m->comp_exists($comp); } -return(1); +return @rv; <%args> $_CallbackName => 'Default' diff --git a/rt/html/Elements/MessageBox b/rt/html/Elements/MessageBox index 64fdf38b7..32f422206 100644 --- a/rt/html/Elements/MessageBox +++ b/rt/html/Elements/MessageBox @@ -21,7 +21,7 @@ %# %# %# END LICENSE BLOCK - + <%INIT> my ($message); @@ -42,6 +42,8 @@ if ($session{'CurrentUser'}->UserObj->Signature) { $QuoteTransaction => undef $Name => 'Content' $Default => '' -$Width => 72 +$Width => $RT::MessageBoxWidth +$Wrap => $RT::MessageBoxWrap +$IncludeSignature => 1 diff --git a/rt/html/Elements/MyTickets b/rt/html/Elements/MyTickets index 6e2ddc6c3..52dae3b8d 100644 --- a/rt/html/Elements/MyTickets +++ b/rt/html/Elements/MyTickets @@ -69,7 +69,7 @@ <%INIT> -my $rows = 10; +my $rows = $RT::MyTicketsLength; my $MyTickets; $MyTickets = new RT::Tickets ($session{'CurrentUser'}); $MyTickets->LimitOwner(VALUE => $session{'CurrentUser'}->Id); diff --git a/rt/html/Elements/SelectLang b/rt/html/Elements/SelectLang new file mode 100644 index 000000000..cc2c357e0 --- /dev/null +++ b/rt/html/Elements/SelectLang @@ -0,0 +1,56 @@ +%# 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 + +<%ARGS> +$ShowNullOption => 1 +$ShowAllQueues => 1 +$Name => undef +$Verbose => undef +$Default => 0 +$Lite => 0 + + +<%ONCE> +use I18N::LangTags::List; +my (@lang, %lang_to_desc); +foreach my $lang (map { s/:://; s/_/-/g; $_ } grep { /^\w+::$/ } keys %RT::I18N::) { + next if $lang =~ /i-default|en-us/; + my $desc = I18N::LangTags::List::name($lang); + next unless ($desc); + $desc =~ s/(.*) (.*)/$2 ($1)/; + $lang_to_desc{$lang} = $desc; +} +@lang = sort { $lang_to_desc{$a} cmp $lang_to_desc{$b} } keys %lang_to_desc; + diff --git a/rt/html/Elements/SelectStatus b/rt/html/Elements/SelectStatus index 2c1ffad39..16a5f2995 100644 --- a/rt/html/Elements/SelectStatus +++ b/rt/html/Elements/SelectStatus @@ -24,6 +24,7 @@ @@ -34,4 +35,5 @@ my @status = $queue->StatusArray(); <%ARGS> $Name => undef $Default => undef +$SkipDeleted => 0 diff --git a/rt/html/Elements/SelectWatcherType b/rt/html/Elements/SelectWatcherType index 26de8f7b9..82aab2a85 100644 --- a/rt/html/Elements/SelectWatcherType +++ b/rt/html/Elements/SelectWatcherType @@ -22,7 +22,9 @@ %# %# END LICENSE BLOCK +   -- cgit v1.2.1 From c582e92888b4a5553e1b4e5214cf35217e4a0cf0 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 11 Nov 2004 12:13:50 +0000 Subject: import rt 3.0.12 --- rt/html/Elements/Header | 1 - rt/html/Elements/Menu | 2 +- rt/html/Elements/MessageBox | 9 +++++---- rt/html/Elements/MyRequests | 2 +- rt/html/Elements/QueryString | 7 +++++++ rt/html/Elements/SelectMatch | 6 +++--- 6 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 rt/html/Elements/QueryString (limited to 'rt/html/Elements') diff --git a/rt/html/Elements/Header b/rt/html/Elements/Header index 0fd91a2e2..23ab5f781 100644 --- a/rt/html/Elements/Header +++ b/rt/html/Elements/Header @@ -58,7 +58,6 @@ ONLOAD=" % } else { <&|/l&>Not logged in. % } -
diff --git a/rt/html/Elements/Menu b/rt/html/Elements/Menu index 963be13bf..5cc8ab773 100644 --- a/rt/html/Elements/Menu +++ b/rt/html/Elements/Menu @@ -56,7 +56,7 @@ % } else { % $sep=0; % } -
  • <%$toptabs->{$tab}->{'path'}|n%>" style="font-size: <%$size%>;" class="<%$class%>" <%($class eq 'currenttopnav') ? "name='focus'" : ""|n %> <% !$level && "accesskey='".$accesskey++."'" |n%>><% $toptabs->{$tab}->{'title'}%> %# Second-level items diff --git a/rt/html/Elements/MessageBox b/rt/html/Elements/MessageBox index 32f422206..2f241a158 100644 --- a/rt/html/Elements/MessageBox +++ b/rt/html/Elements/MessageBox @@ -21,7 +21,7 @@ %# %# %# END LICENSE BLOCK - + <%INIT> my ($message); @@ -33,7 +33,7 @@ if ($QuoteTransaction) { } my $signature = ''; -if ($session{'CurrentUser'}->UserObj->Signature) { +if ($IncludeSignature && $session{'CurrentUser'}->UserObj->Signature) { $signature = "-- \n".$session{'CurrentUser'}->UserObj->Signature; } @@ -42,8 +42,9 @@ if ($session{'CurrentUser'}->UserObj->Signature) { $QuoteTransaction => undef $Name => 'Content' $Default => '' -$Width => $RT::MessageBoxWidth -$Wrap => $RT::MessageBoxWrap +$Width => $RT::MessageBoxWidth || 72 +$Height => $RT::MessageBoxHeight || 15 +$Wrap => $RT::MessageBoxWrap || 'HARD' $IncludeSignature => 1 diff --git a/rt/html/Elements/MyRequests b/rt/html/Elements/MyRequests index 05ae62445..da6fb1f7b 100644 --- a/rt/html/Elements/MyRequests +++ b/rt/html/Elements/MyRequests @@ -66,7 +66,7 @@ <%INIT> -my $rows = 10; +my $rows = $RT::MyRequestsLength; my $MyTickets; $MyTickets = new RT::Tickets ($session{'CurrentUser'}); $MyTickets->LimitWatcher(TYPE => 'Requestor', VALUE => $session{'CurrentUser'}->EmailAddress); diff --git a/rt/html/Elements/QueryString b/rt/html/Elements/QueryString new file mode 100644 index 000000000..36c467938 --- /dev/null +++ b/rt/html/Elements/QueryString @@ -0,0 +1,7 @@ +<%init> +my @params; +while ( (my $key, my $value) = each %ARGS ){ + push @params, $key."=".$m->interp->apply_escapes($value,'u'); +} +return(join('&',@params)); + diff --git a/rt/html/Elements/SelectMatch b/rt/html/Elements/SelectMatch index d58a9633a..c291537e1 100644 --- a/rt/html/Elements/SelectMatch +++ b/rt/html/Elements/SelectMatch @@ -38,13 +38,13 @@ $Default => undef <%INIT> my ($TrueDefault, $FalseDefault, $LikeDefault, $NotLikeDefault); -if ($Default && $Default !~ /true/i) { +if ($Default && $Default =~ /false/i) { $FalseDefault = "SELECTED"; } -elsif ($Default && $Default !~ /false/i) { +elsif ($Default && $Default =~ /true/i) { $TrueDefault = "SELECTED"; } -elsif ($Default && $Default !~ /notlike/i) { +elsif ($Default && $Default =~ /notlike/i) { $NotLikeDefault = "SELECTED"; } else { -- cgit v1.2.1 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 ++++++- 5 files changed, 48 insertions(+), 14 deletions(-) (limited to 'rt/html/Elements') 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 - - - - -<%ARGS> -$title => undef -$content => " " -$name => undef -$size => undef - diff --git a/rt/html/Elements/ShadedRow b/rt/html/Elements/ShadedRow deleted file mode 100644 index 8947fcd82..000000000 --- a/rt/html/Elements/ShadedRow +++ /dev/null @@ -1,31 +0,0 @@ -%# 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 - - - - -<%ARGS> -$title => undef -$content => " " - diff --git a/rt/html/Elements/SimpleSearch b/rt/html/Elements/SimpleSearch index 85f37403f..213aa7eac 100644 --- a/rt/html/Elements/SimpleSearch +++ b/rt/html/Elements/SimpleSearch @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,13 +20,29 @@ %# 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. +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) %# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. %# -%# END LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK   diff --git a/rt/html/Elements/Tabs b/rt/html/Elements/Tabs index 6791e5062..ee1a4086c 100644 --- a/rt/html/Elements/Tabs +++ b/rt/html/Elements/Tabs @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,13 +20,29 @@ %# 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. +%# 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. +%# %# +%# CONTRIBUTION SUBMISSION POLICY: %# -%# END LICENSE BLOCK +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# }}} END BPS TAGGED BLOCK <& /Elements/PageLayout, current_toptab => $current_toptab, current_tab => $current_tab, @@ -49,8 +71,11 @@ my $basetabs = { path => '', }, B => { title => loc('Tickets'), - path => 'Search/Listing.html' + path => 'Search/Build.html' }, + C => { title => loc('Tools'), + path => 'Tools/Offline.html' + }, E => { title => loc('Configuration'), path => 'Admin/' }, diff --git a/rt/html/Elements/ViewUser b/rt/html/Elements/ViewUser deleted file mode 100644 index 657272496..000000000 --- a/rt/html/Elements/ViewUser +++ /dev/null @@ -1,51 +0,0 @@ -%# 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 -<& /Elements/TitleBoxStart, - title => "id."\">".loc("Tickets from [_1]", $name)."", - titleright=> "id."\">".loc("Comments about [_1]", $name)."" &> -
    + <& /Elements/Menu, toptabs => $toptabs, current_toptab => $current_toptab &> - - @@ -29,7 +51,15 @@ % } <& /Elements/Callback, %ARGS &>
    -»|« <&|/l, $RT::VERSION &>RT [_1] from Best Practical Solutions, LLC. +<&|/l, '»|«', + $RT::VERSION, + '2004', + 'Best Practical Solutions, LLC', +&>[_1] RT [_2] Copyright 1996-[_3] [_4].
    +% if (!$Menu) { +<&|/l&>Distributed under version 2 of the GNU GPL.
    +<&|/l, 'sales@bestpractical.com' &>To inquire about support, training, custom development or licensing, please contact [_1].
    +% }
    % if ($Debug) {
    diff --git a/rt/html/Elements/GotoTicket b/rt/html/Elements/GotoTicket index bb0c04dd1..393b28f89 100644 --- a/rt/html/Elements/GotoTicket +++ b/rt/html/Elements/GotoTicket @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,11 +20,27 @@ %# 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. +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) %# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. %# -%# END LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK
      diff --git a/rt/html/Elements/Header b/rt/html/Elements/Header index 23ab5f781..5d9bbb08b 100644 --- a/rt/html/Elements/Header +++ b/rt/html/Elements/Header @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,14 +20,30 @@ %# 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. +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) %# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. %# -%# END LICENSE BLOCK - +%# }}} END BPS TAGGED BLOCK +%# <%$Title%> @@ -31,6 +53,19 @@ + +<& /Elements/Callback, _CallbackName => 'Head', %ARGS &> send you a reminder.


    -<&|/l, '2003'&>RT is © Copyright 1996-[_1] Jesse Vincent <jesse@bestpractical.com>. It is distributed under Version 2 of the GNU General Public License. - +<& /Elements/Footer, Menu => 0 &> <%ARGS> $user => "" $pass => undef diff --git a/rt/html/Elements/Menu b/rt/html/Elements/Menu index 5cc8ab773..0e57585c5 100644 --- a/rt/html/Elements/Menu +++ b/rt/html/Elements/Menu @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,13 +20,29 @@ %# 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. +%# 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. +%# %# +%# CONTRIBUTION SUBMISSION POLICY: %# -%# END LICENSE BLOCK +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# }}} END BPS TAGGED BLOCK %# font size depends on level % if ($level ge 3) { % $size = $basesize-(6); @@ -56,7 +78,7 @@ % } else { % $sep=0; % } -
  • <%$toptabs->{$tab}->{'path'}|n%>" style="font-size: <%$size%>;" class="<%$class%>" +
  • <% !$level && "accesskey='".$accesskey++."'" |n%>><% $toptabs->{$tab}->{'title'}%> %# Second-level items @@ -75,6 +97,7 @@ <%INIT> my ($tab, $subtab, $class, $size, $padding); my $basesize=16; + <%ARGS> diff --git a/rt/html/Elements/MessageBox b/rt/html/Elements/MessageBox index 2f241a158..5faa9575c 100644 --- a/rt/html/Elements/MessageBox +++ b/rt/html/Elements/MessageBox @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,13 +20,29 @@ %# 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. +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) %# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. %# -%# END LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK <%INIT> diff --git a/rt/html/Elements/MyRequests b/rt/html/Elements/MyRequests index da6fb1f7b..4e1bf3eaf 100644 --- a/rt/html/Elements/MyRequests +++ b/rt/html/Elements/MyRequests @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,65 +20,50 @@ %# 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. +%# 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. %# %# -%# END LICENSE BLOCK -<& /Elements/TitleBoxStart, title => loc("[_1] highest priority tickets I requested...", $rows), bodyclass=> '' &> -
  • + <%$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'), -- 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 +- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'rt/html/Elements') 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; -- cgit v1.2.1 From d39d52aac8f38ea9115628039f0df5aa3ac826de Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 3 Dec 2004 20:40:48 +0000 Subject: import rt 3.2.2 --- rt/html/Elements/BevelBoxRaisedEnd | 38 ++- rt/html/Elements/BevelBoxRaisedStart | 38 ++- rt/html/Elements/Callback | 38 ++- rt/html/Elements/Checkbox | 38 ++- rt/html/Elements/CollectionAsTable/Header | 91 ++++++ rt/html/Elements/CollectionAsTable/ParseFormat | 81 +++++ rt/html/Elements/CollectionAsTable/Row | 69 +++++ rt/html/Elements/CreateTicket | 38 ++- rt/html/Elements/EditLinks | 171 +++++++++++ rt/html/Elements/Error | 38 ++- rt/html/Elements/Footer | 48 ++- rt/html/Elements/GotoTicket | 38 ++- rt/html/Elements/Header | 57 +++- rt/html/Elements/ListActions | 38 ++- rt/html/Elements/Login | 41 ++- rt/html/Elements/Menu | 41 ++- rt/html/Elements/MessageBox | 38 ++- rt/html/Elements/MyRequests | 111 ++++--- rt/html/Elements/MyTickets | 115 ++++---- rt/html/Elements/PageLayout | 38 ++- rt/html/Elements/QueryString | 45 +++ rt/html/Elements/QuickCreate | 70 +++++ rt/html/Elements/Quicksearch | 51 +++- rt/html/Elements/RT__Ticket/ColumnMap | 394 +++++++++++++++++++++++++ rt/html/Elements/Refresh | 40 ++- rt/html/Elements/ScrubHTML | 71 +++++ rt/html/Elements/Section | 38 ++- rt/html/Elements/SelectAttachmentField | 45 ++- rt/html/Elements/SelectBoolean | 38 ++- rt/html/Elements/SelectCustomFieldOperator | 38 ++- rt/html/Elements/SelectCustomFieldValue | 40 ++- rt/html/Elements/SelectDate | 41 ++- rt/html/Elements/SelectDateRelation | 38 ++- rt/html/Elements/SelectDateType | 38 ++- rt/html/Elements/SelectEqualityOperator | 38 ++- rt/html/Elements/SelectGroups | 38 ++- rt/html/Elements/SelectLang | 38 ++- rt/html/Elements/SelectLinkType | 38 ++- rt/html/Elements/SelectMatch | 45 ++- rt/html/Elements/SelectNewTicketQueue | 43 ++- rt/html/Elements/SelectOwner | 46 ++- rt/html/Elements/SelectQueue | 46 ++- rt/html/Elements/SelectResultsPerPage | 38 ++- rt/html/Elements/SelectSortOrder | 38 ++- rt/html/Elements/SelectStatus | 46 ++- rt/html/Elements/SelectTicketSortBy | 38 ++- rt/html/Elements/SelectTicketTypes | 38 ++- rt/html/Elements/SelectUsers | 38 ++- rt/html/Elements/SelectWatcherType | 38 ++- rt/html/Elements/SetupSessionCookie | 40 ++- rt/html/Elements/ShowLink | 62 ++++ rt/html/Elements/ShowLinks | 109 +++++++ rt/html/Elements/SimpleSearch | 38 ++- rt/html/Elements/Submit | 38 ++- rt/html/Elements/Tabs | 43 ++- rt/html/Elements/TicketList | 121 ++++++++ rt/html/Elements/TitleBox | 46 +++ rt/html/Elements/TitleBoxEnd | 38 ++- rt/html/Elements/TitleBoxStart | 54 +++- 59 files changed, 2871 insertions(+), 516 deletions(-) create mode 100644 rt/html/Elements/CollectionAsTable/Header create mode 100644 rt/html/Elements/CollectionAsTable/ParseFormat create mode 100644 rt/html/Elements/CollectionAsTable/Row create mode 100755 rt/html/Elements/EditLinks create mode 100644 rt/html/Elements/QuickCreate create mode 100644 rt/html/Elements/RT__Ticket/ColumnMap create mode 100644 rt/html/Elements/ScrubHTML create mode 100644 rt/html/Elements/ShowLink create mode 100755 rt/html/Elements/ShowLinks create mode 100644 rt/html/Elements/TicketList create mode 100644 rt/html/Elements/TitleBox (limited to 'rt/html/Elements') diff --git a/rt/html/Elements/BevelBoxRaisedEnd b/rt/html/Elements/BevelBoxRaisedEnd index ebf45df0f..f1c794b37 100644 --- a/rt/html/Elements/BevelBoxRaisedEnd +++ b/rt/html/Elements/BevelBoxRaisedEnd @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,13 +20,29 @@ %# 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. +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) %# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. %# -%# END LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK
    diff --git a/rt/html/Elements/BevelBoxRaisedStart b/rt/html/Elements/BevelBoxRaisedStart index c4e6c55bc..ca504e4b2 100644 --- a/rt/html/Elements/BevelBoxRaisedStart +++ b/rt/html/Elements/BevelBoxRaisedStart @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,13 +20,29 @@ %# 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. +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) %# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. %# -%# END LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK +<%perl> + +my %generic_query_args = ( Query => $Query, Rows => $Rows, Page => $Page ); + +my $item = 0; +$$maxitems = 0; +foreach my $col (@Format) { + $item++; + $$maxitems = $item if $item > $$maxitems; + if ( $col->{title} eq 'NEWLINE' ) { + $m->out(''); + $item = 0; + } + else { + $m->out(''); + } +} + + diff --git a/rt/html/Elements/CollectionAsTable/ParseFormat b/rt/html/Elements/CollectionAsTable/ParseFormat new file mode 100644 index 000000000..c7b709bff --- /dev/null +++ b/rt/html/Elements/CollectionAsTable/ParseFormat @@ -0,0 +1,81 @@ +%# 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 + +<%ARGS> +$Format + + +<%init> +use Regexp::Common qw(delimited); +my @Columns; +#my $quoted = qr[$RE{delimited}{-delim=>qq{\'\"}}|(?:\{|\}|\w|\.)+]; +my $justquoted = qr[$RE{delimited}{-delim=>qq{\'\"}}]; +#my $quoted = $RE{quoted}{-esc}; +my $word = qr [(?:\{|\}|\w|\.)+]; + +while ($Format =~ /($justquoted|$word)/igx) { + my $col = $1; + + if ($col =~ /^$RE{quoted}{-esc}$/) { + substr($col,0,1) = ""; + substr($col,-1,1) = ""; + } + + my $colref; + if ( $col =~ s/\/STYLE:(.*?)$//io ) { + $colref->{'style'} = $1; + } + if ( $col =~ s/\/CLASS:(.*?)$//io ) { + $colref->{'class'} = $1; + } + if ( $col =~ s/\/TITLE:(.*?)$//io ) { + $colref->{'title'} = $1; + } + if ( $col =~ /__(.*?)__/gio ) { + my @subcols; + while ( $col =~ s/^(.*?)__(.*?)__//o ) { + push ( @subcols, $1 ) if ($1); + push ( @subcols, "__$2__" ); + $colref->{'attribute'} = $2; + } + push ( @subcols, $col ); + @{ $colref->{'output'} } = @subcols; + } + else { + @{ $colref->{'output'} } = ( "__" . $col . "__" ); + $colref->{'attribute'} = $col; + } + + if ( !$colref->{'title'} && grep { /^__(.*?)__$/io } + @{ $colref->{'output'} } ) + { + $colref->{'title'} = $1; + $colref->{'attribute'} = $1; + } + + + push @Columns, $colref; +} + return(@Columns); + diff --git a/rt/html/Elements/CollectionAsTable/Row b/rt/html/Elements/CollectionAsTable/Row new file mode 100644 index 000000000..926317be9 --- /dev/null +++ b/rt/html/Elements/CollectionAsTable/Row @@ -0,0 +1,69 @@ +%# 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 + +<%ARGS> +$i => undef +@Format => undef +$record => undef +$maxitems => undef +$Depth => undef +$Warning => undef + + +<%PERL> +$m->out( '' ); +my $item; +foreach my $column (@Format) { + if ( $column->{title} eq 'NEWLINE' ) { + while ($item < $maxitems) { + $m->out("\n"); + $item++; + } + $item = 0; + $m->out(''); + $m->out( '' ); + next; + } + $item++; + $m->out(''); +} +$m->out(''); + diff --git a/rt/html/Elements/CreateTicket b/rt/html/Elements/CreateTicket index 7e1025d0a..70c94e78f 100644 --- a/rt/html/Elements/CreateTicket +++ b/rt/html/Elements/CreateTicket @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,13 +20,29 @@ %# 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. +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) %# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. %# -%# END LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK
    <&|/l, $m->scomp('/Elements/SelectNewTicketQueue')&> [_1] diff --git a/rt/html/Elements/EditLinks b/rt/html/Elements/EditLinks new file mode 100755 index 000000000..b66291f30 --- /dev/null +++ b/rt/html/Elements/EditLinks @@ -0,0 +1,171 @@ +%# {{{ BEGIN BPS TAGGED BLOCK +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# +%# +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: +%# +%# 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. +%# +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# }}} END BPS TAGGED BLOCK +
    diff --git a/rt/html/Elements/Callback b/rt/html/Elements/Callback index 79157e751..cbec1883d 100644 --- a/rt/html/Elements/Callback +++ b/rt/html/Elements/Callback @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,13 +20,29 @@ %# 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. +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) %# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. %# -%# END LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK <%once> my (%cache, $check); diff --git a/rt/html/Elements/Checkbox b/rt/html/Elements/Checkbox index ae3d765c2..146de6a7a 100644 --- a/rt/html/Elements/Checkbox +++ b/rt/html/Elements/Checkbox @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,13 +20,29 @@ %# 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. +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) %# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. %# -%# END LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK > <%ARGS> diff --git a/rt/html/Elements/CollectionAsTable/Header b/rt/html/Elements/CollectionAsTable/Header new file mode 100644 index 000000000..2d1574dea --- /dev/null +++ b/rt/html/Elements/CollectionAsTable/Header @@ -0,0 +1,91 @@ +%# 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 + +<%ARGS> +@Format => undef +$AllowSorting => undef +$Order=>undef +$BaseURL => undef +$Query => undef +$Rows => undef +$Page => undef +$maxitems => undef + +
    '); + my $title = $col->{title}; + $title =~ s/^__(.*)__$/$1/o; + $title = ( $m->comp('/Elements/RT__Ticket/ColumnMap', + Name => $title, + Attr => 'title' + ) + || $title + ); + if ( $AllowSorting + && $col->{'attribute'} + && $m->comp('/Elements/RT__Ticket/ColumnMap', + Name => $col->{'attribute'}, + Attr => 'attribute' ) + ) + { + + $m->out( + '' . loc($title) . '' + ); + } + else { + $m->out( loc($title) ); + } + $m->out('
     
    '); + foreach my $subcol ( @{ $column->{output} } ) { + if ( $subcol =~ /^__(.*?)__$/o ) { + my $col = $1; + my $value = $m->comp('/Elements/RT__Ticket/ColumnMap', Name => $col, Attr => 'value'); + + if ( $value && ref($value)) { + $m->out( &{ $value } ( $record, $i ) ); + } else { + $m->out($value ); + } + } + else { + $m->out( Encode::decode_utf8($subcol) ); + } + } + $m->out('
    + + + + +
    +

    <&|/l&>Current Links

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    <&|/l&>(Check box to delete)
    <&|/l&>Depends on: +% while (my $link = $Object->DependsOn->Next) { + + <& ShowLink, URI => $link->TargetURI &>
    +% } +
    <&|/l&>Depended on by: +% while (my $link = $Object->DependedOnBy->Next) { +% my $member = $link->BaseObj; + + <& ShowLink, URI => $link->BaseURI &>
    +% } +
    <&|/l&>Parents: +% while (my $link = $Object->MemberOf->Next) { + + <& ShowLink, URI => $link->TargetURI &>
    +% } +
    <&|/l&>Children: +% while (my $link = $Object->Members->Next) { + + <& ShowLink, URI => $link->BaseURI &>
    +% } +
    <&|/l&>Refers to: +% while (my $link = $Object->RefersTo->Next) { + + <& ShowLink, URI => $link->TargetURI &>
    +%} +
    <&|/l&>Referred to by: +% while (my $link = $Object->ReferredToBy->Next) { + + <& ShowLink, URI => $link->BaseURI &>
    +% } +
    + +
    +

    <&|/l&>New Links

    +% if (ref($Object) eq 'RT::Ticket') { +<&|/l&>Enter tickets or URIs to link tickets to. Separate multiple entries with spaces.
    +% } elsif (ref($Object) eq 'RT::Queue') { +<&|/l&>Enter queues or URIs to link queues to. Separate multiple entries with spaces.
    +% } else { +<&|/l&>Enter objects or URIs to link objects to. Separate multiple entries with spaces.
    +% } + +% if ($Merge) { + + + + +% } + + + + + + + + + + + + + + + + + + + + + + + + +
    <&|/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:
    +
    + +<%INIT> +my $id; +if ($Object && $Object->Id) { + $id = $Object->Id; +} else { + $id = 'new'; +} + + +<%ARGS> +$Object => undef +$Merge => 0 + diff --git a/rt/html/Elements/Error b/rt/html/Elements/Error index dc44f125e..3aa77a51e 100644 --- a/rt/html/Elements/Error +++ b/rt/html/Elements/Error @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,13 +20,29 @@ %# 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. +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) %# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. %# -%# END LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK <& /Elements/Callback, %ARGS, error => $error &> <& /Elements/Header, Code => $Code, Why => $Why &> <& /Elements/Tabs &> diff --git a/rt/html/Elements/Footer b/rt/html/Elements/Footer index 5c833f886..213761e91 100644 --- a/rt/html/Elements/Footer +++ b/rt/html/Elements/Footer @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,13 +20,29 @@ %# 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. +%# 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. +%# %# +%# CONTRIBUTION SUBMISSION POLICY: %# -%# END LICENSE BLOCK +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# }}} END BPS TAGGED BLOCK % if ($Menu) {
    - - - - - - - -% my $i; -% while (my $Ticket = $MyTickets->Next) { -% $i++; - - - - - - - -% } -
    <&|/l&>#<&|/l&>Subject<&|/l&>Queue<&|/l&>Status<&|/l&>Owner
    -<%$Ticket->Id%> - - -<%$Ticket->Subject || loc('(no subject)')%> - - -<%$Ticket->QueueObj->Name%> - -% if ($Ticket->HasUnresolvedDependencies ) { -% if ($Ticket->HasUnresolvedDependencies( Type => 'approval' )) { -<&|/l&>(pending approval) -% } else { -<&|/l&>(pending other tickets) -% } -% } else { -<%loc($Ticket->Status)%> -% } - -<%$Ticket->OwnerObj->Name%> -
    -<& /Elements/TitleBoxEnd &> - +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# }}} END BPS TAGGED BLOCK +<&|/Elements/TitleBox, + title => loc("[_1] newest unowned tickets", $rows), + title_href => "Search/Results.html".$QueryString &> +<& /Elements/TicketList, + Format => "'__id__/TITLE:#', '__Subject__/TITLE:Subject', QueueName, ExtendedStatus, CreatedRelative, '".loc('Take')."/TITLE: ' ", + Query => $Query, + OrderBy => 'Created', + Order => 'DESC', + ShowNavigation => 0, + Rows => $rows -<%INIT> + &> + +<%init> my $rows = $RT::MyRequestsLength; -my $MyTickets; -$MyTickets = new RT::Tickets ($session{'CurrentUser'}); -$MyTickets->LimitWatcher(TYPE => 'Requestor', VALUE => $session{'CurrentUser'}->EmailAddress); -$MyTickets->LimitStatus(VALUE => "open"); -$MyTickets->LimitStatus(VALUE => "new"); -$MyTickets->RowsPerPage($rows); -$MyTickets->OrderBy(FIELD => 'Priority', ORDER => 'DESC'); - +my $Query = "Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')"; + +my $QueryString = '?' . $m->comp('/Elements/QueryString', + Query => $Query, + Order => 'DESC', + OrderBy => 'Priority') if ($Query); + + diff --git a/rt/html/Elements/MyTickets b/rt/html/Elements/MyTickets index 52dae3b8d..9f30a893b 100644 --- a/rt/html/Elements/MyTickets +++ b/rt/html/Elements/MyTickets @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,68 +20,51 @@ %# 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. +%# 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. %# %# -%# END LICENSE BLOCK -<& /Elements/TitleBoxStart, title => loc("[_1] highest priority tickets I own...", $rows), bodyclass=> '' &> - - - - - - - - - -% my $i; -% while (my $Ticket = $MyTickets->Next) { -% next if $Ticket->HasUnresolvedDependencies( Type => 'approval' ); -% last if $i++ >= $rows; - - - - - - - -% } -
    <&|/l&>#<&|/l&>Subject<&|/l&>Queue<&|/l&>Status 
    -<%$Ticket->Id%> - - -<%$Ticket->Subject || loc('(no subject)')%> - - -<%$Ticket->QueueObj->Name%> - -% if ($Ticket->HasUnresolvedDependencies ) { -% if ($Ticket->HasUnresolvedDependencies( Type => 'approval' ) or -% $Ticket->HasUnresolvedDependencies( Type => 'code' )) { -<&|/l&>(pending approval) -% } else { -<&|/l&>(pending other tickets) -% } -% } else { -<%loc($Ticket->Status)%> -% } - -[<&|/l&>Update] -
    -<& /Elements/TitleBoxEnd &> - +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# }}} END BPS TAGGED BLOCK +<&|/Elements/TitleBox, + title => loc('[_1] highest priority tickets I own', $rows), + title_href => "Search/Results.html".$QueryString &> +<& /Elements/TicketList, + Format => "'__id__/TITLE:#', '__Subject__/TITLE:Subject', Priority, QueueName, ExtendedStatus", -<%INIT> + Query => $Query, + OrderBy => 'Priority', + Order => 'DESC', + Rows => $rows, + ShowNavigation => 0 + &> + +<%init> my $rows = $RT::MyTicketsLength; -my $MyTickets; -$MyTickets = new RT::Tickets ($session{'CurrentUser'}); -$MyTickets->LimitOwner(VALUE => $session{'CurrentUser'}->Id); -$MyTickets->LimitStatus(VALUE => "open"); -$MyTickets->LimitStatus(VALUE => "new"); -$MyTickets->RowsPerPage($rows); -$MyTickets->OrderBy(FIELD => 'Priority', ORDER => 'DESC'); - +my $Query = " Owner = '".$session{'CurrentUser'}->Id."' AND ( Status = 'new' OR Status = 'open')"; + +my $QueryString = '?' . $m->comp('/Elements/QueryString', + Query => $Query, + Order => 'DESC', + OrderBy => 'Priority') if ($Query); + + + diff --git a/rt/html/Elements/PageLayout b/rt/html/Elements/PageLayout index 685317581..4670a8bb2 100644 --- a/rt/html/Elements/PageLayout +++ b/rt/html/Elements/PageLayout @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,13 +20,29 @@ %# 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. +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) %# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. %# -%# END LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK diff --git a/rt/html/Elements/QueryString b/rt/html/Elements/QueryString index 36c467938..cbec29a30 100644 --- a/rt/html/Elements/QueryString +++ b/rt/html/Elements/QueryString @@ -1,3 +1,48 @@ +%# {{{ BEGIN BPS TAGGED BLOCK +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# +%# +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: +%# +%# 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. +%# +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# }}} END BPS TAGGED BLOCK <%init> my @params; while ( (my $key, my $value) = each %ARGS ){ diff --git a/rt/html/Elements/QuickCreate b/rt/html/Elements/QuickCreate new file mode 100644 index 000000000..10cfbd3c0 --- /dev/null +++ b/rt/html/Elements/QuickCreate @@ -0,0 +1,70 @@ +%# {{{ BEGIN BPS TAGGED BLOCK +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# +%# +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: +%# +%# 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. +%# +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# }}} END BPS TAGGED BLOCK +<& /Elements/TitleBoxStart, title => loc('Quick ticket creation') &> +
    + +
    <%$AppName%>
    + + + + + +%# +
    +<&|/l&>Subject:
    +
    +<&|/l&>Queue:
    <& /Elements/SelectQueue, Name => 'Queue', ShowNullOption => 0 &>
    +
    +<&|/l&>Owner:
    + +
    +
    +
    + +<& /Elements/TitleBoxEnd &> diff --git a/rt/html/Elements/Quicksearch b/rt/html/Elements/Quicksearch index b1a67ab29..103c760c7 100644 --- a/rt/html/Elements/Quicksearch +++ b/rt/html/Elements/Quicksearch @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,13 +20,29 @@ %# 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. +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) %# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. %# -%# END LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK <& /Elements/TitleBoxStart, title => loc("Quick search"), bodyclass => "" &> @@ -33,6 +55,11 @@ <%PERL> my $i; while (my $queue = $Queues->Next) { + my $new_q = "Queue = '".$queue->Name."' AND Status = 'new'"; + my $open_q = "Queue = '".$queue->Name."' AND Status = 'open'"; + my $all_q = "Queue = '".$queue->Name."' AND (Status = 'open' OR Status = 'new')"; + + $Tickets->ClearRestrictions; $Tickets->LimitStatus(VALUE => "open"); $Tickets->LimitQueue(VALUE => $queue->Name, OPERATOR => '='); @@ -43,12 +70,14 @@ while (my $queue = $Queues->Next) { $Tickets->LimitQueue(VALUE => $queue->Name, OPERATOR => '='); my $new = $Tickets->Count(); + + % $i++; - - - + + + % }
    <%$queue->Name%><%$new%><%$open%><%$queue->Name%><%$new%><%$open%>
    diff --git a/rt/html/Elements/RT__Ticket/ColumnMap b/rt/html/Elements/RT__Ticket/ColumnMap new file mode 100644 index 000000000..a6d387cae --- /dev/null +++ b/rt/html/Elements/RT__Ticket/ColumnMap @@ -0,0 +1,394 @@ +%# 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 + +<%ARGS> +$Name => undef +$Attr => undef + + +<%perl> +return ColumnMap($Name, $Attr); + + +<%INIT> +our ( $COLUMN_MAP, $CUSTOM_FIELD_MAP ); + +sub ColumnMap { + my $name = shift; + my $attr = shift; + + # First deal with the simple things from the map + if ( $COLUMN_MAP->{$name} ) { + return ( $COLUMN_MAP->{$name}->{$attr} ); + } + + # now, let's deal with harder things, like Custom Fields + + elsif ( $name =~ /^(?:CF|CustomField).(.*)$/ ) { + my $field = $1; + my $cf; + if ( $CUSTOM_FIELD_MAP->{$field} ) { + $cf = $CUSTOM_FIELD_MAP->{$field}; + } + else { + + $cf = RT::CustomField->new( $session{'CurrentUser'} ); + + if ( $field =~ /^(.+?)\.{(.+)}$/ ) { + $cf->LoadByNameAndQueue( Queue => $1, Name => $2 ); + } + else { + $field = $1 if $field =~ /^{(.+)}$/; # trim { } + $cf->LoadByNameAndQueue( Queue => "0", Name => $field ); + } + $CUSTOM_FIELD_MAP->{$field} = $cf if ( $cf->id ); + } + + unless ( $cf->id ) { + return undef; + } + + if ( $attr eq 'attribute' ) { + return (undef); + } + elsif ( $attr eq 'title' ) { + return ( $cf->Name ); + } + elsif ( $attr eq 'value' ) { + my $value = eval "sub { + my \$values = \$_[0]->CustomFieldValues('" . $cf->id . "'); + return ( join( ', ', map { \$_->Content } \@{ \$values->ItemsArrayRef } )) + }" || die $@; + return ($value); + } + } +} + +$COLUMN_MAP = { + QueueName => { + attribute => 'Queue', + title => 'Queue', + value => sub { return $_[0]->QueueObj->Name } + }, + OwnerName => { + title => 'Owner', + attribute => 'Owner', + value => sub { return $_[0]->OwnerObj->Name } + }, + id => { + attribute => 'id', + align => 'right', + value => sub { return $_[0]->id } + }, + Status => { + attribute => 'Status', + value => sub { return $_[0]->Status } + }, + Subject => { + attribute => 'Subject', + value => sub { return $_[0]->Subject || "(" . loc('No subject') . ")" } + }, + ExtendedStatus => { + title => 'Status', + attribute => 'Status', + value => sub { + my $Ticket = shift; + + if ( $Ticket->HasUnresolvedDependencies ) { + if ( $Ticket->HasUnresolvedDependencies( Type => 'approval' ) + or $Ticket->HasUnresolvedDependencies( Type => 'code' ) ) + { + return "" . loc('(pending approval)') . ""; + } + else { + return "" . loc('(pending other Collection)') . ""; + } + } + else { + return loc( $Ticket->Status ); + } + + } + }, + Priority => { + attribute => 'Priority', + value => sub { return $_[0]->Priority } + }, + InitialPriority => { + attribute => 'InitialPriority', + value => sub { return $_[0]->InitialPriority } + }, + FinalPriority => { + attribute => 'FinalPriority', + value => sub { return $_[0]->FinalPriority } + }, + EffectiveId => { + attribute => 'EffectiveId', + value => sub { return $_[0]->EffectiveId } + }, + Type => { + attribute => 'Type', + value => sub { return $_[0]->Type } + }, + TimeWorked => { + attribute => 'TimeWorked', + value => sub { return $_[0]->TimeWorked } + }, + TimeLeft => { + attribute => 'TimeLeft', + value => sub { return $_[0]->TimeLeft } + }, + TimeEstimated => { + attribute => 'TimeEstimated', + value => sub { return $_[0]->TimeEstimated } + }, + Requestors => { + value => sub { return $_[0]->Requestors->MemberEmailAddressesAsString } + }, + Cc => { + value => sub { return $_[0]->Cc->MemberEmailAddressesAsString } + }, + AdminCc => { + value => sub { return $_[0]->AdminCc->MemberEmailAddressesAsString } + }, + StartsRelative => { + title => 'Starts', + attribute => 'Starts', + value => sub { return $_[0]->StartsObj->AgeAsString } + }, + StartedRelative => { + title => 'Started', + attribute => 'Started', + value => sub { return $_[0]->StartedObj->AgeAsString } + }, + CreatedRelative => { + title => 'Created', + attribute => 'Created', + value => sub { return $_[0]->CreatedObj->AgeAsString } + }, + LastUpdatedRelative => { + title => 'LastUpdated', + attribute => 'LastUpdated', + value => sub { return $_[0]->LastUpdatedObj->AgeAsString } + }, + ToldRelative => { + title => 'Told', + attribute => 'Told', + value => sub { return $_[0]->ToldObj->AgeAsString } + }, + DueRelative => { + title => 'Due', + attribute => 'Due', + value => sub { + my $date = $_[0]->DueObj; + if ($date && $date->Unix > 0 && $date->Unix < time()) { + return '' . $date->AgeAsString . ''; + } else { + return $date->AgeAsString; + } + } + }, + ResolvedRelative => { + title => 'Resolved', + attribute => 'Resolved', + value => sub { return $_[0]->ResolvedObj->AgeAsString } + }, + Starts => { + attribute => 'Starts', + value => sub { return $_[0]->StartsObj->AsString } + }, + Started => { + attribute => 'Started', + value => sub { return $_[0]->StartedObj->AsString } + }, + Created => { + attribute => 'Created', + value => sub { return $_[0]->CreatedObj->AsString } + }, + CreatedBy => { + attribute => 'CreatedBy', + value => sub { return $_[0]->CreatorObj->Name } + }, + LastUpdated => { + attribute => 'LastUpdated', + value => sub { return $_[0]->LastUpdatedObj->AsString } + }, + LastUpdatedBy => { + attribute => 'LastUpdatedBy', + value => sub { return $_[0]->LastUpdatedByObj->Name } + }, + Told => { + attribute => 'Told', + value => sub { return $_[0]->ToldObj->AsString } + }, + Due => { + attribute => 'Due', + value => sub { return $_[0]->DueObj->AsString } + }, + Resolved => { + attribute => 'Resolved', + value => sub { return $_[0]->ResolvedObj->AsString } + }, + + DependedOnBy => { + value => sub { + my $links = $_[0]->DependedOnBy; + return ( + join( + "
    ", + map { + '' + . ( $_->BaseIsLocal ? $_->LocalBase : $_->Base ) + . '' + } @{ $links->ItemsArrayRef } + ) + ); + } + }, + Members => { + value => sub { + my $links = $_[0]->Members; + return ( + join( + "
    ", + map { + '' + . ( $_->BaseIsLocal ? $_->LocalBase : $_->Base ) + . '' + } @{ $links->ItemsArrayRef } + ) + ); + } + }, + Children => { + value => sub { + my $links = $_[0]->Members; + return ( + join( + "
    ", + map { + '' + . ( $_->BaseIsLocal ? $_->LocalBase : $_->Base ) + . '' + } @{ $links->ItemsArrayRef } + ) + ); + } + }, + ReferredToBy => { + value => sub { + my $links = $_[0]->ReferredToBy; + return ( + join( + "
    ", + map { + '' + . ( $_->BaseIsLocal ? $_->LocalBase : $_->Base ) + . '' + } @{ $links->ItemsArrayRef } + ) + ); + } + }, + + DependsOn => { + value => sub { + my $links = $_[0]->DependsOn; + return ( + join( + "
    ", + map { + '' + . ( $_->TargetIsLocal ? $_->LocalTarget : $_->Target ) + . '' + } @{ $links->ItemsArrayRef } + ) + ); + } + }, + MemberOf => { + value => sub { + my $links = $_[0]->MemberOf; + return ( + join( + "
    ", + map { + '' + . ( $_->TargetIsLocal ? $_->LocalTarget : $_->Target ) + . '' + } @{ $links->ItemsArrayRef } + ) + ); + } + }, + Parents => { + value => sub { + my $links = $_[0]->MemberOf; + return ( + join( + "
    ", + map { + '' + . ( $_->TargetIsLocal ? $_->LocalTarget : $_->Target ) + . '' + } @{ $links->ItemsArrayRef } + ) + ); + } + }, + RefersTo => { + value => sub { + my $links = $_[0]->RefersTo; + return ( + join( + "
    ", + map { + '' + . ( $_->TargetIsLocal ? $_->LocalTarget : $_->Target ) + . '' + } @{ $links->ItemsArrayRef } + ) + ); + } + }, + + '_CLASS' => { + value => sub { return $_[1] % 2 ? 'oddline' : 'evenline' } + }, + +}; + + + +# }}} +$m->comp( '/Elements/Callback', COLUMN_MAP => $COLUMN_MAP, _CallbackName => 'ColumnMap'); + diff --git a/rt/html/Elements/Refresh b/rt/html/Elements/Refresh index 2b5376fee..3cfb7c663 100644 --- a/rt/html/Elements/Refresh +++ b/rt/html/Elements/Refresh @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,13 +20,29 @@ %# 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. +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) %# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. %# -%# END LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK
    diff --git a/rt/html/Elements/SelectAttachmentField b/rt/html/Elements/SelectAttachmentField index 47bc53211..cd16bbaee 100644 --- a/rt/html/Elements/SelectAttachmentField +++ b/rt/html/Elements/SelectAttachmentField @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,17 +20,34 @@ %# 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. +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) %# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. %# -%# END LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK <%ARGS> $Name => 'AttachmentField' diff --git a/rt/html/Elements/SelectBoolean b/rt/html/Elements/SelectBoolean index 8cf60dc33..d17606027 100644 --- a/rt/html/Elements/SelectBoolean +++ b/rt/html/Elements/SelectBoolean @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,13 +20,29 @@ %# 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. +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) %# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. %# -%# END LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK % while (my $option = shift @Options) { % my $value = shift @Values; diff --git a/rt/html/Elements/SelectCustomFieldValue b/rt/html/Elements/SelectCustomFieldValue index 60f65bcf2..de9f5401d 100644 --- a/rt/html/Elements/SelectCustomFieldValue +++ b/rt/html/Elements/SelectCustomFieldValue @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,19 +20,35 @@ %# 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. +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) %# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. %# -%# END LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK <& /Elements/Callback, %ARGS &> % if ($CustomField->Type =~ /Select/i) { % my $values = $CustomField->Values; +%# }}} END BPS TAGGED BLOCK +> <%init> unless ((defined $Default) or @@ -45,4 +67,5 @@ $menu_prefix=>'' $current=>time $Default => undef $Name => undef +$Size => 16 diff --git a/rt/html/Elements/SelectDateRelation b/rt/html/Elements/SelectDateRelation index ee26efeaa..b3f3868b3 100644 --- a/rt/html/Elements/SelectDateRelation +++ b/rt/html/Elements/SelectDateRelation @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,13 +20,29 @@ %# 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. +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) %# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. %# -%# END LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK diff --git a/rt/html/Elements/SelectEqualityOperator b/rt/html/Elements/SelectEqualityOperator index 99c60d554..5e5d1a4b9 100644 --- a/rt/html/Elements/SelectEqualityOperator +++ b/rt/html/Elements/SelectEqualityOperator @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,13 +20,29 @@ %# 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. +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) %# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. %# -%# END LICENSE BLOCK +%# }}} END BPS TAGGED BLOCK
    diff --git a/rt/html/Elements/TitleBoxStart b/rt/html/Elements/TitleBoxStart index 02c76a75e..a0c733543 100644 --- a/rt/html/Elements/TitleBoxStart +++ b/rt/html/Elements/TitleBoxStart @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,14 +20,30 @@ %# 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. +%# 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. +%# %# +%# CONTRIBUTION SUBMISSION POLICY: %# -%# END LICENSE BLOCK - <%$class ? "class=\"$class\"" : "class=\"titlebox\""|n%>> + + X  - - <% $title_href && ""|n%><%$title |n %><% $title_href && "" |n%> + <% $title_href && ""|n%><%$title |n %><% $title_href && "" |n%> - - + @@ -30,7 +52,15 @@ <& /Elements/Callback, %ARGS &> % if ($Debug) { diff --git a/rt/html/Elements/Header b/rt/html/Elements/Header index 38cb4bd6b..e4f613fcc 100644 --- a/rt/html/Elements/Header +++ b/rt/html/Elements/Header @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,14 +20,30 @@ %# 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. +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) %# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. %# -%# END LICENSE BLOCK - +%# }}} END BPS TAGGED BLOCK +%# <%$Title%> @@ -31,6 +53,19 @@ + +<& /Elements/Callback, _CallbackName => 'Head', %ARGS &> - % foreach my $action (sort keys %{$topactions}) { diff --git a/rt/html/Elements/ShadedBox b/rt/html/Elements/ShadedBox deleted file mode 100644 index 36b9cae7c..000000000 --- a/rt/html/Elements/ShadedBox +++ /dev/null @@ -1,33 +0,0 @@ -%# 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 -
    <%$titleright ? $titleright : ' ' |n %>
    +
    <%ARGS> $width => "100%" $class => undef @@ -58,3 +81,8 @@ $titleright => undef $contentbg => "#dddddd" $color => "#336699" +<%init> +my $id = rand(2000); + +$title_class = "CLASS=\"$title_class\"" if $title_class; + -- cgit v1.2.1 From e81cd66ea62231e89fbd30a95a0e5bdde2292eeb Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 3 Dec 2004 20:51:54 +0000 Subject: landing rt 3.2.2 --- rt/html/Elements/Footer | 48 +++++++++++++++++++++++++++------- rt/html/Elements/Header | 57 +++++++++++++++++++++++++++++++++-------- rt/html/Elements/PageLayout | 40 ++++++++++++++++++++++------- rt/html/Elements/ShadedBox | 33 ------------------------ rt/html/Elements/ShadedInputRow | 35 ------------------------- rt/html/Elements/ShadedRow | 31 ---------------------- rt/html/Elements/SimpleSearch | 38 +++++++++++++++++++++------ rt/html/Elements/Tabs | 43 ++++++++++++++++++++++++------- rt/html/Elements/ViewUser | 51 ------------------------------------ 9 files changed, 180 insertions(+), 196 deletions(-) delete mode 100644 rt/html/Elements/ShadedBox delete mode 100644 rt/html/Elements/ShadedInputRow delete mode 100644 rt/html/Elements/ShadedRow delete mode 100644 rt/html/Elements/ViewUser (limited to 'rt/html/Elements') diff --git a/rt/html/Elements/Footer b/rt/html/Elements/Footer index 052bf87e9..12432caaa 100644 --- a/rt/html/Elements/Footer +++ b/rt/html/Elements/Footer @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK +%# {{{ BEGIN BPS TAGGED BLOCK %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,13 +20,29 @@ %# 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. +%# 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. +%# %# +%# CONTRIBUTION SUBMISSION POLICY: %# -%# END LICENSE BLOCK +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# }}} END BPS TAGGED BLOCK % if ($Menu) {
    <%$AppName%> + <%$AppName%>
    - - - - -
    <%$title |n %>:<%$content |n %>
    -<%ARGS> -$title => undef -$content => " " - diff --git a/rt/html/Elements/ShadedInputRow b/rt/html/Elements/ShadedInputRow deleted file mode 100644 index e9fb69e5f..000000000 --- a/rt/html/Elements/ShadedInputRow +++ /dev/null @@ -1,35 +0,0 @@ -%# 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 -
    <%$title |n %>: - value="<%$content|h%>" SIZE=<%$size%>> -
    <%$title |n %>:<%$content |n %>
    - - - -
    -%while (my $w=$tickets->Next) { -<%$w->Id%>: <%$w->Subject%> (<%$w->Status%>)
    -%} -
    - <% ($User->Comments || loc("No comment entered about this user")) %> -
    -<& /Elements/TitleBoxEnd &> - -<%ARGS> -$User=>undef - - -<%INIT> -my $name=$User->RealName || $User->EmailAddress; - -my $tickets = new RT::Tickets($session{'CurrentUser'}); -$tickets->LimitWatcher(TYPE => 'Requestor', VALUE => $User->EmailAddress); - - - -- cgit v1.2.1 From f0676ef614e5c6d996ffeb9f6bd386d8d2b8d483 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 4 Dec 2004 01:09:41 +0000 Subject: landing rt 3.2.2 --- rt/html/Elements/PageLayout | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rt/html/Elements') diff --git a/rt/html/Elements/PageLayout b/rt/html/Elements/PageLayout index c2097e36e..41eae785f 100644 --- a/rt/html/Elements/PageLayout +++ b/rt/html/Elements/PageLayout @@ -44,7 +44,7 @@ %# %# }}} END BPS TAGGED BLOCK - % foreach my $action (sort keys %{$topactions}) { -- cgit v1.2.1 From d6b29a3abb5beccceb334723bdc06568eb5b899a Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 10 Dec 2004 00:04:49 +0000 Subject: fix link back to billing main --- rt/html/Elements/Tabs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rt/html/Elements') diff --git a/rt/html/Elements/Tabs b/rt/html/Elements/Tabs index ee1a4086c..4fc229b84 100644 --- a/rt/html/Elements/Tabs +++ b/rt/html/Elements/Tabs @@ -64,7 +64,7 @@ my $basetopactions = { }; my $basetabs = { ' A'=> { title => 'Billing Main', - path => '..', + path => '../', }, A => { #title => loc('Homepage'), title => 'Ticketing Main', -- cgit v1.2.1 From a66cbc713bc45bbfe179da31b6c0dfad75821b50 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 10 Dec 2004 21:35:30 +0000 Subject: fix link to freeside docs in RT header --- rt/html/Elements/Header | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rt/html/Elements') diff --git a/rt/html/Elements/Header b/rt/html/Elements/Header index e4f613fcc..27658df42 100644 --- a/rt/html/Elements/Header +++ b/rt/html/Elements/Header @@ -103,7 +103,7 @@ ONLOAD=" -- cgit v1.2.1 From c11c2a6c8192a8402f3a0434d58cf82d9b2fc4fc Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 20 Dec 2004 11:29:16 +0000 Subject: backport from 3.3-TESTING to fix XSS on ticket lists --- rt/html/Elements/CollectionAsTable/Row | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'rt/html/Elements') diff --git a/rt/html/Elements/CollectionAsTable/Row b/rt/html/Elements/CollectionAsTable/Row index 926317be9..701966fcc 100644 --- a/rt/html/Elements/CollectionAsTable/Row +++ b/rt/html/Elements/CollectionAsTable/Row @@ -54,9 +54,16 @@ foreach my $column (@Format) { my $value = $m->comp('/Elements/RT__Ticket/ColumnMap', Name => $col, Attr => 'value'); if ( $value && ref($value)) { - $m->out( &{ $value } ( $record, $i ) ); + # All HTML snippets are returned by the callback function + # as scalar references. Data fetched from the objects are + # plain scalars, and needs to be escaped properly. + $m->out( + map { ref($_) ? $$_ : $m->interp->apply_escapes( $_ => 'h' ) } + &{ $value } ( $record, $i ) + ); } else { - $m->out($value ); + # Simple value; just escape it. + $m->out( $m->interp->apply_escapes( $value => 'h' ) ); } } else { -- cgit v1.2.1 From 7c04e83390fd815fbf75a22118728b2eb6b4f7ad Mon Sep 17 00:00:00 2001 From: khoff Date: Fri, 11 Mar 2005 01:34:31 +0000 Subject: Reorganized RT->Freeside integration to support Internal (single RT/Freeside database) and XMLRPC interfaces. All the UI stuff is handled the same either way. Integration type is changed by setting $RT::URI::freeside::IntegrationType to either 'Internal' or 'XMLRPC' in your RT_SiteConfig.pm. --- rt/html/Elements/Header | 5 +++-- rt/html/Elements/Menu | 2 +- rt/html/Elements/Tabs | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'rt/html/Elements') diff --git a/rt/html/Elements/Header b/rt/html/Elements/Header index 27658df42..4a16d5667 100644 --- a/rt/html/Elements/Header +++ b/rt/html/Elements/Header @@ -78,7 +78,7 @@ ONLOAD="
    <%$AppName%> + <%$AppName%> Freeside v<% $FS::VERSION %>
    - Documentation
    + Documentation
    - + @@ -124,6 +124,7 @@ ONLOAD=" $r->headers_out->{'Pragma'} = 'no-cache'; $r->headers_out->{'Cache-control'} = 'no-cache'; +require RT::URI::freeside; <%ARGS> diff --git a/rt/html/Elements/Menu b/rt/html/Elements/Menu index 0e57585c5..e933fb4f0 100644 --- a/rt/html/Elements/Menu +++ b/rt/html/Elements/Menu @@ -78,7 +78,7 @@ % } else { % $sep=0; % } -
  • <%$toptabs->{$tab}->{'path'}%>" style="font-size: <%$size%>;" class="<%$class%>" <%($class eq 'currenttopnav') ? "name='focus'" : ""|n %> <% !$level && "accesskey='".$accesskey++."'" |n%>><% $toptabs->{$tab}->{'title'}%> %# Second-level items diff --git a/rt/html/Elements/Tabs b/rt/html/Elements/Tabs index 4fc229b84..4a018bfad 100644 --- a/rt/html/Elements/Tabs +++ b/rt/html/Elements/Tabs @@ -64,7 +64,7 @@ my $basetopactions = { }; my $basetabs = { ' A'=> { title => 'Billing Main', - path => '../', + path => &RT::URI::freeside::FreesideURL(), }, A => { #title => loc('Homepage'), title => 'Ticketing Main', @@ -93,6 +93,8 @@ if (!defined $toptabs) { if (!defined $topactions) { $topactions = $basetopactions; } + + require RT::URI::freeside; # Now let callbacks add their extra tabs $m->comp('/Elements/Callback', -- cgit v1.2.1 From d4d0590bef31071e8809ec046717444b95b3f30a Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 15 Oct 2005 09:11:20 +0000 Subject: import rt 3.4.4 --- rt/html/Elements/BevelBoxRaisedEnd | 6 +- rt/html/Elements/BevelBoxRaisedStart | 6 +- rt/html/Elements/Callback | 56 +++--- rt/html/Elements/Checkbox | 8 +- rt/html/Elements/CollectionAsTable/Header | 100 +++++---- rt/html/Elements/CollectionAsTable/ParseFormat | 59 ++++-- rt/html/Elements/CollectionAsTable/Row | 92 ++++++--- rt/html/Elements/CreateTicket | 8 +- rt/html/Elements/EditCustomField | 89 ++++++++ rt/html/Elements/EditCustomFieldBinary | 60 ++++++ rt/html/Elements/EditCustomFieldFreeform | 68 +++++++ rt/html/Elements/EditCustomFieldImage | 60 ++++++ rt/html/Elements/EditCustomFieldSelect | 71 +++++++ rt/html/Elements/EditCustomFieldText | 65 ++++++ rt/html/Elements/EditCustomFieldWikitext | 65 ++++++ rt/html/Elements/EditLinks | 25 ++- rt/html/Elements/Error | 12 +- rt/html/Elements/Footer | 17 +- rt/html/Elements/GotoTicket | 6 +- rt/html/Elements/Header | 14 +- rt/html/Elements/ListActions | 6 +- rt/html/Elements/Login | 8 +- rt/html/Elements/Menu | 13 +- rt/html/Elements/MessageBox | 8 +- rt/html/Elements/MyRequests | 15 +- rt/html/Elements/MyTickets | 15 +- rt/html/Elements/PageLayout | 13 +- rt/html/Elements/QueryString | 6 +- rt/html/Elements/QuickCreate | 6 +- rt/html/Elements/Quicksearch | 44 ++-- rt/html/Elements/RT__Ticket/ColumnMap | 268 ++++++++----------------- rt/html/Elements/Refresh | 6 +- rt/html/Elements/ScrubHTML | 6 +- rt/html/Elements/Section | 6 +- rt/html/Elements/SelectAttachmentField | 6 +- rt/html/Elements/SelectBoolean | 6 +- rt/html/Elements/SelectCustomFieldOperator | 6 +- rt/html/Elements/SelectCustomFieldValue | 6 +- rt/html/Elements/SelectDate | 6 +- rt/html/Elements/SelectDateRelation | 6 +- rt/html/Elements/SelectDateType | 6 +- rt/html/Elements/SelectEqualityOperator | 8 +- rt/html/Elements/SelectGroups | 19 +- rt/html/Elements/SelectLang | 6 +- rt/html/Elements/SelectLinkType | 6 +- rt/html/Elements/SelectMatch | 6 +- rt/html/Elements/SelectNewTicketQueue | 10 +- rt/html/Elements/SelectOwner | 65 ++++-- rt/html/Elements/SelectQueue | 9 +- rt/html/Elements/SelectResultsPerPage | 6 +- rt/html/Elements/SelectSortOrder | 6 +- rt/html/Elements/SelectStatus | 8 +- rt/html/Elements/SelectTicketSortBy | 6 +- rt/html/Elements/SelectTicketTypes | 6 +- rt/html/Elements/SelectUsers | 21 +- rt/html/Elements/SelectWatcherType | 6 +- rt/html/Elements/SetupSessionCookie | 21 +- rt/html/Elements/ShowCustomFieldBinary | 49 +++++ rt/html/Elements/ShowCustomFieldImage | 51 +++++ rt/html/Elements/ShowCustomFieldWikitext | 55 +++++ rt/html/Elements/ShowCustomFields | 77 +++++++ rt/html/Elements/ShowLink | 6 +- rt/html/Elements/ShowLinks | 6 +- rt/html/Elements/ShowMemberships | 86 ++++++++ rt/html/Elements/SimpleSearch | 6 +- rt/html/Elements/Submit | 37 +++- rt/html/Elements/Tabs | 26 ++- rt/html/Elements/TicketList | 115 +++++++---- rt/html/Elements/TitleBox | 6 +- rt/html/Elements/TitleBoxEnd | 9 +- rt/html/Elements/TitleBoxStart | 8 +- 71 files changed, 1504 insertions(+), 591 deletions(-) create mode 100644 rt/html/Elements/EditCustomField create mode 100644 rt/html/Elements/EditCustomFieldBinary create mode 100644 rt/html/Elements/EditCustomFieldFreeform create mode 100644 rt/html/Elements/EditCustomFieldImage create mode 100644 rt/html/Elements/EditCustomFieldSelect create mode 100644 rt/html/Elements/EditCustomFieldText create mode 100644 rt/html/Elements/EditCustomFieldWikitext create mode 100644 rt/html/Elements/ShowCustomFieldBinary create mode 100644 rt/html/Elements/ShowCustomFieldImage create mode 100644 rt/html/Elements/ShowCustomFieldWikitext create mode 100644 rt/html/Elements/ShowCustomFields create mode 100644 rt/html/Elements/ShowMemberships (limited to 'rt/html/Elements') diff --git a/rt/html/Elements/BevelBoxRaisedEnd b/rt/html/Elements/BevelBoxRaisedEnd index f1c794b37..e1d1edb7c 100644 --- a/rt/html/Elements/BevelBoxRaisedEnd +++ b/rt/html/Elements/BevelBoxRaisedEnd @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}}
  • freeside<% FS::Conf->new->config('company_name') %> Ticketing<% &RT::URI::freeside::FreesideGetConfig('company_name') %> Ticketing % if ($session{'CurrentUser'} && $session{'CurrentUser'}->Id && $LoggedIn) { <&|/l&>Skip Menu | @@ -102,7 +102,7 @@ ONLOAD="
    - Freeside v<% $FS::VERSION %>
    + Freeside v<% &RT::URI::freeside::FreesideVersion() %>
    Documentation
    diff --git a/rt/html/Elements/BevelBoxRaisedStart b/rt/html/Elements/BevelBoxRaisedStart index ca504e4b2..6c5a6137e 100644 --- a/rt/html/Elements/BevelBoxRaisedStart +++ b/rt/html/Elements/BevelBoxRaisedStart @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} + <%perl> -my %generic_query_args = ( Query => $Query, Rows => $Rows, Page => $Page ); +my %generic_query_args = ( Query => $Query, Rows => $Rows, Page => $Page, Format => $FormatString ); my $item = 0; -$$maxitems = 0; foreach my $col (@Format) { $item++; - $$maxitems = $item if $item > $$maxitems; if ( $col->{title} eq 'NEWLINE' ) { - $m->out(''); - $item = 0; + while ( $item < $maxitems ) { + $m->out(qq{\n}); + $item++; + } + + $item = 0; + $m->out(qq{\n}); } else { - $m->out('' ); +$m->out('' ); my $item; foreach my $column (@Format) { if ( $column->{title} eq 'NEWLINE' ) { - while ($item < $maxitems) { - $m->out("\n"); - $item++; - } - $item = 0; + while ( $item < $maxitems ) { + $m->out(qq{\n}); + $item++; + } + $item = 0; $m->out(''); - $m->out( '' ); + $m->out('' ); next; } $item++; - $m->out(''); diff --git a/rt/html/Elements/CreateTicket b/rt/html/Elements/CreateTicket index 70c94e78f..bd60bbddf 100644 --- a/rt/html/Elements/CreateTicket +++ b/rt/html/Elements/CreateTicket @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK - +%# END BPS TAGGED BLOCK }}} + <&|/l, $m->scomp('/Elements/SelectNewTicketQueue')&> [_1] diff --git a/rt/html/Elements/EditCustomField b/rt/html/Elements/EditCustomField new file mode 100644 index 000000000..d2398c9da --- /dev/null +++ b/rt/html/Elements/EditCustomField @@ -0,0 +1,89 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# +%# +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: +%# +%# 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. +%# +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# END BPS TAGGED BLOCK }}} +<%INIT> +my $Values; +if ($Object) { + $Values = $Object->CustomFieldValues($CustomField->id); + $Values->Columns( qw( id CustomField ObjectType ObjectId Disabled Content ContentType ContentEncoding ) ); + $NamePrefix ||= join('-', 'Object', ref($Object), $Object->Id, 'CustomField', ''); +} +my $Type = $CustomField->Type; + +return unless ($Type); # if we can't see the type, all hell will break loose. + +my $MaxValues = $CustomField->MaxValues; +if ($MaxValues == 1 and $Object and $Values) { + # what exactly is this doing? Without the "unless" it breaks RTFM + # transaction extraction into articles. + $Default = ($Values->First ? $Values->First->Content : '') unless $Default; + $Values->GotoFirstItem; +} +# The "Magic" hidden input causes RT to know that we were trying to edit the field, even if +# we don't see a value later, since browsers aren't compelled to submit empty form fields +$m->out("\n".''."\n"); + +return $m->comp( + "EditCustomField$Type", + %ARGS, + Rows => $Rows, + Cols => $Cols, + Default => $Default, + Object => $Object, + Values => $Values, + MaxValues => $MaxValues, + Multiple => ($MaxValues != 1), + NamePrefix => $NamePrefix, + CustomField => $CustomField, +); + +<%ARGS> +$Object => undef +$CustomField => undef +$NamePrefix => undef +$Rows => 5 +$Cols => 15 +$Default => undef + diff --git a/rt/html/Elements/EditCustomFieldBinary b/rt/html/Elements/EditCustomFieldBinary new file mode 100644 index 000000000..002825660 --- /dev/null +++ b/rt/html/Elements/EditCustomFieldBinary @@ -0,0 +1,60 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# +%# +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: +%# +%# 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. +%# +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# END BPS TAGGED BLOCK }}} +% while ($Values and my $value = $Values->Next ) { +%# XXX - let user download the file(s) here? +<% $value->Content %>
    +% } +% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) { + +% } +<%ARGS> +$Object => undef +$CustomField => undef +$NamePrefix => undef +$Default => undef +$Values => undef +$MaxValues => undef + diff --git a/rt/html/Elements/EditCustomFieldFreeform b/rt/html/Elements/EditCustomFieldFreeform new file mode 100644 index 000000000..c097ee0a9 --- /dev/null +++ b/rt/html/Elements/EditCustomFieldFreeform @@ -0,0 +1,68 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# +%# +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: +%# +%# 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. +%# +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# END BPS TAGGED BLOCK }}} +% if ($Multiple) { + +% } else { + +% } +<%INIT> +if ($Multiple and $Values) { + $Default = ''; + while (my $value = $Values->Next ) { + $Default .= $value->Content."\n"; + } +} + +<%ARGS> +$Object => undef +$CustomField => undef +$NamePrefix => undef +$Default => undef +$Values => undef +$Multiple => undef +$Cols +$Rows + diff --git a/rt/html/Elements/EditCustomFieldImage b/rt/html/Elements/EditCustomFieldImage new file mode 100644 index 000000000..b378ceae6 --- /dev/null +++ b/rt/html/Elements/EditCustomFieldImage @@ -0,0 +1,60 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# +%# +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: +%# +%# 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. +%# +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# END BPS TAGGED BLOCK }}} +% while ($Values and my $value = $Values->Next ) { +<& ShowCustomFieldImage, Object => $value &> +
    +% } +% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) { + +% } +<%ARGS> +$Object => undef +$CustomField => undef +$NamePrefix => undef +$Default => undef +$Values => undef +$MaxValues => undef + diff --git a/rt/html/Elements/EditCustomFieldSelect b/rt/html/Elements/EditCustomFieldSelect new file mode 100644 index 000000000..db33a6839 --- /dev/null +++ b/rt/html/Elements/EditCustomFieldSelect @@ -0,0 +1,71 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# +%# +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: +%# +%# 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. +%# +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# END BPS TAGGED BLOCK }}} + +<%ARGS> +$Object => undef +$CustomField => undef +$NamePrefix => undef +$Default => undef +$Values => undef +$Multiple => 0 +$Cols +$Rows + diff --git a/rt/html/Elements/EditCustomFieldText b/rt/html/Elements/EditCustomFieldText new file mode 100644 index 000000000..1aac3283b --- /dev/null +++ b/rt/html/Elements/EditCustomFieldText @@ -0,0 +1,65 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# +%# +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: +%# +%# 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. +%# +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# END BPS TAGGED BLOCK }}} +% while ($Values and my $value = $Values->Next ) { +
    +% } +% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) { + +% } +<%INIT> +# XXX - MultiValue textarea is for now outlawed. +$MaxValues = 1; + +<%ARGS> +$Object => undef +$CustomField => undef +$NamePrefix => undef +$Default => undef +$Values => undef +$MaxValues => undef +$Cols +$Rows + diff --git a/rt/html/Elements/EditCustomFieldWikitext b/rt/html/Elements/EditCustomFieldWikitext new file mode 100644 index 000000000..1aac3283b --- /dev/null +++ b/rt/html/Elements/EditCustomFieldWikitext @@ -0,0 +1,65 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# +%# +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: +%# +%# 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. +%# +%# 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. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# END BPS TAGGED BLOCK }}} +% while ($Values and my $value = $Values->Next ) { +
    +% } +% if (!$MaxValues or !$Values or $Values->Count < $MaxValues) { + +% } +<%INIT> +# XXX - MultiValue textarea is for now outlawed. +$MaxValues = 1; + +<%ARGS> +$Object => undef +$CustomField => undef +$NamePrefix => undef +$Default => undef +$Values => undef +$MaxValues => undef +$Cols +$Rows + diff --git a/rt/html/Elements/EditLinks b/rt/html/Elements/EditLinks index b66291f30..68c08dd16 100755 --- a/rt/html/Elements/EditLinks +++ b/rt/html/Elements/EditLinks @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}}
    diff --git a/rt/html/Elements/Callback b/rt/html/Elements/Callback index cbec1883d..937e923a1 100644 --- a/rt/html/Elements/Callback +++ b/rt/html/Elements/Callback @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,43 +42,45 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} <%once> -my (%cache, $check); +my %cache; <%init> -# checks for inode change time for each callback directory -my $new_check = join( - $;, map { $_->[1] => (stat("$_->[1]/Callbacks"))[10] } $m->interp->resolver->comp_root_array -) or return; - $Page = $m->callers(1)->path unless ($Page); -my $callbacks; -if ($new_check eq $check) { - $callbacks = $cache{$Page,$_CallbackName}; -} -else { - $check = $new_check; -} +my $CacheKey = "Callback--$Page--$_CallbackName"; +my $callbacks = $cache{$CacheKey} || $m->notes($CacheKey); if (!$callbacks) { - my $path = "/Callbacks/*$Page/$_CallbackName"; - $callbacks = [ $m->interp->resolver->glob_path($path) ]; - @$callbacks = grep !/^\.|~$/, @$callbacks; #skip backup files - - #skip files without a package - my $invalid_base = "/Callbacks/$Page/$_CallbackName"; - @$callbacks = grep !/^$invalid_base$/, @$callbacks; - - + my $path = "/Callbacks/*$Page/$_CallbackName"; - $cache{$Page,$_CallbackName} = $callbacks; + # Due to API changes after Mason 1.28, we have to check for which + # version we're running when getting the component roots + my @roots = map { $_->[1] } + $HTML::Mason::VERSION <= 1.28 + ? $m->interp->resolver->comp_root_array + : $m->interp->comp_root_array; + + my %seen; + + for my $root (@roots) { + push @$callbacks, + # Skip backup files, files without a leading package name, + # and files we've already seen + grep { !/^\.|~$/ + and $_ ne "/Callbacks/$Page/$_CallbackName" + and not $seen{$_}++ } + $m->interp->resolver->glob_path($path, $root); + } + + $m->notes($CacheKey => $callbacks); + $cache{$Page,$_CallbackName} = $callbacks if !$RT::DevelMode; } my @rv; foreach my $comp (sort @$callbacks) { - push @rv, $m->comp($comp, %ARGS) if $m->comp_exists($comp); + push @rv, $m->comp($comp, %ARGS); } return @rv; diff --git a/rt/html/Elements/Checkbox b/rt/html/Elements/Checkbox index 146de6a7a..f2256fb78 100644 --- a/rt/html/Elements/Checkbox +++ b/rt/html/Elements/Checkbox @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,8 +42,8 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK -> +%# END BPS TAGGED BLOCK }}} +> <%ARGS> $Name => undef diff --git a/rt/html/Elements/CollectionAsTable/Header b/rt/html/Elements/CollectionAsTable/Header index 2d1574dea..9ed4be8ec 100644 --- a/rt/html/Elements/CollectionAsTable/Header +++ b/rt/html/Elements/CollectionAsTable/Header @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK; +%# BEGIN BPS TAGGED BLOCK {{{ %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,16 +20,32 @@ %# 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. +%# 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. %# %# -%# END LICENSE BLOCK - +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# END BPS TAGGED BLOCK }}} <%ARGS> @Format => undef +$FormatString => undef $AllowSorting => undef $Order=>undef $BaseURL => undef @@ -32,53 +54,63 @@ $Rows => undef $Page => undef $maxitems => undef -
     
    '); + $m->out(''); my $title = $col->{title}; $title =~ s/^__(.*)__$/$1/o; - $title = ( $m->comp('/Elements/RT__Ticket/ColumnMap', - Name => $title, - Attr => 'title' - ) - || $title - ); - if ( $AllowSorting + $title = ( + $m->comp( + '/Elements/RT__Ticket/ColumnMap', + Name => $title, + Attr => 'title' + ) + || $title + ); + if ( + $AllowSorting && $col->{'attribute'} - && $m->comp('/Elements/RT__Ticket/ColumnMap', - Name => $col->{'attribute'}, - Attr => 'attribute' ) - ) + && $m->comp( + '/Elements/RT__Ticket/ColumnMap', + Name => $col->{'attribute'}, + Attr => 'attribute' + ) + ) { $m->out( - 'comp( '/Elements/QueryString', %generic_query_args, OrderBy => ( - $m->comp('/Elements/RT__Ticket/ColumnMap', - Name => $col->{'attribute'}, - Attr => 'attribute' - ) + $m->comp( + '/Elements/RT__Ticket/ColumnMap', + Name => $col->{'attribute'}, + Attr => 'attribute' + ) || $col->{'attribute'} ), Order => ( $ARGS{'Order'} eq 'ASC' ? 'DESC' : 'ASC' ) - ). - '">' . loc($title) . '' + ) + . '">' + . loc($title) . '' ); } else { diff --git a/rt/html/Elements/CollectionAsTable/ParseFormat b/rt/html/Elements/CollectionAsTable/ParseFormat index c7b709bff..57434efe2 100644 --- a/rt/html/Elements/CollectionAsTable/ParseFormat +++ b/rt/html/Elements/CollectionAsTable/ParseFormat @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK; +%# BEGIN BPS TAGGED BLOCK {{{ %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,44 +20,59 @@ %# 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. +%# 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. %# %# -%# END LICENSE BLOCK - +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# END BPS TAGGED BLOCK }}} <%ARGS> $Format <%init> -use Regexp::Common qw(delimited); +use Regexp::Common; my @Columns; -#my $quoted = qr[$RE{delimited}{-delim=>qq{\'\"}}|(?:\{|\}|\w|\.)+]; -my $justquoted = qr[$RE{delimited}{-delim=>qq{\'\"}}]; -#my $quoted = $RE{quoted}{-esc}; -my $word = qr [(?:\{|\}|\w|\.)+]; -while ($Format =~ /($justquoted|$word)/igx) { +while ($Format =~ /($RE{delimited}{-delim=>qq{\'"}}|[{}\w.]+)/go) { my $col = $1; - if ($col =~ /^$RE{quoted}{-esc}$/) { + if ($col =~ /^$RE{quoted}$/o) { substr($col,0,1) = ""; substr($col,-1,1) = ""; } my $colref; - if ( $col =~ s/\/STYLE:(.*?)$//io ) { + + if ( $col =~ s!/STYLE:([^/]+)!!io ) { $colref->{'style'} = $1; } - if ( $col =~ s/\/CLASS:(.*?)$//io ) { + if ( $col =~ s!/CLASS:([^/]+)!!io ) { $colref->{'class'} = $1; } - if ( $col =~ s/\/TITLE:(.*?)$//io ) { + if ( $col =~ s!/TITLE:([^/]+)!!io ) { $colref->{'title'} = $1; } + if ( $col =~ s!/ALIGN:([^\/]+)!!io ) { + $colref->{'align'} = $1; + } if ( $col =~ /__(.*?)__/gio ) { my @subcols; while ( $col =~ s/^(.*?)__(.*?)__//o ) { diff --git a/rt/html/Elements/CollectionAsTable/Row b/rt/html/Elements/CollectionAsTable/Row index 926317be9..3316bc027 100644 --- a/rt/html/Elements/CollectionAsTable/Row +++ b/rt/html/Elements/CollectionAsTable/Row @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK; +%# BEGIN BPS TAGGED BLOCK {{{ %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,14 +20,29 @@ %# 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. +%# 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. %# %# -%# END LICENSE BLOCK - +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# END BPS TAGGED BLOCK }}} <%ARGS> $i => undef @Format => undef @@ -32,35 +53,56 @@ $Warning => undef <%PERL> -$m->out( '
      
    '); + $m->out('out( 'align="' . $column->{align} . '"' ) if ( $column->{align} ); + $m->out('>'); foreach my $subcol ( @{ $column->{output} } ) { if ( $subcol =~ /^__(.*?)__$/o ) { - my $col = $1; - my $value = $m->comp('/Elements/RT__Ticket/ColumnMap', Name => $col, Attr => 'value'); + my $col = $1; + my $value = $m->comp( + '/Elements/RT__Ticket/ColumnMap', + Name => $col, + Attr => 'value' + ); + my @out; + + if ( $value && ref($value) ) { + + # All HTML snippets are returned by the callback function + # as scalar references. Data fetched from the objects are + # plain scalars, and needs to be escaped properly. + @out = + map { + ref($_) ? $$_ : $m->interp->apply_escapes( $_ => 'h' ) + } &{$value}( $record, $i ) + ; + } + else { - if ( $value && ref($value)) { - $m->out( &{ $value } ( $record, $i ) ); - } else { - $m->out($value ); + # Simple value; just escape it. + @out = $m->interp->apply_escapes( $value => 'h' ); } + s/\n/
    /gs for @out; + $m->out( @out ); } else { - $m->out( Encode::decode_utf8($subcol) ); + $m->out($subcol); } } $m->out('
    @@ -67,7 +67,7 @@ @@ -76,7 +76,7 @@ @@ -85,7 +85,7 @@ @@ -94,7 +94,7 @@ @@ -103,7 +103,7 @@ @@ -114,9 +114,12 @@ @@ -51,20 +51,12 @@ % } <& /Elements/Callback, %ARGS &>
    -<&|/l, '»|«', - $RT::VERSION, - '2004', - 'Best Practical Solutions, LLC', -&>[_1] RT [_2] Copyright 1996-[_3] [_4].
    +<&|/l, '»|«', $RT::VERSION, '2005', 'Best Practical Solutions, LLC', &>[_1] RT [_2] Copyright 1996-[_3] [_4].
    % if (!$Menu) { <&|/l&>Distributed under version 2 of the GNU GPL.
    <&|/l, 'sales@bestpractical.com' &>To inquire about support, training, custom development or licensing, please contact [_1].
    % }
    -% if ($Debug) { -
    -<&|/l&>Time to display: <%Time::HiRes::tv_interval( $m->{'rt_base_time'} )%> -% } % if ($Debug >= 2 ) { % require Data::Dumper; % my $d = Data::Dumper->new([\%ARGS], [qw(%ARGS)]); @@ -72,6 +64,7 @@ <%$d->Dump() %> % } +
    <&|/l&>Time to display: <%Time::HiRes::tv_interval( $m->{'rt_base_time'} )%>
    % if ($Menu) { diff --git a/rt/html/Elements/GotoTicket b/rt/html/Elements/GotoTicket index 393b28f89..869d57ef1 100644 --- a/rt/html/Elements/GotoTicket +++ b/rt/html/Elements/GotoTicket @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,5 +42,5 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}}
      diff --git a/rt/html/Elements/Header b/rt/html/Elements/Header index 5d9bbb08b..8c3775bba 100644 --- a/rt/html/Elements/Header +++ b/rt/html/Elements/Header @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} %# @@ -77,16 +77,18 @@ ONLOAD=" >
    @@ -57,7 +57,7 @@ <&|/l&>Depends on: % while (my $link = $Object->DependsOn->Next) { - + <& ShowLink, URI => $link->TargetURI &>
    % }
    % while (my $link = $Object->DependedOnBy->Next) { % my $member = $link->BaseObj; - + <& ShowLink, URI => $link->BaseURI &>
    % }
    <&|/l&>Parents: % while (my $link = $Object->MemberOf->Next) { - + <& ShowLink, URI => $link->TargetURI &>
    % }
    <&|/l&>Children: % while (my $link = $Object->Members->Next) { - + <& ShowLink, URI => $link->BaseURI &>
    % }
    <&|/l&>Refers to: % while (my $link = $Object->RefersTo->Next) { - + <& ShowLink, URI => $link->TargetURI &>
    %}
    <&|/l&>Referred to by: % while (my $link = $Object->ReferredToBy->Next) { - + <& ShowLink, URI => $link->BaseURI &>
    % }

    <&|/l&>New Links

    % if (ref($Object) eq 'RT::Ticket') { -<&|/l&>Enter tickets or URIs to link tickets to. Separate multiple entries with spaces.
    +<&|/l&>Enter tickets or URIs to link tickets to. Separate multiple entries with spaces. +<& /Elements/Callback, _CallbackName => 'ExtraLinkInstructions' &> +
    % } elsif (ref($Object) eq 'RT::Queue') { -<&|/l&>Enter queues or URIs to link queues to. Separate multiple entries with spaces.
    +<&|/l&>Enter queues or URIs to link queues to. Separate multiple entries with spaces. +
    % } else { <&|/l&>Enter objects or URIs to link objects to. Separate multiple entries with spaces.
    % } diff --git a/rt/html/Elements/Error b/rt/html/Elements/Error index 3aa77a51e..bc5a1880a 100644 --- a/rt/html/Elements/Error +++ b/rt/html/Elements/Error @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} <& /Elements/Callback, %ARGS, error => $error &> <& /Elements/Header, Code => $Code, Why => $Why &> <& /Elements/Tabs &> @@ -53,9 +53,11 @@ <%$Details%> <& /Elements/TitleBoxEnd &> - - +<%cleanup> +$m->comp('/Elements/Footer'); +$m->abort(); + <%args> $Code => undef diff --git a/rt/html/Elements/Footer b/rt/html/Elements/Footer index 213761e91..4c90acfa3 100644 --- a/rt/html/Elements/Footer +++ b/rt/html/Elements/Footer @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} % if ($Menu) {
    - +
    <%loc(" width="230" height="50">     % if ($session{'CurrentUser'} && $session{'CurrentUser'}->Id && $LoggedIn) { <&|/l&>Skip Menu | +%if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System )) { <&|/l&>Preferences +% } <& /Elements/Callback, %ARGS &> % unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) { -| <&|/l&>Logout +| <&|/l&>Logout % }
    <&|/l, "".$session{'CurrentUser'}->Name."" &>Logged in as [_1] @@ -105,7 +107,7 @@ $r->headers_out->{'Cache-control'} = 'no-cache'; <%ARGS> $Prefs => '/User/Prefs.html' $Focus => 'focus' -$Title => undef +$Title => 'RT' $Code => undef $Refresh => 0 $Why => undef diff --git a/rt/html/Elements/ListActions b/rt/html/Elements/ListActions index 344fe9e5a..8433d17e0 100644 --- a/rt/html/Elements/ListActions +++ b/rt/html/Elements/ListActions @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} % if ($actions[0] ) { <& /Elements/TitleBoxStart, title => loc('Results') &>
      diff --git a/rt/html/Elements/Login b/rt/html/Elements/Login index 25ded9ff3..1d4bfd5ec 100644 --- a/rt/html/Elements/Login +++ b/rt/html/Elements/Login @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} <%INIT> if ($m->request_comp->path =~ '^/REST/\d+\.\d+/') { $r->content_type("text/plain"); @@ -67,7 +67,7 @@ if ($m->request_comp->path =~ '^/REST/\d+\.\d+/') { contentbg=>"#cccccc" &> % unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) { -
      + diff --git a/rt/html/Elements/Menu b/rt/html/Elements/Menu index 0e57585c5..398e3ab07 100644 --- a/rt/html/Elements/Menu +++ b/rt/html/Elements/Menu @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} %# font size depends on level % if ($level ge 3) { % $size = $basesize-(6); @@ -69,16 +69,17 @@ % } % my $style=""; % if ($sep) { -% $style="border-top: solid #999 1px; padding-top: .1em; margin-top: .5em;"; +% $style="minor"; % } elsif ($level == 0 ) { -% $style="border-bottom: solid white 1px; padding-top: .25em; padding-bottom: .5em;" ; +% $style="major"; % } % if ($toptabs->{$tab}->{'separator'}) { % $sep=1; % } else { % $sep=0; % } -
    • {$tab}->{'path'} =~ /^https?:/i ? $toptabs->{$tab}->{'path'} : $RT::WebPath . "/" . $toptabs->{$tab}->{'path'}; +
    • <% !$level && "accesskey='".$accesskey++."'" |n%>><% $toptabs->{$tab}->{'title'}%> %# Second-level items diff --git a/rt/html/Elements/MessageBox b/rt/html/Elements/MessageBox index 5faa9575c..dd48bec9a 100644 --- a/rt/html/Elements/MessageBox +++ b/rt/html/Elements/MessageBox @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,8 +42,8 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK - +%# END BPS TAGGED BLOCK }}} + <%INIT> my ($message); diff --git a/rt/html/Elements/MyRequests b/rt/html/Elements/MyRequests index 4e1bf3eaf..172b4a4fa 100644 --- a/rt/html/Elements/MyRequests +++ b/rt/html/Elements/MyRequests @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} <&|/Elements/TitleBox, title => loc("[_1] newest unowned tickets", $rows), title_href => "Search/Results.html".$QueryString &> @@ -61,9 +61,10 @@ my $rows = $RT::MyRequestsLength; my $Query = "Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')"; -my $QueryString = '?' . $m->comp('/Elements/QueryString', - Query => $Query, - Order => 'DESC', - OrderBy => 'Priority') if ($Query); +my $QueryString = ""; +$QueryString = '?' . $m->comp('/Elements/QueryString', + Query => $Query, + Order => 'DESC', + OrderBy => 'Priority') if ($Query); diff --git a/rt/html/Elements/MyTickets b/rt/html/Elements/MyTickets index 9f30a893b..cf5225abc 100644 --- a/rt/html/Elements/MyTickets +++ b/rt/html/Elements/MyTickets @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} <&|/Elements/TitleBox, title => loc('[_1] highest priority tickets I own', $rows), title_href => "Search/Results.html".$QueryString &> @@ -61,10 +61,11 @@ my $rows = $RT::MyTicketsLength; my $Query = " Owner = '".$session{'CurrentUser'}->Id."' AND ( Status = 'new' OR Status = 'open')"; -my $QueryString = '?' . $m->comp('/Elements/QueryString', - Query => $Query, - Order => 'DESC', - OrderBy => 'Priority') if ($Query); +my $QueryString = ""; +$QueryString = '?' . $m->comp('/Elements/QueryString', + Query => $Query, + Order => 'DESC', + OrderBy => 'Priority') if ($Query); diff --git a/rt/html/Elements/PageLayout b/rt/html/Elements/PageLayout index 4670a8bb2..3d7241dad 100644 --- a/rt/html/Elements/PageLayout +++ b/rt/html/Elements/PageLayout @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}}
    • <&|/l&>Username:
      @@ -76,7 +76,7 @@ % if ($actions->{"$action"}->{'html'}) { % push @actions, $actions->{"$action"}->{'html'}; % } else { -% push @actions, "{$action}->{'path'}."\">".$actions->{$action}->{'title'}.""; +% push @actions, qq|{$action}->{'path'}.qq|">|.$actions->{$action}->{'title'}.""; % } % } <% join(" | ", @actions) | n %> @@ -93,11 +93,12 @@
      <%$AppName%>
      - +<& /Elements/Callback, _CallbackName => 'BeforeBody', %ARGS &> +%$m->flush_buffer(); # we've got the page laid out, let's flush the buffer; <%INIT> foreach my $tab (sort keys %{$toptabs}) { - if ($toptabs->{$tab}->{'path'} eq $current_toptab) { + if ($current_toptab && $toptabs->{$tab}->{'path'} eq $current_toptab) { $toptabs->{$tab}->{"subtabs"} = $tabs; $toptabs->{$tab}->{"current_subtab"} = $current_tab; } diff --git a/rt/html/Elements/QueryString b/rt/html/Elements/QueryString index cbec29a30..7d41f15e0 100644 --- a/rt/html/Elements/QueryString +++ b/rt/html/Elements/QueryString @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} <%init> my @params; while ( (my $key, my $value) = each %ARGS ){ diff --git a/rt/html/Elements/QuickCreate b/rt/html/Elements/QuickCreate index 10cfbd3c0..0d2489c61 100644 --- a/rt/html/Elements/QuickCreate +++ b/rt/html/Elements/QuickCreate @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} <& /Elements/TitleBoxStart, title => loc('Quick ticket creation') &> diff --git a/rt/html/Elements/Quicksearch b/rt/html/Elements/Quicksearch index 103c760c7..d54f72e88 100644 --- a/rt/html/Elements/Quicksearch +++ b/rt/html/Elements/Quicksearch @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,42 +42,40 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} <& /Elements/TitleBoxStart, title => loc("Quick search"), bodyclass => "" &> - - - + + + <%PERL> my $i; while (my $queue = $Queues->Next) { - my $new_q = "Queue = '".$queue->Name."' AND Status = 'new'"; - my $open_q = "Queue = '".$queue->Name."' AND Status = 'open'"; - my $all_q = "Queue = '".$queue->Name."' AND (Status = 'open' OR Status = 'new')"; + next unless ($queue->CurrentUserHasRight('ShowTicket')); + my $name = $queue->Name; + $name =~ s|(['\\])|\\$1|g; + + my $new_q = "Queue = '$name' AND Status = 'new'"; + my $open_q = "Queue = '$name' AND Status = 'open'"; + my $all_q = "Queue = '$name' AND (Status = 'open' OR Status = 'new')"; - $Tickets->ClearRestrictions; - $Tickets->LimitStatus(VALUE => "open"); - $Tickets->LimitQueue(VALUE => $queue->Name, OPERATOR => '='); - my $open = $Tickets->Count(); - - $Tickets->ClearRestrictions; - $Tickets->LimitStatus(VALUE => "new"); - $Tickets->LimitQueue(VALUE => $queue->Name, OPERATOR => '='); - my $new = $Tickets->Count(); - + $Tickets->FromSQL($open_q); + my $open = $Tickets->Count(); + $Tickets->FromSQL($new_q); + my $new = $Tickets->Count(); + $i++; -% $i++; - - - + + + % }
      <&|/l&>Queue<&|/l&>New<&|/l&>Open<&|/l&>Queue<&|/l&>New<&|/l&>Open
      <%$queue->Name%><%$new%><%$open%><%$queue->Name%><%$new%><%$open%>
      diff --git a/rt/html/Elements/RT__Ticket/ColumnMap b/rt/html/Elements/RT__Ticket/ColumnMap index a6d387cae..dade91494 100644 --- a/rt/html/Elements/RT__Ticket/ColumnMap +++ b/rt/html/Elements/RT__Ticket/ColumnMap @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK; +%# BEGIN BPS TAGGED BLOCK {{{ %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,25 +20,37 @@ %# 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. +%# 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. %# %# -%# END LICENSE BLOCK - +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# END BPS TAGGED BLOCK }}} <%ARGS> $Name => undef $Attr => undef -<%perl> -return ColumnMap($Name, $Attr); - -<%INIT> -our ( $COLUMN_MAP, $CUSTOM_FIELD_MAP ); +<%ONCE> +our ( $COLUMN_MAP ); sub ColumnMap { my $name = shift; @@ -45,46 +63,52 @@ sub ColumnMap { # now, let's deal with harder things, like Custom Fields - elsif ( $name =~ /^(?:CF|CustomField).(.*)$/ ) { + elsif ( $name =~ /^(?:CF|CustomField)\.\{(.+)\}$/ ) { my $field = $1; - my $cf; - if ( $CUSTOM_FIELD_MAP->{$field} ) { - $cf = $CUSTOM_FIELD_MAP->{$field}; - } - else { - - $cf = RT::CustomField->new( $session{'CurrentUser'} ); - - if ( $field =~ /^(.+?)\.{(.+)}$/ ) { - $cf->LoadByNameAndQueue( Queue => $1, Name => $2 ); - } - else { - $field = $1 if $field =~ /^{(.+)}$/; # trim { } - $cf->LoadByNameAndQueue( Queue => "0", Name => $field ); - } - $CUSTOM_FIELD_MAP->{$field} = $cf if ( $cf->id ); - } - - unless ( $cf->id ) { - return undef; - } if ( $attr eq 'attribute' ) { return (undef); } elsif ( $attr eq 'title' ) { - return ( $cf->Name ); + return ( $field ); } elsif ( $attr eq 'value' ) { - my $value = eval "sub { - my \$values = \$_[0]->CustomFieldValues('" . $cf->id . "'); - return ( join( ', ', map { \$_->Content } \@{ \$values->ItemsArrayRef } )) - }" || die $@; - return ($value); + # Display custom field contents, separated by newlines. + # For Image custom fields we also show a thumbnail here. + return sub { + my $values = $_[0]->CustomFieldValues($field); + return map { + ( + ($_->CustomFieldObj->Type eq 'Image') + ? \($m->scomp( '/Elements/ShowCustomFieldImage', Object => $_ )) + : $_->Content + ), + \'
      ', + } @{ $values->ItemsArrayRef } + }; } } } +sub LinkCallback { + my $method = shift; + + my $mode = $RT::Ticket::LINKTYPEMAP{$method}{Mode}; + my $type = $RT::Ticket::LINKTYPEMAP{$method}{Type}; + my $mode_uri = $mode.'URI'; + my $local_type = 'Local'.$mode; + + return sub { + map { + \'', + ( $_->$mode_uri->IsLocal ? $_->$local_type : $_->$mode ), + \'
      ', + } @{ $_[0]->Links($mode,$type)->ItemsArrayRef } + } +} + $COLUMN_MAP = { QueueName => { attribute => 'Queue', @@ -103,7 +127,7 @@ $COLUMN_MAP = { }, Status => { attribute => 'Status', - value => sub { return $_[0]->Status } + value => sub { return loc($_[0]->Status) } }, Subject => { attribute => 'Subject', @@ -119,10 +143,10 @@ $COLUMN_MAP = { if ( $Ticket->HasUnresolvedDependencies( Type => 'approval' ) or $Ticket->HasUnresolvedDependencies( Type => 'code' ) ) { - return "" . loc('(pending approval)') . ""; + return \'', loc('(pending approval)'), \''; } else { - return "" . loc('(pending other Collection)') . ""; + return \'', loc('(pending other Collection)'), \''; } } else { @@ -137,10 +161,12 @@ $COLUMN_MAP = { }, InitialPriority => { attribute => 'InitialPriority', + name => 'Initial Priority', value => sub { return $_[0]->InitialPriority } }, FinalPriority => { attribute => 'FinalPriority', + name => 'Final Priority', value => sub { return $_[0]->FinalPriority } }, EffectiveId => { @@ -153,14 +179,17 @@ $COLUMN_MAP = { }, TimeWorked => { attribute => 'TimeWorked', + title => 'Time Worked', value => sub { return $_[0]->TimeWorked } }, TimeLeft => { attribute => 'TimeLeft', + title => 'Time Left', value => sub { return $_[0]->TimeLeft } }, TimeEstimated => { attribute => 'TimeEstimated', + title => 'Time Estimated', value => sub { return $_[0]->TimeEstimated } }, Requestors => { @@ -188,7 +217,7 @@ $COLUMN_MAP = { value => sub { return $_[0]->CreatedObj->AgeAsString } }, LastUpdatedRelative => { - title => 'LastUpdated', + title => 'Last Updated', attribute => 'LastUpdated', value => sub { return $_[0]->LastUpdatedObj->AgeAsString } }, @@ -203,7 +232,7 @@ $COLUMN_MAP = { value => sub { my $date = $_[0]->DueObj; if ($date && $date->Unix > 0 && $date->Unix < time()) { - return '' . $date->AgeAsString . ''; + return (\'' , $date->AgeAsString , \''); } else { return $date->AgeAsString; } @@ -228,14 +257,17 @@ $COLUMN_MAP = { }, CreatedBy => { attribute => 'CreatedBy', + title => 'Created By', value => sub { return $_[0]->CreatorObj->Name } }, LastUpdated => { attribute => 'LastUpdated', + title => 'Last Updated', value => sub { return $_[0]->LastUpdatedObj->AsString } }, LastUpdatedBy => { attribute => 'LastUpdatedBy', + title => 'Last Updated By', value => sub { return $_[0]->LastUpdatedByObj->Name } }, Told => { @@ -251,144 +283,18 @@ $COLUMN_MAP = { value => sub { return $_[0]->ResolvedObj->AsString } }, - DependedOnBy => { - value => sub { - my $links = $_[0]->DependedOnBy; - return ( - join( - "
      ", - map { - '' - . ( $_->BaseIsLocal ? $_->LocalBase : $_->Base ) - . '' - } @{ $links->ItemsArrayRef } - ) - ); - } - }, - Members => { - value => sub { - my $links = $_[0]->Members; - return ( - join( - "
      ", - map { - '' - . ( $_->BaseIsLocal ? $_->LocalBase : $_->Base ) - . '' - } @{ $links->ItemsArrayRef } - ) - ); - } - }, - Children => { - value => sub { - my $links = $_[0]->Members; - return ( - join( - "
      ", - map { - '' - . ( $_->BaseIsLocal ? $_->LocalBase : $_->Base ) - . '' - } @{ $links->ItemsArrayRef } - ) - ); - } - }, - ReferredToBy => { - value => sub { - my $links = $_[0]->ReferredToBy; - return ( - join( - "
      ", - map { - '' - . ( $_->BaseIsLocal ? $_->LocalBase : $_->Base ) - . '' - } @{ $links->ItemsArrayRef } - ) - ); - } - }, - - DependsOn => { - value => sub { - my $links = $_[0]->DependsOn; - return ( - join( - "
      ", - map { - '' - . ( $_->TargetIsLocal ? $_->LocalTarget : $_->Target ) - . '' - } @{ $links->ItemsArrayRef } - ) - ); - } - }, - MemberOf => { - value => sub { - my $links = $_[0]->MemberOf; - return ( - join( - "
      ", - map { - '' - . ( $_->TargetIsLocal ? $_->LocalTarget : $_->Target ) - . '' - } @{ $links->ItemsArrayRef } - ) - ); - } - }, - Parents => { - value => sub { - my $links = $_[0]->MemberOf; - return ( - join( - "
      ", - map { - '' - . ( $_->TargetIsLocal ? $_->LocalTarget : $_->Target ) - . '' - } @{ $links->ItemsArrayRef } - ) - ); - } - }, - RefersTo => { - value => sub { - my $links = $_[0]->RefersTo; - return ( - join( - "
      ", - map { - '' - . ( $_->TargetIsLocal ? $_->LocalTarget : $_->Target ) - . '' - } @{ $links->ItemsArrayRef } - ) - ); - } - }, + # Everything from LINKTYPEMAP + (map { + $_ => { value => LinkCallback( $_ ) } + } keys %RT::Ticket::LINKTYPEMAP), '_CLASS' => { value => sub { return $_[1] % 2 ? 'oddline' : 'evenline' } }, }; - - - -# }}} + +<%init> $m->comp( '/Elements/Callback', COLUMN_MAP => $COLUMN_MAP, _CallbackName => 'ColumnMap'); - +return ColumnMap($Name, $Attr); + diff --git a/rt/html/Elements/Refresh b/rt/html/Elements/Refresh index 3cfb7c663..9f241d279 100644 --- a/rt/html/Elements/Refresh +++ b/rt/html/Elements/Refresh @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}}
      diff --git a/rt/html/Elements/SelectAttachmentField b/rt/html/Elements/SelectAttachmentField index cd16bbaee..ea1528c03 100644 --- a/rt/html/Elements/SelectAttachmentField +++ b/rt/html/Elements/SelectAttachmentField @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} diff --git a/rt/html/Elements/SelectCustomFieldOperator b/rt/html/Elements/SelectCustomFieldOperator index 2264f2dcf..8f7ea618b 100644 --- a/rt/html/Elements/SelectCustomFieldOperator +++ b/rt/html/Elements/SelectCustomFieldOperator @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} > <%init> diff --git a/rt/html/Elements/SelectDateRelation b/rt/html/Elements/SelectDateRelation index b3f3868b3..ccf0c1121 100644 --- a/rt/html/Elements/SelectDateRelation +++ b/rt/html/Elements/SelectDateRelation @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} diff --git a/rt/html/Elements/SelectEqualityOperator b/rt/html/Elements/SelectEqualityOperator index 5e5d1a4b9..0f8deea89 100644 --- a/rt/html/Elements/SelectEqualityOperator +++ b/rt/html/Elements/SelectEqualityOperator @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} -
      +% #Manually flush the content buffer after each titlebox is displayed +% $m->flush_buffer(); + <%ARGS> $title => undef $content => undef diff --git a/rt/html/Elements/TitleBoxStart b/rt/html/Elements/TitleBoxStart index a0c733543..804e5cfaa 100644 --- a/rt/html/Elements/TitleBoxStart +++ b/rt/html/Elements/TitleBoxStart @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} undef $bodyclass => undef $title_href => undef $title => undef -$title_class => undef +$title_class => '' $titleright_href => undef $titleright => undef -- cgit v1.2.1 From 6863b061a7740eed16903f01dae6b46521e9ca7b Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 15 Oct 2005 09:33:53 +0000 Subject: landing rt 3.4.4 on HEAD --- rt/html/Elements/CollectionAsTable/Row | 99 +++++++++++++++++++++++----------- rt/html/Elements/Footer | 17 ++---- rt/html/Elements/Header | 15 +++--- rt/html/Elements/Menu | 13 ++--- rt/html/Elements/PageLayout | 13 ++--- rt/html/Elements/SimpleSearch | 6 +-- rt/html/Elements/Tabs | 26 +++++---- 7 files changed, 115 insertions(+), 74 deletions(-) (limited to 'rt/html/Elements') diff --git a/rt/html/Elements/CollectionAsTable/Row b/rt/html/Elements/CollectionAsTable/Row index 701966fcc..3316bc027 100644 --- a/rt/html/Elements/CollectionAsTable/Row +++ b/rt/html/Elements/CollectionAsTable/Row @@ -1,8 +1,14 @@ -%# BEGIN LICENSE BLOCK; +%# BEGIN BPS TAGGED BLOCK {{{ %# -%# Copyright (c) 1996-2003 Jesse Vincent +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# %# -%# (Except where explictly superceded by other copyright notices) +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: %# %# 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 @@ -14,14 +20,29 @@ %# 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. +%# 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. %# %# -%# END LICENSE BLOCK - +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# END BPS TAGGED BLOCK }}} <%ARGS> $i => undef @Format => undef @@ -32,42 +53,56 @@ $Warning => undef <%PERL> -$m->out( '' ); +$m->out('' ); my $item; foreach my $column (@Format) { if ( $column->{title} eq 'NEWLINE' ) { - while ($item < $maxitems) { - $m->out("\n"); - $item++; - } - $item = 0; + while ( $item < $maxitems ) { + $m->out(qq{\n}); + $item++; + } + $item = 0; $m->out(''); - $m->out( '' ); + $m->out('' ); next; } $item++; - $m->out(''); diff --git a/rt/html/Elements/Footer b/rt/html/Elements/Footer index 12432caaa..78a116f38 100644 --- a/rt/html/Elements/Footer +++ b/rt/html/Elements/Footer @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} % if ($Menu) { @@ -52,21 +52,13 @@ <& /Elements/Callback, %ARGS &> -% if ($Debug) { -
      -<&|/l&>Time to display: <%Time::HiRes::tv_interval( $m->{'rt_base_time'} )%> -% } % if ($Debug >= 2 ) { % require Data::Dumper; % my $d = Data::Dumper->new([\%ARGS], [qw(%ARGS)]); @@ -74,6 +66,7 @@ <%$d->Dump() %> % } +
      <&|/l&>Time to display: <%Time::HiRes::tv_interval( $m->{'rt_base_time'} )%>
      % if ($Menu) { diff --git a/rt/html/Elements/Header b/rt/html/Elements/Header index 4a16d5667..b9518dcb7 100644 --- a/rt/html/Elements/Header +++ b/rt/html/Elements/Header @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} %# @@ -77,15 +77,18 @@ ONLOAD=" >
        
      '); + $m->out('out( 'align="' . $column->{align} . '"' ) if ( $column->{align} ); + $m->out('>'); foreach my $subcol ( @{ $column->{output} } ) { if ( $subcol =~ /^__(.*?)__$/o ) { - my $col = $1; - my $value = $m->comp('/Elements/RT__Ticket/ColumnMap', Name => $col, Attr => 'value'); + my $col = $1; + my $value = $m->comp( + '/Elements/RT__Ticket/ColumnMap', + Name => $col, + Attr => 'value' + ); + my @out; + + if ( $value && ref($value) ) { + + # All HTML snippets are returned by the callback function + # as scalar references. Data fetched from the objects are + # plain scalars, and needs to be escaped properly. + @out = + map { + ref($_) ? $$_ : $m->interp->apply_escapes( $_ => 'h' ) + } &{$value}( $record, $i ) + ; + } + else { - if ( $value && ref($value)) { - # All HTML snippets are returned by the callback function - # as scalar references. Data fetched from the objects are - # plain scalars, and needs to be escaped properly. - $m->out( - map { ref($_) ? $$_ : $m->interp->apply_escapes( $_ => 'h' ) } - &{ $value } ( $record, $i ) - ); - } else { - # Simple value; just escape it. - $m->out( $m->interp->apply_escapes( $value => 'h' ) ); + # Simple value; just escape it. + @out = $m->interp->apply_escapes( $value => 'h' ); } + s/\n/
      /gs for @out; + $m->out( @out ); } else { - $m->out( Encode::decode_utf8($subcol) ); + $m->out($subcol); } } $m->out('
      - +<<<<<<< Header +
      freesidefreeside <% &RT::URI::freeside::FreesideGetConfig('company_name') %> Ticketing % if ($session{'CurrentUser'} && $session{'CurrentUser'}->Id && $LoggedIn) { <&|/l&>Skip Menu | +%if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System )) { <&|/l&>Preferences +% } <& /Elements/Callback, %ARGS &> % unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) { -| <&|/l&>Logout +| <&|/l&>Logout % }
      <&|/l, "".$session{'CurrentUser'}->Name."" &>Logged in as [_1] @@ -130,7 +133,7 @@ require RT::URI::freeside; <%ARGS> $Prefs => '/User/Prefs.html' $Focus => 'focus' -$Title => undef +$Title => 'RT' $Code => undef $Refresh => 0 $Why => undef diff --git a/rt/html/Elements/Menu b/rt/html/Elements/Menu index e933fb4f0..398e3ab07 100644 --- a/rt/html/Elements/Menu +++ b/rt/html/Elements/Menu @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} %# font size depends on level % if ($level ge 3) { % $size = $basesize-(6); @@ -69,16 +69,17 @@ % } % my $style=""; % if ($sep) { -% $style="border-top: solid #999 1px; padding-top: .1em; margin-top: .5em;"; +% $style="minor"; % } elsif ($level == 0 ) { -% $style="border-bottom: solid white 1px; padding-top: .25em; padding-bottom: .5em;" ; +% $style="major"; % } % if ($toptabs->{$tab}->{'separator'}) { % $sep=1; % } else { % $sep=0; % } -
    • <%$toptabs->{$tab}->{'path'}%>" style="font-size: <%$size%>;" class="<%$class%>" +% my $url = $toptabs->{$tab}->{'path'} =~ /^https?:/i ? $toptabs->{$tab}->{'path'} : $RT::WebPath . "/" . $toptabs->{$tab}->{'path'}; +
    • <% !$level && "accesskey='".$accesskey++."'" |n%>><% $toptabs->{$tab}->{'title'}%> %# Second-level items diff --git a/rt/html/Elements/PageLayout b/rt/html/Elements/PageLayout index 41eae785f..94bdbe194 100644 --- a/rt/html/Elements/PageLayout +++ b/rt/html/Elements/PageLayout @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} @@ -76,7 +76,7 @@ % if ($actions->{"$action"}->{'html'}) { % push @actions, $actions->{"$action"}->{'html'}; % } else { -% push @actions, "{$action}->{'path'}."\">".$actions->{$action}->{'title'}.""; +% push @actions, qq|{$action}->{'path'}.qq|">|.$actions->{$action}->{'title'}.""; % } % } %#<% join(" | ", @actions) | n %> @@ -94,11 +94,12 @@
      <%$AppName%>
      - +<& /Elements/Callback, _CallbackName => 'BeforeBody', %ARGS &> +%$m->flush_buffer(); # we've got the page laid out, let's flush the buffer; <%INIT> foreach my $tab (sort keys %{$toptabs}) { - if ($toptabs->{$tab}->{'path'} eq $current_toptab) { + if ($current_toptab && $toptabs->{$tab}->{'path'} eq $current_toptab) { $toptabs->{$tab}->{"subtabs"} = $tabs; $toptabs->{$tab}->{"current_subtab"} = $current_tab; } diff --git a/rt/html/Elements/SimpleSearch b/rt/html/Elements/SimpleSearch index 213aa7eac..e76f801df 100644 --- a/rt/html/Elements/SimpleSearch +++ b/rt/html/Elements/SimpleSearch @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}}   diff --git a/rt/html/Elements/Tabs b/rt/html/Elements/Tabs index 4a018bfad..f5839a9e5 100644 --- a/rt/html/Elements/Tabs +++ b/rt/html/Elements/Tabs @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} <& /Elements/PageLayout, current_toptab => $current_toptab, current_tab => $current_tab, @@ -76,17 +76,25 @@ my $basetabs = { C => { title => loc('Tools'), path => 'Tools/Offline.html' }, - E => { title => loc('Configuration'), - path => 'Admin/' - }, - K => { title => loc('Preferences'), - path => 'User/Prefs.html' - }, P => { title => loc('Approval'), path => 'Approvals/' }, }; +if ($session{'CurrentUser'}->HasRight( Right => 'ShowConfigTab', + Object => $RT::System )) { + $basetabs->{E} = { title => loc('Configuration'), + path => 'Admin/', + }; +} + +if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf', + Object => $RT::System )) { + $basetabs->{K} = { title => loc('Preferences'), + path => 'User/Prefs.html' + }; +} + if (!defined $toptabs) { $toptabs = $basetabs; } -- cgit v1.2.1 From 4fad0a5e620764e7372455094de9704b9c1b11ec Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 15 Oct 2005 11:13:52 +0000 Subject: land RT 3.4.4 on HEAD --- rt/html/Elements/Header | 1 - 1 file changed, 1 deletion(-) (limited to 'rt/html/Elements') diff --git a/rt/html/Elements/Header b/rt/html/Elements/Header index b9518dcb7..a2563fee3 100644 --- a/rt/html/Elements/Header +++ b/rt/html/Elements/Header @@ -77,7 +77,6 @@ ONLOAD=" > -<<<<<<< Header
      freeside <% &RT::URI::freeside::FreesideGetConfig('company_name') %> Ticketing -- cgit v1.2.1