From 52bb24a1bc7d80a768639a4b04c471553078502b Mon Sep 17 00:00:00 2001 From: cvs2git Date: Thu, 17 Feb 2011 00:25:24 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'RT_3_8_9'. --- rt/html/Ticket/Elements/Reminders | 168 -------------------------------------- 1 file changed, 168 deletions(-) delete mode 100644 rt/html/Ticket/Elements/Reminders (limited to 'rt/html/Ticket/Elements/Reminders') diff --git a/rt/html/Ticket/Elements/Reminders b/rt/html/Ticket/Elements/Reminders deleted file mode 100644 index ae72162..0000000 --- a/rt/html/Ticket/Elements/Reminders +++ /dev/null @@ -1,168 +0,0 @@ -%# BEGIN BPS TAGGED BLOCK {{{ -%# -%# COPYRIGHT: -%# -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%# -%# -%# (Except where explicitly superseded by other copyright notices) -%# -%# -%# LICENSE: -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# You should have received a copy of the GNU General Public License -%# along with this program; if not, write to the Free Software -%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -%# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. -%# -%# -%# CONTRIBUTION SUBMISSION POLICY: -%# -%# (The following paragraph is not intended to limit the rights granted -%# to you to modify and distribute this software under the terms of -%# the GNU General Public License and is only of importance to you if -%# you choose to contribute your changes and enhancements to the -%# community by submitting them to Best Practical Solutions, LLC.) -%# -%# By intentionally submitting any modifications, corrections or -%# derivatives to this work, or any other work intended for use with -%# Request Tracker, to Best Practical Solutions, LLC, you confirm that -%# you are the copyright holder for those contributions and you grant -%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -%# royalty-free, perpetual, license to use, copy, create derivative -%# works based on those contributions, and sublicense and distribute -%# those contributions and any derivatives thereof. -%# -%# END BPS TAGGED BLOCK }}} -<%args> -$Ticket => undef -$id => undef -$ShowCompleted => 0 -$Edit => 0 - -<%init> - -$Ticket = LoadTicket($id) if ($id); - -my $request_args = $m->request_args(); - -my $reminder_collection = $Ticket->Reminders->Collection; - -if ( $request_args->{'update-reminders'} ) { - while ( my $reminder = $reminder_collection->Next ) { - if ( $reminder->Status ne 'resolved' && $request_args->{ 'Complete-Reminder-' . $reminder->id } ) { - $Ticket->Reminders->Resolve($reminder); - } - elsif ( $reminder->Status eq 'resolved' && !$request_args->{ 'Complete-Reminder-' . $reminder->id } ) { - $Ticket->Reminders->Open($reminder); - } - - if ( exists( $request_args->{ 'Reminder-Subject-' . $reminder->id } ) && ( $reminder->Subject ne $request_args->{ 'Reminder-Subject-' . $reminder->id } )) { - $reminder->SetSubject( $request_args->{ 'Reminder-Subject-' . $reminder->id } ) ; - } - - if ( exists( $request_args->{ 'Reminder-Owner-' . $reminder->id } ) && ( $reminder->Owner != $request_args->{ 'Reminder-Owner-' . $reminder->id } )) { - $reminder->SetOwner( $request_args->{ 'Reminder-Owner-' . $reminder->id } , "Force" ) ; - } - - if ( exists( $request_args->{ 'Reminder-Due-' . $reminder->id } ) && ( $reminder->DueObj->Date ne $request_args->{ 'Reminder-Due-' . $reminder->id } )) { - $reminder->SetDue( $request_args->{ 'Reminder-Due-' . $reminder->id } ) ; - } - } -} - -if ( $request_args->{'NewReminder-Subject'} ) { - my $due_obj = RT::Date->new( $session{'CurrentUser'} ); - my $date = Time::ParseDate::parsedate( - $request_args->{'NewReminder-Due'}, - UK => $RT::DateDayBeforeMonth, - PREFER_PAST => 0, - PREFER_FUTURE => 1 - ); - $due_obj->Set( Value => $date, Format => 'unix' ); - my ( $add_id, $msg, $txnid ) = $Ticket->Reminders->Add( - - Subject => $request_args->{'NewReminder-Subject'}, - Owner => $request_args->{'NewReminder-Owner'}, - Due => $due_obj->ISO - ); -} - -# We've made changes, let's reload our search - -$reminder_collection = $Ticket->Reminders->Collection; - - - -
-% while (my $reminder = $reminder_collection->Next) { -% if ($reminder->Status eq 'resolved' && !$ShowCompleted) { - -% } elsif ($Edit) { -<& SELF:EditEntry, Reminder => $reminder, Ticket => $Ticket &> -% } else { -<& SELF:ShowEntry, Reminder => $reminder, Ticket => $Ticket &> -% } -% } -
-
-

<&|/l&>New reminder:

-<& SELF:NewReminder, Ticket => $Ticket &> -<%method NewReminder> -<%args> -$Ticket - -
- - -
-
- -<& /Elements/SelectOwner, Name => 'NewReminder-Owner', QueueObj => $Ticket->QueueObj, DefaultValue => 0 &> -
-
- -<& /Elements/SelectDate, Name => "NewReminder-Due", Default => "" &> -
-
- -<%method EditEntry> -<%args> -$Reminder -$Ticket - -Status eq 'resolved' ? 'CHECKED' : '' %> -/> - • - <& /Elements/SelectOwner, Name => 'Reminder-Owner-'.$Reminder->id, Queue => $Ticket->QueueObj, Default => $Reminder->Owner, DefaultValue => 0 &> - <& /Elements/SelectDate, Name => 'Reminder-Due-'.$Reminder->id, Default => $Reminder->DueObj->Date &> - (<%$Reminder->DueObj->Unix>0 ? $Reminder->DueObj->AgeAsString : '' %>)
- -<%method ShowEntry> -<%args> -$Reminder -$Ticket - -Status eq 'resolved' ? 'CHECKED' : '' %> -/> - <%$Reminder->Subject%> • - <%$Reminder->OwnerObj->Name%> - <%$Reminder->DueObj->Unix>0 ? "• ". $Reminder->DueObj->AgeAsString : '' |n%>
- -- cgit v1.1