diff options
Diffstat (limited to 'rt/html/Elements')
50 files changed, 2451 insertions, 0 deletions
diff --git a/rt/html/Elements/BevelBoxRaisedEnd b/rt/html/Elements/BevelBoxRaisedEnd new file mode 100644 index 000000000..ebf45df0f --- /dev/null +++ b/rt/html/Elements/BevelBoxRaisedEnd @@ -0,0 +1,26 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK + </TD> +</TR> +</table> diff --git a/rt/html/Elements/BevelBoxRaisedStart b/rt/html/Elements/BevelBoxRaisedStart new file mode 100644 index 000000000..c4e6c55bc --- /dev/null +++ b/rt/html/Elements/BevelBoxRaisedStart @@ -0,0 +1,26 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<table cellspacing=0 cellpadding=0 width=100% height=100%> + <TR> + <TD width=100% height=100%> diff --git a/rt/html/Elements/Callback b/rt/html/Elements/Callback new file mode 100644 index 000000000..93ac4c01b --- /dev/null +++ b/rt/html/Elements/Callback @@ -0,0 +1,65 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<%once> +my (%cache, $check); +</%once> +<%init> +# checks for inode change time for each callback directory +my $new_check = join( + $;, map { $_->[1] => (stat("$_->[1]/Callbacks"))[10] } $m->interp->resolver->comp_root_array +) or return; + +$Page = $m->callers(1)->path unless ($Page); + +my $callbacks; +if ($new_check eq $check) { + $callbacks = $cache{$Page,$_CallbackName}; +} +else { + $check = $new_check; +} + +if (!$callbacks) { + my $path = "/Callbacks/*$Page/$_CallbackName"; + $callbacks = [ $m->interp->resolver->glob_path($path) ]; + @$callbacks = grep !/^\.|~$/, @$callbacks; #skip backup files + + #skip files without a package + my $invalid_base = "/Callbacks/$Page/$_CallbackName"; + @$callbacks = grep !/^$invalid_base$/, @$callbacks; + + + + $cache{$Page,$_CallbackName} = $callbacks; +} + +foreach my $comp (@$callbacks) { + $m->comp($comp, %ARGS) if $m->comp_exists($comp); +} +return(1); +</%init> +<%args> +$_CallbackName => 'Default' +$Page => undef +</%args> diff --git a/rt/html/Elements/Checkbox b/rt/html/Elements/Checkbox new file mode 100644 index 000000000..ae3d765c2 --- /dev/null +++ b/rt/html/Elements/Checkbox @@ -0,0 +1,39 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<INPUT TYPE="Checkbox" NAME ="<%$Name%>" <%$IsChecked%>> + +<%ARGS> +$Name => undef +$Default => undef +$True => undef +$False => undef +$IsChecked => undef +</%ARGS> + +<%INIT> +$IsChecked = + ($Default && $Default =~ /checked/i) + ? " CHECKED " : ""; +1; +</%INIT> diff --git a/rt/html/Elements/CreateTicket b/rt/html/Elements/CreateTicket new file mode 100644 index 000000000..7e1025d0a --- /dev/null +++ b/rt/html/Elements/CreateTicket @@ -0,0 +1,26 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<FORM ACTION="<% $RT::WebPath%>/Ticket/Create.html"> +<&|/l, $m->scomp('/Elements/SelectNewTicketQueue')&><input type="submit" value="New ticket in"> [_1]</&> +</FORM> diff --git a/rt/html/Elements/Error b/rt/html/Elements/Error new file mode 100644 index 000000000..dc44f125e --- /dev/null +++ b/rt/html/Elements/Error @@ -0,0 +1,62 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Elements/Callback, %ARGS, error => $error &> +<& /Elements/Header, Code => $Code, Why => $Why &> +<& /Elements/Tabs &> +<& /Elements/TitleBoxStart, class=> "error", title => $Title &> +<%$Why%> +<br> +<font size=-1> +<%$Details%> +</font> +<& /Elements/TitleBoxEnd &> +</body> +</HTML> + + +<%args> +$Code => undef +$Details => undef +$Title => loc("RT Error") +$Why => loc("the calling component did not specify why") +</%args> + +<%INIT> +my $error = "WebRT: $Why ($Details)"; + +# TODO: Log::Dispatch isn't UTF-8 safe. Autrijus needs to talk to dave rolsky about getting this fixed +if ($] >= 5.007001) { + require Encode; + Encode::_utf8_off($error); +} + +$RT::Logger->error($error); + +if ( $session{'SessionType'} eq 'REST' ) { + $r->content_type('text/plain'); + $m->out( "Error: " . $Why . "\n" ); + $m->out( $Details . "\n" ); + $m->abort(); +} +</%INIT> diff --git a/rt/html/Elements/Footer b/rt/html/Elements/Footer new file mode 100644 index 000000000..5c833f886 --- /dev/null +++ b/rt/html/Elements/Footer @@ -0,0 +1,60 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +% if ($Menu) { +</td> +</tr> +<tr> +<td> +% } +<& /Elements/Callback, %ARGS &> +<div class="bpscredits"> +»|« <&|/l, $RT::VERSION &>RT [_1] from <a href="http://bestpractical.com">Best Practical Solutions, LLC</a>.</&> +</div> +% if ($Debug) { +<HR> +<b><&|/l&>Time to display</&>: <%Time::HiRes::tv_interval( $m->{'rt_base_time'} )%></b> +% } +% if ($Debug >= 2 ) { +% require Data::Dumper; +% my $d = Data::Dumper->new([\%ARGS], [qw(%ARGS)]); +<pre> +<%$d->Dump() %> +</pre> +% } +% if ($Menu) { +</TD> +</TR> +</TABLE> +</TD> +</TR> +</TABLE> +% } +</BODY> +</HTML> +% $m->abort(); + +<%ARGS> +$Debug => 0 +$Menu => 1 +</%ARGS> diff --git a/rt/html/Elements/GotoTicket b/rt/html/Elements/GotoTicket new file mode 100644 index 000000000..bb0c04dd1 --- /dev/null +++ b/rt/html/Elements/GotoTicket @@ -0,0 +1,24 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<FORM ACTION="<%$RT::WebPath%>/Ticket/Display.html"><input type=submit value="<&|/l&>Goto ticket</&>"> <input size=5 name=id accesskey="0"></FORM> diff --git a/rt/html/Elements/Header b/rt/html/Elements/Header new file mode 100644 index 000000000..0fd91a2e2 --- /dev/null +++ b/rt/html/Elements/Header @@ -0,0 +1,82 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<HTML> +<HEAD> +<TITLE><%$Title%></TITLE> +% if ($Refresh > 0) { +<META HTTP-EQUIV="REFRESH" CONTENT="<%$Refresh%>"> +% } + +<link rel="shortcut icon" href="<%$RT::WebImagesURL%>/favicon.png" type="image/png"> +<link rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/webrt.css" type="text/css"> +</HEAD> +<BODY BGCOLOR="<%$BgColor%>" +% if ($Focus) { +ONLOAD=" + var tmp = (document.getElementsByName('<% $Focus %>')); + if (tmp.length > 0) tmp[tmp.length-1].focus(); +" +% } +> +<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF"> + <tr> + <td colspan=2><a href="http://bestpractical.com"><img src="<%$RT::WebImagesURL%>/bplogo.gif" alt="" width="230" height="50"></a></td> + <td> </td> + <td> </td> + <td width="50%" align="right"> +% if ($session{'CurrentUser'} && $session{'CurrentUser'}->Id && $LoggedIn) { +<SPAN STYLE="display: none"><A HREF="#skipnav"><&|/l&>Skip Menu</&></A> |</SPAN> +<A HREF="<%$RT::WebPath%><% $Prefs %>" ><&|/l&>Preferences</&></A> +<& /Elements/Callback, %ARGS &> +% unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) { +| <A HREF="<%$RT::WebPath%>/NoAuth/Logout.html<%$URL && "?URL=".$URL%>"><&|/l&>Logout</&></a> +% } +<BR> +<&|/l, "<b>".$session{'CurrentUser'}->Name."</b>" &>Logged in as [_1]</&> +% } else { +<&|/l&>Not logged in.</&> +% } +</font> + </td> + </tr> +</table> +<%INIT> + +$r->header_out('Pragma' => 'no-cache'); +$r->header_out('Cache-control' => 'no-cache'); +</%INIT> + +<%ARGS> +$Prefs => '/User/Prefs.html' +$Focus => 'focus' +$Title => undef +$Code => undef +$Refresh => 0 +$Why => undef +$BgColor => '#ffffff' +$ShowBar => 1 +$LoggedIn => 1 +$URL => undef +</%ARGS> diff --git a/rt/html/Elements/ListActions b/rt/html/Elements/ListActions new file mode 100644 index 000000000..ffa09e283 --- /dev/null +++ b/rt/html/Elements/ListActions @@ -0,0 +1,43 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +% if ($actions[0] ) { +<& /Elements/TitleBoxStart, title => loc('Results') &> +<UL> +% foreach my $action (@actions) { +% next unless ($action); +% my $skip = 0; +% $m->comp('/Elements/Callback', _CallbackName => 'ModifyRow', row => \$action, skip => \$skip, %ARGS); +% next if $skip; +<LI><%$action%></LI> +% } +</UL> +<& /Elements/TitleBoxEnd &> +<BR> +% } +<%init> +@actions = grep (/./,@actions); +</%init> +<%ARGS> +@actions => undef +</%ARGS> diff --git a/rt/html/Elements/Login b/rt/html/Elements/Login new file mode 100644 index 000000000..42c49c4af --- /dev/null +++ b/rt/html/Elements/Login @@ -0,0 +1,101 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<%INIT> +if ($m->request_comp->path =~ '^/REST/\d+\.\d+/') { + $r->content_type("text/plain"); + $m->error_format("text"); + $m->out("RT/$RT::VERSION 401 Credentials required\n"); + $m->out("\n$Error\n") if $Error; + $m->abort; +} +</%INIT> + +<& /Elements/Callback, %ARGS, _CallbackName => 'Header' &> +<& /Elements/Header, Title => loc('Login'), Focus => 'user' &> + +<DIV ALIGN=CENTER> +% if ($Error) { +<& /Elements/TitleBoxStart, title => loc('Error') &> +<% $Error %> +<& /Elements/TitleBoxEnd &> +% } +<BR> +<& /Elements/TitleBoxStart, width=> "40%", titleright => loc("RT [_1]", $RT::VERSION), title => loc('Login') , +contentbg=>"#cccccc" &> + +% unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) { +<FORM METHOD=POST ACTION="<% (UNIVERSAL::can($r, 'uri') && ($r->uri) =~ m!.*/(.*)!) %>" > +<TABLE BORDER=0 WIDTH=100%> +<TR ALIGN=RIGHT> +<TD ALIGN=RIGHT><&|/l&>Username</&>:</TD><TD ALIGN=LEFT><input name=user value="<%$user%>"></TD></TR> +<TR><TD ALIGN=RIGHT><&|/l&>Password</&>:</TD><TD ALIGN=LEFT><input type=password name=pass></TD></TR> +<TR><TD colspan=2 align=right> +<input type=submit Value="<&|/l&>Login</&>"> +</TD></TR> +</TABLE> + +%# Give callbacks a chance to add more control elements +<& /Elements/Callback, %ARGS &> + +<&/Elements/TitleBoxEnd&> +% # From mason 1.0.1 forward, this doesn't work. in fact, it breaks things. +% # But on Mason 1.15 it's fixed again, so we still use it. +% # The code below iterates through everything in the passed in arguments +% # Preserving all the old parameters +% # This would be easier, except mason is 'smart' and calls multiple values +% # arrays rather than multiple hash keys +% my $key; my $val; +% foreach $key (keys %ARGS) { +% if (($key ne 'user') and ($key ne 'pass')) { +% if (ref($ARGS{$key}) =~ /ARRAY/) { +% foreach $val (@{$ARGS{$key}}) { +<input type=hidden name="<%$key %>" value="<% $val %>"> +% } +% } +% else { +<input type="hidden" name="<% $key %>" value="<% $ARGS{$key} %>"> +% } +% } +% } +</FORM> +% } +</DIV> + +<BR> +<!-- TODO: not yet implemented +If you've forgotten your username or password, RT can <A +href="/NoAuth/Reminder.html">send you a reminder</a>. +--> +<BR> +<BR> +<BR> +<HR> +<&|/l, '2003'&>RT is © Copyright 1996-[_1] Jesse Vincent <jesse@bestpractical.com>. It is distributed under <a href="http://www.gnu.org/copyleft/gpl.html">Version 2 of the GNU General Public License.</a></&> + +<%ARGS> +$user => "" +$pass => undef +$goto => undef +$Error => undef +</%ARGS> diff --git a/rt/html/Elements/Menu b/rt/html/Elements/Menu new file mode 100644 index 000000000..963be13bf --- /dev/null +++ b/rt/html/Elements/Menu @@ -0,0 +1,84 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +%# font size depends on level +% if ($level ge 3) { +% $size = $basesize-(6); +% } elsif ($level gt 0) { +% $size = $basesize-($level * 2); +% $padding = 2; +% } +% else { +% $size = $basesize; +% $padding = 5; +% } +<ul class="topnav" > +% my $sep=0; +% my $accesskey="1"; +% foreach $tab (sort keys %{$toptabs}) { +% my $current = $current_toptab || ""; +% my $path = $toptabs->{$tab}->{'path'} || ""; +% $path =~ s#/index.html$##gi; +% $current =~ s#/index.html$##gi; +% if ( $path eq $current) { +% $class="currenttopnav" +% } else { +% $class="topnav" +% } +% my $style=""; +% if ($sep) { +% $style="border-top: solid #999 1px; padding-top: .1em; margin-top: .5em;"; +% } elsif ($level == 0 ) { +% $style="border-bottom: solid white 1px; padding-top: .25em; padding-bottom: .5em;" ; +% } +% if ($toptabs->{$tab}->{'separator'}) { +% $sep=1; +% } else { +% $sep=0; +% } +<li style="<%$style%>"><A HREF="<%$RT::WebPath%>/<%$toptabs->{$tab}->{'path'}|n%>" style="font-size: <%$size%>;" class="<%$class%>" +<%($class eq 'currenttopnav') ? "name='focus'" : ""|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> +% } +%# } +% } +</ul> + +<%INIT> +my ($tab, $subtab, $class, $size, $padding); +my $basesize=16; +</%INIT> + +<%ARGS> +$current_toptab => "" +$toptabs => undef +$level => 0 +</%ARGS> diff --git a/rt/html/Elements/MessageBox b/rt/html/Elements/MessageBox new file mode 100644 index 000000000..64fdf38b7 --- /dev/null +++ b/rt/html/Elements/MessageBox @@ -0,0 +1,47 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<TEXTAREA COLS=<%$Width%> ROWS=15 WRAP=HARD NAME="<%$Name%>"><& /Elements/Callback, %ARGS &><% $Default %><%$message%><%$signature%></TEXTAREA> +<%INIT> + +my ($message); + +if ($QuoteTransaction) { + my $transaction=RT::Transaction->new($session{'CurrentUser'}); + $transaction->Load($QuoteTransaction); + $message=$transaction->Content(Quote => 1); +} + +my $signature = ''; +if ($session{'CurrentUser'}->UserObj->Signature) { + $signature = "-- \n".$session{'CurrentUser'}->UserObj->Signature; +} + +</%INIT> +<%ARGS> +$QuoteTransaction => undef +$Name => 'Content' +$Default => '' +$Width => 72 +</%ARGS> + diff --git a/rt/html/Elements/MyRequests b/rt/html/Elements/MyRequests new file mode 100644 index 000000000..05ae62445 --- /dev/null +++ b/rt/html/Elements/MyRequests @@ -0,0 +1,78 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Elements/TitleBoxStart, title => loc("[_1] highest priority tickets I requested...", $rows), bodyclass=> '' &> +<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH=100%> +<TR> +<TH align=right><&|/l&>#</&></TH> +<TH align=left><&|/l&>Subject</&></TH> +<TH align=left><&|/l&>Queue</&></TH> +<TH align=left><&|/l&>Status</&></TH> +<TH align=left><&|/l&>Owner</&></TH> +</TR> +% my $i; +% while (my $Ticket = $MyTickets->Next) { +% $i++; +<TR class="<% $i%2 ? 'oddline' : 'evenline'%>" > +<TD ALIGN=RIGHT> +<%$Ticket->Id%> +</TD> +<TD> +<A HREF="<% $RT::WebPath %>/Ticket/Display.html?id=<%$Ticket->Id%>"> +<%$Ticket->Subject || loc('(no subject)')%> +</A> +</TD> +<TD> +<%$Ticket->QueueObj->Name%> +</TD> +<TD> +% if ($Ticket->HasUnresolvedDependencies ) { +% if ($Ticket->HasUnresolvedDependencies( Type => 'approval' )) { +<em><&|/l&>(pending approval)</&></em> +% } else { +<em><&|/l&>(pending other tickets)</&></em> +% } +% } else { +<%loc($Ticket->Status)%> +% } +</TD> +<TD> +<%$Ticket->OwnerObj->Name%> +</TD> +</TR> +% } +</TABLE> +<& /Elements/TitleBoxEnd &> + + +<%INIT> +my $rows = 10; +my $MyTickets; +$MyTickets = new RT::Tickets ($session{'CurrentUser'}); +$MyTickets->LimitWatcher(TYPE => 'Requestor', VALUE => $session{'CurrentUser'}->EmailAddress); +$MyTickets->LimitStatus(VALUE => "open"); +$MyTickets->LimitStatus(VALUE => "new"); +$MyTickets->RowsPerPage($rows); +$MyTickets->OrderBy(FIELD => 'Priority', ORDER => 'DESC'); + +</%INIT> diff --git a/rt/html/Elements/MyTickets b/rt/html/Elements/MyTickets new file mode 100644 index 000000000..6e2ddc6c3 --- /dev/null +++ b/rt/html/Elements/MyTickets @@ -0,0 +1,81 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Elements/TitleBoxStart, title => loc("[_1] highest priority tickets I own...", $rows), bodyclass=> '' &> +<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH=100%> +<TR> +<TH ALIGN=RIGHT><&|/l&>#</&></TH> +<TH ALIGN=LEFT><&|/l&>Subject</&></TH> +<TH ALIGN=LEFT><&|/l&>Queue</&></TH> +<TH ALIGN=LEFT><&|/l&>Status</&></TH> +<TH ALIGN=LEFT> </TH> +</TR> + <TR> +% my $i; +% while (my $Ticket = $MyTickets->Next) { +% next if $Ticket->HasUnresolvedDependencies( Type => 'approval' ); +% last if $i++ >= $rows; +<TR class="<% $i%2 ? 'oddline' : 'evenline'%>" > +<TD ALIGN=RIGHT> +<%$Ticket->Id%> +</TD> +<TD> +<A HREF="<% $RT::WebPath %>/Ticket/Display.html?id=<%$Ticket->Id%>"> +<%$Ticket->Subject || loc('(no subject)')%> +</A> +</TD> +<TD> +<%$Ticket->QueueObj->Name%> +</TD> +<TD> +% if ($Ticket->HasUnresolvedDependencies ) { +% if ($Ticket->HasUnresolvedDependencies( Type => 'approval' ) or +% $Ticket->HasUnresolvedDependencies( Type => 'code' )) { +<em><&|/l&>(pending approval)</&></em> +% } else { +<em><&|/l&>(pending other tickets)</&></em> +% } +% } else { +<%loc($Ticket->Status)%> +% } +</TD> +<TD ALIGN=RIGHT> +[<A HREF="<% $RT::WebPath %>/Ticket/Update.html?id=<%$Ticket->Id%>"><&|/l&>Update</&></A>] +</TD> +</TR> +% } +</TABLE> +<& /Elements/TitleBoxEnd &> + + +<%INIT> +my $rows = 10; +my $MyTickets; +$MyTickets = new RT::Tickets ($session{'CurrentUser'}); +$MyTickets->LimitOwner(VALUE => $session{'CurrentUser'}->Id); +$MyTickets->LimitStatus(VALUE => "open"); +$MyTickets->LimitStatus(VALUE => "new"); +$MyTickets->RowsPerPage($rows); +$MyTickets->OrderBy(FIELD => 'Priority', ORDER => 'DESC'); + +</%INIT> diff --git a/rt/html/Elements/PageLayout b/rt/html/Elements/PageLayout new file mode 100644 index 000000000..685317581 --- /dev/null +++ b/rt/html/Elements/PageLayout @@ -0,0 +1,99 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<table class="darkblue" border=0 cellspacing=0 cellpadding=0 width="100%"> + <th class="titlebox" align="left"><span class="rtname"><%$AppName%></span> + </th> + <span class="topactions"> +% foreach my $action (sort keys %{$topactions}) { + <td class="darkblueright"> + <%$topactions->{"$action"}->{'html'} |n %> + </td> +% } + </span> +</table> +<table border=0 cellspacing=0 cellpadding=0 width="100%" height="100%"> +%# Vertical menu +<TR height="100%"> +<TD valign="top" width="140" class="blue"> + <& /Elements/Menu, toptabs => $toptabs, current_toptab => $current_toptab &> +</TD> +<td valign="top"> +<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> +<tr> + <td class="blue" valign="top"> + <span class="title"><%$title%></span> +</td> +</tr> +<tr> +<td class="blueright" valign="top"> + <span class="nav"> +% if ($actions) { +% my @actions; +% foreach my $action (sort keys %{$actions}) { +% if ($actions->{"$action"}->{'html'}) { +% push @actions, $actions->{"$action"}->{'html'}; +% } else { +% push @actions, "<A class='nav' HREF=\"".$RT::WebPath."/".$actions->{$action}->{'path'}."\">".$actions->{$action}->{'title'}."</A>"; +% } +% } +<% join(" | ", @actions) | n %> +% if ($subactions) { +% my @actions; +% foreach my $action (sort keys %{$subactions}) { +% push @actions, $subactions->{"$action"}->{'html'}; +% } +<% join(" | ", @actions) | n %> +% } +% } + </span> + </td> +</tr> +<TR valign="top"> +<TD valign="top" width="100%" height="100%" class="mainbody" > + +<%INIT> + + foreach my $tab (sort keys %{$toptabs}) { + if ($toptabs->{$tab}->{'path'} eq $current_toptab) { + $toptabs->{$tab}->{"subtabs"} = $tabs; + $toptabs->{$tab}->{"current_subtab"} = $current_tab; + } + } + +if (! defined($AppName)) { + $AppName = loc("RT for [_1]", $RT::rtname); +} + +</%INIT> +<%ARGS> +$current_toptab => undef +$current_tab => undef +$toptabs => undef +$topactions => undef +$tabs => undef +$actions => undef +$subactions => undef +$title => $m->callers(-1)->path +$AppName => undef +</%ARGS> diff --git a/rt/html/Elements/Quicksearch b/rt/html/Elements/Quicksearch new file mode 100644 index 000000000..b1a67ab29 --- /dev/null +++ b/rt/html/Elements/Quicksearch @@ -0,0 +1,61 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Elements/TitleBoxStart, title => loc("Quick search"), bodyclass => "" &> + +<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH=100%> +<tr> + <th align=left><&|/l&>Queue</&></th> + <th align=right><font size=-1><&|/l&>New</&></font></th> + <th align=right><font size=-1><&|/l&>Open</&></font></th> +</tr> + +<%PERL> +my $i; +while (my $queue = $Queues->Next) { + $Tickets->ClearRestrictions; + $Tickets->LimitStatus(VALUE => "open"); + $Tickets->LimitQueue(VALUE => $queue->Name, OPERATOR => '='); + my $open = $Tickets->Count(); + + $Tickets->ClearRestrictions; + $Tickets->LimitStatus(VALUE => "new"); + $Tickets->LimitQueue(VALUE => $queue->Name, OPERATOR => '='); + my $new = $Tickets->Count(); + +</%PERL> +% $i++; +<TR class="<% $i%2 ? 'oddline' : 'evenline'%>" > +<td><A HREF="<% $RT::WebPath%>/Search/Listing.html?ValueOfStatus=open&ValueOfStatus=new&StatusOp=%3D&QueueOp=%3D&ValueOfQueue=<%$queue->Id%>&RowsPerPage=50&NewSearch=1" TITLE="<% $queue->Description %>"><%$queue->Name%></a></TD> +<td align="right"><A HREF="<% $RT::WebPath%>/Search/Listing.html?ValueOfStatus=new&StatusOp=%3D&QueueOp=%3D&ValueOfQueue=<%$queue->Id%>&RowsPerPage=50&NewSearch=1"><%$new%></a></TD> +<td align="right"><A HREF="<% $RT::WebPath%>/Search/Listing.html?ValueOfStatus=open&StatusOp=%3D&QueueOp=%3D&ValueOfQueue=<%$queue->Id%>&RowsPerPage=50&NewSearch=1"><%$open%></a></TD> +</TR> +% } +</TABLE> +<& /Elements/TitleBoxEnd &> + +<%INIT> +my $Queues = RT::Queues->new($session{'CurrentUser'}); +$Queues->UnLimit(); +my $Tickets = RT::Tickets->new($session{'CurrentUser'}); +</%INIT> diff --git a/rt/html/Elements/Refresh b/rt/html/Elements/Refresh new file mode 100644 index 000000000..2b5376fee --- /dev/null +++ b/rt/html/Elements/Refresh @@ -0,0 +1,45 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<SELECT NAME="<%$Name%>"> +<OPTION VALUE="-1" +%unless ($Default) { + SELECTED +%} +><&|/l&>Don't refresh this page.</&></OPTION> +%foreach my $value (@refreshevery) { +<OPTION VALUE="<%$value%>" +% if ($value == $Default) { +SELECTED +% } +><&|/l, $value/60 &>Refresh this page every [_1] minutes.</&></OPTION> +%} +</SELECT> + +<%INIT> +my @refreshevery = qw(120 300 600 1200 3600 7200); +</%INIT> +<%ARGS> +$Name => undef +$Default => 0 +</%ARGS> diff --git a/rt/html/Elements/Section b/rt/html/Elements/Section new file mode 100644 index 000000000..691235846 --- /dev/null +++ b/rt/html/Elements/Section @@ -0,0 +1,34 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<TABLE WIDTH=100%> +<TR> +<TD> +<font size=+4><%$title%></font> +</TD> +</TR> +</TABLE> + +<%ARGS> +$title => undef +</%ARGS> diff --git a/rt/html/Elements/SelectAttachmentField b/rt/html/Elements/SelectAttachmentField new file mode 100644 index 000000000..47bc53211 --- /dev/null +++ b/rt/html/Elements/SelectAttachmentField @@ -0,0 +1,31 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<SELECT NAME="<%$Name%>"> +<OPTION VALUE="Content"><&|/l&>content</&></OPTION> +<OPTION VALUE="ContentType"><&|/l&>content-type</&></OPTION> +<OPTION VALUE="Filename"><&|/l&>filename</&></OPTION> +</SELECT> +<%ARGS> +$Name => 'AttachmentField' +</%ARGS> diff --git a/rt/html/Elements/SelectBoolean b/rt/html/Elements/SelectBoolean new file mode 100644 index 000000000..8cf60dc33 --- /dev/null +++ b/rt/html/Elements/SelectBoolean @@ -0,0 +1,46 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<SELECT NAME ="<%$Name%>"> +<OPTION VALUE="<%$TrueVal%>" <%$TrueDefault%>><%$True%></OPTION> +<OPTION VALUE="<%$FalseVal%>" <%$FalseDefault%>><%$False%></OPTION> +</SELECT> + +<%ARGS> +$Name => undef +$True => loc("is") +$Default => 'true' +$TrueVal => 1 +$FalseVal => 0 +$False => loc("isn't") +</%ARGS> + +<%INIT> +my ($TrueDefault, $FalseDefault); +if ($Default && $Default !~ /true/i) { + $FalseDefault = "SELECTED"; +} +else { + $TrueDefault = "SELECTED"; +} +</%INIT> diff --git a/rt/html/Elements/SelectCustomFieldOperator b/rt/html/Elements/SelectCustomFieldOperator new file mode 100644 index 000000000..e886cbe37 --- /dev/null +++ b/rt/html/Elements/SelectCustomFieldOperator @@ -0,0 +1,40 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<SELECT NAME ="<%$Name%>"> +% while (my $option = shift @Options) { +% my $value = shift @Values; +<OPTION VALUE="<%$value%>" +% if ($Default eq $value) { +SELECTED +% } +><%$option%></OPTION> +% } +</SELECT> + +<%ARGS> +$Name => undef +@Options => ( loc('contains'), loc("doesn't contain"), loc('is'), loc("isn't"), loc('less than'), loc('greater than')) +@Values => ('LIKE', 'NOT LIKE', '=', '!=', '<', '>') +$Default => undef +</%ARGS> diff --git a/rt/html/Elements/SelectCustomFieldValue b/rt/html/Elements/SelectCustomFieldValue new file mode 100644 index 000000000..60f65bcf2 --- /dev/null +++ b/rt/html/Elements/SelectCustomFieldValue @@ -0,0 +1,41 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Elements/Callback, %ARGS &> +% if ($CustomField->Type =~ /Select/i) { +% my $values = $CustomField->Values; +<select name="<%$Name%>"> +<option value="" SELECTED>-</option> +<option value="null"><&|/l&>(no value)</&></option> +% while (my $value = $values->Next) { +<option value="<%$value->Name%>"><%$value->Name%></option> +% } +</select> +% } +% else { +<input name="<%$Name%>" size="20"> +% } +<%args> +$Name => undef +$CustomField =>undef +</%args> diff --git a/rt/html/Elements/SelectDate b/rt/html/Elements/SelectDate new file mode 100644 index 000000000..5f169fc0a --- /dev/null +++ b/rt/html/Elements/SelectDate @@ -0,0 +1,48 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<INPUT NAME="<%$Name%>" VALUE="<%$Default%>" size=16> + +<%init> +unless ((defined $Default) or + ($current <= 0)) { + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = + localtime($current); + $Default = sprintf("%04d-%02d-%02d %02d:%02d", + $year+1900,$mon+1,$mday, + $hour,$min); +} + +unless ($Name) { + $Name = $menu_prefix. "_Date"; +} +</%init> + +<%args> + +$ShowTime => undef +$menu_prefix=>'' +$current=>time +$Default => undef +$Name => undef +</%args> diff --git a/rt/html/Elements/SelectDateRelation b/rt/html/Elements/SelectDateRelation new file mode 100644 index 000000000..ee26efeaa --- /dev/null +++ b/rt/html/Elements/SelectDateRelation @@ -0,0 +1,36 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<SELECT NAME ="<%$Name%>"> +<OPTION VALUE="<"><%$Before%></OPTION> +<OPTION VALUE="="><%$On%></OPTION> +<OPTION VALUE=">"><%$After%></OPTION> +</SELECT> + +<%ARGS> +$Name => undef +$Default => undef +$Before => loc('Before') +$On => loc('On') +$After => loc('After') +</%ARGS> diff --git a/rt/html/Elements/SelectDateType b/rt/html/Elements/SelectDateType new file mode 100644 index 000000000..afb9a70e9 --- /dev/null +++ b/rt/html/Elements/SelectDateType @@ -0,0 +1,36 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<SELECT NAME="<%$Name%>"> +<OPTION VALUE="Created"><&|/l&>Created</&></OPTION> +<OPTION VALUE="Started"><&|/l&>Started</&></OPTION> +<OPTION VALUE="Resolved"><&|/l&>Resolved</&></OPTION> +<OPTION VALUE="Told"><&|/l&>Last Contacted</&></OPTION> +<OPTION VALUE="LastUpdated"><&|/l&>Last Updated</&></OPTION> +<OPTION VALUE="Starts"><&|/l&>Starts</&></OPTION> +<OPTION VALUE="Due"><&|/l&>Due</&></OPTION> +<OPTION VALUE="Updated"><&|/l&>Updated</&></OPTION> +</SELECT> +<%ARGS> +$Name => 'DateType' +</%ARGS> diff --git a/rt/html/Elements/SelectEqualityOperator b/rt/html/Elements/SelectEqualityOperator new file mode 100644 index 000000000..99c60d554 --- /dev/null +++ b/rt/html/Elements/SelectEqualityOperator @@ -0,0 +1,40 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<SELECT NAME ="<%$Name%>"> +% while (my $option = shift @Options) { +% my $value = shift @Values; +<OPTION VALUE="<%$value%>" +% if ($Default eq $value) { +SELECTED +% } +><%$option%></OPTION> +% } +</SELECT> + +<%ARGS> +$Name => undef +@Options => (loc('less than'), loc('equal to'), loc('greater than'), loc('not equal to')) +@Values => qw(< = > !=) +$Default => undef +</%ARGS> diff --git a/rt/html/Elements/SelectGroups b/rt/html/Elements/SelectGroups new file mode 100644 index 000000000..8f33c1eb3 --- /dev/null +++ b/rt/html/Elements/SelectGroups @@ -0,0 +1,29 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<select name="GroupField"> +<option value="Name"><&|/l&>Name</&> +<option value="Description"><&|/l&>Description</&> +</select> +<& /Elements/SelectMatch, Name=> 'GroupOp' &> +<input size=8 name="GroupString"> diff --git a/rt/html/Elements/SelectLinkType b/rt/html/Elements/SelectLinkType new file mode 100644 index 000000000..9ebefda14 --- /dev/null +++ b/rt/html/Elements/SelectLinkType @@ -0,0 +1,37 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<SELECT NAME ="<%$Name%>"> +<OPTION VALUE="MemberOf"><&|/l&>Member of</&></OPTION> +<OPTION VALUE="DependsOn"><&|/l&>Depends on</&></OPTION> +<OPTION VALUE="RefersTo"><&|/l&>Refers to</&></OPTION> +</SELECT> + +<%ARGS> +$Name => "LinkType" +$Default => undef +</%ARGS> + +<%INIT> +# TODO handle Default +</%INIT> diff --git a/rt/html/Elements/SelectMatch b/rt/html/Elements/SelectMatch new file mode 100644 index 000000000..d58a9633a --- /dev/null +++ b/rt/html/Elements/SelectMatch @@ -0,0 +1,53 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<SELECT NAME ="<%$Name%>"> +<OPTION VALUE="LIKE" <%$LikeDefault%>><%$Like%></OPTION> +<OPTION VALUE="NOT LIKE" <%$NotLikeDefault%>><%$NotLike%></OPTION> +<OPTION VALUE="=" <%$TrueDefault%>><%$True%></OPTION> +<OPTION VALUE="!=" <%$FalseDefault%>><%$False%></OPTION> +</SELECT> + +<%ARGS> +$Name => undef +$Like => loc('contains') +$NotLike => loc("doesn't contain") +$True => loc('is') +$False => loc("isn't") +$Default => undef +</%ARGS> +<%INIT> +my ($TrueDefault, $FalseDefault, $LikeDefault, $NotLikeDefault); +if ($Default && $Default !~ /true/i) { + $FalseDefault = "SELECTED"; +} +elsif ($Default && $Default !~ /false/i) { + $TrueDefault = "SELECTED"; +} +elsif ($Default && $Default !~ /notlike/i) { + $NotLikeDefault = "SELECTED"; +} +else { + $LikeDefault = "SELECTED"; +} +</%INIT> diff --git a/rt/html/Elements/SelectNewTicketQueue b/rt/html/Elements/SelectNewTicketQueue new file mode 100644 index 000000000..a629b7bca --- /dev/null +++ b/rt/html/Elements/SelectNewTicketQueue @@ -0,0 +1,56 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<LABEL ACCESSKEY="9"> +<SELECT NAME ="<%$Name%>"> +% foreach my $queue (@{$session{'create_in_queues'}}) { +<OPTION VALUE="<%$queue->{'id'}%>" <%($Default && ($queue->{'id'} == $Default)) && 'SELECTED'%>><%$queue->{'Name'}%> +% if (($Verbose) and ($queue->{'Description'}) ){ +(<%$queue->{'Description'}%>) +% } +</OPTION> +% } +</SELECT> +</LABEL> + +<%INIT> +unless ($session{'create_in_queues'}) { + +@{$session{'create_in_queues'}} = (); +my $q=new RT::Queues($session{'CurrentUser'}); +$q->UnLimit; +while (my $queue=$q->Next) { + if ($queue->CurrentUserHasRight('CreateTicket')) { + my $ds = { Name => $queue->Name, Description => $queue->Description, id => $queue->id }; + push (@{$session{'create_in_queues'}}, $ds); + } +} +} +</%INIT> + + +<%ARGS> +$Name => 'Queue' +$Verbose => undef +$Default => undef +</%ARGS> diff --git a/rt/html/Elements/SelectOwner b/rt/html/Elements/SelectOwner new file mode 100644 index 000000000..04b078d20 --- /dev/null +++ b/rt/html/Elements/SelectOwner @@ -0,0 +1,59 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<SELECT NAME="<%$Name%>"> +<OPTION VALUE="">-</OPTION> +<OPTION <% ($RT::Nobody->Id() == $Default) && "SELECTED" %> VALUE="<%$RT::Nobody->Id%>"><%$RT::Nobody->Name%></OPTION> +%while ( my $User = $Users->Next()) { +<OPTION VALUE="<%$User->Id()%>" <% ($User->Id() == $Default) && "SELECTED" %>><%$User->Name()%></OPTION> +%} +</SELECT> + +<%INIT> +my $Users = RT::Users->new($session{CurrentUser}); +my $object; + + +if ($TicketObj) { + $object = $TicketObj; +} +elsif ($QueueObj) { + $object = $QueueObj; +} +if ($object) { + $Users->WhoHaveRight(Right => 'OwnTicket', + Object => $object, + IncludeSystemRights => 1, + IncludeSuperusers => 1); +} else { + $Users->LimitToPrivileged; +} +</%INIT> + +<%ARGS> +$QueueObj => undef +$Name => undef +$Default => undef +$User => undef +$TicketObj => undef +</%ARGS> diff --git a/rt/html/Elements/SelectQueue b/rt/html/Elements/SelectQueue new file mode 100644 index 000000000..c45b9b532 --- /dev/null +++ b/rt/html/Elements/SelectQueue @@ -0,0 +1,59 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +% if ($Lite) { +<INPUT NAME="<%$Name%>" size=25 DEFAULT="<%$d->Name%>"> +% } else { +<SELECT NAME ="<%$Name%>"> +% if ($ShowNullOption) { +<OPTION VALUE="">-</OPTION> +% } +% while (my $queue=$q->Next) { +% if ($ShowAllQueues || $queue->CurrentUserHasRight('CreateTicket')) { +<OPTION VALUE="<%$queue->Id%>" <%($Default && ($queue->Id == $Default)) && 'SELECTED'%>><%$queue->Name%> +% if (($Verbose) and ($queue->Description) ){ +(<%$queue->Description%>) +% } +</OPTION> +% } +% } +</SELECT> +% } +<%ARGS> +$ShowNullOption => 1 +$ShowAllQueues => 1 +$Name => undef +$Verbose => undef +$Default => 0 +$Lite => 0 +</%ARGS> + +<%INIT> + +my $q=new RT::Queues($session{'CurrentUser'}); +$q->UnLimit; + +my $d = new RT::Queue($session{'CurrentUser'}); +$d->Load($Default); + +</%INIT> diff --git a/rt/html/Elements/SelectResultsPerPage b/rt/html/Elements/SelectResultsPerPage new file mode 100644 index 000000000..1bde71306 --- /dev/null +++ b/rt/html/Elements/SelectResultsPerPage @@ -0,0 +1,43 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +%# TODO: Better default handling + +<SELECT NAME ="<%$Name%>"> +% foreach my $value (@values) { +<OPTION VALUE="<%$value%>" <% $value == $Default && 'SELECTED' %>> +<% shift @labels %> +</OPTION> +% } +</SELECT> + +<%INIT> +my @values = qw(0 10 25 50 100); +my @labels = (loc('Unlimited'), qw(10 25 50 100)); +</%INIT> +<%ARGS> + +$Name => undef +$Default => 50 + +</%ARGS> diff --git a/rt/html/Elements/SelectSortOrder b/rt/html/Elements/SelectSortOrder new file mode 100644 index 000000000..0ad999a7a --- /dev/null +++ b/rt/html/Elements/SelectSortOrder @@ -0,0 +1,41 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<SELECT NAME="<%$Name%>"> +%foreach my $order (@orders) { +<OPTION VALUE="<%$order%>" <%$order eq $Default && 'SELECTED' %>> +<% shift @order_names %> +</OPTION> +% } +</SELECT> + +<%INIT> +my @orders = qw (ASC DESC); +my @order_names = (loc('Ascending'), loc('Descending')); + +</%INIT> + +<%ARGS> +$Name => 'SortOrder' +$Default => 'ASC' +</%ARGS> diff --git a/rt/html/Elements/SelectStatus b/rt/html/Elements/SelectStatus new file mode 100644 index 000000000..2c1ffad39 --- /dev/null +++ b/rt/html/Elements/SelectStatus @@ -0,0 +1,37 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<SELECT NAME ="<%$Name%>"> +<OPTION VALUE="">-</OPTION> +%foreach my $status (@status) { +<OPTION VALUE="<%$status%>" <%($Default eq $status) && 'SELECTED'%>><%loc($status)%></OPTION> +% } +</SELECT> +<%ONCE> +my $queue = new RT::Queue($session{'CurrentUser'}); +my @status = $queue->StatusArray(); +</%ONCE> +<%ARGS> +$Name => undef +$Default => undef +</%ARGS> diff --git a/rt/html/Elements/SelectTicketSortBy b/rt/html/Elements/SelectTicketSortBy new file mode 100644 index 000000000..1d0b3942a --- /dev/null +++ b/rt/html/Elements/SelectTicketSortBy @@ -0,0 +1,38 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<SELECT NAME="<%$Name%>"> +% foreach my $field (@sortfields) { +<OPTION VALUE="<%$field%>" <% $field eq $Default && 'SELECTED'%>><% loc($field) %></OPTION> +% } +</SELECT> + +<%INIT> +my $tickets = new RT::Tickets($session{'CurrentUser'}); +my @sortfields = $tickets->SortFields(); + +</%INIT> +<%ARGS> +$Name => 'SortTicketsBy' +$Default => 'id' +</%ARGS> diff --git a/rt/html/Elements/SelectTicketTypes b/rt/html/Elements/SelectTicketTypes new file mode 100644 index 000000000..80aecac67 --- /dev/null +++ b/rt/html/Elements/SelectTicketTypes @@ -0,0 +1,34 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<SELECT NAME="<%$Name%>"> +%foreach (@Types) { +<OPTION VALUE="<% $_ %>" <% ($_ eq $Default) && "SELECTED" %>><&|/l&><% $_ %></&> +%} +</SELECT> + +<%ARGS> +$Name => 'TickType' +$Default => undef +@Types => qw(Approval Ticket) +</%ARGS> diff --git a/rt/html/Elements/SelectUsers b/rt/html/Elements/SelectUsers new file mode 100644 index 000000000..7ed3835b6 --- /dev/null +++ b/rt/html/Elements/SelectUsers @@ -0,0 +1,31 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<select name="UserField"> +<option value="Name"><&|/l&>User Id</&> +<option value="EmailAddress"><&|/l&>Email</&> +<option value="RealName"><&|/l&>Name</&> +<option value="Organization"><&|/l&>Organization</&> +</select> +<& /Elements/SelectMatch, Name=> 'UserOp' &> +<input size=8 name="UserString"> diff --git a/rt/html/Elements/SelectWatcherType b/rt/html/Elements/SelectWatcherType new file mode 100644 index 000000000..26de8f7b9 --- /dev/null +++ b/rt/html/Elements/SelectWatcherType @@ -0,0 +1,44 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<SELECT NAME ="<%$Name%>"> +<OPTION VALUE="">-</OPTION> +%for my $option (@types) { +<OPTION VALUE="<%$option%>" <%$option eq $Default && "SELECTED"%>><%loc($option)%></OPTION> +%} +</SELECT> + +<%INIT> +my @types; +if ($Scope =~ 'queue') { + @types = qw(Cc AdminCc); +} +else { + @types = qw(Requestor Cc AdminCc); +} +</%INIT> +<%ARGS> +$Default=>undef +$Scope => 'ticket' +$Name => 'WatcherType' +</%ARGS> diff --git a/rt/html/Elements/SetupSessionCookie b/rt/html/Elements/SetupSessionCookie new file mode 100644 index 000000000..4d728ce70 --- /dev/null +++ b/rt/html/Elements/SetupSessionCookie @@ -0,0 +1,77 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<%init> +my %cookies = CGI::Cookie->fetch(); +my %backends = ( + mysql => 'Apache::Session::MySQL', + Pg => 'Apache::Session::Postgres', + Oracle => 'Apache::Session::Oracle', +) unless $RT::WebSessionClass; +my $session_class = $RT::WebSessionClass || $backends{$RT::DatabaseType} || 'Apache::Session::File'; +my $pm = "$session_class.pm"; $pm =~ s|::|/|g; require $pm; + + eval { + tie %session, $session_class, + $SessionCookie || ( $cookies{'RT_SID'} ? $cookies{'RT_SID'}->value() : undef ), + $backends{$RT::DatabaseType} ? { + Handle => $RT::Handle->dbh, + LockHandle => $RT::Handle->dbh, + } : { + Directory => $RT::MasonSessionDir, + LockDirectory => $RT::MasonSessionDir, + }; + }; + if ($@) { + + # If the session is invalid, create a new session. + if ( $@ =~ /Object does not/i ) { + tie %session, $session_class, undef, + $backends{$RT::DatabaseType} ? { + Handle => $RT::Handle->dbh, + LockHandle => $RT::Handle->dbh, + } : { + Directory => $RT::MasonSessionDir, + LockDirectory => $RT::MasonSessionDir, + }; + undef $cookies{'RT_SID'}; + } + else { + die "RT Couldn't write to session directory '$RT::MasonSessionDir': $@. Check that this dir ectory's permissions are correct."; + } + } + + if ( !$cookies{'RT_SID'} ) { + my $cookie = new CGI::Cookie( + -name => 'RT_SID', + -value => $session{_session_id}, + -path => '/', + ); + $r->header_out('Set-Cookie', $cookie->as_string); + + } + return(); +</%init> +<%args> +$SessionCookie => '' +</%args> diff --git a/rt/html/Elements/ShadedBox b/rt/html/Elements/ShadedBox new file mode 100644 index 000000000..36b9cae7c --- /dev/null +++ b/rt/html/Elements/ShadedBox @@ -0,0 +1,33 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<table> + <tr> + <td class="label"><%$title |n %>:</td> + <td class="value"><%$content |n %></td> + </tr> +</table> +<%ARGS> +$title => undef +$content => " " +</%ARGS> diff --git a/rt/html/Elements/ShadedInputRow b/rt/html/Elements/ShadedInputRow new file mode 100644 index 000000000..e9fb69e5f --- /dev/null +++ b/rt/html/Elements/ShadedInputRow @@ -0,0 +1,35 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<tr> + <td class="label"><%$title |n %>:</td> + <td class="value"> + <input name=<%$name%> value="<%$content|h%>" SIZE=<%$size%>> + </td> +</tr> +<%ARGS> +$title => undef +$content => " " +$name => undef +$size => undef +</%ARGS> diff --git a/rt/html/Elements/ShadedRow b/rt/html/Elements/ShadedRow new file mode 100644 index 000000000..8947fcd82 --- /dev/null +++ b/rt/html/Elements/ShadedRow @@ -0,0 +1,31 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<tr> + <td class="label"><%$title |n %>:</td> + <td class="value"><%$content |n %></td> +</tr> +<%ARGS> +$title => undef +$content => " " +</%ARGS> diff --git a/rt/html/Elements/SimpleSearch b/rt/html/Elements/SimpleSearch new file mode 100644 index 000000000..69541f801 --- /dev/null +++ b/rt/html/Elements/SimpleSearch @@ -0,0 +1,27 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<form action="<% $RT::WebPath %>/index.html"> +<input size="12" name="q" accesskey="0"> +<input type="submit" value="<&|/l&>Search</&>"> +</form> diff --git a/rt/html/Elements/Submit b/rt/html/Elements/Submit new file mode 100644 index 000000000..2c35ca0f4 --- /dev/null +++ b/rt/html/Elements/Submit @@ -0,0 +1,62 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<TABLE WIDTH=100% BGCOLOR="<%$color%>" CELLSPACING=0 BORDER=0 CELLPADDING=0 > +<TR> +% if ($Reset) { +<TD> +<FONT COLOR=#ffd800 > +<INPUT TYPE=RESET VALUE="<%$ResetLabel%>"> +</FONT> +</TD> +%} +<TD> + +</TD> +<TD ALIGN=RIGHT VALIGN=CENTER><FONT COLOR=#ffd800> +% if ($AlternateLabel) { +<B><%$AlternateCaption%> +<INPUT TYPE=SUBMIT +%if ($Name) { +NAME="<%$Name%>" +%} +VALUE='<%$AlternateLabel%>'></B> +% } +<B><%$Caption%> <INPUT TYPE=SUBMIT +%if ($Name) { +NAME="<%$Name%>" +% } + VALUE='<%$Label%>'></B></FONT> +</TD> +</TR> +</TABLE> +<%ARGS> +$color => "#336699" +$Caption => undef +$AlternateCaption => undef +$AlternateLabel => undef +$Label => loc('Submit') +$Name => undef +$Reset => undef +$ResetLabel => loc('Reset') +</%ARGS> diff --git a/rt/html/Elements/Tabs b/rt/html/Elements/Tabs new file mode 100644 index 000000000..4db3849c6 --- /dev/null +++ b/rt/html/Elements/Tabs @@ -0,0 +1,82 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Elements/PageLayout, + current_toptab => $current_toptab, + current_tab => $current_tab, + toptabs => $toptabs, + topactions => $topactions, + tabs => $tabs, + actions => $actions, + subactions => $subactions, + title => $Title +&> +<a name="skipnav" id="skipnav" accesskey="8"></a> +<%INIT> +my $action; +my $basetopactions = { + A => { html => $m->scomp('/Elements/CreateTicket') + }, + B => { html => $m->scomp('/Elements/SimpleSearch') + } + }; +my $basetabs = { A => { title => loc('Homepage'), + path => '', + }, + B => { title => loc('Tickets'), + path => 'Search/Listing.html' + }, + E => { title => loc('Configuration'), + path => 'Admin/' + }, + K => { title => loc('Preferences'), + path => 'User/Prefs.html' + }, + P => { title => loc('Approval'), + path => 'Approvals/' + }, + }; + +if (!defined $toptabs) { + $toptabs = $basetabs; +} +if (!defined $topactions) { + $topactions = $basetopactions; +} + + # Now let callbacks add their extra tabs + $m->comp('/Elements/Callback', + topactions => $topactions, + toptabs => $toptabs, %ARGS); + +</%INIT> +<%ARGS> +$current_toptab => undef +$current_tab => undef +$toptabs => undef +$topactions => undef +$tabs => undef +$actions => undef +$subactions => undef +$Title => undef +</%ARGS> diff --git a/rt/html/Elements/TitleBoxEnd b/rt/html/Elements/TitleBoxEnd new file mode 100644 index 000000000..37f374466 --- /dev/null +++ b/rt/html/Elements/TitleBoxEnd @@ -0,0 +1,31 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK + </TD> + </TR> +</TABLE> +<%ARGS> +$title => undef +$content => undef +</%ARGS> + diff --git a/rt/html/Elements/TitleBoxStart b/rt/html/Elements/TitleBoxStart new file mode 100644 index 000000000..02c76a75e --- /dev/null +++ b/rt/html/Elements/TitleBoxStart @@ -0,0 +1,60 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<TABLE CLASS="<%$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="titleboxtitle"> + <b> + <% $title_href && "<A CLASS=\"$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> + <td bgcolor="<%$contentbg%>" colspan="2" class="<%defined($bodyclass) ? $bodyclass : $class|n%>"> +<%ARGS> +$width => "100%" +$class => undef +$bodyclass => undef +$title_href => undef +$title => undef +$title_class => undef + +$titleright_href => undef +$titleright => undef +$contentbg => "#dddddd" +$color => "#336699" +</%ARGS> diff --git a/rt/html/Elements/ViewUser b/rt/html/Elements/ViewUser new file mode 100644 index 000000000..657272496 --- /dev/null +++ b/rt/html/Elements/ViewUser @@ -0,0 +1,51 @@ +%# BEGIN LICENSE BLOCK +%# +%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com> +%# +%# (Except where explictly superceded by other copyright notices) +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# Unless otherwise specified, all modifications, corrections or +%# extensions to this work which alter its source code become the +%# property of Best Practical Solutions, LLC when submitted for +%# inclusion in the work. +%# +%# +%# END LICENSE BLOCK +<& /Elements/TitleBoxStart, + title => "<a class='inverse' href=\"$RT::WebPath/Search/Listing.html?LimitRequestorById=1&IdOfRequestor=".$User->id."\">".loc("Tickets from [_1]", $name)."</a>", + titleright=> "<a class='inverse' href=\"$RT::WebPath/EditUserComments.html?id=".$User->id."\">".loc("Comments about [_1]", $name)."</a>" &> +<TABLE WIDTH="100%"> +<tr> +<td halign=left valign=top> +%while (my $w=$tickets->Next) { +<%$w->Id%>: <a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$w->id%>"><%$w->Subject%></a> (<%$w->Status%>)<BR> +%} +</td> +<td align=right valign=top> + <% ($User->Comments || loc("No comment entered about this user")) %> +</tr> +</table> +<& /Elements/TitleBoxEnd &> + +<%ARGS> +$User=>undef +</%ARGS> + +<%INIT> +my $name=$User->RealName || $User->EmailAddress; + +my $tickets = new RT::Tickets($session{'CurrentUser'}); +$tickets->LimitWatcher(TYPE => 'Requestor', VALUE => $User->EmailAddress); + + +</%INIT> |