From 8103c1fc1b2c27a6855feadf26f91b980a54bc52 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 2 Mar 2008 04:11:51 +0000 Subject: import rt 3.6.6 --- rt/html/Elements/BevelBoxRaisedEnd | 10 +- rt/html/Elements/BevelBoxRaisedStart | 12 +- rt/html/Elements/Callback | 6 +- rt/html/Elements/Checkbox | 8 +- rt/html/Elements/CollectionAsTable/Header | 20 +-- rt/html/Elements/CollectionAsTable/ParseFormat | 6 +- rt/html/Elements/CollectionAsTable/Row | 23 +-- rt/html/Elements/CreateTicket | 12 +- rt/html/Elements/EditCustomField | 16 +- rt/html/Elements/EditCustomFieldBinary | 10 +- rt/html/Elements/EditCustomFieldFreeform | 22 ++- rt/html/Elements/EditCustomFieldImage | 12 +- rt/html/Elements/EditCustomFieldSelect | 84 ++++++++-- rt/html/Elements/EditCustomFieldText | 10 +- rt/html/Elements/EditCustomFieldWikitext | 10 +- rt/html/Elements/EditLinks | 115 +++++++------- rt/html/Elements/EmailInput | 0 rt/html/Elements/Error | 22 +-- rt/html/Elements/Footer | 47 +++--- rt/html/Elements/GotoTicket | 8 +- rt/html/Elements/Header | 119 +++++++------- rt/html/Elements/ListActions | 30 ++-- rt/html/Elements/Login | 80 ++++++---- rt/html/Elements/Menu | 128 +++++++++------ rt/html/Elements/MessageBox | 10 +- rt/html/Elements/MyRT | 2 +- rt/html/Elements/MyRequests | 33 +--- rt/html/Elements/MyTickets | 34 +--- rt/html/Elements/PageLayout | 211 +++++++++++++++++++------ rt/html/Elements/QueryString | 13 +- rt/html/Elements/QuickCreate | 37 ++--- rt/html/Elements/Quicksearch | 57 ++----- rt/html/Elements/RT__Ticket/ColumnMap | 39 +++-- rt/html/Elements/Refresh | 22 +-- rt/html/Elements/ScrubHTML | 8 +- rt/html/Elements/Section | 15 +- rt/html/Elements/SelectAttachmentField | 18 ++- rt/html/Elements/SelectBoolean | 17 +- rt/html/Elements/SelectCustomFieldOperator | 18 ++- rt/html/Elements/SelectCustomFieldValue | 10 +- rt/html/Elements/SelectDate | 14 +- rt/html/Elements/SelectDateRelation | 16 +- rt/html/Elements/SelectDateType | 26 +-- rt/html/Elements/SelectEqualityOperator | 16 +- rt/html/Elements/SelectGroups | 12 +- rt/html/Elements/SelectLang | 16 +- rt/html/Elements/SelectLinkType | 16 +- rt/html/Elements/SelectMatch | 18 ++- rt/html/Elements/SelectNewTicketQueue | 45 +----- rt/html/Elements/SelectOwner | 16 +- rt/html/Elements/SelectQueue | 69 ++++---- rt/html/Elements/SelectResultsPerPage | 17 +- rt/html/Elements/SelectSortOrder | 14 +- rt/html/Elements/SelectStatus | 14 +- rt/html/Elements/SelectTicketSortBy | 12 +- rt/html/Elements/SelectTicketTypes | 12 +- rt/html/Elements/SelectUsers | 12 +- rt/html/Elements/SelectWatcherType | 14 +- rt/html/Elements/SetupSessionCookie | 128 ++++++++------- rt/html/Elements/ShowCustomFieldBinary | 6 +- rt/html/Elements/ShowCustomFieldImage | 8 +- rt/html/Elements/ShowCustomFieldWikitext | 9 +- rt/html/Elements/ShowCustomFields | 37 ++++- rt/html/Elements/ShowLink | 8 +- rt/html/Elements/ShowLinks | 17 +- rt/html/Elements/ShowMemberships | 6 +- rt/html/Elements/SimpleSearch | 12 +- rt/html/Elements/Submit | 65 +++----- rt/html/Elements/Tabs | 15 +- rt/html/Elements/TicketList | 46 ++++-- rt/html/Elements/TitleBox | 11 +- rt/html/Elements/TitleBoxEnd | 21 +-- rt/html/Elements/TitleBoxStart | 49 +----- 73 files changed, 1218 insertions(+), 933 deletions(-) create mode 100644 rt/html/Elements/EmailInput (limited to 'rt/html/Elements') diff --git a/rt/html/Elements/BevelBoxRaisedEnd b/rt/html/Elements/BevelBoxRaisedEnd index e1d1edb7c..b1ba8f69b 100644 --- a/rt/html/Elements/BevelBoxRaisedEnd +++ b/rt/html/Elements/BevelBoxRaisedEnd @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,6 +45,6 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - - + + diff --git a/rt/html/Elements/BevelBoxRaisedStart b/rt/html/Elements/BevelBoxRaisedStart index 6c5a6137e..b690c1d74 100644 --- a/rt/html/Elements/BevelBoxRaisedStart +++ b/rt/html/Elements/BevelBoxRaisedStart @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,6 +45,6 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - - - + +
+ + + + <%perl> my %generic_query_args = ( Query => $Query, Rows => $Rows, Page => $Page, Format => $FormatString ); @@ -62,18 +64,18 @@ my %generic_query_args = ( Query => $Query, Rows => $Rows, Page => $Page, Format my $item = 0; foreach my $col (@Format) { $item++; - if ( $col->{title} eq 'NEWLINE' ) { + if ( $col->{title} && ($col->{title} eq 'NEWLINE') ) { while ( $item < $maxitems ) { $m->out(qq{\n}); $item++; } $item = 0; - $m->out(qq{\n}); + $m->out(qq{\n}); } else { - $m->out(''); + $m->out(''); } } - + diff --git a/rt/html/Elements/CollectionAsTable/ParseFormat b/rt/html/Elements/CollectionAsTable/ParseFormat index be56dea76..227076093 100644 --- a/rt/html/Elements/CollectionAsTable/ParseFormat +++ b/rt/html/Elements/CollectionAsTable/ParseFormat @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Elements/CollectionAsTable/Row b/rt/html/Elements/CollectionAsTable/Row index 0de362ea8..d8492265e 100644 --- a/rt/html/Elements/CollectionAsTable/Row +++ b/rt/html/Elements/CollectionAsTable/Row @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -53,23 +55,26 @@ $Warning => undef <%PERL> -$m->out('' ); +use HTML::Entities; +$m->out('' ); my $item; foreach my $column (@Format) { - if ( $column->{title} eq 'NEWLINE' ) { + if ( defined $column->{title} && $column->{title} eq 'NEWLINE' ) { while ( $item < $maxitems ) { $m->out(qq{\n}); $item++; } $item = 0; - $m->out(''); - $m->out('' ); next; } $item++; - $m->out(''); } -$m->out(''); +$m->out(''); diff --git a/rt/html/Elements/CreateTicket b/rt/html/Elements/CreateTicket index bd60bbddf..644df223a 100644 --- a/rt/html/Elements/CreateTicket +++ b/rt/html/Elements/CreateTicket @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,6 +45,6 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -
-<&|/l, $m->scomp('/Elements/SelectNewTicketQueue')&> [_1] - +
+<&|/l, $m->scomp('/Elements/SelectNewTicketQueue')&> [_1] + diff --git a/rt/html/Elements/EditCustomField b/rt/html/Elements/EditCustomField index e443c764e..d247c63f1 100644 --- a/rt/html/Elements/EditCustomField +++ b/rt/html/Elements/EditCustomField @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,7 +47,7 @@ %# END BPS TAGGED BLOCK }}} <%INIT> my $Values; -if ($Object) { +if ($Object and $Object->id) { $Values = $Object->CustomFieldValues($CustomField->id); $Values->Columns( qw( id CustomField ObjectType ObjectId Disabled Content ContentType ContentEncoding ) ); $NamePrefix ||= join('-', 'Object', ref($Object), $Object->Id, 'CustomField', ''); @@ -67,10 +69,14 @@ if ($MaxValues == 1 and $Object and $Values) { } # 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"); +$m->out("\n".''."\n"); + +my $EditComponent = "EditCustomField$Type"; +$m->comp('/Elements/Callback', _CallbackName => 'EditComponentName', Name => \$EditComponent, CustomField => $CustomField, Object => $Object ); +$EditComponent = "EditCustomField$Type" unless $m->comp_exists($EditComponent); return $m->comp( - "EditCustomField$Type", + $EditComponent, %ARGS, Rows => $Rows, Cols => $Cols, diff --git a/rt/html/Elements/EditCustomFieldBinary b/rt/html/Elements/EditCustomFieldBinary index 002825660..485457c25 100644 --- a/rt/html/Elements/EditCustomFieldBinary +++ b/rt/html/Elements/EditCustomFieldBinary @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,10 +47,10 @@ %# END BPS TAGGED BLOCK }}} % while ($Values and my $value = $Values->Next ) { %# XXX - let user download the file(s) here? -<% $value->Content %>
+<% $value->Content %>
% } % if (!$MaxValues or !$Values or $Values->Count < $MaxValues) { - + % } <%ARGS> $Object => undef diff --git a/rt/html/Elements/EditCustomFieldFreeform b/rt/html/Elements/EditCustomFieldFreeform index c097ee0a9..279632dcc 100644 --- a/rt/html/Elements/EditCustomFieldFreeform +++ b/rt/html/Elements/EditCustomFieldFreeform @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,17 +45,21 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} +% my $name = $NamePrefix . $CustomField->Id . '-Value'; % if ($Multiple) { - + % } else { - + % } <%INIT> if ($Multiple and $Values) { - $Default = ''; - while (my $value = $Values->Next ) { - $Default .= $value->Content."\n"; - } + $Default = ''; + while (my $value = $Values->Next ) { + $Default .= $value->Content."\n"; + } +} +elsif ( ! $Multiple ) { + $Default =~ s/\s*\n\s*/ /g if $Default; } <%ARGS> diff --git a/rt/html/Elements/EditCustomFieldImage b/rt/html/Elements/EditCustomFieldImage index b378ceae6..b6a30c659 100644 --- a/rt/html/Elements/EditCustomFieldImage +++ b/rt/html/Elements/EditCustomFieldImage @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -44,11 +46,11 @@ %# %# END BPS TAGGED BLOCK }}} % while ($Values and my $value = $Values->Next ) { -<& ShowCustomFieldImage, Object => $value &> -
+<& ShowCustomFieldImage, Object => $value &> +
% } % if (!$MaxValues or !$Values or $Values->Count < $MaxValues) { - + % } <%ARGS> $Object => undef diff --git a/rt/html/Elements/EditCustomFieldSelect b/rt/html/Elements/EditCustomFieldSelect index 5dd4d0d69..815e977a0 100644 --- a/rt/html/Elements/EditCustomFieldSelect +++ b/rt/html/Elements/EditCustomFieldSelect @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,30 +45,84 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - + +% foreach my $cat (@category) { +% my ($depth, $name) = @$cat; + +% } +
+% } + +<%ARGS> +$Object => undef +$CustomField => undef +$NamePrefix => undef +$Default => undef +$Values => undef +$Multiple => 0 +$Rows => undef + + +<%method options> % my $selected; % my $CFVs = $CustomField->Values; +% my @levels; % while ($CFVs and my $value = $CFVs->Next ) { +% my $category = $value->Category; +% if (1) { # length $category) { +% my $level = (split(/:/, $category || ''))[0]; +% while (@levels) { +% if ($levels[-1] eq $level) { +% undef $level; +% last; +% } elsif (index($level, $levels[-1]) != 0) { + +% pop @levels; +% } else { +% last; +% } +% } +% if ($level) { +% push @$CategoryRef, [0+@levels, $level]; + +% push @levels, $level; +% } +% } % } - - -<%ARGS> -$Object => undef +% for (@levels) { + +% } +<%args> $CustomField => undef -$NamePrefix => undef $Default => undef $Values => undef -$Multiple => 0 -$Cols -$Rows - +$SelectedRef => undef +$CategoryRef => undef + + diff --git a/rt/html/Elements/EditCustomFieldText b/rt/html/Elements/EditCustomFieldText index 1aac3283b..b7569b003 100644 --- a/rt/html/Elements/EditCustomFieldText +++ b/rt/html/Elements/EditCustomFieldText @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -44,10 +46,10 @@ %# %# 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. diff --git a/rt/html/Elements/EditCustomFieldWikitext b/rt/html/Elements/EditCustomFieldWikitext index 1aac3283b..b7569b003 100644 --- a/rt/html/Elements/EditCustomFieldWikitext +++ b/rt/html/Elements/EditCustomFieldWikitext @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -44,10 +46,10 @@ %# %# 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. diff --git a/rt/html/Elements/EditLinks b/rt/html/Elements/EditLinks index 68c08dd16..7670ffa24 100755 --- a/rt/html/Elements/EditLinks +++ b/rt/html/Elements/EditLinks @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,9 +45,9 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -
diff --git a/rt/html/Elements/Callback b/rt/html/Elements/Callback index c7aeb9f5d..b498f2816 100644 --- a/rt/html/Elements/Callback +++ b/rt/html/Elements/Callback @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Elements/Checkbox b/rt/html/Elements/Checkbox index f2256fb78..5593c7a71 100644 --- a/rt/html/Elements/Checkbox +++ b/rt/html/Elements/Checkbox @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,7 +45,7 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -> + /> <%ARGS> $Name => undef diff --git a/rt/html/Elements/CollectionAsTable/Header b/rt/html/Elements/CollectionAsTable/Header index 9ed4be8ec..a3277b317 100644 --- a/rt/html/Elements/CollectionAsTable/Header +++ b/rt/html/Elements/CollectionAsTable/Header @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -54,7 +56,7 @@ $Rows => undef $Page => undef $maxitems => undef -
 
'); - my $title = $col->{title}; + $m->out(''); + my $title = $col->{title} || ''; $title =~ s/^__(.*)__$/$1/o; $title = ( $m->comp( @@ -116,8 +118,8 @@ foreach my $col (@Format) { else { $m->out( loc($title) ); } - $m->out('
 
{class} + ? encode_entities($column->{class}, q{'"&<>}) : 'collection-as-table'; + $m->out(qq{out( 'align="' . $column->{align} . '"' ) if ( $column->{align} ); $m->out( 'style="' . $column->{style} . '"' ) if ( $column->{style} ); $m->out('>'); @@ -99,7 +104,7 @@ foreach my $column (@Format) { # Simple value; just escape it. @out = $m->interp->apply_escapes( $value => 'h' ); } - s/\n/
/gs for @out; + s/\n/
/gs for @out; $m->out( @out ); } else { @@ -108,5 +113,5 @@ foreach my $column (@Format) { } $m->out('
- - + + + + + + + + + + + + + + + + + + + + + + + +
+ + + - + - -

<&|/l&>Current Links

@@ -57,8 +59,8 @@ @@ -66,9 +68,8 @@ @@ -76,8 +77,8 @@ @@ -85,8 +86,8 @@ @@ -94,8 +95,8 @@ @@ -103,61 +104,63 @@
<&|/l&>Depends on: % while (my $link = $Object->DependsOn->Next) { - - <& ShowLink, URI => $link->TargetURI &>
+ + <& ShowLink, URI => $link->TargetURI &>
% }
<&|/l&>Depended on by: % while (my $link = $Object->DependedOnBy->Next) { -% my $member = $link->BaseObj; - - <& ShowLink, URI => $link->BaseURI &>
+ + <& ShowLink, URI => $link->BaseURI &>
% }
<&|/l&>Parents: % while (my $link = $Object->MemberOf->Next) { - - <& ShowLink, URI => $link->TargetURI &>
+ + <& ShowLink, URI => $link->TargetURI &>
% }
<&|/l&>Children: % while (my $link = $Object->Members->Next) { - - <& ShowLink, URI => $link->BaseURI &>
+ + <& ShowLink, URI => $link->BaseURI &>
% }
<&|/l&>Refers to: % while (my $link = $Object->RefersTo->Next) { - - <& ShowLink, URI => $link->TargetURI &>
+ + <& ShowLink, URI => $link->TargetURI &>
%}
<&|/l&>Referred to by: % while (my $link = $Object->ReferredToBy->Next) { - - <& ShowLink, URI => $link->BaseURI &>
+% # Skip reminders +% next if (UNIVERSAL::isa($link->BaseObj, 'RT::Ticket') && $link->BaseObj->Type eq 'reminder'); + + <& 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. <& /Elements/Callback, _CallbackName => 'ExtraLinkInstructions' &> -
+
% } 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.
+<&|/l&>Enter objects or URIs to link objects to. Separate multiple entries with spaces.
% } - +
% if ($Merge) { - - - - + + + + % } - - - - - - - - - - - - - - - - - - - - - - - - -
<&|/l&>Merge into: <&|/l&>(only one ticket)
<&|/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:
-
+
<&|/l&>Depends on:
<&|/l&>Depended on by:
<&|/l&>Parents:
<&|/l&>Children:
<&|/l&>Refers to:
<&|/l&>Referred to by:
+
<%INIT> my $id; diff --git a/rt/html/Elements/EmailInput b/rt/html/Elements/EmailInput new file mode 100644 index 000000000..e69de29bb diff --git a/rt/html/Elements/Error b/rt/html/Elements/Error index bc5a1880a..369327406 100644 --- a/rt/html/Elements/Error +++ b/rt/html/Elements/Error @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -44,15 +46,13 @@ %# %# END BPS TAGGED BLOCK }}} <& /Elements/Callback, %ARGS, error => $error &> -<& /Elements/Header, Code => $Code, Why => $Why &> -<& /Elements/Tabs &> -<& /Elements/TitleBoxStart, class=> "error", title => $Title &> +<& /Elements/Header, Code => $Code, Why => $Why, Title => $Title &> +<& /Elements/Tabs, Title => $Title &> +
<%$Why%> -
- +
<%$Details%> -
-<& /Elements/TitleBoxEnd &> +
<%cleanup> $m->comp('/Elements/Footer'); @@ -61,7 +61,7 @@ $m->abort(); <%args> $Code => undef -$Details => undef +$Details =>'' $Title => loc("RT Error") $Why => loc("the calling component did not specify why") @@ -77,7 +77,7 @@ if ($] >= 5.007001) { $RT::Logger->error($error); -if ( $session{'SessionType'} eq 'REST' ) { +if ( defined ($session{'SessionType'}) && $session{'SessionType'} eq 'REST' ) { $r->content_type('text/plain'); $m->out( "Error: " . $Why . "\n" ); $m->out( $Details . "\n" ); diff --git a/rt/html/Elements/Footer b/rt/html/Elements/Footer index 4c90acfa3..16f13f9fc 100644 --- a/rt/html/Elements/Footer +++ b/rt/html/Elements/Footer @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,19 +45,26 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -% if ($Menu) { - - - - -% } +%# End of div#body from /Elements/PageLayout + <& /Elements/Callback, %ARGS &> -
-<&|/l, '»|«', $RT::VERSION, '2005', 'Best Practical Solutions, LLC', &>[_1] RT [_2] Copyright 1996-[_3] [_4].
+ % if ($Debug >= 2 ) { % require Data::Dumper; @@ -64,17 +73,9 @@ <%$d->Dump() %> % } -
<&|/l&>Time to display: <%Time::HiRes::tv_interval( $m->{'rt_base_time'} )%>
-% if ($Menu) { - - - - - - -% } - - + + + % $m->abort(); <%ARGS> diff --git a/rt/html/Elements/GotoTicket b/rt/html/Elements/GotoTicket index 869d57ef1..ad6ad1b15 100644 --- a/rt/html/Elements/GotoTicket +++ b/rt/html/Elements/GotoTicket @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,4 +45,4 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -
 
+
 
diff --git a/rt/html/Elements/Header b/rt/html/Elements/Header index f5a616ece..d8db26cb2 100644 --- a/rt/html/Elements/Header +++ b/rt/html/Elements/Header @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,78 +45,89 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -%# - - -<%$Title%> + + + + +<%$Title%> + % if ($Refresh && $Refresh > 0) { - + % } - - + + - -<& /Elements/Callback, _CallbackName => 'Head', %ARGS &> - - % } -> - - - - - - - -
<%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, _CallbackName => 'Head', %ARGS &> + + + > + +% if ($ShowBar) { +<& /Elements/Logo &> + +
+
+ <&|/l&>Skip Menu | +% if ($session{'CurrentUser'}->Name) { + <&|/l, "".$session{'CurrentUser'}->Name."" &>Logged in as [_1] +% if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System )) { + | <&|/l&>Preferences +% } % } else { -<&|/l&>Not logged in. + <&|/l&>Not logged in. +% } + <& /Elements/Callback, %ARGS &> +% unless (!$session{'CurrentUser'}->Name +% or ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth)) { + | <&|/l&>Logout +% } +
% } -
-<%INIT> +<%INIT> $r->headers_out->{'Pragma'} = 'no-cache'; $r->headers_out->{'Cache-control'} = 'no-cache'; + +my $id = $m->request_comp->path; +$id =~ s|^/||g; +$id =~ s|/|-|g; +$id =~ s|\.html$||g; +$id =~ s|index$||g + if $id ne 'index'; +$id =~ s|-$||g; <%ARGS> $Prefs => '/User/Prefs.html' -$Focus => 'focus' +#$Focus => 'focus' +$Focus => '' $Title => 'RT' $Code => undef $Refresh => 0 $Why => undef -$BgColor => '#ffffff' $ShowBar => 1 -$LoggedIn => 1 $URL => undef +$RSSAutoDiscovery => undef +$onload => undef diff --git a/rt/html/Elements/ListActions b/rt/html/Elements/ListActions index 8433d17e0..24f923a8a 100644 --- a/rt/html/Elements/ListActions +++ b/rt/html/Elements/ListActions @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,22 +45,20 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -% if ($actions[0] ) { -<& /Elements/TitleBoxStart, title => loc('Results') &> -
    +<&| /Widgets/TitleBox, 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 &> -
    +% next unless $action; +% my $skip = 0; +% $m->comp('/Elements/Callback', _CallbackName => 'ModifyRow', row => \$action, skip => \$skip, %ARGS); +% next if $skip; +
  • <%$action%>
  • % } +
+ <%init> -@actions = grep (/./,@actions); +@actions = grep $_, @actions; +return unless @actions; <%ARGS> @actions => undef diff --git a/rt/html/Elements/Login b/rt/html/Elements/Login index 1d4bfd5ec..cd39b87d8 100644 --- a/rt/html/Elements/Login +++ b/rt/html/Elements/Login @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -51,36 +53,58 @@ if ($m->request_comp->path =~ '^/REST/\d+\.\d+/') { $m->out("\n$Error\n") if $Error; $m->abort; } + +my $req_uri; + +if (UNIVERSAL::can($r, 'uri') and $r->uri =~ m{.*/(.*)}) { + $req_uri = $1; +} + +my $form_action = defined $goto ? $goto + : defined $req_uri ? $req_uri + : $RT::WebPath + ; <& /Elements/Callback, %ARGS, _CallbackName => 'Header' &> <& /Elements/Header, Title => loc('Login'), Focus => 'user' &> -
+%# End of div#quickbar from /Elements/Header +
+ + +<& /Elements/Callback, %ARGS, _CallbackName => 'AfterForm' &> <& /Elements/Footer, Menu => 0 &> <%ARGS> $user => "" diff --git a/rt/html/Elements/Menu b/rt/html/Elements/Menu index 398e3ab07..b5b2bdad5 100644 --- a/rt/html/Elements/Menu +++ b/rt/html/Elements/Menu @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,66 +45,90 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED 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"; +<% $menu_class ? qq[ class="$menu_class"] : ''|n %>> +>
    +% my $sep = 0; +% my $postsep = 0; +% my $accesskey = 1; +% +% $count = 0; +% $class = {}; +% % 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="minor"; -% } elsif ($level == 0 ) { -% $style="major"; -% } -% if ($toptabs->{$tab}->{'separator'}) { -% $sep=1; -% } else { -% $sep=0; -% } -% my $url = $toptabs->{$tab}->{'path'} =~ /^https?:/i ? $toptabs->{$tab}->{'path'} : $RT::WebPath . "/" . $toptabs->{$tab}->{'path'}; -
  • -<% !$level && "accesskey='".$accesskey++."'" |n%>><% $toptabs->{$tab}->{'title'}%> +% $count++; +% +% my $current = $current_toptab || ""; +% my $path = $toptabs->{$tab}->{'path'} || ""; +% +% $path =~ s#/index.html$##gi; +% $current =~ s#/index.html$##gi; +% +% $sep = $toptabs->{$tab}->{'separator'} ? 1 : 0; +% +% my @aclass; +% push @aclass, 'selected' +% if $path eq $current; +% +% push @aclass, 'odd' +% if $level % 2; +% +% $class->{a} = join ' ', @aclass; +% +% my @li; +% push @li, 'first' +% if $count == 1; +% +% push @li, 'pre-separator' +% if $sep; +% +% push @li, 'post-separator' +% if $postsep; +% +% $class->{li} = join ' ', @li; +% +% my $url = ($toptabs->{$tab}->{'path'}||'') =~ /^https?:/i +% ? $toptabs->{$tab}->{'path'} || '' +% : $RT::WebPath . "/" . $toptabs->{$tab}->{'path'}; +% + {li} ? qq[ class="$class->{li}"] : ''|n %>> + <% $count > 1 && !$postsep && qq[· ]|n%> + {a} && qq[ class="$class->{a}"] |n%> + <% !$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'} &>
  • -% } -%# } +% if ($toptabs->{$tab}->{'subtabs'} +% and keys %{$toptabs->{$tab}->{'subtabs'}}) +% { + <& /Elements/Menu, level => $level+1, + current_toptab => $toptabs->{$tab}->{'current_subtab'}, + toptabs => $toptabs->{$tab}->{'subtabs'}, + last_level => $toptabs->{$tab}->{last_system_menu_level} &> +% } + +% if ($sep) { +
  • ···
  • +% } +% +% $postsep = $sep; % } +
<%INIT> -my ($tab, $subtab, $class, $size, $padding); -my $basesize=16; +my ($tab, $class, $count); +my @ul; +push @ul, 'last-menu-level' + if $last_level; +push @ul, 'odd' + if $level % 2; +my $menu_class = join ' ', @ul; <%ARGS> $current_toptab => "" $toptabs => undef $level => 0 +$last_level => 0 diff --git a/rt/html/Elements/MessageBox b/rt/html/Elements/MessageBox index dd48bec9a..0149e1b30 100644 --- a/rt/html/Elements/MessageBox +++ b/rt/html/Elements/MessageBox @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,10 +45,10 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - + <%INIT> -my ($message); +my $message = ''; if ($QuoteTransaction) { my $transaction=RT::Transaction->new($session{'CurrentUser'}); diff --git a/rt/html/Elements/MyRT b/rt/html/Elements/MyRT index be487a433..3fde555c2 100644 --- a/rt/html/Elements/MyRT +++ b/rt/html/Elements/MyRT @@ -48,7 +48,7 @@ - diff --git a/rt/html/Elements/MyRequests b/rt/html/Elements/MyRequests index 172b4a4fa..fc1e27095 100644 --- a/rt/html/Elements/MyRequests +++ b/rt/html/Elements/MyRequests @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,28 +45,5 @@ %# 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> -my $rows = $RT::MyRequestsLength; - -my $Query = "Owner = 'Nobody' AND ( Status = 'new' OR Status = 'open')"; - -my $QueryString = ""; -$QueryString = '?' . $m->comp('/Elements/QueryString', - Query => $Query, - Order => 'DESC', - OrderBy => 'Priority') if ($Query); - - +%# DEPRECATED +<& /Elements/ShowSearch, Name => 'My Requests' &> diff --git a/rt/html/Elements/MyTickets b/rt/html/Elements/MyTickets index cf5225abc..8d657db3d 100644 --- a/rt/html/Elements/MyTickets +++ b/rt/html/Elements/MyTickets @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,29 +45,5 @@ %# 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", - - Query => $Query, - OrderBy => 'Priority', - Order => 'DESC', - Rows => $rows, - ShowNavigation => 0 - &> - -<%init> -my $rows = $RT::MyTicketsLength; - -my $Query = " Owner = '".$session{'CurrentUser'}->Id."' AND ( Status = 'new' OR Status = 'open')"; - -my $QueryString = ""; -$QueryString = '?' . $m->comp('/Elements/QueryString', - Query => $Query, - Order => 'DESC', - OrderBy => 'Priority') if ($Query); - - - +%# DEPRECATED +<& /Elements/ShowSearch, Name => 'My Tickets' &> diff --git a/rt/html/Elements/PageLayout b/rt/html/Elements/PageLayout index 3d7241dad..c2765811b 100644 --- a/rt/html/Elements/PageLayout +++ b/rt/html/Elements/PageLayout @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,60 +45,126 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -
> +> % $show_cb->($_) foreach @$body;
- - -% foreach my $action (sort keys %{$topactions}) { - +
+% foreach my $action (reverse sort keys %{$topactions}) { + +% $m->out($topactions->{"$action"}->{'html'}); + % } - -
<%$AppName%> - - <%$topactions->{"$action"}->{'html'} |n %> -
- -%# Vertical menu - - -
- <& /Elements/Menu, toptabs => $toptabs, current_toptab => $current_toptab &> - - - - - - - - - - + @@ -59,7 +61,7 @@ @@ -69,7 +71,7 @@ @@ -83,7 +85,7 @@ @@ -93,7 +95,8 @@ diff --git a/rt/html/Elements/ShowMemberships b/rt/html/Elements/ShowMemberships index 3936d5080..f6b2817d7 100644 --- a/rt/html/Elements/ShowMemberships +++ b/rt/html/Elements/ShowMemberships @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Elements/SimpleSearch b/rt/html/Elements/SimpleSearch index 2b34d3a24..78abce467 100644 --- a/rt/html/Elements/SimpleSearch +++ b/rt/html/Elements/SimpleSearch @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,7 +45,7 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -
- -  + + + diff --git a/rt/html/Elements/Submit b/rt/html/Elements/Submit index 9d8dca20f..ee3e8b6f6 100644 --- a/rt/html/Elements/Submit +++ b/rt/html/Elements/Submit @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,54 +45,32 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -% if ($CheckAll or $ClearAll) { - -% } -
- <%$title%> -
- -% if ($actions) { -% my @actions; -% foreach my $action (sort keys %{$actions}) { -% if ($actions->{"$action"}->{'html'}) { -% push @actions, $actions->{"$action"}->{'html'}; + + +%# End of div#quickbar from /Elements/Header + + +% if ( $show_menu ) { + +% } + +
+ + +% } + + +
<& /Elements/Callback, _CallbackName => 'BeforeBody', %ARGS &> %$m->flush_buffer(); # we've got the page laid out, let's flush the buffer; -<%INIT> +<%INIT> foreach my $tab (sort keys %{$toptabs}) { if ($current_toptab && $toptabs->{$tab}->{'path'} eq $current_toptab) { $toptabs->{$tab}->{"subtabs"} = $tabs; @@ -108,7 +176,53 @@ if (! defined($AppName)) { $AppName = loc("RT for [_1]", $RT::rtname); } +my ($menu_depth, $almost_last, $page_tabs); + +if ($RT::WebDefaultStylesheet ne '3.4-compat') { + ($menu_depth, $almost_last) = @{$m->comp('.menu_recurse', data => $toptabs)}; + + if (defined $almost_last->{subtabs} and %{$almost_last->{subtabs}}) { + $page_tabs = { + current_toptab => $almost_last->{current_subtab}, + %{$almost_last->{subtabs}}, + }; + + delete $almost_last->{subtabs}; + delete $almost_last->{current_subtab}; + } +} + +%# There's probably a better way to do this that involves three times as +%# much work and redoing the whole menu/tab system... which would seem a +%# bit out of scope. +%# +%# This function recurses through the menu and returns the second to +%# last menu, that is, the menu holding the last reference to +%# and submenu. It also returns the number of menu levels minus +%# the last submenu. +<%def .menu_recurse> + <%args> + $data => { } + $pdata => { } + $ppdata => { } + $level => 0 + + <%init> + for my $key (keys %$data) { + return $m->comp('.menu_recurse', data => $data->{$key}->{subtabs}, + pdata => $data->{$key}, + ppdata => $pdata, + level => $level+1) + if ref($data->{$key}) eq 'HASH' + and defined $data->{$key}->{subtabs} + and %{$data->{$key}->{subtabs}}; + } + $ppdata->{last_system_menu_level}++; + return [$level, $pdata]; + + + <%ARGS> $current_toptab => undef $current_tab => undef @@ -119,4 +233,5 @@ $actions => undef $subactions => undef $title => $m->callers(-1)->path $AppName => undef +$show_menu => 1 diff --git a/rt/html/Elements/QueryString b/rt/html/Elements/QueryString index 1ddab85de..0176180d2 100644 --- a/rt/html/Elements/QueryString +++ b/rt/html/Elements/QueryString @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -49,7 +51,12 @@ while ( my ($key, $value) = each %ARGS ){ if( UNIVERSAL::isa( $value, 'ARRAY' ) ) { push @params, map $key."=".$m->interp->apply_escapes($_,'u'), @$value; } else { - push @params, $key."=".$m->interp->apply_escapes($value,'u'); + if (ref $value eq "ARRAY") { + push @params, $key."=".$m->interp->apply_escapes($_, 'u') + for @{$value}; + } else { + push @params, $key."=".$m->interp->apply_escapes($value||"",'u'); + } } } return(join('&',@params)); diff --git a/rt/html/Elements/QuickCreate b/rt/html/Elements/QuickCreate index 3e58f852a..bad7503b7 100644 --- a/rt/html/Elements/QuickCreate +++ b/rt/html/Elements/QuickCreate @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,28 +45,27 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<& /Elements/TitleBoxStart, title => loc('Quick ticket creation') &> +
+<&| /Widgets/TitleBox, title => loc('Quick ticket creation') &>
- + - - - - -%# +%#
-<&|/l&>Subject:
-
-<&|/l&>Queue:
<& /Elements/SelectNewTicketQueue, Name => 'Queue' &>
-
-<&|/l&>Owner:
+
+<&|/l&>Subject:
+
+<&|/l&>Queue:
<& /Elements/SelectNewTicketQueue, Name => 'Queue', ShowNullOption => 0 &> +
+<&|/l&>Owner:
-
-
+
-<& /Elements/TitleBoxEnd &> + +
+ diff --git a/rt/html/Elements/Quicksearch b/rt/html/Elements/Quicksearch index 5f1af0f2d..4acbc204d 100644 --- a/rt/html/Elements/Quicksearch +++ b/rt/html/Elements/Quicksearch @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,44 +45,17 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<& /Elements/TitleBoxStart, title => loc("Quick search"), bodyclass => "" &> - - - - - - - - -<%PERL> -my $i; -while (my $queue = $Queues->Next) { - next unless ($queue->CurrentUserHasRight('ShowTicket')); - - my $qid = $queue->Id; - my $new_q = "Queue = '$qid' AND Status = 'new'"; - my $open_q = "Queue = '$qid' AND Status = 'open'"; - my $all_q = "Queue = '$qid' AND (Status = 'open' OR Status = 'new')"; - - $Tickets->FromSQL($open_q); - my $open = $Tickets->Count(); - - $Tickets->FromSQL($new_q); - my $new = $Tickets->Count(); - - $i++; - - - - - - -% } -
<&|/l&>Queue<&|/l&>New<&|/l&>Open
<%$queue->Name%><%$new%><%$open%>
-<& /Elements/TitleBoxEnd &> - +
+<&|/Widgets/TitleBox, title => loc("Quick search"), bodyclass => "", + titleright => loc("Edit"), titleright_href => $RT::WebPath.'/Prefs/Quicksearch.html' &> +<& /Elements/QueueSummary, + cache => 'quick_search_queues', + queue_filter => sub { $_->CurrentUserHasRight('ShowTicket') && !exists $unwanted->{$_->Name} }, + conditions => [ {cond => "Status = 'new'", name => loc ('new') }, + {cond => "Status = 'open'", name => loc ('open') }, + {cond => "Status = 'stalled'", name => loc ('stalled') }] &> + +
<%INIT> -my $Queues = RT::Queues->new($session{'CurrentUser'}); -$Queues->UnLimit(); -my $Tickets = RT::Tickets->new($session{'CurrentUser'}); +my $unwanted = $session{'CurrentUser'}->UserObj->Preferences('QuickSearch', {}); diff --git a/rt/html/Elements/RT__Ticket/ColumnMap b/rt/html/Elements/RT__Ticket/ColumnMap index 80e3c693c..21dc2a753 100644 --- a/rt/html/Elements/RT__Ticket/ColumnMap +++ b/rt/html/Elements/RT__Ticket/ColumnMap @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -52,7 +54,7 @@ $Attr => undef <%ONCE> our ( $COLUMN_MAP ); -sub ColumnMap { +my $ColumnMap = sub { my $name = shift; my $attr = shift; @@ -77,20 +79,22 @@ sub ColumnMap { # For Image custom fields we also show a thumbnail here. return sub { my $values = $_[0]->CustomFieldValues($field); - return map { + my @values = map { ( ($_->CustomFieldObj->Type eq 'Image') ? \($m->scomp( '/Elements/ShowCustomFieldImage', Object => $_ )) : $_->Content ), - \'
', - } @{ $values->ItemsArrayRef } + \'
', + } @{ $values->ItemsArrayRef }; + pop @values; # Remove that last
+ return @values; }; } } -} +}; -sub LinkCallback { +my $LinkCallback = sub { my $method = shift; my $mode = $RT::Ticket::LINKTYPEMAP{$method}{Mode}; @@ -101,14 +105,14 @@ sub LinkCallback { return sub { map { - \'$mode_uri->Resolver->HREF, \'">', ( $_->$mode_uri->IsLocal ? $_->$local_type : $_->$mode ), - \'
', + \'
', } @{ $_[0]->Links($other_mode,$type)->ItemsArrayRef } } -} +}; $COLUMN_MAP = { QueueName => { @@ -194,12 +198,15 @@ $COLUMN_MAP = { value => sub { return $_[0]->TimeEstimated } }, Requestors => { + attribute => 'Requestor.EmailAddress', value => sub { return $_[0]->Requestors->MemberEmailAddressesAsString } }, Cc => { + attribute => 'Cc.EmailAddress', value => sub { return $_[0]->Cc->MemberEmailAddressesAsString } }, AdminCc => { + attribute => 'AdminCc.EmailAddress', value => sub { return $_[0]->AdminCc->MemberEmailAddressesAsString } }, StartsRelative => { @@ -286,16 +293,22 @@ $COLUMN_MAP = { # Everything from LINKTYPEMAP (map { - $_ => { value => LinkCallback( $_ ) } + $_ => { value => $LinkCallback->( $_ ) } } keys %RT::Ticket::LINKTYPEMAP), '_CLASS' => { value => sub { return $_[1] % 2 ? 'oddline' : 'evenline' } }, + '_CHECKBOX' => { + attribute => 'checkbox', + title => loc('Update'), + align => 'right', + value => sub { return \('') } + }, }; <%init> $m->comp( '/Elements/Callback', COLUMN_MAP => $COLUMN_MAP, _CallbackName => 'ColumnMap'); -return ColumnMap($Name, $Attr); +return $ColumnMap->( $Name, $Attr ); diff --git a/rt/html/Elements/Refresh b/rt/html/Elements/Refresh index 9f241d279..6edec0967 100644 --- a/rt/html/Elements/Refresh +++ b/rt/html/Elements/Refresh @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,20 +45,20 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - + <%INIT> my @refreshevery = qw(120 300 600 1200 3600 7200); diff --git a/rt/html/Elements/ScrubHTML b/rt/html/Elements/ScrubHTML index 443ded9c4..f382cc273 100644 --- a/rt/html/Elements/ScrubHTML +++ b/rt/html/Elements/ScrubHTML @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -52,8 +54,8 @@ $scrubber->default( '*' => 0, id => 1, class => 1, - href => qr{^(?:http:|ftp:|https:|/)}i, # Match http, ftp and relative urls + href => qr{^(?:http:|ftp:|https:|/|__Web(?:Path|BaseURL|URL)__)}i, face => 1, size => 1, target => 1 diff --git a/rt/html/Elements/Section b/rt/html/Elements/Section index afbb9cf38..befe2475f 100644 --- a/rt/html/Elements/Section +++ b/rt/html/Elements/Section @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,14 +45,7 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - - - - -
-<%$title%> -
- +

<%$title%>

<%ARGS> $title => undef diff --git a/rt/html/Elements/SelectAttachmentField b/rt/html/Elements/SelectAttachmentField index ea1528c03..8a37ca504 100644 --- a/rt/html/Elements/SelectAttachmentField +++ b/rt/html/Elements/SelectAttachmentField @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,12 +45,12 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - + <%ARGS> $Name => 'AttachmentField' diff --git a/rt/html/Elements/SelectBoolean b/rt/html/Elements/SelectBoolean index a3f08fdbc..b34e07a14 100644 --- a/rt/html/Elements/SelectBoolean +++ b/rt/html/Elements/SelectBoolean @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,10 +45,10 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - + <%ARGS> $Name => undef @@ -58,7 +60,8 @@ $False => loc("isn't") <%INIT> -my ($TrueDefault, $FalseDefault); +my $TrueDefault = ''; +my $FalseDefault =''; if ($Default && $Default !~ /true/i) { $FalseDefault = "SELECTED"; } diff --git a/rt/html/Elements/SelectCustomFieldOperator b/rt/html/Elements/SelectCustomFieldOperator index 8f7ea618b..ecb306c58 100644 --- a/rt/html/Elements/SelectCustomFieldOperator +++ b/rt/html/Elements/SelectCustomFieldOperator @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,20 +45,20 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - % while (my $option = shift @Options) { % my $value = shift @Values; - +><%$option%> % } - + <%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 +$Default => '' diff --git a/rt/html/Elements/SelectCustomFieldValue b/rt/html/Elements/SelectCustomFieldValue index 27d6c4995..2bcb35e9a 100644 --- a/rt/html/Elements/SelectCustomFieldValue +++ b/rt/html/Elements/SelectCustomFieldValue @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -47,7 +49,7 @@ % if ($CustomField->Type =~ /Select/i) { % my $values = $CustomField->Values; % } % else { - + % } <%args> $Name => undef diff --git a/rt/html/Elements/SelectDate b/rt/html/Elements/SelectDate index d3815798b..b43f324ac 100644 --- a/rt/html/Elements/SelectDate +++ b/rt/html/Elements/SelectDate @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,8 +45,10 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -> - + + <%init> unless ((defined $Default) or ($current <= 0)) { @@ -65,7 +69,7 @@ unless ($Name) { $ShowTime => undef $menu_prefix=>'' $current=>time -$Default => undef +$Default => '' $Name => undef $Size => 16 diff --git a/rt/html/Elements/SelectDateRelation b/rt/html/Elements/SelectDateRelation index ccf0c1121..9c80be4d7 100644 --- a/rt/html/Elements/SelectDateRelation +++ b/rt/html/Elements/SelectDateRelation @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,11 +45,11 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - + <%ARGS> $Name => undef diff --git a/rt/html/Elements/SelectDateType b/rt/html/Elements/SelectDateType index 7b3f0990f..653949a83 100644 --- a/rt/html/Elements/SelectDateType +++ b/rt/html/Elements/SelectDateType @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,16 +45,16 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - + <%ARGS> $Name => 'DateType' diff --git a/rt/html/Elements/SelectEqualityOperator b/rt/html/Elements/SelectEqualityOperator index 0f8deea89..851add309 100644 --- a/rt/html/Elements/SelectEqualityOperator +++ b/rt/html/Elements/SelectEqualityOperator @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,16 +45,16 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - % while (my $option = shift @Options) { % my $value = shift @Values; - +><%$option%> % } - + <%ARGS> $Name => undef diff --git a/rt/html/Elements/SelectGroups b/rt/html/Elements/SelectGroups index bc37fd69a..c1fb9df2a 100644 --- a/rt/html/Elements/SelectGroups +++ b/rt/html/Elements/SelectGroups @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,14 +47,14 @@ %# END BPS TAGGED BLOCK }}} <& /Elements/SelectMatch, Name=> 'GroupOp' &> - + <%INIT> my $CFs = RT::CustomFields->new($session{'CurrentUser'}); $CFs->LimitToChildType('RT::Group'); diff --git a/rt/html/Elements/SelectLang b/rt/html/Elements/SelectLang index a439ea330..7640744c9 100644 --- a/rt/html/Elements/SelectLang +++ b/rt/html/Elements/SelectLang @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,18 +45,18 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - % if ($ShowNullOption) { - + % } % foreach my $lang (@lang) { - + % } - + <%ARGS> $ShowNullOption => 1 $ShowAllQueues => 1 diff --git a/rt/html/Elements/SelectLinkType b/rt/html/Elements/SelectLinkType index 28cb4419a..4617e7c1c 100644 --- a/rt/html/Elements/SelectLinkType +++ b/rt/html/Elements/SelectLinkType @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,11 +45,11 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - + <%ARGS> $Name => "LinkType" diff --git a/rt/html/Elements/SelectMatch b/rt/html/Elements/SelectMatch index 60949d979..646ad4e31 100644 --- a/rt/html/Elements/SelectMatch +++ b/rt/html/Elements/SelectMatch @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,12 +45,12 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - + <%ARGS> $Name => undef diff --git a/rt/html/Elements/SelectNewTicketQueue b/rt/html/Elements/SelectNewTicketQueue index 51b89b2a6..55dc7d2ea 100644 --- a/rt/html/Elements/SelectNewTicketQueue +++ b/rt/html/Elements/SelectNewTicketQueue @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,39 +45,6 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED 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 => 0 -$Default => 0 - + diff --git a/rt/html/Elements/SelectOwner b/rt/html/Elements/SelectOwner index 85843e5f0..f33b346dc 100644 --- a/rt/html/Elements/SelectOwner +++ b/rt/html/Elements/SelectOwner @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,20 +45,20 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - %if ($DefaultValue) { - + %} %foreach my $User ( @users) { - +><%$User->Name()%> %} - + <%INIT> my @objects; my @users; diff --git a/rt/html/Elements/SelectQueue b/rt/html/Elements/SelectQueue index 56aede89f..0decb5bc9 100644 --- a/rt/html/Elements/SelectQueue +++ b/rt/html/Elements/SelectQueue @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -44,26 +46,26 @@ %# %# END BPS TAGGED BLOCK }}} % if ($Lite) { -% my $d = new RT::Queue($session{'CurrentUser'}); -% $d->Load($Default); - -% } else { - % } -% while (my $queue=$q->Next) { -% if ($ShowAllQueues || $queue->CurrentUserHasRight($CheckQueueRight)) { - +% else { + % } -% } - -% } -<%ARGS> +<%args> $CheckQueueRight => 'CreateTicket' $ShowNullOption => 1 $ShowAllQueues => 1 @@ -72,11 +74,24 @@ $Verbose => undef $NamedValues => 0 $Default => 0 $Lite => 0 - - -<%INIT> - -my $q=new RT::Queues($session{'CurrentUser'}); -$q->UnLimit; + +<%init> +my $cache_key = "SelectQueue---" + . $session{'CurrentUser'}->Id + . "---$CheckQueueRight---$ShowAllQueues"; - +if (not defined $session{$cache_key} and not $Lite) { + my $q = new RT::Queues($session{'CurrentUser'}); + $q->UnLimit; + + while (my $queue = $q->Next) { + if ($ShowAllQueues || $queue->CurrentUserHasRight($CheckQueueRight)) { + push @{$session{$cache_key}}, { + Id => $queue->Id, + Name => $queue->Name, + Description => $queue->Description, + }; + } + } +} + diff --git a/rt/html/Elements/SelectResultsPerPage b/rt/html/Elements/SelectResultsPerPage index 65ed536d6..a83cfaab7 100644 --- a/rt/html/Elements/SelectResultsPerPage +++ b/rt/html/Elements/SelectResultsPerPage @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -45,17 +47,18 @@ %# END BPS TAGGED BLOCK }}} %# TODO: Better default handling - +% foreach my $value ( @values ) { + + % } - + <%INIT> my @values = qw(0 10 25 50 100); my @labels = (loc('Unlimited'), qw(10 25 50 100)); +$Default = 50 unless defined $Default; <%ARGS> diff --git a/rt/html/Elements/SelectSortOrder b/rt/html/Elements/SelectSortOrder index f6dd70ded..2a2771777 100644 --- a/rt/html/Elements/SelectSortOrder +++ b/rt/html/Elements/SelectSortOrder @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,13 +45,13 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - %foreach my $order (@orders) { - + % } - + <%INIT> my @orders = qw (ASC DESC); diff --git a/rt/html/Elements/SelectStatus b/rt/html/Elements/SelectStatus index fa76a3e5d..5f861af4f 100644 --- a/rt/html/Elements/SelectStatus +++ b/rt/html/Elements/SelectStatus @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,15 +45,15 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - %if ($DefaultValue) { - + %} %foreach my $status (@status) { %next if ($SkipDeleted && $status eq 'deleted'); - + % } - + <%ONCE> my $queue = new RT::Queue($session{'CurrentUser'}); my @status = $queue->StatusArray(); diff --git a/rt/html/Elements/SelectTicketSortBy b/rt/html/Elements/SelectTicketSortBy index 3e05dcce9..aca98f878 100644 --- a/rt/html/Elements/SelectTicketSortBy +++ b/rt/html/Elements/SelectTicketSortBy @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,11 +45,11 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - % foreach my $field (@sortfields) { - + % } - + <%INIT> my $tickets = new RT::Tickets($session{'CurrentUser'}); diff --git a/rt/html/Elements/SelectTicketTypes b/rt/html/Elements/SelectTicketTypes index a905f6067..5bacccf6c 100644 --- a/rt/html/Elements/SelectTicketTypes +++ b/rt/html/Elements/SelectTicketTypes @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,11 +45,11 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - %foreach (@Types) { -
<% $CustomField->Name %>: % unless ( $count ) { @@ -57,7 +59,9 @@ % } else {
    % while ( my $Value = $Values->Next ) { -
  • <% $print_value->( $CustomField, $Value ) |n %>
  • +
  • +% $print_value->( $CustomField, $Value ); +
  • % }
% } @@ -72,12 +76,37 @@ $m->comp('/Elements/Callback', _CallbackName => 'MassageCustomFields', my $print_value = sub { my ($cf, $value) = @_; + my $linked = $cf->LinkValueTo; + if ( $linked ) { + $m->out(''); + } my $comp = "ShowCustomField". $cf->Type; + $m->comp('/Elements/Callback', + _CallbackName => 'ShowComponentName', + Name => \$comp, + CustomField => $cf, + Object => $Object + ); if ( $m->comp_exists( $comp ) ) { $m->comp( $comp, Object => $value ); } else { $m->print( $value->Content ); } + $m->out('') if $linked; + + # This section automatically populates a div with the "IncludeContentForValue" for this custom + # field if it's been defined + if ( $cf->IncludeContentForValue ) { + my $vid = $value->id; + $m->out( '
' ); + $m->print( loc("See also:") ); + $m->out( '' ); + $m->print( $value->IncludeContentForValue ); + $m->out( qq{
\n} ); + $m->out( qq{\n} ); + } }; diff --git a/rt/html/Elements/ShowLink b/rt/html/Elements/ShowLink index 5929a968e..a1d6bdf97 100644 --- a/rt/html/Elements/ShowLink +++ b/rt/html/Elements/ShowLink @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,7 +45,7 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - + % if ($URI->IsLocal) { % my $member = $URI->Object; % if (UNIVERSAL::isa($member, "RT::Ticket")) { diff --git a/rt/html/Elements/ShowLinks b/rt/html/Elements/ShowLinks index c9279a5db..800e82ea2 100755 --- a/rt/html/Elements/ShowLinks +++ b/rt/html/Elements/ShowLinks @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -49,7 +51,7 @@
    % while (my $Link = $Ticket->DependsOn->Next) { -
  • <& ShowLink, URI => $Link->TargetURI &> +
  • <& ShowLink, URI => $Link->TargetURI &>
  • % }
    % while (my $Link = $Ticket->DependedOnBy->Next) { -
  • <& ShowLink, URI => $Link->BaseURI &> +
  • <& ShowLink, URI => $Link->BaseURI &>
  • % }
    % while (my $Link = $Ticket->MemberOf->Next) { -
  • <& ShowLink, URI => $Link->TargetURI &> +
  • <& ShowLink, URI => $Link->TargetURI &>
  • % }
    % while (my $Link = $Ticket->RefersTo->Next) { -
  • <& ShowLink, URI => $Link->TargetURI &> +
  • <& ShowLink, URI => $Link->TargetURI &>
  • % }
    % while (my $Link = $Ticket->ReferredToBy->Next) { -
  • <& ShowLink, URI => $Link->BaseURI &> +% next if (UNIVERSAL::isa($Link->BaseObj, 'RT::Ticket') && $Link->BaseObj->Type eq 'reminder'); +
  • <& ShowLink, URI => $Link->BaseURI &>
  • % }
- - - - - -
+
+
% if ($CheckAll) { - + % } % if ($ClearAll) { - + % } % if ($Reset) { - -%} -
-  - -% if ($AlternateLabel) { -<%$AlternateCaption%> - + % } -<%$Caption%> +
+% if ($AlternateLabel) { + <%$AlternateCaption%> + value="<%$AlternateLabel%>" class="button" /> +% } else { + <%$Caption%> + value="<%$Label%>" class="button" /> % } - VALUE='<%$Label%>'> -
+ +
+ + <%ARGS> -$color => "#336699" +$color => undef $Caption => '' $AlternateCaption => undef $AlternateLabel => undef @@ -100,6 +80,7 @@ $CheckAll => undef $CheckAllLabel => loc('Check All') $ClearAll => undef $ClearAllLabel => loc('Clear All') +$CheckboxName => '' $Reset => undef $ResetLabel => loc('Reset') diff --git a/rt/html/Elements/Tabs b/rt/html/Elements/Tabs index b2081edca..863cdd8ee 100644 --- a/rt/html/Elements/Tabs +++ b/rt/html/Elements/Tabs @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -51,7 +53,8 @@ tabs => $tabs, actions => $actions, subactions => $subactions, - title => $Title + title => $Title, + show_menu => $show_menu, &> <%INIT> @@ -65,11 +68,14 @@ my $basetopactions = { my $basetabs = { A => { title => loc('Homepage'), path => '', }, + Ab => { title => loc('Simple Search'), + path => 'Search/Simple.html' + }, B => { title => loc('Tickets'), path => 'Search/Build.html' }, C => { title => loc('Tools'), - path => 'Tools/Offline.html' + path => 'Tools/index.html' }, P => { title => loc('Approval'), path => 'Approvals/' @@ -112,4 +118,5 @@ $tabs => undef $actions => undef $subactions => undef $Title => undef +$show_menu => 1 diff --git a/rt/html/Elements/TicketList b/rt/html/Elements/TicketList index 1a531274f..593a77bc9 100644 --- a/rt/html/Elements/TicketList +++ b/rt/html/Elements/TicketList @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,7 +45,7 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - +
% if ($ShowHeader) { <& /Elements/CollectionAsTable/Header, @@ -67,7 +69,7 @@ <& /Elements/CollectionAsTable/Row, Format => \@Format, i => $i, record => $record, maxitems => $maxitems &> % } -
+
% if ($Rows && $ShowNavigation) {
@@ -75,7 +77,9 @@ % if (($TotalFound % $Rows) == 0) { % $oddRows = 0; % } else { $oddRows = 1; } -<&|/l, $Page, int($TotalFound/$Rows)+$oddRows&>Page [_1] of [_2] +% my $pages = int($TotalFound/$Rows)+$oddRows; +% $pages = 1 if $pages < 1; +<&|/l, $Page, $pages &>Page [_1] of [_2] <%perl> my $prev = $m->comp( @@ -98,18 +102,27 @@ my $next = $m->comp( ); % if ($Page > 1) { -<&|/l&>Previous Page +<&|/l&>Previous Page % } % if (($Page * $Rows) < $TotalFound) { -<&|/l&>Next Page +<&|/l&>Next Page % } % } <%INIT> my $maxitems = 0; $Format ||= $RT::DefaultSearchResultFormat; + +# DisplayFormat lets us use a "temporary" format for display, while +# still using our original format for next/prev page links. +# bulk update uses this feature to add checkboxes + + +$DisplayFormat ||= $Format; + # Scrub the html of the format string to remove any potential nasties. $Format = $m->comp('/Elements/ScrubHTML', Content => $Format); +$DisplayFormat = $m->comp('/Elements/ScrubHTML', Content => $DisplayFormat); unless ($Collection) { @@ -117,13 +130,13 @@ unless ($Collection) { $Collection->FromSQL($Query); } -my (@Format) = $m->comp('/Elements/CollectionAsTable/ParseFormat', Format => $Format); +my (@Format) = $m->comp('/Elements/CollectionAsTable/ParseFormat', Format => $DisplayFormat); # Find the maximum number of items in any row, so we can pad the table. my $item = 0; foreach my $col (@Format) { $item++; - if ( $col->{title} eq 'NEWLINE' ) { + if ( $col->{title} && ($col->{title} eq 'NEWLINE') ) { $item = 0; } else { @@ -131,10 +144,20 @@ foreach my $col (@Format) { } } +if ($OrderBy =~ /\|/) { + # Multiple Sorts + my @OrderBy = split /\|/,$OrderBy; + my @Order = split /\|/,$Order; + $Collection->OrderByCols( + map { { FIELD => $OrderBy[$_], ORDER => $Order[$_] } } ( 0 + .. $#OrderBy ) );; +} else { + $Collection->OrderBy(FIELD => $OrderBy, ORDER => $Order); +} -$Collection->OrderBy(FIELD => $OrderBy, ORDER => $Order); $Collection->RowsPerPage($Rows) if ($Rows); -$Collection->GotoPage($Page-1); # SB uses page 0 as the first page +$Page = 1 unless $Page > 0; # workaround problems with Page = '' or undef +$Collection->GotoPage( $Page - 1 ); # SB uses page 0 as the first page my $TotalFound = $Collection->CountAll(); @@ -149,6 +172,7 @@ $Order => undef $OrderBy => undef $BaseURL => undef $Format => $RT::DefaultSearchResultFormat +$DisplayFormat => undef $ShowNavigation => 1 $ShowHeader => 1 diff --git a/rt/html/Elements/TitleBox b/rt/html/Elements/TitleBox index 3c638e2d3..dfab9ea82 100644 --- a/rt/html/Elements/TitleBox +++ b/rt/html/Elements/TitleBox @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,4 +45,7 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<& TitleBoxStart, %ARGS&><%$m->content|n%><& TitleBoxEnd&> +<%init> +# For compatibility with 3.4 +$m->comp('/Widgets/TitleBox', %ARGS ); + diff --git a/rt/html/Elements/TitleBoxEnd b/rt/html/Elements/TitleBoxEnd index d791e3a4f..933d77000 100644 --- a/rt/html/Elements/TitleBoxEnd +++ b/rt/html/Elements/TitleBoxEnd @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,14 +45,7 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - - - -% #Manually flush the content buffer after each titlebox is displayed -% $m->flush_buffer(); - -<%ARGS> -$title => undef -$content => undef - - +<%init> +# For compatibility with 3.4 +$m->comp('/Widgets/TitleBoxEnd', %ARGS ); + diff --git a/rt/html/Elements/TitleBoxStart b/rt/html/Elements/TitleBoxStart index 804e5cfaa..ba24fd92e 100644 --- a/rt/html/Elements/TitleBoxStart +++ b/rt/html/Elements/TitleBoxStart @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,46 +45,7 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - - - - - - - -
- <%$class ? "class=\"$class\"" : "class=\"titlebox\""|n%>> - - X  - - <% $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 => '' - -$titleright_href => undef -$titleright => undef -$contentbg => "#dddddd" -$color => "#336699" - <%init> -my $id = rand(2000); - -$title_class = "CLASS=\"$title_class\"" if $title_class; +# For compatibility with 3.4 +$m->comp('/Widgets/TitleBoxStart', %ARGS ); -- cgit v1.2.1