__skin__
default
__description__
Message that is sent to recipients of shift change notices.

	This data comes from ScheduleShifts:

		old	= UID of previous assignment of shift
		new	= UID of new assignment of shift
		default = UID of default assignment of shift
		date	= Date of new assignment, if not a default assignment.
		day	= Day of new assignment.
		type	= Schedule change type ('default' or 'shift').
		shift	= Name of shift being changed

		Shift_Default 	= Constant for $old or $new that represents
				  "The default user"
		Shift_Notset 	= Constant for $old or $new representing
				  that no assignment has been made

	Inherent data from Messages. This has been hard to determine
	but as near as I can figure out, we have:

		mode		= Slash.MSG_MODE_EMAIL or Slash.MSG_MODE_WEB
		user		= User the message is being sent to (?)

__title__
Useless title to template
__page__
shifts
__lang__
en_US
__name__
shift_change
__template__
[%
	IF msg.mode == Slash.MSG_MODE_WEB;
		# Set formatting codes for web.
		bold='<b>'; unbold='</b>'; break='<br>';
	ELSE;
		# Set formatting codes for email.
		bold='*'; unbold='*'; break="\n";
	END;

	IF user.uid == old;
		the_shift = "your $shift";
	ELSE;
		IF old > 0;
			the_shift = "${old_nickname}'s $shift";
		ELSE;
			IF old == Shift_Notset;
				the_shift = "the unassigned $shift";
			ELSE;
				the_shift = "${old_nickname}'s usual $shift";
			END;
		END;
	END;

	IF user.uid == new;
		new_assign = 'you have';
	ELSE;
		new_assign = "${new_nickname} has";
	END;
-%]
[% bold %]NOTICE OF SHIFT CHANGE[% unbold; break;
break -%]
[% IF type == 'default' -%]
Please be aware that [% new_assign %] been assigned[% break;
bold; 'all of '; the_shift; unbold -%] shifts for [% day %].[%
break -%]
[% ELSE -%]
Please be aware that [% new_assign %] been assigned[% break;
bold; the_shift; unbold -%] shift on [% day.ucfirst %][% IF date %], [% 
date.replace(' 00:00', ''); END %].[% break;
break -%]
[% END -%]
Make sure you update your calendars appropriately![%
break;
break; -%]
__seclev__
10000
__version__
$Id: shift_change;shifts;default,v 1.1 2005/03/08 22:33:35 pudge Exp $
