<?cs def:print_label_row(label, value) ?>
  <tr>
    <td class="regheading" align="right"><?cs var:label ?></td>    
    <td class="regheading"><?cs var:value ?></td>    
  </tr>
</td>
<?cs /def ?>

<?cs def:print_search_critira() ?>
  <table border="4" cellspacing="0">
     <?cs call:print_label_row(lang.survey_deliver_course_list.label[0], search_param) ?> 
     <?cs call:print_label_row(lang.survey_deliver_course_list.label[1], "") ?> 
     <?cs each:this = subdir ?>
      <tr><td>&nbsp;</td>
      <td>
       <?cs if:this.url ?>
        <?cs var:this.value ?>
        <a href="<?cs var:this.url ?>" title="<?cs var:lang.survey_deliver_course_list.desc_help ?>" class="normal">(<?cs var:this.desc ?>)</a>
      <?cs else ?>
       <?cs this.value ?> (<?cs var:this.desc ?>)
      <?cs /if ?>
     </td>
     <?cs /each ?>
     <?cs call:print_label_row(lang.survey_deliver_course_list.label[2], lang.survey_deliver_course_list.type[params_type] ) ?> 
     
     <?cs call:print_label_row(lang.survey_deliver_course_list.label[3], lang.survey_deliver_course_list.where[params_where]) ?> 
     <?cs call:print_label_row(lang.survey_deliver_course_list.label[4], number_matches) ?> 
  </table>
<?cs /def ?>

<?cs def:print_course_info(mycourse) ?>
  <?cs if:mycourse.letter ?>
     <tr class="survey_color"><td colspan="6"><?cs var:mycourse.letter ?></td></tr>
  <?cs /if ?> 
  <tr>
   <td>
     <input type="checkbox" name="course_list" value="<?cs var:mycourse.subdir ?>/<?cs var:mycourse.dirname ?>:<?cs var:mycourse.course_no ?>" />
   </td>
   <td><?cs var:mycourse.subdir ?>/<?cs var:mycourse.dirname ?></td>
   <td><?cs var:mycourse.course_no ?></td>
   <td><?cs var:mycourse.course_title ?></td>
   <td><?cs var:mycourse.semester ?></td>
   <td><?cs var:mycourse.instructor ?></td>
  </tr>
<?cs /def ?>

<?cs def:print_course_list(group) ?> 
<table width="75%">
<?cs each:this = group ?>
  <?cs if:this.name ?>
    <tr>
     <td colspan="6" class="regheading" align="center"> 
      <?cs if:super ?>
       <br /><?cs var:this.name ?>
       <a href="<?cs var:this.url ?>" title="<?cs var:lang.survey_deliver_course_list.desc_help ?>" class="normal"><?cs var:this.desc ?></a>
      <?cs else ?>
       <br /><?cs var:this.name ?><?cs var:this.desc ?>
      <?cs /if ?>
     </td>
    </tr>
 <?cs /if ?>
  <?cs each:course = this.course ?>
     <?cs call:print_course_info(course) ?>
  <?cs /each ?>
<?cs /each ?>   
  <tr class="survey_color">
    <td colspan="6" align="center">
     <?cs if:super ?>
     <br /><input type="submit" value="<?cs var:lang.survey_deliver_course_list.delete ?>" /><br /><br />
     <?cs else ?>
     <br /><input type="submit" value="<?cs var:lang.survey_deliver_course_list.submit ?>" /><br /><br />
     <?cs /if ?>
   </td>
  </tr>
</table>
<?cs /def ?>

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
   <head>
     <?cs if:super ?>
      <title><?cs var:lang.survey_deliver_course_list.super_title ?></title>
     <?cs else ?>
      <title><?cs var:lang.survey_deliver_course_list.page_title ?></title>
     <?cs /if ?>

   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <link rel="StyleSheet" href="<?cs var:image_path ?>common.css" type="text/css" media="screen" />
   <link rel="StyleSheet" href="<?cs var:image_path ?>survey.css" type="text/css" media="screen" />
  </head>

<body>
<div>
   <a href="javascript:history.back()" title="<?cs var:lang.survey_deliver_course_list.goback ?>">
    <img src="<?cs var:image_path ?>back_arrow.gif" width="50" height="34" alt="<?cs var:lang.survey_deliver_course_list.goback ?>" />
   </a>
</div>

<div>
  <?cs if:super ?>
    <form  method="post" action="super_delete_course_confirm" >
  <?cs else ?>
  <form  method="post" action="survey_deliver" >
  <?cs /if ?>

  <div>
   <input type="hidden" name="id" value="<?cs var:Query.id ?>" />
   <?cs if:!super ?>
   <input type="hidden" name="crs" value="1" />
   <input type="hidden" name="count" value="<?cs var:Query.count ?>" />
  <?cs /if ?>
   <input type="hidden" name="num_course" value="<?cs var:number_matches ?>" />
  </div>
  <table width="100%">
    <tr><td align="center">
     <?cs call:print_search_critira() ?>
     <?cs if:super ?>
       <div class="center_red"><?cs var:lang.survey_deliver_course_list.delete_title ?></div>
       <div class="center_msg"><?cs var:lang.survey_deliver_course_list.steps1 ?></div>
     <?cs else ?>
       <div class="center_msg"><?cs var:lang.survey_deliver_course_list.steps ?></div>
     <?cs /if ?>
     <?cs if:normal_count ?>
        <?cs call:print_course_list(ctr_group) ?> 
     <?cs elif:standalone_count ?>
        <?cs call:print_course_list(std_group) ?> 
     <?cs elif:temp_count ?>
        <?cs call:print_course_list(temp_group) ?> 
     <?cs /if ?>
    </td></tr>
  </table>    
</form>
</div>
</body>
</html>

