diff options
author | ivan <ivan> | 2007-08-03 21:49:03 +0000 |
---|---|---|
committer | ivan <ivan> | 2007-08-03 21:49:03 +0000 |
commit | 3a651bfd3784bdbb4367b3d6385ccee33e8ebe5c (patch) | |
tree | 05fc4d7ede2deab9460606a342aeacb68956aee3 /rt/html | |
parent | 6dc9b93431801f93f2003b7163d24cd5ddaf4cd3 (diff) |
merging RT_3_6_4 to HEAD
Diffstat (limited to 'rt/html')
-rw-r--r-- | rt/html/Elements/CollectionAsTable/Row | 18 | ||||
-rw-r--r-- | rt/html/Elements/Footer | 47 | ||||
-rw-r--r-- | rt/html/Elements/Header | 119 | ||||
-rw-r--r-- | rt/html/Elements/Menu | 128 | ||||
-rw-r--r-- | rt/html/Elements/PageLayout | 222 | ||||
-rw-r--r-- | rt/html/Elements/QuickCreate | 37 | ||||
-rw-r--r-- | rt/html/Elements/SimpleSearch | 12 | ||||
-rw-r--r-- | rt/html/Elements/Tabs | 13 | ||||
-rw-r--r-- | rt/html/Elements/TicketList | 46 | ||||
-rw-r--r-- | rt/html/Elements/TitleBoxStart | 49 | ||||
-rw-r--r-- | rt/html/NoAuth/images/space.gif | bin | 43 -> 0 bytes | |||
-rw-r--r-- | rt/html/NoAuth/printrt.css | 77 | ||||
-rw-r--r-- | rt/html/NoAuth/webrt.css | 759 | ||||
-rw-r--r-- | rt/html/Search/Bulk.html | 482 | ||||
-rw-r--r-- | rt/html/Ticket/Elements/ShowMemberOf | 57 | ||||
-rw-r--r-- | rt/html/Ticket/Elements/ShowReferences | 72 | ||||
-rw-r--r-- | rt/html/Ticket/Elements/ShowSummary | 98 | ||||
-rw-r--r-- | rt/html/Ticket/Elements/Tabs | 94 | ||||
-rwxr-xr-x | rt/html/Widgets/TitleBoxStart | 2 |
19 files changed, 836 insertions, 1496 deletions
diff --git a/rt/html/Elements/CollectionAsTable/Row b/rt/html/Elements/CollectionAsTable/Row index 0de362ea8..64ecef41c 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 %# <jesse@bestpractical.com> %# %# (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,17 +55,17 @@ $Warning => undef </%ARGS> <%PERL> -$m->out('<TR class="' . ( $Warning ? 'warnline' : $i % 2 ? 'oddline' : 'evenline' ) . '" >' ); +$m->out('<tr class="' . ( $Warning ? 'warnline' : $i % 2 ? 'oddline' : 'evenline' ) . '" >' ); 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{<td class="collection-as-table"> </td>\n}); $item++; } $item = 0; - $m->out('</TR>'); - $m->out('<TR class="' + $m->out('</tr>'); + $m->out('<tr class="' . ( $Warning ? 'warnline' : $i % 2 ? 'oddline' : 'evenline' ) . '" >' ); next; @@ -99,7 +101,7 @@ foreach my $column (@Format) { # Simple value; just escape it. @out = $m->interp->apply_escapes( $value => 'h' ); } - s/\n/<br>/gs for @out; + s/\n/<br \/>/gs for @out; $m->out( @out ); } else { @@ -108,5 +110,5 @@ foreach my $column (@Format) { } $m->out('</td>'); } -$m->out('</TR>'); +$m->out('</tr>'); </%PERL> diff --git a/rt/html/Elements/Footer b/rt/html/Elements/Footer index 78a116f38..00a3c33d0 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 %# <jesse@bestpractical.com> %# %# (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,27 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -% if ($Menu) { -</td> -</tr> -<tr> -<td> -% } +%# End of div#body from /Elements/PageLayout +</div> <& /Elements/Callback, %ARGS &> +<div id="footer"> + <p id="time"> + <span><&|/l&>Time to display</&>: <%Time::HiRes::tv_interval( $m->{'rt_base_time'} )%></span> + </p> + <!-- -<div class="bpscredits"> -<&|/l, '»|«', $RT::VERSION, '2005', '<a href="http://www.bestpractical.com?rt='.$RT::VERSION.'">Best Practical Solutions, LLC</a>', &>[_1] RT [_2] Copyright 1996-[_3] [_4].</&><br> + <p id="bpscredits"> + <span> +<&|/l, '»|«', $RT::VERSION, '2006', '<a href="http://www.bestpractical.com?rt='.$RT::VERSION.'">Best Practical Solutions, LLC</a>', &>[_1] RT [_2] Copyright 1996-[_3] [_4].</&> +</span> +</p> % if (!$Menu) { -<&|/l&>Distributed under version 2 <a href="http://www.gnu.org/copyleft/gpl.html"> of the GNU GPL.</a></&><br> -<&|/l, '<a href="mailto:sales@bestpractical.com">sales@bestpractical.com</a>' &>To inquire about support, training, custom development or licensing, please contact [_1].</&><br> + <p id="legal"> +<&|/l&>Distributed under version 2 <a href="http://www.gnu.org/copyleft/gpl.html"> of the GNU GPL.</a></&><br /> +<&|/l, '<a href="mailto:sales@bestpractical.com">sales@bestpractical.com</a>' &>To inquire about support, training, custom development or licensing, please contact [_1].</&><br /> + </p> % } + </div> --> % if ($Debug >= 2 ) { @@ -66,17 +75,9 @@ <%$d->Dump() %> </pre> % } -<div class="page-stats"><&|/l&>Time to display</&>: <%Time::HiRes::tv_interval( $m->{'rt_base_time'} )%></div> -% if ($Menu) { -</TD> -</TR> -</TABLE> -</TD> -</TR> -</TABLE> -% } -</BODY> -</HTML> + + </body> +</html> % $m->abort(); <%ARGS> diff --git a/rt/html/Elements/Header b/rt/html/Elements/Header index b5512aae9..f40d45ee1 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 %# <jesse@bestpractical.com> %# %# (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,59 +45,74 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -%#<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<HTML> -<HEAD> -<TITLE><%$Title%></TITLE> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> + +<title><%$Title%></title> + % if ($Refresh && $Refresh > 0) { -<META HTTP-EQUIV="REFRESH" CONTENT="<%$Refresh%>"> + <meta http-equiv="refresh" content="<%$Refresh%>" /> % } <link rel="shortcut icon" href="<%$RT::WebImagesURL%>/favicon.png" type="image/png" /> -<link media="all" rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/webrt.css" type="text/css" /> -<link media="print" rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/printrt.css" type="text/css" /> - -<script> -function hideshow(num) { - idstring = "element-" + num; - chunk = document.getElementById(idstring); - if ( chunk.style.display == "none") { - chunk.style.display = chunk.style.tag; - } else { - chunk.style.tag = chunk.style.display; - chunk.style.display = "none"; - } -} -</script> -<& /Elements/Callback, _CallbackName => 'Head', %ARGS &> -</HEAD> -<BODY BACKGROUND="<% $RT::URI::freeside::URL %>/images/background-cheat.png" STYLE="margin-top:0; margin-bottom:0; margin-left:0; margin-right:0" -% if ($Focus) { -ONLOAD=" - var tmp = (document.getElementsByName('<% $Focus %>')); - if (tmp.length > 0) tmp[tmp.length-1].focus(); -" +<link rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/css/<% $RT::WebDefaultStylesheet %>/main.css" type="text/css" media="all" /> +<link rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/css/print.css" type="text/css" media="print" /> + +% if ( $RSSAutoDiscovery ) { + <link rel="alternate" href="<%$RSSAutoDiscovery%>" type="application/rss+xml" title="RSS RT Search" /> % } -> + +<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/util.js"></script> +<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/ahah.js"></script> +<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/titlebox-state.js"></script> +<script type="text/javascript"><!-- + onLoadHook("loadTitleBoxStates()"); +% if ( $Focus ) { + onLoadHook("focusElementById('<% $Focus %>')"); +% } +% if ( $onload ) { + onLoadHook("<% $onload |n %>"); +% } +--></script> + +<& /Elements/Callback, _CallbackName => 'Head', %ARGS &> + +</head> + <body BACKGROUND="<% $RT::URI::freeside::URL %>/images/background-cheat.png" + STYLE="margin-top:0; margin-bottom:0; margin-left:0; margin-right:0" + <% $id && qq[ id="comp-$id"] |n %> + > + +% if ($ShowBar) { + <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" STYLE="padding-left:0; padding-right:4"> <tr> <td colspan=2 rowspan=2><img border=0 alt="freeside" src="<%$RT::WebImagesURL%>/small-logo.png" width="92" height="62"></td> <td align="left" rowspan=2><font size=6><% &RT::URI::freeside::FreesideGetConfig('company_name') || 'ExampleCo' %></font></td> <td align="right" valign="top"> -% if ($session{'CurrentUser'} && $session{'CurrentUser'}->Id && $LoggedIn) { -<SPAN STYLE="display: none"><A HREF="#skipnav"><&|/l&>Skip Menu</&></A> |</SPAN> -<&|/l, "<b>".$session{'CurrentUser'}->Name."</b>" &>Logged in as [_1]</&> -<BR> -%if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System )) { -<A HREF="<%$RT::WebPath%><% $Prefs %>" ><&|/l&>Preferences</&></A> + +<div id="quickbar"> + <div id="quick-personal"> + <span class="hide"><a href="#skipnav"><&|/l&>Skip Menu</&></a> | </span> +% if ($session{'CurrentUser'}->Name) { + <&|/l, "<span>".$session{'CurrentUser'}->Name."</span>" &>Logged in as [_1]</&> +% if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System )) { + | <a href="<%$RT::WebPath%><%$Prefs%>"><&|/l&>Preferences</&></a> +% } +% } else { + <&|/l&>Not logged in.</&> % } -<& /Elements/Callback, %ARGS &> -% unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) { -| <A HREF="<%$RT::WebPath%>/NoAuth/Logout.html<%$URL ? "?URL=".$URL : ''%>"><&|/l&>Logout</&></a> + <& /Elements/Callback, %ARGS &> +% unless (!$session{'CurrentUser'}->Name +% or ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth)) { + | <a href="<%$RT::WebPath%>/NoAuth/Logout.html<%$URL ? "?URL=".$URL : ''%>"><&|/l&>Logout</&></a> % } -% } else { -<&|/l&>Not logged in.</&> + </div> % } + </td> </tr> @@ -124,22 +141,32 @@ ONLOAD=" </tr> </table> -<%INIT> +<%INIT> $r->headers_out->{'Pragma'} = 'no-cache'; $r->headers_out->{'Cache-control'} = 'no-cache'; + require RT::URI::freeside; + +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; </%INIT> <%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 </%ARGS> 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 %# <jesse@bestpractical.com> %# %# (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; -% } -<ul class="topnav" > -% my $sep=0; -% my $accesskey="1"; +<ul<% !$level ? ' id="system-menu"' : ''|n %><% $menu_class ? qq[ class="$menu_class"] : ''|n %>> +<div<% $menu_class ? qq[ class="$menu_class"] : ''|n %>><div class="wrapper"> +% 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'}; -<li class="<%$class%>-<%$level%>-<%$style%>"><A HREF="<% $url %>" class="<%$class%>-<%$level%>" -<%($class eq 'currenttopnav') ? "name='focus'" : ""|n %> -<% !$level && "accesskey='".$accesskey++."'" |n%>><% $toptabs->{$tab}->{'title'}%></A> +% $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<% $class->{li} ? qq[ class="$class->{li}"] : ''|n %>> + <% $count > 1 && !$postsep && qq[<span class="bullet">· </span>]|n%> + <a href="<% $url %>" + <% $class->{a} && qq[ class="$class->{a}"] |n%> + <% !$level && " accesskey='".$accesskey++."'" |n%>> + <% $toptabs->{$tab}->{'title'} || ''%></a> %# 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'} &></li> -% } -%# } +% 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} &> +% } + </li> +% if ($sep) { + <li class="separator">···</li> +% } +% +% $postsep = $sep; % } +</div></div> </ul> <%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; </%INIT> <%ARGS> $current_toptab => "" $toptabs => undef $level => 0 +$last_level => 0 </%ARGS> diff --git a/rt/html/Elements/PageLayout b/rt/html/Elements/PageLayout index f13ee0dda..493f2275f 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 %# <jesse@bestpractical.com> %# %# (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,72 +45,124 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<table class="black" border=0 cellspacing=0 cellpadding=0 width="100%"> -<tr> - <TD colspan=5 WIDTH="100%" STYLE="padding:0"><IMG BORDER=0 ALT="" SRC="<% $RT::URI::freeside::URL %>/images/black-gradient.png" HEIGHT="13" WIDTH="100%"></TD> -</tr> -<tr> -%# <th class="black" align="left" width=15%><span class="rtname"><%$AppName%></span> -%# </th> - <span class="topactions"> -% my $notfirst = 0; foreach my $action (sort keys %{$topactions}) { - <td class="blackright" ALIGN="right" VALIGN="center"> - <%$topactions->{"$action"}->{'html'} |n %> - </td> + <div id="topactions"> +% foreach my $action (reverse sort keys %{$topactions}) { + <span class="topaction"> +% $m->out($topactions->{"$action"}->{'html'}); + </span> % } - </span> -</tr> -</table> -<table border=0 cellspacing=0 cellpadding=0 width="100%" height="100%"> -<TR> - <TD BGCOLOR="#000000" STYLE="padding:0" WIDTH="154"></TD> - <TD STYLE="padding:0" WIDTH="13"><IMG BORDER=0 ALT="" SRC="<% $RT::URI::freeside::URL %>/images/black-gray-corner.png"></TD> - <TD STYLE="padding:0"><IMG BORDER=0 ALT="" SRC="<% $RT::URI::freeside::URL %>/images/black-gray-top.png" HEIGHT="13" WIDTH="100%"></TD> -</TR> -%# Vertical menu -<TR height="100%"> -<TD valign="top" width="140" class="black"> - <& /Elements/Menu, toptabs => $toptabs, current_toptab => $current_toptab &> -</TD> -<TD STYLE="padding:0" HEIGHT="100%" WIDTH=13 VALIGN="top"><IMG WIDTH="13" HEIGHT="100%" BORDER=0 ALT="" SRC="<% $RT::URI::freeside::URL %>/images/black-gray-side.png"></TD> -<td valign="top"> -<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> -<tr> - <td class="<% $actions ? 'darkmediumgray' : 'bggray' %>" valign="top"> - <span class="title"><%$title%></span> -</td> -</tr> -<tr> -<td class="<% $actions ? 'darkmediumgrayright' : 'bggrayright' %>" valign="top"> - <span class="nav"> -% if ($actions) { -% my @actions; -% foreach my $action (sort keys %{$actions}) { -% if ($actions->{"$action"}->{'html'}) { -% push @actions, $actions->{"$action"}->{'html'}; + </div> + +%# End of div#quickbar from /Elements/Header +</div> + +<div id="nav"> +<& /Elements/Menu, toptabs => $toptabs, current_toptab => $current_toptab &> +</div> + +<div id="header"> + <h1><%$title%></h1> + +% my $sep = 0; +% my $postsep = 0; +% my $count = 0; +% my $class = { }; +% + <ul id="page-menu"<% (($actions && %$actions) || ($subactions && %$subactions)) && q[ class="actions-present"] | n %>> + <div><div><div> +% if ($page_tabs) { +% foreach my $tab (sort keys %{$page_tabs}) { +% next if $tab =~ /^(?:current_toptab|this)$/; +% $count++; +% +% my $current = $page_tabs->{current_toptab} || ""; +% my $path = $page_tabs->{$tab}->{'path'} || ""; +% +% $path =~ s#/index.html$##gi; +% $current =~ s#/index.html$##gi; +% +% $sep = $toptabs->{$tab}->{'separator'} ? 1 : 0; +% +% $class->{a} = $path eq $current ? ' class="selected"' : undef; +% +% my @li; +% push @li, 'first' +% if $count == 1; +% +% push @li, 'pre-separator' +% if $sep; +% +% push @li, 'post-separator' +% if $postsep; +% +% $class->{li} = join ' ', @li; +% +% + <li<% $class->{li} ? qq[ class="$class->{li}"] : ''|n %>><% $count > 1 && !$postsep && "· "|n%><a href="<%$RT::WebPath%>/<%$page_tabs->{$tab}->{'path'}%>"<%$class->{a}|n%><% $class->{a} ? ' name="focus"' : ''|n %>><% $page_tabs->{$tab}->{'title'} %></a></li> +% +% if ($sep) { + <li class="separator">···</li> +% } +% $postsep = $sep; +% } % } else { -% push @actions, qq|<a class="nav" href="|.$RT::WebPath."/".$actions->{$action}->{'path'}.qq|">|.$actions->{$action}->{'title'}."</a>"; + % } -% } -%#<% join(" | ", @actions) | n %> -<% '['. join("] [", @actions). '] ' | n %> -% if ($subactions) { -% my @actions; -% foreach my $action (sort keys %{$subactions}) { -% push @actions, $subactions->{"$action"}->{'html'}; -% } -<% join(" | ", @actions) | n %> + </div></div></div> + </ul> + +% if (($actions && %$actions) || ($subactions && %$subactions)) { + <ul id="actions-menu"> + <div><div><div> +% $sep = 0; +% $postsep = 0; +% $count = 0; +% $class = { }; +% +% for my $type ($actions, $subactions) { +% +% if ($type && %$type) { +% foreach my $action (sort keys %{$type}) { +% $count++; +% +% $sep = $type->{$action}->{'separator'} ? 1 : 0; +% +% my @li; +% push @li, 'first' +% if $count == 1; +% +% push @li, 'pre-separator' +% if $sep; +% +% push @li, 'post-separator' +% if $postsep; +% +% $class->{li} = join ' ', @li; +% + <li<% $class->{li} ? qq[ class="$class->{li}"] : ''|n %>><% $count > 1 && !$postsep && qq[<span class="bullet">· </span>]|n%> +% if ($type->{"$action"}->{'html'}) { + <% $type->{"$action"}->{'html'} | n %> +% } else { + <a href="<%$RT::WebPath%>/<%$type->{$action}->{'path'}%>"<% $type->{$action}->{class} && ' class="'.$type->{$action}->{class}.'"' |n %><% $type->{$action}->{id} && ' id="'.$type->{$action}->{id}.'"' |n %>><%$type->{$action}->{'title'}%></a> +% } + </li> +% if ($sep) { + <li class="separator">···</li> +% } +% $postsep = $sep; +% } % } % } - </span> - </td> -</tr> -<TR valign="top"> -<TD valign="top" width="100%" height="100%" class="mainbody" > + </div></div></div> + </ul> +% } +</div> + +<div id="body"> <& /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; @@ -120,7 +174,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}; + } +} </%INIT> + +%# 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 + </%args> + <%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]; + </%init> +</%def> + <%ARGS> $current_toptab => undef $current_tab => undef @@ -130,5 +230,5 @@ $tabs => undef $actions => undef $subactions => undef $title => $m->callers(-1)->path -$AppName => '' +$AppName => undef </%ARGS> diff --git a/rt/html/Elements/QuickCreate b/rt/html/Elements/QuickCreate index 0b97121a4..75b3a4598 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 %# <jesse@bestpractical.com> %# %# (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') &> +<div class="quick-create"> +<&| /Widgets/TitleBox, title => loc('Quick ticket creation') &> <form method="post" action="<%$RT::WebPath%>/<% $RT::QuickCreateLong ? 'Ticket/Create.html' : 'index.html' %>"> -<input type="hidden" name="QuickCreate" value="1"> +<input type="hidden" class="hidden" name="QuickCreate" value="1" /> <table> -<tr> -<td> -<font size="-2"><&|/l&>Subject</&>:<br><input size="30" name="Subject"></font> -</td> -<td> -<font size="-2"><&|/l&>Queue</&>:<br><& /Elements/SelectQueue, Name => 'Queue', ShowNullOption => 0 &></font> -</td> -<td> -<font size="-2"><&|/l&>Owner</&>:<br> +<tr><td> +<&|/l&>Subject</&>:<br /><input size="30" name="Subject" /> +</td><td> +<&|/l&>Queue</&>:<br /><& /Elements/SelectNewTicketQueue, Name => 'Queue', ShowNullOption => 0 &> +</td><td> +<&|/l&>Owner</&>:<br /> <select type="select" name="Owner"> -<option value="<%$session{'CurrentUser'}->id%>" SELECTED><%$session{'CurrentUser'}->Name %></option> +<option value="<%$session{'CurrentUser'}->id%>" selected><%$session{'CurrentUser'}->Name %></option> <option value="<%$RT::Nobody->id%>"><%loc('Nobody')%></option> </select> -</font> </td> </tr> -%#<tr><td colspan="3"><font size="-2"><textarea cols="50" rows="3"></textarea></font></td></tr> +%#<tr><td colspan="3"><textarea cols="50" rows="3"></textarea></td></tr> </table> -<div align="right"><input type="submit" value="<%loc('Create')%>"></div> +<div align="right"><input type="submit" class="button" value="<%loc('Create')%>" /></div> </form> -<& /Elements/TitleBoxEnd &> +</&> +</div> + diff --git a/rt/html/Elements/SimpleSearch b/rt/html/Elements/SimpleSearch index e9fc5c6ed..a4fd7e270 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 %# <jesse@bestpractical.com> %# %# (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,14 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<form action="<% $RT::WebPath %>/index.html" STYLE="margin:0"> +<form action="<% $RT::WebPath %>/Search/Simple.html" STYLE="margin:0"> <SCRIPT TYPE="text/javascript"> function clearhint_search_ticket (what) { if ( what.value == '(ticket # or subject string)' ) what.value = ''; } </SCRIPT> -<input name="q" accesskey="0" VALUE="(ticket # or subject string)" onFocus="clearhint_search_ticket(this);" onClick="clearhint_search_ticket(this);" STYLE="text-align:right; font-family: Arial, Verdana, Helvetica, sans-serif;"><BR> +<input name="q" autocomplete="off" accesskey="0" class="field" VALUE="(ticket # or subject string)" onFocus="clearhint_search_ticket(this);" onClick="clearhint_search_ticket(this);" STYLE="text-align:right; font-family: Arial, Verdana, Helvetica, sans-serif;"><BR> <A HREF="<% $RT::WebPath %>/Search/Build.html" STYLE="color: #ffffff; font-size: 70%; font-weight:normal">Advanced</A> -<input type="submit" value="<&|/l&>Search tickets</&>" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:70%;padding-left:2px;padding-right:2px"> +<input type="submit" class="fsblackbutton" value="<&|/l&>Search tickets</&>" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:70%;padding-left:2px;padding-right:2px"> </form> diff --git a/rt/html/Elements/Tabs b/rt/html/Elements/Tabs index bbea3fe9a..f94711c3c 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 %# <jesse@bestpractical.com> %# %# (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: @@ -78,11 +80,14 @@ my $basetabs = { title => 'Ticketing Main', path => '', }, - B => { title => loc('Search Tickets'), + Ab => { title => loc('Simple Ticket Search'), + path => 'Search/Simple.html' + }, + B => { title => loc('Adv. Ticket Search'), path => 'Search/Build.html' }, C => { title => loc('Tools'), - path => 'Tools/Offline.html' + path => 'Tools/index.html' }, P => { title => loc('Approval'), path => 'Approvals/' diff --git a/rt/html/Elements/TicketList b/rt/html/Elements/TicketList index 4195d6320..02b071624 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 %# <jesse@bestpractical.com> %# %# (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 }}} -<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH=100%> +<table border="0" cellspacing="0" cellpadding="1" width="100%"> % if ($ShowHeader) { <& /Elements/CollectionAsTable/Header, @@ -69,7 +71,7 @@ <& /Elements/CollectionAsTable/Row, Format => \@Format, i => $i, record => $record, maxitems => $maxitems &> % } -</TABLE> +</table> % if ($Rows && $ShowNavigation) { <hr> @@ -77,7 +79,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( @@ -100,18 +104,27 @@ my $next = $m->comp( ); </%perl> % if ($Page > 1) { -<A href="<%$BaseURL%><%$prev%>"><&|/l&>Previous Page</&></a> +<a href="<%$BaseURL%><%$prev%>"><&|/l&>Previous Page</&></a> % } % if (($Page * $Rows) < $TotalFound) { -<A href="<%$BaseURL%><%$next%>"><&|/l&>Next Page</&></a> +<a href="<%$BaseURL%><%$next%>"><&|/l&>Next Page</&></a> % } % } <%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) { @@ -119,13 +132,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 { @@ -133,10 +146,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(); </%INIT> @@ -151,6 +174,7 @@ $Order => undef $OrderBy => undef $BaseURL => undef $Format => $RT::DefaultSearchResultFormat +$DisplayFormat => undef $ShowNavigation => 1 $ShowHeader => 1 </%ARGS> diff --git a/rt/html/Elements/TitleBoxStart b/rt/html/Elements/TitleBoxStart index d98fe2744..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 %# <jesse@bestpractical.com> %# %# (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 }}} -<TABLE CLASS="box <%$class|n%>" - BGCOLOR="<%$color%>" - CELLSPACING=0 - BORDER=0 - WIDTH="<%$width%>" - CELLPADDING="0"> - - <TR> - <TH - <%$color && "style=\"color: $color;\""|n%> - <%$class ? "class=\"$class\"" : "class=\"titlebox\""|n%>> - <span class="titleboxclose"> - <a href="#" onClick="hideshow('<%$id%>')">X</A></span> - <span class="titleboxtitle"> - <b><% $title_href && "<A $title_class HREF=\"$title_href\">"|n%><%$title |n %><% $title_href && "</A>" |n%></b> - </span> - </TH> - <TH - <%$color && "style=\"color: $color;\""|n%> - <%$class ? "class=\"$class\"": "class=\"titleboxright\""|n%>> - <span class="titleboxright"><%$titleright ? $titleright : ' ' |n %></span> - </TH> - </TR> - <tr id="element-<%$id%>"> - <td bgcolor="<%$contentbg%>" colspan="3" class="<%defined($bodyclass) ? $bodyclass : $class|n%>"> -<%ARGS> -$width => "100%" -$class => undef -$bodyclass => undef -$title_href => undef -$title => undef -$title_class => '' - -$titleright_href => undef -$titleright => undef -$contentbg => "#d4d4d4" -$color => "#336699" -</%ARGS> <%init> -my $id = rand(2000); - -$title_class = "CLASS=\"$title_class\"" if $title_class; +# For compatibility with 3.4 +$m->comp('/Widgets/TitleBoxStart', %ARGS ); </%init> diff --git a/rt/html/NoAuth/images/space.gif b/rt/html/NoAuth/images/space.gif Binary files differdeleted file mode 100644 index 1d11fa9ad..000000000 --- a/rt/html/NoAuth/images/space.gif +++ /dev/null diff --git a/rt/html/NoAuth/printrt.css b/rt/html/NoAuth/printrt.css deleted file mode 100644 index 72e7e8b7e..000000000 --- a/rt/html/NoAuth/printrt.css +++ /dev/null @@ -1,77 +0,0 @@ -%# {{{ BEGIN BPS TAGGED BLOCK -%# -%# -%# -%# LICENSE: -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# You should have received a copy of the GNU General Public License -%# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -%# -%# -%# CONTRIBUTION SUBMISSION POLICY: -%# -%# (The following paragraph is not intended to limit the rights granted -%# to you to modify and distribute this software under the terms of -%# the GNU General Public License and is only of importance to you if -%# you choose to contribute your changes and enhancements to the -%# community by submitting them to Best Practical Solutions, LLC.) -%# -%# By intentionally submitting any modifications, corrections or -%# derivatives to this work, or any other work intended for use with -%# Request Tracker, to Best Practical Solutions, LLC, you confirm that -%# you are the copyright holder for those contributions and you grant -%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -%# royalty-free, perpetual, license to use, copy, create derivative -%# works based on those contributions, and sublicense and distribute -%# those contributions and any derivatives thereof. -%# -%# }}} END BPS TAGGED BLOCK -%# -%# Special stylesheet for printing tickets -%# Koos van den Hout koos@cs.uu.nl 2005-11-21 -%# - -SPAN.nav { display: none !important; } -.nav2 { display: none !important; } -.nav { display: none !important; } -.topnav { display: none !important; } -.blue { display: none !important; } -.darkblue { display: none !important; } -.blueright { display: none !important; } -.currentnav { display: none !important; } -th.titlebox { border-top: none; border-bottom: none; } -th.titleboxright { display:none !important; border-top: none; border-bottom: none; } -.titlebox { border-top: none; border-bottom: none; } - -div.downloadattachment, div.downloadcontenttype { - display: none !important; -} - - -a[href$="Respond"], a[href$="Comment"], a[href*="ShowEmailRecord"] { - display: none !important; -} - - -%# Provide a callback for adding/modifying the style sheet. -%# http://www.w3.org/TR/REC-CSS1 - section 3.2, says: -%# "latter specified rule wins" -<& /Elements/Callback &> -<%flags> -inherit => undef -</%flags> -<%init> -$r->content_type('text/css'); -$r->headers_out->{'Expires'} = '+30m'; -</%init> diff --git a/rt/html/NoAuth/webrt.css b/rt/html/NoAuth/webrt.css deleted file mode 100644 index 5da0f8310..000000000 --- a/rt/html/NoAuth/webrt.css +++ /dev/null @@ -1,759 +0,0 @@ -/* -%# BEGIN BPS TAGGED BLOCK {{{ -%# -%# COPYRIGHT: -%# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC -%# <jesse@bestpractical.com> -%# -%# (Except where explicitly superseded by other copyright notices) -%# -%# -%# LICENSE: -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# You should have received a copy of the GNU General Public License -%# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -%# -%# -%# CONTRIBUTION SUBMISSION POLICY: -%# -%# (The following paragraph is not intended to limit the rights granted -%# to you to modify and distribute this software under the terms of -%# the GNU General Public License and is only of importance to you if -%# you choose to contribute your changes and enhancements to the -%# community by submitting them to Best Practical Solutions, LLC.) -%# -%# By intentionally submitting any modifications, corrections or -%# derivatives to this work, or any other work intended for use with -%# Request Tracker, to Best Practical Solutions, LLC, you confirm that -%# you are the copyright holder for those contributions and you grant -%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -%# royalty-free, perpetual, license to use, copy, create derivative -%# works based on those contributions, and sublicense and distribute -%# those contributions and any derivatives thereof. -%# -%# END BPS TAGGED BLOCK }}} -*/ - -/* * { - font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 1.2em; -} */ - -SPAN.nav { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 12px; - color: #FFFFFF; - text-decoration: none; - white-space: nowrap} -.nav2 { font-size: 10px; - white-space: nowrap} -.nav { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 13px; - font-weight: bold; - color: #FFFFFF; - text-decoration: none; - white-space: nowrap} -.currentnav { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 13px; - font-weight: bold; - color: #FFFF66; - text-decoration: none; - white-space: nowrap} -.topnav { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 16px; - font-weight: normal; - color: #FFFFFF; - text-decoration: none; - white-space: nowrap} - -/* -%# .topnav is the original RT class for the sidebar navigation tabs. -%# Font-sizing by level depth was originally hard-coded into Elements/Menu. -%# This modification sets a different class name for each level, allowing -%# style sheet control over the formats. -*/ - -a.topnav-0 { font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 16px; - font-weight: normal; - color: #FFFFFF; - text-decoration: none; - white-space: nowrap} -a.topnav-1 { font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 14px; - font-weight: normal; - color: #FFFFFF; - text-decoration: none; - white-space: nowrap} -a.topnav-2 { font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 12px; - font-weight: normal; - color: #FFFFFF; - text-decoration: none; - white-space: nowrap} -a.topnav-3 { font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 11px; - font-weight: normal; - color: #FFFFFF; - text-decoration: none; - white-space: nowrap} -a.topnav-4 { font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 11px; - font-weight: normal; - color: #FFFFFF; - text-decoration: none; - white-space: nowrap} -a.topnav-5 { font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 11px; - font-weight: normal; - color: #FFFFFF; - text-decoration: none; - white-space: nowrap} -li.topnav-0-minor { - border-top: solid #777777 1px; - padding-top: .1em; - margin-top: .5em; -} -li.topnav-1-minor { - border-top: solid #777777 1px; - padding-top: .1em; - margin-top: .5em; -} -li.topnav-2-minor { - border-top: solid #777777 1px; - padding-top: .1em; - margin-top: .5em; -} -li.topnav-3-minor { - border-top: solid #777777 1px; - padding-top: .1em; - margin-top: .5em; -} -li.topnav-4-minor { - border-top: solid #777777 1px; - padding-top: .1em; - margin-top: .5em; -} -li.topnav-5-minor { - border-top: solid #777777 1px; - padding-top: .1em; - margin-top: .5em; -} -li.topnav-0-major { - border-bottom: solid black 1px; - padding-top: .25em; - padding-bottom: .5em; -} -li.topnav-1-major { - border-bottom: solid black 1px; - padding-top: .25em; - padding-bottom: .5em; -} -li.topnav-2-major { - border-bottom: solid black 1px; - padding-top: .25em; - padding-bottom: .5em; -} -li.topnav-3-major { - border-bottom: solid black 1px; - padding-top: .25em; - padding-bottom: .5em; -} -li.topnav-4-major { - border-bottom: solid black 1px; - padding-top: .25em; - padding-bottom: .5em; -} -li.topnav-5-major { - border-bottom: solid black 1px; - padding-top: .25em; - padding-bottom: .5em; -} - -.currenttopnav { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 16px; - font-weight: bold; - color: #ffffff; background-color: #7e0079; - text-decoration: none; - white-space: nowrap} - -/* -%# .currenttopnav is the original RT class for the sidebar navigation tabs. -%# Font-sizing by level depth was originally hard-coded into Elements/Menu. -%# This modification sets a different class name for each level, allowing -%# style sheet control over the formats -*/ - -a.currenttopnav-0 { font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 16px; - font-weight: bold; - color: #ffffff; background-color: #7e0079; - text-decoration: none; - white-space: nowrap} -a.currenttopnav-1 { font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 14px; - font-weight: bold; - color: #ffffff; background-color: #7e0079; - text-decoration: none; - white-space: nowrap} -a.currenttopnav-2 { font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 12px; - font-weight: normal; - color: #ffffff; background-color: #7e0079; - text-decoration: none; - white-space: nowrap} -a.currenttopnav-3 { font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 11px; - font-weight: normal; - color: #ffffff; background-color: #7e0079; - text-decoration: none; - white-space: nowrap} -a.currenttopnav-4 { font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 11px; - font-weight: normal; - color: #ffffff; background-color: #7e0079; - text-decoration: none; - white-space: nowrap} -a.currenttopnav-5 { font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 11px; - font-weight: normal; - color: #ffffff; background-color: #7e0079; - text-decoration: none; - white-space: nowrap} -li.currenttopnav-0-minor { - border-top: solid #999999 1px; - padding-top: .1em; - margin-top: .5em; -} -li.currenttopnav-1-minor { - border-top: solid #777777 1px; - padding-top: .1em; - margin-top: .5em; -} -li.currenttopnav-2-minor { - border-top: solid #777777 1px; - padding-top: .1em; - margin-top: .5em; -} -li.currenttopnav-3-minor { - border-top: solid #777777 1px; - padding-top: .1em; - margin-top: .5em; -} -li.currenttopnav-4-minor { - border-top: solid #777777 1px; - padding-top: .1em; - margin-top: .5em; -} -li.currenttopnav-5-minor { - border-top: solid #777777 1px; - padding-top: .1em; - margin-top: .5em; -} -li.currenttopnav-0-major { - border-bottom: solid black 1px; - padding-top: .25em; - padding-bottom: .5em; -} -li.currenttopnav-1-major { - border-bottom: solid black 1px; - padding-top: .25em; - padding-bottom: .5em; -} -li.currenttopnav-2-major { - border-bottom: solid black 1px; - padding-top: .25em; - padding-bottom: .5em; -} -li.currenttopnav-3-major { - border-bottom: solid black 1px; - padding-top: .25em; - padding-bottom: .5em; -} -li.currenttopnav-4-major { - border-bottom: solid black 1px; - padding-top: .25em; - padding-bottom: .5em; -} -li.currenttopnav-5-major { - border-bottom: solid black 1px; - padding-top: .25em; - padding-bottom: .5em; -} - -.topactions { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 10px; - color: #FFFFFF; - text-decoration: none; - white-space: nowrap} -.subnav { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 11px; - font-weight: normal; - color: #FFFFFF; - text-decoration: none; - white-space: nowrap} -.currentsubnav { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 11px; - font-weight: bold; - color: #FFFF66; - text-decoration: none; - white-space: nowrap} -.error { background-color: #ff0000; - background-position: left top; - vertical-align: top; - text-align: left; - } -.oldblue { background-color: #0066CC; - background-position: left top; - vertical-align: top; - text-align: left; - } -.blue { - background-color: #4682B4; -/* %# background-color: #eeeeee; */ - background-position: left top; - vertical-align: top; - text-align: left; - } -/* %# Actually the "topactions" section */ -.blueright { background-color: #4682B4; - background-position: left top; - vertical-align: top; - text-align: right; - padding-right: 1em; - } -.olddarkblue { background-color: #003399; - background-position: left top; - vertical-align: top; - text-align: left; - } -.darkblue { - background-color: #000080; - background-position: left top; - vertical-align: top; - text-align: left; - } -.darkblueright { - background-color: #000080; - background-position: left top; - vertical-align: top; - text-align: right; - } -.lightgray { - background-color: #eeeeee; - background-position: left top; - vertical-align: top; - text-align: left; - } -.lightgrayright { - background-color: #eeeeee; - background-position: left top; - vertical-align: top; - text-align: right; - } -.black { - background-color: #000000; - color: #ffffff; - background-position: left top; - vertical-align: top; - text-align: left; - } -.blackright { - background-color: #000000; - color: #ffffff; - background-position: left top; - vertical-align: center; - text-align: right; - font-size:16px; - padding-right:4px - } - -input.fsblackbutton { - background-color:#333333; - color: #ffffff; - border:1px solid; - border-top-color:#cccccc; - border-left-color:#cccccc; - border-right-color:#aaaaaa; - border-bottom-color:#aaaaaa; - font-family: Arial, Verdana, Helvetica, sans-serif; - font-weight:bold; - padding-left:12px; - padding-right:12px; - overflow:visible; - filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff333333',EndColorStr='#ff666666') -} - -input.fsblackbuttonselected { - background-color:#7e0079; - color: #ffffff; - border:1px solid; - border-top-color:#cccccc; - border-left-color:#cccccc; - border-right-color:#aaaaaa; - border-bottom-color:#aaaaaa; - font-family: Arial, Verdana, Helvetica, sans-serif; - font-weight:bold; - padding-left:12px; - padding-right:12px; - overflow:visible; - filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff330033',EndColorStr='#ff7e0079') -} - -.mediumgray { - background-color: #cccccc; - background-position: left top; - vertical-align: top; - text-align: left; - } -.mediumgrayright { - background-color: #cccccc; - background-position: left top; - vertical-align: top; - text-align: right; - } -.darkmediumgray { - background-color: #aaaaaa; - background-position: left top; - vertical-align: top; - text-align: left; - } -.darkmediumgrayright { - background-color: #aaaaaa; - background-position: left top; - vertical-align: top; - text-align: right; - } -.bggray { - background-color: #e8e8e8; - background-position: left top; - vertical-align: top; - text-align: left; - } -.bggrayright { - background-color: #e8e8e8; - background-position: left top; - vertical-align: top; - text-align: right; - } -.white { - background-color: #ffffff; - background-position: left top; - vertical-align: top; - text-align: left; - } -.whiteright { - background-color: #ffffff; - background-position: left top; - vertical-align: top; - text-align: right; - } -.overdue { - color: red; -} - -div.messagebody { - padding: 2em; - -} - - -div.downloadattachment { - font-size: 10px; - text-align: right; - -} - - -td { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 12px; - background-position: left top; - } -.black { background-color: #000000; - background-position: left top; - } -span.rtname { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 18px; - font-weight: normal; - color: #ffffff} -span.title { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 20px; - font-weight: bold; - color: #ffffff} -.header { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 12px; - font-weight: bold; - color: #0066CC} -.subheader { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 11px; - font-weight: bold; - color: #0066CC } -.value { font-weight: bold; } -.entry { font-weight: normal; } -.label { font-weight: normal; - text-align: right; } -.labeltop { font-weight: normal; - text-align: right; - vertical-align: top } -.productnav { font-family: Arial, Verdana, Helvetica, sans-serif; - font-size: 11px; - color: #FFFFFF; - text-align: center; - vertical-align: middle; - text-decoration: none} -.rtblue { background-color: #3399FF; - margin-top: 0.2em; - background-position: left top; - vertical-align: top } - - -.currenttab { margin: 0.2em; background: #336699; } -.othertab { margin: 0.2em; background: #efefef; } -.oddline { background-color : #ccccee; } - -UL.topnav LI :focus { text-decoration: underline; } - -TD.mainbody { - padding-top: 0.5em; - padding-left: 1em; - padding-right: 1em; - margin-left: 1em; - margin-right: 1em; - background-color: #e8e8e8; -} - -td.boxcontainer + td.boxcontainer { - margin-left: 1em; - padding-left: 1em; - border-collapse: collapse; -} - -th.ticketheader { font-size: 80%; - font-weight: bold; - color: #336699; - background: #cccccc; -} - -th.titlebox { - text-align: left; - padding-left: 0.5em; - padding-right: 0.5em; - margin-left: 0.5em; - margin-right: 0.5em; - border-top: solid black 1px; - border-bottom: solid black 1px; -} -th.titleboxright { - text-align: right; - padding-left: 0.5em; - padding-right: 0.5em; - margin-left: 0.5em; - margin-right: 0.5em; - border-top: solid black 1px; - border-bottom: solid black 1px; -} - -TD.titlebox { - padding-left: 1em; - padding-right: 1em; - padding-top: 1em; - padding-bottom: 1em; -} - -SPAN.message { - font-size: 100%; - font-family: Arial, Verdana, Helvetica, sans-serif; -} - - -BODY { - color: #000; - background: #FFFFFF; - font-family: Verdana, Arial, Helvetica, sans-serif; - margin-top: 0px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - border-top: 0px; - border-bottom: 0px; - border-left: 0px; - border-right: 0px; -} - - -TR.oddline { - background-color : #ffffff; -} - -TR.evenline { - background-color : #ccccee; -} - -H1, H2, H3 { - margin-top: 0.2em; - color: #336699; - font-family: Verdana, Arial, Helvetica, sans-serif; - - clear: both; -} - - -DIV.endmatter { margin-left: -7% } -.bpscredits {margin-top: 1em; - text-align: right; - color: #666666; - } - - -A { font-weight: bold; color: #000000 - } - -.currenttab { color: #ffffff;} -.othertab { color: #336699; } - -.inverse { color: #ffffff; } - - - -A:link IMG, A:visited IMG { border-style: none } -a:focus {text-decoration: underline } -A IMG { color: white } /* The only way to hide the border in NS 4.x */ - -/* a:link { text-decoration: none} */ -/* a:visited { text-decoration: none} */ - -a:hover { text-decoration: underline} -/* a:focus { background-color: #ccccee } */ - -.hide { - display: none; - color: white; -} - -SPAN.date { font-size: 0.8em } - -span.title { font-size: 1.6em; - vertical-align: middle; -/* %# color: #ffffff; */ - color: #000000; - } -span.productname { font-size: 2em; - color: #0066cc;} -SPAN.titleboxtitle, SPAN.titleboxclose { - font-size: 80%; - color: #ffffff; - vertical-align: middle; - text-align: left; - } -SPAN.titleboxtitle a { - color: #ffffff; -} -SPAN.titleboxtitle a:after { - content: "..."; -} - -SPAN.titleboxright { - font-size: 0.8em; - color: #ffffff; - vertical-align: middle; - text-align: right; - } - -SPAN.attribution { - font-weight: bold; -} - -SPAN.label { font-size: 0.8em; -} - -DIV.page-stats { font-size: 0.8em; - color: #cccccc; - text-align: right; - } - - -BLOCKQUOTE { - font-style: italic; -} - -.emphasized { - font-weight: bold -} - - -.oddline { - background-color : #ccccee; -} - -ul.topnav { - list-style: none; - margin-left: 0; - margin-right: 0.25em; - padding-left: 0.25em; - padding-bottom: 0; - padding-top:0; - margin-top: 0; - margin-bottom:0; -} - -.menu-major-separator { - border-bottom: solid white 1px; - padding-top: .25em; - padding-bottom: .5em; -} - -.menu-minor-separator { - border-top: solid #999999 1px; - padding-top: .1em; - margin-top: .5em; -} - -TH.collection-as-table { text-align: center; - font-size: 0.8em; - padding-left: .5em; - padding-right: .5em; - color: #333333; - background-color: #cccccc; - white-space: nowrap; - } - -TD.collection-as-table { text-align: left; - padding-left: .5em; - padding-right: .5em; - } - -textarea.signature { - width: 100%; -} -textarea.comments { - width: 100%; -} - -textarea.messagebox { - width: 100%; -} - -/* -%# Provide a callback for adding/modifying the style sheet. -%# http://www.w3.org/TR/REC-CSS1 - section 3.2, says: -%# "latter specified rule wins" -<& /Elements/Callback &> -<%flags> -inherit => undef -</%flags> -<%init> -$r->content_type('text/css'); -#$r->headers_out->{'Expires'} = '+30m'; -</%init> -*/ diff --git a/rt/html/Search/Bulk.html b/rt/html/Search/Bulk.html index b7c64e3f8..9742df5ae 100644 --- a/rt/html/Search/Bulk.html +++ b/rt/html/Search/Bulk.html @@ -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 %# <jesse@bestpractical.com> %# %# (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,185 +45,220 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<& /Elements/Header, Title => loc("Bulk ticket update") &> -<& /Elements/Tabs, Title => loc("Bulk ticket update") &> +<& /Elements/Header, Title => $title &> +<& /Ticket/Elements/Tabs, + current_tab => "Search/Bulk.html", + Title => $title, + Format => $ARGS{'Format'}, # we don't want the locally modified one + Query => $Query, + Rows => $Rows, + OrderBy => $OrderBy, + Order => $Order &> <& /Elements/ListActions, actions => \@results &> -<FORM METHOD="POST" ACTION="<%$RT::WebPath%>/Search/Bulk.html" > -<input type="hidden" name="Query" value="<%$ARGS{'Query'}%>"> -<TABLE WIDTH=100% border=0 cellpadding=3 CELLSPACING=0> -<TR> -<TH><&|/l&>Update</&></TH> -%foreach my $col (@cols) { -% my $colalias = $col; -% $colalias =~ s/(Obj\-\>|)(Name|AsString)//; - -<TH><% loc($colalias) %> </TH> +<form method="post" action="<%$RT::WebPath%>/Search/Bulk.html" enctype="multipart/form-data"> +% foreach my $var qw(Query Format OrderBy Order Rows Page) { +<input type="hidden" class="hidden" name="<%$var%>" value="<%$ARGS{$var}%>" /> %} -</TR> - -<%PERL> - -my $i; - -$Tickets->RedoSearch(); -while (my $Ticket = $Tickets->Next) { - $i++; - if ($i % 2) { - $bgcolor = "#d4d4d4"; - } - else { - $bgcolor = "#ffffff"; - } - </%PERL> -<TR bgcolor="<%$bgcolor%>"> -<TD><input type=checkbox name="UpdateTicket<%$Ticket->Id%>" value="1" CHECKED></TD> -%foreach my $col (@cols) { -<TD> -% if ($col eq 'id') { -<A HREF="<% $RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->Id%>"><%$Ticket->Id()%></A> -% } -%else { -<% eval "\$Ticket->$col()" %> -%} -</TD> -%} -</TR> -%} - - - -</TABLE> - -<HR> - - -<& /Elements/TitleBoxStart, title => loc('Update selected tickets') &> -<TABLE> -<TR> -<TD VALIGN=TOP> +<& /Elements/TicketList, Query => $Query, + DisplayFormat => $Format, + Format => $ARGS{'Format'}, + Verbatim => 1, + AllowSorting => 1, + OrderBy => $OrderBy, + Order => $Order, + Rows => $Rows, + Page => $Page, + BaseURL => $RT::WebPath."/Search/Bulk.html?" + &> + +<hr> + +<& /Elements/Submit, Label => loc('Update'), CheckAll => 1, ClearAll => 1 &> +<br /> +<&|/Widgets/TitleBox, title => $title &> +<table> +<tr> +<td valign="top"> <table> -<tr><td class=label> <&|/l&>Make Owner</&>: </td> -<td class=value> <& /Elements/SelectOwner, Name => "Owner" &> (<input type=checkbox name="ForceOwnerChange"> <&|/l&>Force change</&>) </td></tr> -<tr><td class=label> <&|/l&>Add Requestor</&>: </td> -<td class=value> <INPUT Name="AddRequestor" SIZE=20> </td></tr> -<tr><td class=label> <&|/l&>Remove Requestor</&>: </td> -<td class=value> <INPUT Name="DeleteRequestor" SIZE=20> </td></tr> -<tr><td class=label> <&|/l&>Add Cc</&>: </td> -<td class=value> <INPUT Name="AddCc" SIZE=20> </td></tr> -<tr><td class=label> <&|/l&>Remove Cc</&>: </td> -<td class=value> <INPUT Name="DeleteCc" SIZE=20> </td></tr> -<tr><td class=label> <&|/l&>Add AdminCc</&>: </td> -<td class=value> <INPUT Name="AddAdminCc" SIZE=20> </td></tr> -<tr><td class=label> <&|/l&>Remove AdminCc</&>: </td> -<td class=value> <INPUT Name="DeleteAdminCc" SIZE=20> </td></tr> +<tr><td class="label"> <&|/l&>Make Owner</&>: </td> +<td class="value"> <& /Elements/SelectOwner, Name => "Owner" &> (<input type="checkbox" class="checkbox" name="ForceOwnerChange" /> <&|/l&>Force change</&>) </td></tr> +<tr><td class="label"> <&|/l&>Add Requestor</&>: </td> +<td class="value"> <input name="AddRequestor" size="20" /> </td></tr> +<tr><td class="label"> <&|/l&>Remove Requestor</&>: </td> +<td class="value"> <input name="DeleteRequestor" size="20" /> </td></tr> +<tr><td class="label"> <&|/l&>Add Cc</&>: </td> +<td class="value"> <input name="AddCc" size="20" /> </td></tr> +<tr><td class="label"> <&|/l&>Remove Cc</&>: </td> +<td class="value"> <input name="DeleteCc" size="20" /> </td></tr> +<tr><td class="label"> <&|/l&>Add AdminCc</&>: </td> +<td class="value"> <input name="AddAdminCc" size="20" /> </td></tr> +<tr><td class="label"> <&|/l&>Remove AdminCc</&>: </td> +<td class="value"> <input name="DeleteAdminCc" size="20" /> </td></tr> </table> -</TD> -<TD VALIGN=TOP> +</td> +<td valign="top"> <table> -<tr><td class=label> <&|/l&>Make subject</&>: </td> -<td class=value> <INPUT Name="Subject" SIZE=20> </td></tr> -<tr><td class=label> <&|/l&>Make priority</&>: </td> -<td class=value> <INPUT Name="Priority" SIZE=4> </td></tr> -<tr><td class=label> <&|/l&>Make queue</&>: </td> -<td class=value> <& /Elements/SelectQueue, Name => "Queue" &> </td></tr> -<tr><td class=label> <&|/l&>Make Status</&>: </td> -<td class=value> <& /Elements/SelectStatus, Name => "Status" &> </td></tr> -<tr><td class=label> <&|/l&>Make date Starts</&>: </td> -<td class=value> <& /Elements/SelectDate, Name => "Starts_Date", ShowTime => 0, Default => '' &> </td></tr> -<tr><td class=label> <&|/l&>Make date Started</&>: </td> -<td class=value> <& /Elements/SelectDate, Name => "Started_Date", ShowTime => 0, Default => '' &> </td></tr> -<tr><td class=label> <&|/l&>Make date Told</&>: </td> -<td class=value> <& /Elements/SelectDate, Name => "Told_Date", ShowTime => 0, Default => '' &> </td></tr> -<tr><td class=label> <&|/l&>Make date Due</&>: </td> -<td class=value> <& /Elements/SelectDate, Name => "Due_Date", ShowTime => 0, Default => '' &> </td></tr> -<tr><td class=label> <&|/l&>Make date Resolved</&>: </td> -<td class=value> <& /Elements/SelectDate, Name => "Resolved_Date", ShowTime => 0, Default => '' &> </td></tr> +<tr><td class="label"> <&|/l&>Make subject</&>: </td> +<td class="value"> <input name="Subject" size="20" /> </td></tr> +<tr><td class="label"> <&|/l&>Make priority</&>: </td> +<td class="value"> <input name="Priority" size="4" /> </td></tr> +<tr><td class="label"> <&|/l&>Make queue</&>: </td> +<td class="value"> <& /Elements/SelectQueue, Name => "Queue" &> </td></tr> +<tr><td class="label"> <&|/l&>Make Status</&>: </td> +<td class="value"> <& /Elements/SelectStatus, Name => "Status" &> </td></tr> +<tr><td class="label"> <&|/l&>Make date Starts</&>: </td> +<td class="value"> <& /Elements/SelectDate, Name => "Starts_Date", ShowTime => 0, Default => '' &> </td></tr> +<tr><td class="label"> <&|/l&>Make date Started</&>: </td> +<td class="value"> <& /Elements/SelectDate, Name => "Started_Date", ShowTime => 0, Default => '' &> </td></tr> +<tr><td class="label"> <&|/l&>Make date Told</&>: </td> +<td class="value"> <& /Elements/SelectDate, Name => "Told_Date", ShowTime => 0, Default => '' &> </td></tr> +<tr><td class="label"> <&|/l&>Make date Due</&>: </td> +<td class="value"> <& /Elements/SelectDate, Name => "Due_Date", ShowTime => 0, Default => '' &> </td></tr> +<tr><td class="label"> <&|/l&>Make date Resolved</&>: </td> +<td class="value"> <& /Elements/SelectDate, Name => "Resolved_Date", ShowTime => 0, Default => '' &> </td></tr> </table> -</TD> -</TR> +</td> +</tr> </table> -<& /Elements/TitleBoxEnd&> -<& /Elements/TitleBoxStart, title => loc('Add comments or replies to selected tickets') &> +</&> +<&| /Widgets/TitleBox, title => loc('Add comments or replies to selected tickets') &> <table> -<tr><td align=right><&|/l&>Update Type</&>:</td> +<tr><td align="right"><&|/l&>Update Type</&>:</td> <td><select name="UpdateType"> <option value="private" ><&|/l&>Comments (not sent to requestors)</&></option> <option value="response" ><&|/l&>Reply to requestors</&></option> </select> </td></tr> -<tr><td align=right><&|/l&>Subject</&>:</td><td> <input name="UpdateSubject" size=60 value=""></td></tr> +<tr><td align="right"><&|/l&>Subject</&>:</td><td> <input name="UpdateSubject" size="60" value="" /></td></tr> % while (my $CF = $TxnCFs->Next()) { -<TR> -<TD ALIGN=RIGHT><% $CF->Name %>:</TD> -<TD><& /Elements/EditCustomField, +<tr> +<td align="right"><% $CF->Name %>:</td> +<td><& /Elements/EditCustomField, CustomField => $CF, NamePrefix => "Object-RT::Transaction--CustomField-" - &><em><% $CF->FriendlyType %></em></TD> -</TD></TR> + &><em><% $CF->FriendlyType %></em></td> +</td></tr> % } # end if while - <tr><td align=right><&|/l&>Attach</&>:</td><td><input name="UpdateAttachment" type="file"></td></tr> - <tr><td class=labeltop><&|/l&>Message</&>:</td><td> + <tr><td align="right"><&|/l&>Attach</&>:</td><td><input name="UpdateAttachment" type="file" /></td></tr> + <tr><td class="labeltop"><&|/l&>Message</&>:</td><td> <& /Elements/MessageBox, Name=>"UpdateContent"&> </td></tr> </table> -<& /Elements/TitleBoxEnd &> - +</&> +<&|/Widgets/TitleBox, title => loc('Edit Custom Fields'), color => "#336633"&> +<%perl> +my $cfs = RT::CustomFields->new($session{'CurrentUser'}); +$cfs->LimitToGlobal(); +$cfs->LimitToQueue($_) for keys %$seen_queues; +</%perl> +<table> +<tr> +<th><&|/l&>Name</&></th> +<th><&|/l&>Add values</&></th> +<th><&|/l&>Delete values</&></th> +</tr> +% while (my $cf = $cfs->Next()) { +<tr> +<td class="label"><%$cf->Name%><br /> +<em>(<%$cf->FriendlyType%>)</em></td> +% my $rows = 5; +% my @add = (NamePrefix => 'Bulk-Add-CustomField-', CustomField => $cf, Rows => $rows, Multiple => ($cf->MaxValues ==1 ? 0 : 1) , Cols => 25); +% my @del = (NamePrefix => 'Bulk-Delete-CustomField-', CustomField => $cf, Rows => $rows, Multiple => 1, Cols => 25); +% if ($cf->Type eq 'Select') { +<td><& /Elements/EditCustomFieldSelect, @add &></td> +<td><& /Elements/EditCustomFieldSelect, @del &></td> +% } elsif ($cf->Type eq 'Combobox') { +<td><& /Elements/EditCustomFieldCombobox, @add &></td> +<td><& /Elements/EditCustomFieldCombobox, @del &></td> +% } elsif ($cf->Type eq 'Freeform') { +<td><& /Elements/EditCustomFieldFreeform, @add &></td> +<td><& /Elements/EditCustomFieldFreeform, @del &></td> +% } elsif ($cf->Type eq 'Text') { +<td><& /Elements/EditCustomFieldText, @add &></td> +<td> </td> +% } else { +% $RT::Logger->crit("Unknown CustomField type: " . $cf->Type); +% } +</tr> +% } +</table> +</&> -<& /Elements/TitleBoxStart, title => loc('Edit Links'), color => "#336633"&> -<i><&|/l&>Enter tickets or URIs to link tickets to. Separate multiple entries with spaces.</&></i><br> +<&|/Widgets/TitleBox, title => loc('Edit Links'), color => "#336633"&> +<em><&|/l&>Enter tickets or URIs to link tickets to. Separate multiple entries with spaces.</&></em><br /> <& /Ticket/Elements/BulkLinks &> -<& /Elements/TitleBoxEnd &> +</&> + +<& /Elements/Submit, Label => loc('Update') &> + -<& /Elements/Submit, Label => loc('Update All') &> +</form> -</FORM> <%INIT> +my $title = loc("Update multiple tickets"); # Iterate through the ARGS hash and remove anything with a null value. -map ($ARGS{$_} =~ /^$/ && (delete $ARGS{$_}), keys %ARGS); - -my ($bgcolor, @results); -my @cols = qw(id Status Priority Subject QueueObj->Name OwnerObj->Name RequestorAddresses DueAsString ); - - -my $Tickets = RT::Tickets->new($session{'CurrentUser'}); -$Tickets->FromSQL($ARGS{'Query'}); - -Abort(loc("No search to operate on.")) unless ($Tickets); - -my %allcfs; -my %cfqnames; -my %cfqs; -my $count = 0; -while (my $Ticket = $Tickets->Next) { - my $cfq = $Ticket->QueueObj; - my $cfqid = $cfq->Id; - my $cfqn = $cfq->Name; - unless ( exists $cfqs{$cfqid} ) { - $cfqs{$cfqid} = 1; - $count++; - my $cfs = $cfq->TicketCustomFields; - while (my $cf = $cfs->Next) { - $allcfs{$cf->Id} = $cf; - $cfqnames{$cf->Id} = $cfqn; - } +map ( $ARGS{$_} =~ /^$/ && ( delete $ARGS{$_} ), keys %ARGS ); + +my (@results); + +$Page ||= 1; + +$Format ||= $RT::DefaultSearchResultFormat; + +# inject _CHECKBOX to the first field. +$Format =~ s/'?([^']+)'?,/'___CHECKBOX__$1',/; + +my $Tickets = RT::Tickets->new( $session{'CurrentUser'} ); +$Tickets->FromSQL($Query); +if ( $OrderBy =~ /\|/ ) { + + # Multiple Sorts + my @OrderBy = split /\|/, $OrderBy; + my @Order = split /\|/, $Order; + $Tickets->OrderByCols( + map { { FIELD => $OrderBy[$_], ORDER => $Order[$_] } } + ( 0 .. $#OrderBy ) ); +} +else { + $Tickets->OrderBy( FIELD => $OrderBy, ORDER => $Order ); +} + +$Tickets->RowsPerPage($Rows) if ($Rows); +$Tickets->GotoPage( $Page - 1 ); # SB uses page 0 as the first page + +Abort( loc("No search to operate on.") ) unless ($Tickets); + +# build up a list of all custom fields for tickets that we're displaying, so +# we can display sane edit widgets. + +my $fields = {}; +my $seen_queues = {}; +while ( my $ticket = $Tickets->Next ) { + next if $seen_queues->{ $ticket->Queue }++; + + my $custom_fields = $ticket->QueueObj->TicketCustomFields; + while ( my $field = $custom_fields->Next ) { + $fields->{ $field->id } = $field; } } -my $do_comment_reply=0; +my $do_comment_reply = 0; + # Prepare for ticket updates -$ARGS{'UpdateContent'} =~ s/\r\n/\n/g; -chomp ($ARGS{'UpdateContent'}) ; - -if ($ARGS{'UpdateContent'} && - $ARGS{'UpdateContent'} ne '' && - $ARGS{'UpdateContent'} ne "-- \n" . - $session{'CurrentUser'}->UserObj->Signature) { - $do_comment_reply=1; +if ($ARGS{'UpdateContent'}) { + $ARGS{'UpdateContent'} =~ s/\r\n/\n/g; + chomp( $ARGS{'UpdateContent'} ); + + if ($ARGS{'UpdateContent'} ne '' + && $ARGS{'UpdateContent'} ne "-- \n" + . $session{'CurrentUser'}->UserObj->Signature ) { + $do_comment_reply = 1; + } } #Iterate through each ticket we've been handed @@ -229,50 +266,131 @@ my @linkresults; my %queues; $Tickets->RedoSearch(); -while (my $Ticket = $Tickets->Next) { - $queues{$Ticket->QueueObj->Id}++; - $RT::Logger->debug( "Checking Ticket ".$Ticket->Id ."\n"); - next unless ($ARGS{"UpdateTicket".$Ticket->Id}); - $RT::Logger->debug ("Matched\n"); - my @updateresults; + +# pull out the labels for any custom fields we want to update + +my $cf_del_keys; +@$cf_del_keys = grep { /^Bulk-Delete-CustomField/ } keys %ARGS; +my $cf_add_keys; +@$cf_add_keys = grep { /^Bulk-Add-CustomField/ } keys %ARGS; + + +while ( my $Ticket = $Tickets->Next ) { + next unless ( $ARGS{ "UpdateTicket" . $Ticket->Id } ); + + #Update the links + $ARGS{'id'} = $Ticket->id; + $queues{ $Ticket->QueueObj->Id }++; + + my @updateresults; if ($do_comment_reply) { - ProcessUpdateMessage(TicketObj => $Ticket, ARGSRef => \%ARGS, Actions => \@updateresults); + ProcessUpdateMessage( + TicketObj => $Ticket, + ARGSRef => \%ARGS, + Actions => \@updateresults + ); } #Update the basics. - my @basicresults = ProcessTicketBasics(TicketObj => $Ticket, ARGSRef => \%ARGS); - my @dateresults = ProcessTicketDates(TicketObj => $Ticket, ARGSRef => \%ARGS); + my @basicresults = + ProcessTicketBasics( TicketObj => $Ticket, ARGSRef => \%ARGS ); + my @dateresults = + ProcessTicketDates( TicketObj => $Ticket, ARGSRef => \%ARGS ); + #Update the watchers - my @watchresults = ProcessTicketWatchers(TicketObj => $Ticket, ARGSRef => \%ARGS); + my @watchresults = + ProcessTicketWatchers( TicketObj => $Ticket, ARGSRef => \%ARGS ); + foreach my $type qw(MergeInto DependsOn MemberOf RefersTo) { + $ARGS{ $Ticket->id . "-" . $type } = $ARGS{"Ticket-$type"}; + $ARGS{ $type . "-" . $Ticket->id } = $ARGS{"$type-Ticket"}; + } + @linkresults = + ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS ); + foreach my $type qw(MergeInto DependsOn MemberOf RefersTo) { + delete $ARGS{ $type . "-" . $Ticket->id }; + delete $ARGS{ $Ticket->id . "-" . $type }; + } - #Update the links - $ARGS{'id'} = $Ticket; - $ARGS{$Ticket->Id.'-MergeInto'} = $ARGS{'Ticket-MergeInto'}; - $ARGS{$Ticket->Id.'-DependsOn'} = $ARGS{'Ticket-DependsOn'}; - $ARGS{'DependsOn-'.$Ticket->Id} = $ARGS{'DependsOn-Ticket'}; - $ARGS{$Ticket->Id.'-MemberOf'} = $ARGS{'Ticket-MemberOf'}; - $ARGS{'MemberOf-'.$Ticket->Id} = $ARGS{'MemberOf-Ticket'}; - $ARGS{$Ticket->Id.'-RefersTo'} = $ARGS{'Ticket-RefersTo'}; - $ARGS{'RefersTo-'.$Ticket->Id} = $ARGS{'RefersTo-Ticket'}; - @linkresults = ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS); - delete $ARGS{'id'}; - delete $ARGS{$Ticket->Id.'-MergeInto'}; - delete $ARGS{$Ticket->Id.'-DependsOn'}; - delete $ARGS{'DependsOn-'.$Ticket->Id}; - delete $ARGS{$Ticket->Id.'-MemberOf'}; - delete $ARGS{'MemberOf-'.$Ticket->Id}; - delete $ARGS{$Ticket->Id.'-RefersTo'}; - delete $ARGS{'RefersTo-'.$Ticket->Id}; - my @tempresults = (@watchresults, @basicresults, @dateresults, - @updateresults, @linkresults); - @tempresults = map { loc("Ticket [_1]: [_2]",$Ticket->Id,$_) } @tempresults; - - @results = (@results, @tempresults); + my @cfresults; + + foreach my $list ( $cf_add_keys, $cf_del_keys ) { + next unless $list->[0]; + + + my $op; + if ( $list->[0] =~ /Add/ ) { + $op = 'add'; + + } + elsif ( $list->[0] =~ /Del/ ) { + $op = 'del'; + } + else { + $RT::Logger->crit( + "Got an op that was neither add nor delete. can never happen" + . $list->[0] ); + last; + } + + foreach my $key (@$list) { + my ( $cfid, $cf ); + if ( $key =~ /CustomField-(\d+)-/ ) { + $cfid = $1; + $cf = RT::CustomField->new( $session{'CurrentUser'} ); + $cf->Load($cfid); + } + else {next} + my @values = + ref( $ARGS{$key} ) eq 'ARRAY' + ? @{ $ARGS{$key} } + : ( $ARGS{$key} ); + map { s/(\r\n|\r)/\n/g; } @values; # fix the newlines + # now break the multiline values into multivalues + @values = map { split( /\n/, $_ ) } @values + unless ( $cf->SingleValue ); + + my $current_values = $Ticket->CustomFieldValues($cfid); + foreach my $value (@values) { + if ( $op eq 'del' && $current_values->HasEntry($value) ) { + my ( $id, $msg ) = $Ticket->DeleteCustomFieldValue( + Field => $cfid, + Value => $value + ); + push @cfresults, $msg; + } + + elsif ( $op eq 'add' && !$current_values->HasEntry($value) ) { + my ( $id, $msg ) = $Ticket->AddCustomFieldValue( + Field => $cfid, + Value => $value + ); + push @cfresults, $msg; + } + } + } + } + my @tempresults = ( + @watchresults, @basicresults, @dateresults, + @updateresults, @linkresults, @cfresults + ); + + @tempresults = + map { loc( "Ticket [_1]: [_2]", $Ticket->Id, $_ ) } @tempresults; + + @results = ( @results, @tempresults ); } -my $TxnCFs = RT::CustomFields->new($session{CurrentUser}); -$TxnCFs->LimitToLookupType("RT::Queue-RT::Ticket-RT::Transaction"); -$TxnCFs->LimitToGlobalOrObjectId(sort keys %queues); +my $TxnCFs = RT::CustomFields->new( $session{CurrentUser} ); +$TxnCFs->LimitToLookupType( RT::Transaction->CustomFieldLookupType ); +$TxnCFs->LimitToGlobalOrObjectId( sort keys %queues ); </%INIT> +<%args> +$Format => undef +$Page => 1 +$Rows => undef +$Order => 'ASC' +$OrderBy => 'id' +$Query => undef +</%args> diff --git a/rt/html/Ticket/Elements/ShowMemberOf b/rt/html/Ticket/Elements/ShowMemberOf deleted file mode 100644 index e443132bc..000000000 --- a/rt/html/Ticket/Elements/ShowMemberOf +++ /dev/null @@ -1,57 +0,0 @@ -%# BEGIN BPS TAGGED BLOCK {{{ -%# -%# COPYRIGHT: -%# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC -%# <jesse@bestpractical.com> -%# -%# (Except where explicitly superseded by other copyright notices) -%# -%# -%# LICENSE: -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# You should have received a copy of the GNU General Public License -%# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -%# -%# -%# CONTRIBUTION SUBMISSION POLICY: -%# -%# (The following paragraph is not intended to limit the rights granted -%# to you to modify and distribute this software under the terms of -%# the GNU General Public License and is only of importance to you if -%# you choose to contribute your changes and enhancements to the -%# community by submitting them to Best Practical Solutions, LLC.) -%# -%# By intentionally submitting any modifications, corrections or -%# derivatives to this work, or any other work intended for use with -%# Request Tracker, to Best Practical Solutions, LLC, you confirm that -%# you are the copyright holder for those contributions and you grant -%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -%# royalty-free, perpetual, license to use, copy, create derivative -%# works based on those contributions, and sublicense and distribute -%# those contributions and any derivatives thereof. -%# -%# END BPS TAGGED BLOCK }}} -<UL> -% my $memberof = $Ticket->MemberOf; -% while (my $member_of = $memberof->Next) { -<LI><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member_of->Id%>"><%$member_of->Id%></a>: <%$member_of->Subject%> [<%$member_of->Status%>] -% } -</UL> - -<%INIT> -</%INIT> -<%ARGS> -$Ticket => undef -</%ARGS> diff --git a/rt/html/Ticket/Elements/ShowReferences b/rt/html/Ticket/Elements/ShowReferences deleted file mode 100644 index bb323f66c..000000000 --- a/rt/html/Ticket/Elements/ShowReferences +++ /dev/null @@ -1,72 +0,0 @@ -%# BEGIN BPS TAGGED BLOCK {{{ -%# -%# COPYRIGHT: -%# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC -%# <jesse@bestpractical.com> -%# -%# (Except where explicitly superseded by other copyright notices) -%# -%# -%# LICENSE: -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# You should have received a copy of the GNU General Public License -%# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -%# -%# -%# CONTRIBUTION SUBMISSION POLICY: -%# -%# (The following paragraph is not intended to limit the rights granted -%# to you to modify and distribute this software under the terms of -%# the GNU General Public License and is only of importance to you if -%# you choose to contribute your changes and enhancements to the -%# community by submitting them to Best Practical Solutions, LLC.) -%# -%# By intentionally submitting any modifications, corrections or -%# derivatives to this work, or any other work intended for use with -%# Request Tracker, to Best Practical Solutions, LLC, you confirm that -%# you are the copyright holder for those contributions and you grant -%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -%# royalty-free, perpetual, license to use, copy, create derivative -%# works based on those contributions, and sublicense and distribute -%# those contributions and any derivatives thereof. -%# -%# END BPS TAGGED BLOCK }}} -<UL> -% while (my $Link = $Ticket->RefersTo->Next) { -<LI> -% if ($Link->TargetURI->IsLocal) { -% my $member = $Link->TargetObj; - -<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]<br> -% } else { -<A HREF="<%$Link->TargetURI->HREF%>"><%$Link->Target%></A> -% } -%} - - - -% while (my $Link = $Ticket->ReferredToBy->Next) { -<LI> -% if ($Link->BaseURI->IsLocal) { -% my $member = $Link->BaseObj; -<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]<br> -% } else { -<A HREF="<%$Link->BaseURI->HREF%>"><%$Link->Base%></A> -%} -% } -</UL> -<%ARGS> -$Ticket => undef -</%ARGS> diff --git a/rt/html/Ticket/Elements/ShowSummary b/rt/html/Ticket/Elements/ShowSummary index 5a6e7e099..d171f408e 100644 --- a/rt/html/Ticket/Elements/ShowSummary +++ b/rt/html/Ticket/Elements/ShowSummary @@ -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 %# <jesse@bestpractical.com> %# %# (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,67 +45,71 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - <TABLE WIDTH="100%" class="ticketsummary" > - <TR> - <TD VALIGN=TOP WIDTH="50%" class="boxcontainer"> - <& /Elements/TitleBoxStart, title => loc('The Basics'), + <table width="100%" class="ticket-summary"> + <tr> + <td valign="top" width="50%" class="boxcontainer"> + <&| /Widgets/TitleBox, title => loc('The Basics'), title_href =>"$RT::WebPath/Ticket/Modify.html?id=".$Ticket->Id, - title_class=> 'inverse', - color => "#993333" &> + class => 'ticket-info-basics' &> <& /Ticket/Elements/ShowBasics, Ticket => $Ticket &> - <& /Elements/TitleBoxEnd &> - <br> + </&> + % if ($Ticket->QueueObj->TicketCustomFields->First) { - <& /Elements/TitleBoxStart, title => loc('Custom Fields'), + <&| /Widgets/TitleBox, title => loc('Custom Fields'), title_href =>"$RT::WebPath/Ticket/Modify.html?id=".$Ticket->Id, - title_class=> 'inverse', - color => "#993333" &> + class => 'ticket-info-cfs' &> <& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &> - <& /Elements/TitleBoxEnd &> - -<br> + </&> % } - <& /Elements/TitleBoxStart, title => loc('People'), + <&| /Widgets/TitleBox, title => loc('People'), title_href =>"$RT::WebPath/Ticket/ModifyPeople.html?id=".$Ticket->Id, - title_class=> 'inverse', - color => "#333399" &> - <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &> - <& /Elements/TitleBoxEnd &> - <br> + class => 'ticket-info-people' &> + <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &> + </&> - <& /Elements/TitleBoxStart, title => loc('Customers'), + <& /Widgets/TitleBoxStart, title => loc('Customers'), title_href =>"$RT::WebPath/Ticket/ModifyCustomers.html?id=".$Ticket->Id, - title_class=> 'inverse', - color => "#7f007b" &> + class=> 'ticket-info-customers' &> <& /Ticket/Elements/ShowCustomers, Ticket => $Ticket &> - <& /Elements/TitleBoxEnd &> + </&> - <BR> - </TD> - <TD VALIGN=TOP WIDTH="50%" class="boxcontainer"> + <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &> + <br /> + <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &> - <& /Elements/TitleBoxStart, title => loc("Dates"), + <& /Elements/Callback, %ARGS, _CallbackName => 'LeftColumn' &> + </td> + <td valign="top" width="50%" class="boxcontainer"> + <&|/Widgets/TitleBox, title => loc("Reminders"), + title_href =>"$RT::WebPath/Ticket/Reminders.html?id=".$Ticket->Id, + class => 'ticket-info-reminders' &> + <table> + <tr> + <td> + <form action="<%$RT::WebPath%>/Ticket/Display.html" method="post"> + <& /Ticket/Elements/Reminders, Ticket => $Ticket, ShowCompleted => 0 &> + <div align="right"><input type="submit" class="button" value="Save" /></div> + </form> + </td> + </tr> + </table> + </&> + <&| /Widgets/TitleBox, title => loc("Dates"), title_href =>"$RT::WebPath/Ticket/ModifyDates.html?id=".$Ticket->Id, - title_class=> 'inverse', - color => "#663366" &> + class => 'ticket-info-dates' &> <& /Ticket/Elements/ShowDates, Ticket => $Ticket &> - <& /Elements/TitleBoxEnd &> - <BR> - <& /Elements/TitleBoxStart, title => loc('Links'), + </&> + + <&| /Widgets/TitleBox, title => loc('Links'), title_href => "$RT::WebPath/Ticket/ModifyLinks.html?id=".$Ticket->Id, - title_class=> 'inverse', - titleright => '', color=> "#336633" &> + class => 'ticket-info-links' &> <& /Elements/ShowLinks, Ticket => $Ticket &> - <& /Elements/TitleBoxEnd &> - <BR> - <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &> - - <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &> - + </&> + <& /Elements/Callback, %ARGS, _CallbackName => 'RightColumn' &> - </TD> - </TR> - </TABLE> + </td> + </tr> + </table> <%ARGS> $Ticket => undef $Attachments => undef diff --git a/rt/html/Ticket/Elements/Tabs b/rt/html/Ticket/Elements/Tabs index 46e1d4a27..3dee8dff6 100644 --- a/rt/html/Ticket/Elements/Tabs +++ b/rt/html/Ticket/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 %# <jesse@bestpractical.com> %# %# (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: @@ -121,9 +123,11 @@ my $ticket_page_tabs = { path => "Ticket/ModifyLinks.html?id=" . $id, }, _Eb=> { title => loc('Customers'), path => "Ticket/ModifyCustomers.html?id=" . $id, }, - _F => { title => loc('Jumbo'), - path => "Ticket/ModifyAll.html?id=" . $id, - separator => 1 + _F => { title => loc('Reminders'), + path => "Ticket/Reminders.html?id=" . $id, + separator => 1, }, + _X => { title => loc('Jumbo'), + path => "Ticket/ModifyAll.html?id=" . $id, }, }; @@ -138,76 +142,102 @@ foreach my $tab ( sort keys %{$ticket_page_tabs} ) { $tabs->{'this'}->{"subtabs"} = $ticket_page_tabs; $current_tab = "Ticket/Display.html?id=" . $id; +my %can = ( + ModifyTicket => $Ticket->CurrentUserHasRight('ModifyTicket'), +); - - - -if ( $Ticket->CurrentUserHasRight('ModifyTicket') - or $Ticket->CurrentUserHasRight('ReplyToTicket') ) { - $actions->{'A'} = { title => loc('Reply'), - path => "Ticket/Update.html?Action=Respond&id=" . $id, +if ( $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('ReplyToTicket') ) { + $actions->{'F'} = { + title => loc('Reply'), + path => "Ticket/Update.html?Action=Respond&id=" . $id, }; } -if ( $Ticket->CurrentUserHasRight('ModifyTicket') ) { +if ( $can{'ModifyTicket'} ) { if ( $Ticket->Status ne 'resolved' ) { - $actions->{'B'} = { - + $actions->{'G'} = { path => "Ticket/Update.html?Action=Comment&DefaultStatus=resolved&id=" . $id, title => loc('Resolve') }; } if ( $Ticket->Status ne 'open' ) { - $actions->{'C'} = { path => "Ticket/Display.html?Status=open&id=" . $id, + $actions->{'A'} = { path => "Ticket/Display.html?Status=open&id=" . $id, title => loc('Open it') }; } } if ( $Ticket->CurrentUserHasRight('OwnTicket') ) { - if ( $Ticket->OwnerObj->id == $RT::Nobody->id ) { - $actions->{'D'} = { path => "Ticket/Display.html?Action=Take&id=" . $id, - title => loc('Take') }; + if ( $Ticket->OwnerObj->Id == $RT::Nobody->id + and ( $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('TakeTicket') ) ) + { + $actions->{'B'} = { + path => "Ticket/Display.html?Action=Take&id=" . $id, + title => loc('Take'), + }; } - elsif ( $Ticket->OwnerObj->id != $session{CurrentUser}->id ) { - $actions->{'E'} = {path => "Ticket/Display.html?Action=Steal&id=" . $id, - title => loc('Steal') }; + elsif ( $Ticket->OwnerObj->id != $session{CurrentUser}->id + and ( $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('StealTicket') ) ) + { + $actions->{'C'} = { + path => "Ticket/Display.html?Action=Steal&id=" . $id, + title => loc('Steal'), + }; } } -if ( $Ticket->CurrentUserHasRight('ModifyTicket') - or $Ticket->CurrentUserHasRight('CommentOnTicket') ) { - $actions->{'F'} = { title => loc('Comment'), - path => "Ticket/Update.html?Action=Comment&id=" . $id, +if ( $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('CommentOnTicket') ) { + $actions->{'E'} = { + title => loc('Comment'), + path => "Ticket/Update.html?Action=Comment&id=" . $id, }; } } -my $args = "?" . $m->comp( +if ( (defined $actions->{A} || defined $actions->{B} || defined $actions->{C}) + && (defined $actions->{E} || defined $actions->{F} || defined $actions->{G}) ) { + + if (defined $actions->{C}) { $actions->{C}->{separator} = 1 } + elsif (defined $actions->{B}) { $actions->{B}->{separator} = 1 } + elsif (defined $actions->{A}) { $actions->{A}->{separator} = 1 } +} + +my $args; +$args= "?" . $m->comp( '/Elements/QueryString', Query => $ARGS{'Query'} || $session{'CurrentSearchHash'}->{'Query'}, Format => $ARGS{'Format'} || $session{'CurrentSearchHash'}->{'Format'}, OrderBy => $ARGS{'OrderBy'} || $session{'CurrentSearchHash'}->{'OrderBy'}, Order => $ARGS{'Order'} || $session{'CurrentSearchHash'}->{'Order'}, + Page => $ARGS{'Page'} || $session{'CurrentSearchHash'}->{'Page'}, Rows => $ARGS{'Rows'}, ) if ($ARGS{'Query'} or $session{'CurrentSearchHash'}->{'Query'}); $args ||= ''; $tabs->{"f"} = { path => "Search/Build.html?NewQuery=1", - title => loc('New Query')}; + title => loc('New Search')}; $tabs->{"g"} = { path => "Search/Build.html$args", - title => loc('Query Builder')}; + title => loc('Edit Search')}; $tabs->{"h"} = { path => "Search/Edit.html$args", title => loc('Advanced'), separator => 1 }; -if (defined $session{'tickets'} and $session{'tickets'}->Count) { +if ($args) { $tabs->{"i"} = { path => "Search/Results.html$args", title => loc('Show Results'), - separator => 1, - subtabs => $searchtabs }; + }; if ($current_tab =~ "Search/Results.html") { $current_tab = "Search/Results.html$args"; } + $tabs->{"j"} = { path => "Search/Bulk.html$args", + title => loc('Bulk Update'), + }; + if ($current_tab =~ "Search/Bulk.html") { + $current_tab = "Search/Bulk.html$args"; + } + foreach my $searchtab (keys %{$searchtabs}) { + ($searchtab =~ /^_/) ? $tabs->{"s".$searchtab} = $searchtabs->{$searchtab} : $tabs->{"z_".$searchtab} = $searchtabs->{$searchtab}; + } } + </%INIT> diff --git a/rt/html/Widgets/TitleBoxStart b/rt/html/Widgets/TitleBoxStart index 7edc8a154..1320b8f66 100755 --- a/rt/html/Widgets/TitleBoxStart +++ b/rt/html/Widgets/TitleBoxStart @@ -64,7 +64,7 @@ $title => '' $title_class => '' $titleright_href => undef $titleright => undef -$contentbg => "#dddddd" +$contentbg => "#d4d4d4" $color => "#336699" $id => '' $hideable => 1 |