diff options
author | ivan <ivan> | 2008-03-02 04:11:51 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-03-02 04:11:51 +0000 |
commit | c648976f0b7975f2328ebd7ba8c711fad0ca4195 (patch) | |
tree | f3d176ec300a46c253ba25a988b897bce02fe174 /rt/html/Ticket/Elements | |
parent | 5e05724a635a22776f1b973f5d7e77989da4e048 (diff) | |
parent | 8103c1fc1b2c27a6855feadf26f91b980a54bc52 (diff) |
This commit was generated by cvs2svn to compensate for changes in r6255,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'rt/html/Ticket/Elements')
26 files changed, 443 insertions, 334 deletions
diff --git a/rt/html/Ticket/Elements/AddWatchers b/rt/html/Ticket/Elements/AddWatchers index 98314b9d2..891ff95b5 100644 --- a/rt/html/Ticket/Elements/AddWatchers +++ b/rt/html/Ticket/Elements/AddWatchers @@ -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,10 +45,10 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<BR> -<%$msg%><br> +<br /> +<%$msg%><br /> -<&|/l&>Add new watchers</&>:<br> +<&|/l&>Add new watchers</&>:<br /> <table> % if ($Users and $Users->Count) { @@ -79,17 +81,17 @@ <tr><td> <&/Elements/SelectWatcherType, Name => "WatcherTypeEmail1" &> </td><td> -<input name="WatcherAddressEmail1" size=15> +<input name="WatcherAddressEmail1" size="15" /> </td></tr> <tr><td> <&/Elements/SelectWatcherType, Name => "WatcherTypeEmail2" &> </td><td> -<input name="WatcherAddressEmail2" size=15> +<input name="WatcherAddressEmail2" size="15" /> </td></tr> <tr><td> <&/Elements/SelectWatcherType, Name => "WatcherTypeEmail3" &> </td><td> -<input name="WatcherAddressEmail3" size=15> +<input name="WatcherAddressEmail3" size="15" /> </td></tr> </table> diff --git a/rt/html/Ticket/Elements/BulkLinks b/rt/html/Ticket/Elements/BulkLinks index 6a3859aa3..e449b18d8 100644 --- a/rt/html/Ticket/Elements/BulkLinks +++ b/rt/html/Ticket/Elements/BulkLinks @@ -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,33 +45,33 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<TABLE> - <TR> - <TD class="label"><&|/l&>Merge into</&>:</TD> - <TD class="entry"><input name="Ticket-MergeInto"> <i><&|/l&>(only one ticket)</&></i></TD> - </TR> - <TR> - <TD class="label"><&|/l&>Depends on</&>:</TD> - <TD class="entry"><input name="Ticket-DependsOn"></TD> - </TR> - <TR> - <TD class="label"><&|/l&>Depended on by</&>:</TD> - <TD class="entry"><input name="DependsOn-Ticket"></TD> - </TR> - <TR> - <TD class="label"><&|/l&>Parents</&>:</TD> - <TD class="entry"><input name="Ticket-MemberOf"></TD> - </TR> - <TR> - <TD class="label"><&|/l&>Children</&>:</TD> - <TD class="entry"> <input name="MemberOf-Ticket"></TD> - </TR> - <TR> - <TD class="label"><&|/l&>Refers to</&>:</TD> - <TD class="entry"><input name="Ticket-RefersTo"></TD> - </TR> - <TR> - <TD class="label"><&|/l&>Referred to by</&>:</TD> - <TD class="entry"> <input name="RefersTo-Ticket"></TD> - </TR> -</TABLE> +<table> + <tr> + <td class="label"><&|/l&>Merge into</&>:</td> + <td class="entry"><input name="Ticket-MergeInto" /> <i><&|/l&>(only one ticket)</&></i></td> + </tr> + <tr> + <td class="label"><&|/l&>Depends on</&>:</td> + <td class="entry"><input name="Ticket-DependsOn" /></td> + </tr> + <tr> + <td class="label"><&|/l&>Depended on by</&>:</td> + <td class="entry"><input name="DependsOn-Ticket" /></td> + </tr> + <tr> + <td class="label"><&|/l&>Parents</&>:</td> + <td class="entry"><input name="Ticket-MemberOf" /></td> + </tr> + <tr> + <td class="label"><&|/l&>Children</&>:</td> + <td class="entry"> <input name="MemberOf-Ticket" /></td> + </tr> + <tr> + <td class="label"><&|/l&>Refers to</&>:</td> + <td class="entry"><input name="Ticket-RefersTo" /></td> + </tr> + <tr> + <td class="label"><&|/l&>Referred to by</&>:</td> + <td class="entry"> <input name="RefersTo-Ticket" /></td> + </tr> +</table> diff --git a/rt/html/Ticket/Elements/EditBasics b/rt/html/Ticket/Elements/EditBasics index 715685153..d68fe6522 100644 --- a/rt/html/Ticket/Elements/EditBasics +++ b/rt/html/Ticket/Elements/EditBasics @@ -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,44 +45,65 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<TABLE> - <TR> +<table> + <tr> <td class="label"><&|/l&>Subject</&>:</td> - <td class="value"><input name=Subject value="<%$TicketObj->Subject|h%>" SIZE=50></td> - </TR> + <td class="value"><input name="Subject" value="<%$TicketObj->Subject|h%>" size="50" /></td> + </tr> - <TR> + <tr> <td class="label"><&|/l&>Status</&>:</td> <td class="value"><%$SelectStatus|n%></td> - </TR> - <TR> + </tr> + <tr> <td class="label"><&|/l&>Queue</&>:</td> <td class="value"><%$SelectQueue|n%></td> - </TR> - <TR> + </tr> + <tr> + <td class="label"><&|/l&>Owner</&>:</td> + <td class="value"><& /Elements/SelectOwner, + Name => 'Owner', + QueueObj => $TicketObj->QueueObj, + TicketObj => $TicketObj, + Default => $TicketObj->OwnerObj->Id, + DefaultValue => 0, + &></td> + </tr> + + <tr> <td class="label"><&|/l&>Time Estimated</&>:</td> - <td class="value"><input name=TimeEstimated value="<%$TicketObj->TimeEstimated|h%>" SIZE="5"></td> - </TR> - <TR> + <td class="value"><input name="TimeEstimated" value="<%$TicketObj->TimeEstimated|h%>" size="5" /> + <& /Elements/SelectTimeUnits, Name =>'TimeEstimated' &> +</td> + </tr> + <tr> <td class="label"><&|/l&>Time Worked</&>:</td> - <td class="value"><input name=TimeWorked value="<%$TicketObj->TimeWorked|h%>" SIZE="5"></td> - </TR> - <TR> + <td class="value"><input name="TimeWorked" value="<%$TicketObj->TimeWorked|h%>" size="5" /> + <& /Elements/SelectTimeUnits, Name =>'TimeWorked' &> +</td> + + </tr> + <tr> <td class="label"><&|/l&>Time Left</&>:</td> - <td class="value"><input name=TimeLeft value="<%$TicketObj->TimeLeft|h%>" SIZE="5"></td> - </TR> + <td class="value"><input name="TimeLeft" value="<%$TicketObj->TimeLeft|h%>" size="5" /> + <& /Elements/SelectTimeUnits, Name =>'TimeLeft' &> + </td> + </tr> - <TR> + <tr> <td class="label"><&|/l&>Priority</&>:</td> - <td class="value"><input name=Priority value="<%$TicketObj->Priority|h%>" SIZE="5"></td> - </TR> + <td class="value"><input name="Priority" value="<%$TicketObj->Priority|h%>" size="5" /></td> + </tr> - <TR> + <tr> <td class="label"><&|/l&>Final Priority</&>:</td> - <td class="value"><input name=FinalPriority value="<%$TicketObj->FinalPriority|h%>" SIZE="5"></td> - </TR> + <td class="value"><input name="FinalPriority" value="<%$TicketObj->FinalPriority|h%>" size="5" /></td> + </tr> + + + <& /Elements/Callback, _CallbackName => 'EndOfList', TicketObj => $TicketObj, %ARGS &> -</TABLE> +</table> <%INIT> #It's hard to do this inline, so we'll preload the html of the selectstatus in here. diff --git a/rt/html/Ticket/Elements/EditCustomField b/rt/html/Ticket/Elements/EditCustomField index 63687acd7..fff3925aa 100644 --- a/rt/html/Ticket/Elements/EditCustomField +++ b/rt/html/Ticket/Elements/EditCustomField @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# <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: diff --git a/rt/html/Ticket/Elements/EditCustomFields b/rt/html/Ticket/Elements/EditCustomFields index 78da71201..04d7180af 100644 --- a/rt/html/Ticket/Elements/EditCustomFields +++ b/rt/html/Ticket/Elements/EditCustomFields @@ -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: @@ -44,39 +46,47 @@ %# %# END BPS TAGGED BLOCK }}} <table> -<tr> -<td valign="top" width="50%"> -<table> - % my $i = 0; -% my $cfcount = $CustomFields->Count; -% $cfcount++ if ($cfcount % 2) ; # if we have an odd number of -% #custom fields, fudge it so we know where to put in the table break -% while (my $CustomField = $CustomFields->Next()) { -% if ($cfcount == 2 * $i) { -</table> -</td> -<td valign="top" width="50%"> -<table> -% } +% while ( my $CustomField = $CustomFields->Next ) { +% next unless $CustomField->CurrentUserHasRight('ModifyCustomField'); % $i++; - <tr> +% if ( $i % 2 ) { +<tr> +% } +<td width="50%"> +<table> + <tr id="CF-<%$CustomField->id%>-EditRow"> <td class="labeltop"> - <b><%$CustomField->Name%></b><br> + <b><%$CustomField->Name%></b><br /> <i><%$CustomField->FriendlyType%></i> </td> <td class="entry"><& /Elements/EditCustomField, Object => $TicketObj, CustomField => $CustomField, - NamePrefix => $NamePrefix - &></td> + NamePrefix => $NamePrefix , + Default => $m->notes('Field-' . $CustomField->Id), + &> +% if (my $msg = $m->notes('InvalidField-' . $CustomField->Id)) { + <br /> + <em style="color: red"><% $msg %></em> +% } + </td> </tr> -% } </table> </td> + +% unless ( $i % 2 ) { </tr> -</table> +% } + +% } +%# close row if required +% if ( $i % 2 ) { +</tr> +% } + +</table> <%INIT> my $CustomFields; my $NamePrefix; diff --git a/rt/html/Ticket/Elements/EditDates b/rt/html/Ticket/Elements/EditDates index a19774192..f694506d0 100644 --- a/rt/html/Ticket/Elements/EditDates +++ b/rt/html/Ticket/Elements/EditDates @@ -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,32 +45,32 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<TABLE> - <TR> - <TD class="label"><&|/l&>Starts</&>:</TD> - <TD class="entry"><& /Elements/SelectDate, menu_prefix => 'Starts', current => 0 &> - (<% $TicketObj->StartsObj->AsString %>)</TD> - </TR> - <TR> - <TD class="label"><&|/l&>Started</&>:</TD> - <TD class="entry"><& /Elements/SelectDate, menu_prefix => 'Started', current => 0 &> (<%$TicketObj->StartedObj->AsString %>)</TD> - </TR> +<table> + <tr> + <td class="label"><&|/l&>Starts</&>:</td> + <td class="entry"><& /Elements/SelectDate, menu_prefix => 'Starts', current => 0 &> + (<% $TicketObj->StartsObj->AsString %>)</td> + </tr> + <tr> + <td class="label"><&|/l&>Started</&>:</td> + <td class="entry"><& /Elements/SelectDate, menu_prefix => 'Started', current => 0 &> (<%$TicketObj->StartedObj->AsString %>)</td> + </tr> - <TR> - <TD class="label"> + <tr> + <td class="label"> <&|/l&>Last Contact</&>: - </TD> - <TD class="entry"> + </td> + <td class="entry"> <& /Elements/SelectDate, menu_prefix => 'Told', current => 0 &> (<% $TicketObj->ToldObj->AsString %>) - </TD> - </TR> - <TR> - <TD class="label"><&|/l&>Due</&>:</TD> - <TD class="entry"> + </td> + </tr> + <tr> + <td class="label"><&|/l&>Due</&>:</td> + <td class="entry"> <& /Elements/SelectDate, menu_prefix => 'Due', current => 0 &> (<% $TicketObj->DueObj->AsString %>) - </TD> - </TR> -</TABLE> + </td> + </tr> +</table> <%ARGS> $TicketObj => undef </%ARGS> diff --git a/rt/html/Ticket/Elements/EditPeople b/rt/html/Ticket/Elements/EditPeople index 055d7ba20..fd23ae0d6 100644 --- a/rt/html/Ticket/Elements/EditPeople +++ b/rt/html/Ticket/Elements/EditPeople @@ -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,28 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<TABLE> -<TR> -<TD VALIGN=TOP> +<table width="100%"> +<tr> +<td valign="top"> <h3><&|/l&>New watchers</&></h3> -<&|/l&>Find people whose</&><BR> +<&|/l&>Find people whose</&><br /> <& /Elements/SelectUsers &> -<input type=submit name="OnlySearchForPeople" value="<&|/l&>Go!</&>"> -<BR> -<&|/l&>Find groups whose</&><BR> +<input type="submit" class="button" name="OnlySearchForPeople" value="<&|/l&>Go!</&>" /> +<br /> +<&|/l&>Find groups whose</&><br /> <& /Elements/SelectGroups &> -<input type=submit name="OnlySearchForGroup" value="<&|/l&>Go!</&>"> +<input type="submit" class="button" name="OnlySearchForGroup" value="<&|/l&>Go!</&>" /> <& AddWatchers, Ticket => $Ticket, UserString => $UserString, UserOp => $UserOp, UserField => $UserField, GroupString => $GroupString, GroupOp => $GroupOp, GroupField => $GroupField, PrivilegedOnly => $PrivilegedOnly &> -</TD><TD VALIGN=TOP> +</td><td valign="top"> <h3><&|/l&>Owner</&></h3> <&|/l&>Owner</&>: <& /Elements/SelectOwner, Name => 'Owner', QueueObj => $Ticket->QueueObj, TicketObj => $Ticket, Default => $Ticket->OwnerObj->Id, DefaultValue => 0&> <h3><&|/l&>Current watchers</&></h3> -<&|/l&>(Check box to delete)</&><br> +<&|/l&>(Check box to delete)</&><br /> <&|/l&>Requestors</&>: <& EditWatchers, TicketObj => $Ticket, Watchers => $Ticket->Requestors &> @@ -75,9 +77,9 @@ <&|/l&>Administrative Cc</&>: <& EditWatchers, TicketObj => $Ticket, Watchers => $Ticket->AdminCc &> -</TD> -</TR> -</TABLE> +</td> +</tr> +</table> <%ARGS> $UserField => undef diff --git a/rt/html/Ticket/Elements/EditWatchers b/rt/html/Ticket/Elements/EditWatchers index 0089932f4..918dddb68 100644 --- a/rt/html/Ticket/Elements/EditWatchers +++ b/rt/html/Ticket/Elements/EditWatchers @@ -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: @@ -46,20 +48,25 @@ <ul> %# Print out a placeholder if there are none. %if ($Members->Count == 0 ) { -<li><i><&|/l&>none</&></i> +<li><i><&|/l&>none</&></i></li> % } %while (my $watcher=$Members->Next) { <li> -<INPUT TYPE=CHECKBOX NAME="Ticket-DeleteWatcher-Type-<%$Watchers->Type%>-Principal-<%$watcher->MemberId%>" value="1" UNCHECKED> +<input type="checkbox" class="checkbox" name="Ticket-DeleteWatcher-Type-<%$Watchers->Type%>-Principal-<%$watcher->MemberId%>" value="1" unchecked /> %if ($watcher->MemberObj->IsUser) { <a href="<%$RT::WebPath%>/Admin/Users/Modify.html?id=<%$watcher->MemberObj->Object->id%>"> -<%$watcher->MemberObj->Object->Name%></a> +<%$watcher->MemberObj->Object->Name%></a> +% if ($TicketObj and grep { $_->Content eq $watcher->MemberObj->Object->EmailAddress } $TicketObj->SquelchMailTo) { +<b><&|/l&>(Will not be sent email)</&></b> +% } + %} else { <a href="<%$RT::WebPath%>/Admin/Groups/Modify.html?id=<%$watcher->MemberObj->Object->id%>"> <%$watcher->MemberObj->Object->Name%></a> %} +</li> % } </ul> <%INIT> diff --git a/rt/html/Ticket/Elements/FindAttachments b/rt/html/Ticket/Elements/FindAttachments index 017c77288..a9d698d31 100755 --- a/rt/html/Ticket/Elements/FindAttachments +++ b/rt/html/Ticket/Elements/FindAttachments @@ -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: diff --git a/rt/html/Ticket/Elements/LoadTextAttachments b/rt/html/Ticket/Elements/LoadTextAttachments index 943568fb3..fc83d6605 100755 --- a/rt/html/Ticket/Elements/LoadTextAttachments +++ b/rt/html/Ticket/Elements/LoadTextAttachments @@ -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: @@ -80,7 +82,9 @@ if ( $Ticket->CurrentUserHasRight('ShowTicket') ) { $attachments->Limit ( FIELD => 'ContentType', OPERATOR => '=', VALUE => 'text/plain'); $attachments->Limit ( FIELD => 'ContentType', OPERATOR => 'STARTSWITH', VALUE => 'message/'); $attachments->Limit ( FIELD => 'ContentType', OPERATOR => '=', VALUE => 'text'); - + if ($RT::SuppressInlineTextFiles) { + $attachments->Limit ( FIELD => 'Filename', OPERATOR => 'IS', VALUE => 'NULL'); + } } return ($attachments); </%INIT> diff --git a/rt/html/Ticket/Elements/PreviewScrips b/rt/html/Ticket/Elements/PreviewScrips index 491f8e3f3..423040c8e 100755 --- a/rt/html/Ticket/Elements/PreviewScrips +++ b/rt/html/Ticket/Elements/PreviewScrips @@ -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: @@ -94,23 +96,24 @@ unless ( $Transaction ) { my @non_recipients = $TicketObj->SquelchMailTo; </%init> <h2><&|/l&>This message will be sent to...</&></h2> + % if ( $Object ) { -<i><&|/l&>(Check boxes to disable notifications to the listed recipients)</&></i><br> +<i><&|/l&>(Check boxes to disable notifications to the listed recipients)</&></i><br /> % foreach my $scrip (@{$Object->Scrips->Prepared}) { % next unless $scrip->ActionObj->Action->isa('RT::Action::SendEmail'); -<b><% $scrip->Description %></b><br> +<b><% $scrip->Description %></b><br /> <&|/l, loc($scrip->ConditionObj->Name), loc($scrip->ActionObj->Name), loc($scrip->TemplateObj->Name)&>[_1] [_2] with template [_3]</&> -<br> +<br /> %foreach my $type qw(To Cc Bcc) { %my @addresses = $scrip->ActionObj->Action->$type(); <ul> %foreach my $addr (@addresses) { -<li> <b><%loc($type)%></b>: <input type="checkbox" name="Ticket-<%$TicketObj->id%>-SquelchMailTo" value="<%$addr->address%>"> <%$addr->address%> +<li> <b><%loc($type)%></b>: <input type="checkbox" class="checkbox" name="Ticket-<%$TicketObj->id%>-SquelchMailTo" value="<%$addr->address%>" /> <%$addr->address%> % } </ul> % } % if ($RT::PreviewScripMessages) { -<textarea cols=80 rows="5"> +<textarea cols="80" rows="5"> <%$scrip->ActionObj->TemplateObj->MIMEObj->as_string%> </textarea> % } @@ -120,10 +123,10 @@ my @non_recipients = $TicketObj->SquelchMailTo; <h2><&|/l&>Messages about this ticket will not be sent to...</&></h2> <i><&|/l&>(Check boxes to enable notifications to the listed recipients)</&></i> -<br> +<br /> <ul> % foreach my $recipient (@non_recipients) { -<li><input type="checkbox" name="Ticket-<%$TicketObj->id%>-UnsquelchMailTo" value="<%$recipient->Content%>"> +<li><input type="checkbox" class="checkbox" name="Ticket-<%$TicketObj->id%>-UnsquelchMailTo" value="<%$recipient->Content%>" /> <% $recipient->Content %> % } </ul> diff --git a/rt/html/Ticket/Elements/ShowAttachments b/rt/html/Ticket/Elements/ShowAttachments index 82028dd28..6f1de620a 100644 --- a/rt/html/Ticket/Elements/ShowAttachments +++ b/rt/html/Ticket/Elements/ShowAttachments @@ -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: @@ -44,13 +46,13 @@ %# %# END BPS TAGGED BLOCK }}} % if (keys %documents) { -<& /Elements/TitleBoxStart, title => loc('Attachments'), +<&| /Widgets/TitleBox, title => loc('Attachments'), title_class=> 'inverse', color => "#336699" &> % foreach my $key (keys %documents) { -<%$key%><br> +<%$key%><br /> <ul> % foreach my $rev (@{$documents{$key}}) { @@ -68,7 +70,7 @@ if ($size) { </%PERL> <li><font size="-2"> -<A HREF="<%$RT::WebPath%>/Ticket/Attachment/<%$rev->TransactionId%>/<%$rev->Id%>/<%$rev->Filename | u%>"> +<a href="<%$RT::WebPath%>/Ticket/Attachment/<%$rev->TransactionId%>/<%$rev->Id%>/<%$rev->Filename | u%>"> <&|/l, $rev->CreatedAsString, $size, $rev->CreatorObj->Name &>[_1] ([_2]) by [_3]</&> </a> </font></li> @@ -77,8 +79,9 @@ if ($size) { </ul> % } -<& /Elements/TitleBoxEnd &> -<BR> +</&> + +<br /> % } <%INIT> diff --git a/rt/html/Ticket/Elements/ShowBasics b/rt/html/Ticket/Elements/ShowBasics index e5f09f693..631b90927 100644 --- a/rt/html/Ticket/Elements/ShowBasics +++ b/rt/html/Ticket/Elements/ShowBasics @@ -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: @@ -55,18 +57,18 @@ % if ($Ticket->TimeEstimated) { <tr> <td class="label time estimated"><&|/l&>Estimated</&>:</td> - <td class="value time estimated"><&|/l, $Ticket->TimeEstimated &>[_1] min</&></td> + <td class="value time estimated"><& ShowTime, minutes => $Ticket->TimeEstimated &></td> </tr> % } % if ($Ticket->TimeWorked) { <tr> <td class="label time worked"><&|/l&>Worked</&>:</td> - <td class="value time worked"><&|/l, $Ticket->TimeWorked &>[_1] min</&></td> + <td class="value time worked"><& ShowTime, minutes => $Ticket->TimeWorked &></td> </tr> % } <tr> <td class="label time left"><&|/l&>Left</&>:</td> - <td class="value time left"><&|/l, $Ticket->TimeLeft &>[_1] min</&></td> + <td class="value time left"><& ShowTime, minutes => $Ticket->TimeLeft &></td> </tr> <tr> <td class="label priority"><&|/l&>Priority</&>:</td> @@ -74,7 +76,7 @@ </tr> <tr> <td class="label queue"><&|/l&>Queue</&>:</td> - <td class="value queue"><%$Ticket->QueueObj->Name%></td> + <td class="value queue"><& ShowQueue, QueueObj => $Ticket->QueueObj &></td> </tr> <& /Elements/Callback, _CallbackName => 'EndOfList', TicketObj => $Ticket, %ARGS &> </table> diff --git a/rt/html/Ticket/Elements/ShowCustomFields b/rt/html/Ticket/Elements/ShowCustomFields index eb49212c5..f307d9dd2 100644 --- a/rt/html/Ticket/Elements/ShowCustomFields +++ b/rt/html/Ticket/Elements/ShowCustomFields @@ -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: diff --git a/rt/html/Ticket/Elements/ShowDates b/rt/html/Ticket/Elements/ShowDates index 322fafd99..e00b5ee80 100644 --- a/rt/html/Ticket/Elements/ShowDates +++ b/rt/html/Ticket/Elements/ShowDates @@ -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,41 +45,41 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<TABLE> - <TR> - <TD class="label date created"><&|/l&>Created</&>:</TD> - <TD class="value date created"><% $Ticket->CreatedObj->AsString %></TD> - </TR> - <TR> - <TD class="label date starts"><&|/l&>Starts</&>:</TD> - <TD class="value date starts"><% $Ticket->StartsObj->AsString %></TD> - </TR> - <TR> - <TD class="label date started"><&|/l&>Started</&>:</TD> - <TD class="value date started"><% $Ticket->StartedObj->AsString %></TD> - </TR> - <TR> - <TD class="label date told"><a href="<% $RT::WebPath %>/Ticket/Display.html?id=<% $Ticket->id %>&Action=SetTold"><&|/l&>Last Contact</&></a>:</TD> - <TD class="value date told"><% $Ticket->ToldObj->AsString %></TD> - </TR> - <TR> - <TD class="label date due"><&|/l&>Due</&>:</TD> - <TD class="value date due"><% $Ticket->DueObj->AsString %></TD> - </TR> - <TR> - <TD class="label date resolved"><&|/l&>Closed</&>:</TD> - <TD class="value date resolved"><% $Ticket->ResolvedObj->AsString %></TD> - </TR> - <TR> - <TD class="label date updated"><&|/l&>Updated</&>:</TD> +<table> + <tr> + <td class="label date created"><&|/l&>Created</&>:</td> + <td class="value date created"><% $Ticket->CreatedObj->AsString %></td> + </tr> + <tr> + <td class="label date starts"><&|/l&>Starts</&>:</td> + <td class="value date starts"><% $Ticket->StartsObj->AsString %></td> + </tr> + <tr> + <td class="label date started"><&|/l&>Started</&>:</td> + <td class="value date started"><% $Ticket->StartedObj->AsString %></td> + </tr> + <tr> + <td class="label date told"><a href="<% $RT::WebPath %>/Ticket/Display.html?id=<% $Ticket->id %>&Action=SetTold"><&|/l&>Last Contact</&></a>:</td> + <td class="value date told"><% $Ticket->ToldObj->AsString %></td> + </tr> + <tr> + <td class="label date due"><&|/l&>Due</&>:</td> + <td class="value date due"><% $Ticket->DueObj->AsString %></td> + </tr> + <tr> + <td class="label date resolved"><&|/l&>Closed</&>:</td> + <td class="value date resolved"><% $Ticket->ResolvedObj->AsString %></td> + </tr> + <tr> + <td class="label date updated"><&|/l&>Updated</&>:</td> % my $UpdatedString = $Ticket->LastUpdated ? loc("[_1] by [_2]", $Ticket->LastUpdatedAsString, $Ticket->LastUpdatedByObj->Name) : loc("Never"); % if ($UpdatedLink) { - <TD class="value date updated"><A HREF="#lasttrans"><% $UpdatedString | h %></a></TD> + <td class="value date updated"><A HREF="#lasttrans"><% $UpdatedString | h %></a></td> % } else { - <TD class="value date updated"><% $UpdatedString | h %></TD> + <td class="value date updated"><% $UpdatedString | h %></td> % } - </TR> -</TABLE> + </tr> +</table> <%ARGS> $Ticket => undef $UpdatedLink => 1 diff --git a/rt/html/Ticket/Elements/ShowDependencies b/rt/html/Ticket/Elements/ShowDependencies index f276bc949..b2f4d298d 100644 --- a/rt/html/Ticket/Elements/ShowDependencies +++ b/rt/html/Ticket/Elements/ShowDependencies @@ -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,19 +45,19 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<&|/l&>Depends on</&>:<BR> +<&|/l&>Depends on</&>:<br /> % while (my $Link = $Ticket->DependsOn->Next) { % 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> + <br /> % } -<&|/l&>Depended on by</&>:<BR> +<&|/l&>Depended on by</&>:<br /> % while (my $Link = $Ticket->DependedOnBy->Next) { % 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> + <br /> % } <%ARGS> diff --git a/rt/html/Ticket/Elements/ShowGroupMembers b/rt/html/Ticket/Elements/ShowGroupMembers index 1fdb79aab..e39bc690e 100644 --- a/rt/html/Ticket/Elements/ShowGroupMembers +++ b/rt/html/Ticket/Elements/ShowGroupMembers @@ -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: @@ -47,14 +49,15 @@ % my $UserMembers = $Group->UserMembersObj; % while (my $member = $UserMembers->Next()) { -<& ShowUserEntry, User => $member &><br> +<& ShowUserEntry, User => $member, Ticket => $Ticket &><br /> % } % my $GroupMembers = $Group->MembersObj; % $GroupMembers->LimitToGroups(); % while (my $member = $GroupMembers->Next()) { -<&|/l&>Group</&>: <%$member->MemberObj->Object->Name%><br> +<&|/l&>Group</&>: <%$member->MemberObj->Object->Name%><br /> % } <%ARGS> $Group => undef -</%ARGS>
\ No newline at end of file +$Ticket => undef +</%ARGS> diff --git a/rt/html/Ticket/Elements/ShowHistory b/rt/html/Ticket/Elements/ShowHistory index 878e2535c..45cd5122f 100644 --- a/rt/html/Ticket/Elements/ShowHistory +++ b/rt/html/Ticket/Elements/ShowHistory @@ -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,47 +45,45 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} +<%doc> +# This is (ab)used in Admin/(Users|Groups)/History.html and should probably +# be generalized at some point. +</%doc> <%perl> - if ($ShowDisplayModes or $ShowTitle) { -my $title; -my $titleright; -if ($ShowTitle) { - $title = loc('History'); -} -else { - $title = ' '; -} -$titleright = loc('Display mode') . ":"; -if ($ShowHeaders) { - $titleright .= "[<A HREF=\"" . $URIFile . "?id=" - . $Ticket->id . "\">" - . loc("Brief headers") - . "</a>] <b>[" - . loc("Full headers") . "]</b>"; -} -else { - $titleright .= "<b>[" - . loc("Brief headers") - . "]</b> [<A HREF=\"" - . $URIFile - . "?ShowHeaders=1" - . "&id=" - . $Ticket->id . "\">" - . loc("Full headers") . "</a>]"; -} +if ($ShowDisplayModes or $ShowTitle) { + my $title = $ShowTitle + ? loc('History') + : ' '; + + my $titleright; + + if ($ShowDisplayModes) { + $titleright = q[<span style="color: black">] . loc('Display mode') . ':</span> '; + + if ($ShowHeaders) { + $titleright .= qq{<a href="$URIFile?id=} . + $Ticket->id.qq{">} . + loc("Brief headers") . + qq{</a> — }; + $titleright .= q[<span class="selected">] . loc("Full headers") . "</span>"; + } + else { + $titleright .= q[<span class="selected">] . loc("Brief headers") . "</span> — "; + $titleright .= qq{<a href="$URIFile?ShowHeaders=1;id=} . + $Ticket->id.qq{">} . + loc("Full headers") . + qq{</a>}; + } + } </%perl> -<& /Elements/TitleBoxStart, title => $title, titleright => $titleright, bodyclass=> ''&> +<& /Widgets/TitleBoxStart, title => $title, titleright => $titleright &> % } -<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=2 BORDER=0> +<div id="ticket-history"> <%perl> my @attachments = @{$Attachments->ItemsArrayRef()}; my @attachment_content = @{$AttachmentContent->ItemsArrayRef()}; - - - - while ( my $Transaction = $Transactions->Next ) { my $skip = 0; $m->comp( '/Elements/Callback', @@ -123,9 +123,9 @@ $m->flush_buffer(); } </%perl> -</TABLE> +</div> % if ($ShowDisplayModes or $ShowTitle) { -<& /Elements/TitleBoxEnd &> +<& /Widgets/TitleBoxEnd &> % } <%INIT> my $Transactions = new RT::Transactions($session{'CurrentUser'}); diff --git a/rt/html/Ticket/Elements/ShowMembers b/rt/html/Ticket/Elements/ShowMembers index f4fec1c7c..f87ce8fc9 100644 --- a/rt/html/Ticket/Elements/ShowMembers +++ b/rt/html/Ticket/Elements/ShowMembers @@ -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,21 +45,20 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -% if ($members->Count) { -<UL> +<ul> % while (my $link = $members->Next) { -% my $member= $link->BaseObj; -<LI><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: <%$member->Subject%> [<%loc($member->Status)%>]<br> +<li><& /Elements/ShowLink, URI => $link->BaseURI &><br /> % if ($depth < 8) { -<&/Ticket/Elements/ShowMembers, Ticket => $member, depth => ($depth+1) &> +<& /Ticket/Elements/ShowMembers, Ticket => $link->BaseObj, depth => ($depth+1) &> % } +</li> % } -</UL> -% } +</ul> <%INIT> my $members = $Ticket->Members; +return unless $members->Count; </%INIT> diff --git a/rt/html/Ticket/Elements/ShowMessageHeaders b/rt/html/Ticket/Elements/ShowMessageHeaders index 8dc76bae3..81c56375d 100644 --- a/rt/html/Ticket/Elements/ShowMessageHeaders +++ b/rt/html/Ticket/Elements/ShowMessageHeaders @@ -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,15 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -% use Data::Dumper; <table> % foreach my $header (@headers) { -% next unless ($display_headers{'_all'} || $display_headers{lc($header->{'Tag'})}); -<tr> -<td align="right" class="message-header-key"><%$header->{'Tag'}%>:</td> -<td class="message-header-value"><%$header->{'Value'} | n%></td> -</tr> +% next unless $display_headers{_all} +% or ($display_headers{ lc $header->{Tag} } +% and length $header->{Value}); + <tr> + <td align="right" class="message-header-key"><%$header->{'Tag'}%>:</td> + <td class="message-header-value"><%$header->{'Value'} | n%></td> + </tr> % } </table> <%INIT> @@ -61,23 +64,24 @@ $m->comp('/Elements/Callback', content => \$content, %ARGS); # we'll display the value without escaping later (for MakeClicky et al.) $content = $m->interp->apply_escapes($content, 'h'); -my @lines = split (/\n/,$content); +my @lines = split /\n/, $content; my $in_header = 0; -my @headers =(); -foreach (@lines) { +my @headers; + +for (@lines) { if (/^(\S+):\s+(.*)$/) { - push (@headers, { Tag => $1, Value => $2} ); - } elsif ($headers[-1]) { + push @headers, { Tag => $1, Value => $2 }; + } + elsif (/^\s+/) { $headers[-1]->{'Value'} .= $_; - } else { - - push (@headers, { Tag => $_, Value => ''} ); + } + else { + s/:$//; + push @headers, { Tag => $_, Value => '' }; } } -my %display_headers; - -map { $display_headers{lc($_)} = 1 } @$DisplayHeaders; +my %display_headers = map { lc($_) => 1 } @$DisplayHeaders; $m->comp('/Elements/Callback', _CallbackName => 'Headers', content => \$content, headers => \@headers, display_headers => \%display_headers, %ARGS); diff --git a/rt/html/Ticket/Elements/ShowMessageStanza b/rt/html/Ticket/Elements/ShowMessageStanza index eaf551de9..8040096f1 100644 --- a/rt/html/Ticket/Elements/ShowMessageStanza +++ b/rt/html/Ticket/Elements/ShowMessageStanza @@ -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: @@ -44,7 +46,7 @@ %# %# END BPS TAGGED BLOCK }}} % if (ref($Message)) { -<font color="<%$colors[$Depth]%>"> +<div class="message-stanza-depth-<% $Depth %>"> <%perl> foreach my $stanza (@$Message) { if ( ref $stanza eq "ARRAY" ) { @@ -57,24 +59,23 @@ foreach my $stanza (@$Message) { my $content = $stanza->{raw}; RT::Interface::Web::EscapeUTF8(\$content); $m->comp('/Elements/Callback', content => \$content, %ARGS); - $content =~ s/\n/<br>/gi if defined $content; + $content =~ s{$}{<br />}mg + if defined $content; </%perl> -<%$content |n%><br> -% } +<%$content |n%> +% } % } # end foreach -</font> +</div> % } else { -% my $content = $Message; -% RT::Interface::Web::EscapeUTF8(\$content); -% $m->comp('/Elements/Callback', content => \$content, %ARGS); -% $content =~ s/\n/<br>/gi; -<%$content |n%><br> +% my $content = $Message; +% RT::Interface::Web::EscapeUTF8(\$content); +% $m->comp('/Elements/Callback', content => \$content, %ARGS); +% $content =~ s{$}{<br />}mg; +<%$content |n%> % } <%INIT> use URI::URL; -my $server = 'fsck.com'; -my @colors = ('#000000', '#660000', '#006600', '#000066', '#cc0000', '#00cc00', '#0000cc', '#ff0000', '#00ff00', '#0000ff'); </%INIT> <%ARGS> $Message => undef diff --git a/rt/html/Ticket/Elements/ShowPeople b/rt/html/Ticket/Elements/ShowPeople index dbec93928..76336ecdc 100644 --- a/rt/html/Ticket/Elements/ShowPeople +++ b/rt/html/Ticket/Elements/ShowPeople @@ -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: @@ -46,19 +48,19 @@ <table> <tr> <td class="label"><&|/l&>Owner</&>:</td> - <td class="value"><& ShowUserEntry, User => $Ticket->OwnerObj &></td> + <td class="value"><& ShowUserEntry, User => $Ticket->OwnerObj, Ticket => $Ticket &></td> </tr> <tr> <td class="labeltop"><&|/l&>Requestors</&>:</td> - <td class="value"><& ShowGroupMembers, Group => $Ticket->Requestors &></td> + <td class="value"><& ShowGroupMembers, Group => $Ticket->Requestors, Ticket => $Ticket &></td> </tr> <tr> <td class="labeltop"><&|/l&>Cc</&>:</td> - <td class="value"><& ShowGroupMembers, Group => $Ticket->Cc &></td> + <td class="value"><& ShowGroupMembers, Group => $Ticket->Cc, Ticket => $Ticket &></td> </tr> <tr> <td class="labeltop"><&|/l&>AdminCc</&>:</td> - <td class="value"><& ShowGroupMembers, Group => $Ticket->AdminCc &></td> + <td class="value"><& ShowGroupMembers, Group => $Ticket->AdminCc, Ticket => $Ticket &></td> </tr> </table> <%ARGS> diff --git a/rt/html/Ticket/Elements/ShowQueue b/rt/html/Ticket/Elements/ShowQueue new file mode 100644 index 000000000..484760244 --- /dev/null +++ b/rt/html/Ticket/Elements/ShowQueue @@ -0,0 +1,9 @@ +<% $QueueObj->Name %> +<%ARGS> +$QueueObj +</%ARGS> +<%INIT> +my $value = $QueueObj->Name; +$value = '#'. $QueueObj->id + unless defined $value && length $value; +</%INIT> diff --git a/rt/html/Ticket/Elements/ShowRequestor b/rt/html/Ticket/Elements/ShowRequestor index 57bfa0e55..d7fe6b185 100644 --- a/rt/html/Ticket/Elements/ShowRequestor +++ b/rt/html/Ticket/Elements/ShowRequestor @@ -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: @@ -45,6 +47,7 @@ %# END BPS TAGGED BLOCK }}} <%PERL> my $rows = 10; +my $has_right_adminusers = $session{'CurrentUser'}->HasRight(Object => $RT::System, Right => 'AdminUsers'); my $people = $Ticket->Requestors->UserMembersObj; while (my $requestor=$people->Next) { next if $requestor->Privileged; @@ -55,27 +58,29 @@ $tickets->RowsPerPage($rows); $tickets->OrderBy(FIELD => 'Priority', ORDER => 'DESC'); </%PERL> -<& /Elements/TitleBoxStart, - title => "<a class='inverse' href=\"$RT::WebPath/Admin/Users/Modify.html?id=".$requestor->id."\">".loc("More about [_1]", $name)."</a>" &> +<&| /Widgets/TitleBox, + title_href => $has_right_adminusers ? "$RT::WebPath/Admin/Users/Modify.html?id=".$requestor->id : undef, + title=> loc("More about [_1]", $name), +&> %# Additional information about this user. Empty by default. <& /Elements/Callback, _CallbackName => 'AboutThisUser', requestor => $requestor, %ARGS &> -<&|/l&>Comments about this user</&>:<BR> -<B><% ($requestor->Comments || loc("No comment entered about this user")) %></B><BR> +<&|/l&>Comments about this user</&>:<br /> +<b><% ($requestor->Comments || loc("No comment entered about this user")) %></b><br /> -<&|/l, $rows &>This user's [_1] highest priority tickets</&>:<BR> -<UL> +<&|/l, $rows &>This user's [_1] highest priority tickets</&>:<br /> +<ul> %while (my $w=$tickets->Next) { -<LI><a href="<%$RT::WebPath%><%$DisplayPath%>?id=<%$w->id%>"><%$w->Id%>: <%$w->Subject%></a> (<%$w->Status%>) +<li><a href="<%$RT::WebPath%><%$DisplayPath%>?id=<%$w->id%>"><%$w->Id%>: <%$w->Subject%></a> (<%$w->Status%>) %} -</UL> +</ul> -<&|/l&>Groups this user belongs to</&>:<BR> +<&|/l&>Groups this user belongs to</&>:<br /> <& /Elements/ShowMemberships, UserObj => $requestor &> -<& /Elements/TitleBoxEnd &> +</&> %} <%ARGS> diff --git a/rt/html/Ticket/Elements/ShowTransaction b/rt/html/Ticket/Elements/ShowTransaction index 8bf589d45..f6d73c2f5 100644 --- a/rt/html/Ticket/Elements/ShowTransaction +++ b/rt/html/Ticket/Elements/ShowTransaction @@ -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,25 +45,33 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<TR class="<% $RowNum%2 ? 'oddline' : 'evenline'%>" > -<TD rowspan="2" valign="top" bgcolor="<%$bgcolor%>"><A NAME="txn-<%$Transaction->Id%>" href="<% $DisplayPath %>#txn-<%$Transaction->Id%>">#</A><% $LastTransaction ? '<a name="lasttrans"> </a>' : ' ' |n %></TD> -<TD>  </TD> -<TD><font size=-2><% $transdate|n %></font> </TD> +<div class="ticket-transaction<% $type_class && " $type_class" %><% $RowNum % 2 ? ' odd' : ' even' %>"> +<table width="100%" cellspacing="0" cellpadding="2" border="0"> + <tr> + <td rowspan="2" valign="top" class="type"> + <a name="txn-<%$Transaction->Id%>" href="<% $DisplayPath %>#txn-<%$Transaction->Id%>">#</a> + <% $LastTransaction ? '<a name="lasttrans"> </a>' : ' ' |n %> + </td> + <td class="date"><% $transdate|n %></td> % my $desc = $Transaction->BriefDescription; % $m->comp('/Elements/Callback', _CallbackName => 'ModifyDisplay', text => \$desc, Transaction => $Transaction, %ARGS); -<TD ALIGN="LEFT"><b><%$Transaction->CreatorObj->Name%> - <%$TicketString%> <%$desc%> - -</b></TD> -<TD><%$TimeTaken%> </TD> -<TD ALIGN="RIGHT"><font size=-1><%$titlebar_commands|n%></font></TD> -</TR> -<TR class="<% $RowNum%2 ? 'oddline' : 'evenline'%>"><TD colspan=5> + <td class="description"> + <%$Transaction->CreatorObj->Name%> - <%$TicketString%> <%$desc%> + </td> + <td class="time-taken"><%$TimeTaken%></td> + <td class="actions"><%$titlebar_commands|n%></td> + </tr> + + <tr> + <td colspan="4" class="content"> % if ($Transaction->CustomFieldValues->Count) { -<& /Elements/ShowCustomFields, Object => $Transaction &> + <& /Elements/ShowCustomFields, Object => $Transaction &> % } % $m->comp('ShowTransactionAttachments', %ARGS, Parent => 0) unless ($Collapsed ||!$ShowBody); -</TD> -</TR> + </td> + </tr> +</table> +</div> <%ARGS> $Ticket => undef @@ -82,37 +92,37 @@ $LastTransaction => 0 <%INIT> -my ( $TimeTaken, $TicketString, $bgcolor ); +my ( $TimeTaken, $TicketString, $type_class ); my $transdate = $Transaction->CreatedAsString(); $transdate =~ s/\s/ /g; if ( $Transaction->Type =~ /^(Create|Correspond|Comment$)/ ) { if ( $Transaction->IsInbound ) { - $bgcolor = "#336699"; + $type_class = 'message'; } else { - $bgcolor = "#339999"; + $type_class = 'message'; } } elsif ( ( $Transaction->Field =~ /^Owner$/ ) or ( $Transaction->Type =~ /^(AddWatcher|DelWatcher)$/ ) ) { - $bgcolor = "#333399"; + $type_class = 'people'; } elsif ( $Transaction->Type =~ /^(AddLink|DeleteLink)$/ ) { - $bgcolor = "#336633"; + $type_class = 'links'; } elsif ( $Transaction->Type =~ /^(Status|Set|Told)$/ ) { if ( $Transaction->Field =~ /^(Told|Starts|Started|Due)$/ ) { - $bgcolor = "#663366"; + $type_class = 'dates'; } else { - $bgcolor = "#993333"; + $type_class = 'basics'; } } else { - $bgcolor = "#cccccc"; + $type_class = 'other'; } if ( $Ticket->Id != $Transaction->Ticket ) { @@ -144,9 +154,7 @@ if ( $Transaction->Type =~ /EmailRecord$/ ) { . "&Transaction=" . $Transaction->Id . "&Attachment=" - . ( $Transaction->Attachments->First - && $Transaction->Attachments->First->Id ) - + . ( $Attachments->[0] && $Attachments->[0]->id ) . '">' . loc('Show') . "</a>] "; $ShowBody = 0; } diff --git a/rt/html/Ticket/Elements/ShowUserEntry b/rt/html/Ticket/Elements/ShowUserEntry index 163bcbdb1..8481c143b 100644 --- a/rt/html/Ticket/Elements/ShowUserEntry +++ b/rt/html/Ticket/Elements/ShowUserEntry @@ -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: @@ -49,7 +51,11 @@ % if ($User->EmailAddress && $User->EmailAddress ne $User->Name) { <<%$User->EmailAddress%>> % } +% if ($Ticket and grep { $_->Content eq $User->EmailAddress } $Ticket->SquelchMailTo) { +<b><&|/l&>(Will not be sent email)</&></b> +% } <%ARGS> $User => undef -</%ARGS>
\ No newline at end of file +$Ticket => undef +</%ARGS> |