__section__
default
__description__
The only page that will be defined in this plugin, this form will allow you 
to specify both the default shifts, and any shift changes that will need
to be made in the upcoming weeks (number of weeks on form determined by 
<b>constants.sheduleshift_numweeks</b>.
__title__
Scheduling Form (ScheduleShift)
__page__
shifts
__lang__
en_US
__name__
scheduleForm
__template__
[% key = "-1";
   author_list.$key = "-";

   myodd   = 'data_hl1';
   myeven  = 'data_hl2';
   myweeks = ['Default'];
   FOR w = weeks;
     myweeks.push(w);
   END;

-%]

<form action="[% env.script_name %]" method="post">
<input type="hidden" name="op" value="save">

[% PROCESS titlebar width=> "100%", title => "$constants.sitename Shifts" %]

<table width="100%" cellpadding="5" cellspacing="0">

<tr class="tb_col">
  <th> </th>
[%- FOR day = days_of_week -%]
  <th>[% day.ucfirst %]</th>
[%- END -%]
</tr>

[% FOR w = myweeks -%]
<tr class="[% IF loop.index mod 2; myodd; ELSE; myeven; END %]">
  <th class="tb_col">[% w %]</th>
  [% FOR d = days_of_week -%]
    <td[% IF w == myweeks.1 && curr_day == d %] bgcolor="[% user.colors.bg_3 %]"[% END %]>[% FOR s = shift_types;
             key = "-2";

             # XXX skip if already past date
             def_sel = default_shifts.$d.$s || -1;
             cur_sel = shifts.$w.$d.$s || def_sel;

             myauthors = {};
             IF w == myweeks.0;
               mylabel = "${d}_${s}";

               FOR author = author_list.keys;
                 myauthors.$author = author_list.$author;
               END;

             ELSE;
               mylabel = "S_${w}_${d}_$s";

               FOR author = author_list.keys;
                 IF author == def_sel;
                   myauthors.$key = author_list.$def_sel;
                   IF cur_sel == def_sel;
                     cur_sel = key;
                   END;
                 ELSIF author == cur_sel && cur_sel != def_sel;
                   myauthors.$author = author_list.$author _ ' *';
                 ELSE;
                   myauthors.$author = author_list.$author;
                 END;
               END;

             END;

             Slash.createSelect(
               mylabel,
               myauthors, cur_sel, 1
             );

         %]<br>
       [%- END -%]
    </td>
  [%- END -%]
</tr>
[% END %]
</table>

<input type="submit" value="Save Schedule Changes">
</form>
__seclev__
10000
__version__
$Id: scheduleForm;shifts;default,v 1.3 2005/09/01 19:25:49 tvroom Exp $
