Show
Ignore:
Timestamp:
10/02/07 15:28:29 (14 months ago)
Author:
aarkerio
Message:

Members

Location:
trunk/app/views/ecourses
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/ecourses/admin_add.thtml

    r146 r186  
    77    echo $html->input('Ecourse/title', array("size" => 30, "maxlength" => 90)) . ' e.g. History of Literature'; 
    88    echo $html->tagErrorMsg('Ecourse/title', 'A FAQ title is required.'); 
     9 
     10    echo $form->labelTag('Ecourse/description', 'Description:'); 
     11    echo $html->textarea('Ecourse/description', array("cols" => 40, "rows" =>4)); 
     12 
    913      
    10 echo $form->labelTag('Ecourse/code', 'Code:' ); 
     14    echo $form->labelTag('Ecourse/code', 'Code:' ); 
    1115    echo $html->input('Ecourse/code', array("size" => 12, "maxlenght" => 12))  . ' max. 12 characters, ie.ROM2121'; 
    1216    echo $html->tagErrorMsg('Ecourse/code', 'A category description is required.'); 
     
    2024    echo $html->selectTag('Ecourse/lang_id', $langs, null, null, null, false); 
    2125?> 
    22   <div style="clear:both"></div> 
    23   <?php echo $form->labelTag('Ecourse/status', 'Activate:' );?><br /> 
    24   <?php echo $html->checkbox('Ecourse/status', null, array("value"=>1)); ?><br /> 
    25   <br /><br /> 
    26   <?php echo $form->labelTag('Ecourse/access', 'Restricted access:' );?><br /> 
    27   <?php echo $html->checkbox('Ecourse/access', null, array("value"=>1, "onclick" => "mostrar('invi_code')")); ?><br /> 
    28  
    29 <div id="invi_code" style="display:none;"> 
    30 <?php 
    31     echo $form->labelTag('Ecourse/secret', 'Secret:' ); 
    32     echo $html->input('Ecourse/secret', array("size" => 6, "maxlength" => 6)) . 'The code to allow students register by themselves'; 
    33 ?> 
    34 </div> 
    3526 
    3627  <div style="clear:both"></div> 
     
    7263       if (secret.value.length < 5) 
    7364       {  
    74        alert('You must type a secret code'); 
    75        secret.focus(); 
    76        return false; 
    77       } 
     65         alert('You must type a secret code bigger than 5'); 
     66         secret.focus(); 
     67         return false; 
     68       } 
    7869  } 
    7970  return true; 
  • trunk/app/views/ecourses/admin_edit.thtml

    r141 r186  
    1 <div> 
    2 <?php echo $html->addCrumb('Control Tools', '/admin/entries/start'); ?>  
    3 <?php echo $html->addCrumb('FAQs', '/admin/catfaqs/listing'); ?>  
    4 <?php echo $html->getCrumbs(' / '); ?> 
     1<?php  
     2echo $html->formTag('/admin/ecourses/edit','post', array("onsubmit"=>"return chkForm();"));  
     3echo $html->hidden('Ecourse/id'); 
     4?> 
     5<fieldset> 
     6  <legend>New Course</legend> 
     7<p>By default, your course is accessible to everybody. If you want some c0onfidentiality, the simplest way is to open registration during one week, ask the students to register themselves, then close registration and check for possible intruders in the user list.</p> 
     8  <?php  
     9    echo $form->labelTag('Ecourse/title', 'Title:'); 
     10    echo $html->input('Ecourse/title', array("size" => 30, "maxlength" => 90)) . ' e.g. History of Literature'; 
     11    echo $html->tagErrorMsg('Ecourse/title', 'A FAQ title is required.'); 
     12     
     13    echo $form->labelTag('Ecourse/description', 'Description:'); 
     14    echo $html->textarea('Ecourse/description', array("cols" => 40, "rows" =>4)); 
     15   
     16  
     17    echo $form->labelTag('Ecourse/code', 'Code:' ); 
     18    echo $html->input('Ecourse/code', array("size" => 12, "maxlenght" => 12))  . ' max. 12 characters, ie.ROM2121'; 
     19    echo $html->tagErrorMsg('Ecourse/code', 'A category description is required.'); 
     20  ?> 
     21  <br /><br /> 
     22<?php 
     23    echo $form->labelTag('Ecourse/subject_id', 'Subject:'); 
     24    echo $html->selectTag('Ecourse/subject_id', $subjects, null, null, null, false); 
     25 
     26    echo $form->labelTag('Ecourse/lang_id', 'Lang:'); 
     27    echo $html->selectTag('Ecourse/lang_id', $langs, null, null, null, false); 
     28?> 
     29  <div style="clear:both"></div> 
     30  <?php echo $form->labelTag('Ecourse/status', 'Activate:' );?><br /> 
     31  <?php echo $html->checkbox('Ecourse/status', null, array("value"=>1)); ?><br /> 
     32  <br /><br /> 
     33  <?php echo $form->labelTag('Ecourse/access', 'Restricted access:' );?><br /> 
     34  <?php echo $html->checkbox('Ecourse/access', null, array("value"=>1, "onclick" => "mostrar('invi_code')")); ?><br /> 
     35 
     36<div id="invi_code" style="display:none;"> 
     37<?php 
     38    echo $form->labelTag('Ecourse/secret', 'Secret:' ); 
     39    echo $html->input('Ecourse/secret', array("size" => 6, "maxlength" => 6)) . 'The code to allow students register by themselves'; 
     40?> 
    541</div> 
    642 
    7 <?php  
    8    echo $html->formTag('/admin/catfaqs/edit','post');  
    9    echo $html->hidden('Catfaq/id'); 
    10 ?> 
    11 <fieldset> 
    12   <legend>Edit Item</legend> 
    13   <?php  
    14     echo $form->labelTag('Catfaq/title', 'Title:' ); 
    15     echo $html->input('Catfaq/title', array("size" => 30, "maxlength" => 90)); 
    16     echo $html->tagErrorMsg('Catfaq/title', 'Title is required.'); 
    17       
    18      echo $form->labelTag('Catfaq/description', 'Description:' ); 
    19     echo $html->textarea('Catfaq/description', array("cols" => 40, "row" => 20)); 
    20     echo $html->tagErrorMsg('Catfaq/description', 'Description is required.'); 
    21   ?> 
    2243  <div style="clear:both"></div> 
    2344  <br /> 
     
    2546</fieldset> 
    2647</form> 
     48<script type="text/javascript"> 
     49/* <![CDATA[ */ 
     50function mostrar(a) 
     51{ 
     52  var Div = document.getElementById(a); 
     53 
     54  if (Div.style.display == "none") 
     55  { 
     56       Div.style.display = "block"; 
     57   } 
     58   else 
     59   {  
     60           Div.style.display = "none"; 
     61    } 
     62 } 
     63 
     64function chkForm() 
     65{  
     66  var title   = document.getElementById("EcourseTitle"); 
     67  var access  = document.getElementById("EcourseAccess"); 
     68  var secret  = document.getElementById("EcourseSecret"); 
     69 
     70  if (title.value.length < 5) 
     71  { 
     72      alert('Title larger than 6 characters'); 
     73      title.focus(); 
     74      return false; 
     75  } 
     76 
     77  if (access.checked == true) 
     78  { 
     79       if (secret.value.length < 5) 
     80       {  
     81       alert('You must type a secret code'); 
     82       secret.focus(); 
     83       return false; 
     84      } 
     85  } 
     86  return true; 
     87} 
     88/* ]]> */ 
     89</script> 
  • trunk/app/views/ecourses/admin_listing.thtml

    r146 r186  
    2929      echo '<div class="butonright">' .$gags->sendEdit($val['Ecourse']['id'], 'ecourses') . '</div>'; 
    3030      echo $html->link($val['Ecourse']['title'], '/admin/ecourses/vclassrooms/'.$val['Ecourse']['id']); 
    31       echo '<p style="margin-left:15px;">'. $val['Ecourse']['code']  . '</p>'; 
     31      echo '<p>' . $val['Ecourse']['description']  . '</p>'; 
     32      echo '<p style="margin-left:15px;">Code:'. $val['Ecourse']['code']  . '</p>'; 
    3233      echo '<div class="butonright">'. $gags->confirmDel($val['Ecourse']['id'], 'ecourses') .'</div>'; 
    3334 echo '</div>'; 
  • trunk/app/views/ecourses/admin_vclassrooms.thtml

    r147 r186  
    2323foreach ($data['Vclassroom'] as $val) 
    2424{ 
     25 $s = ($val['status'] == 1) ? 'Actived' : ' No actived'; 
     26 
    2527 echo '<div style="padding:6px 3px 28px 4px;margin:10px 0 5px 0;border:1px dotted gray;">'; 
    2628      echo '<div class="butonright">' .$gags->sendEdit($val['id'], 'vclassrooms') . '</div>'; 
    2729      echo $html->link($val['name'], '/admin/vclassrooms/members/'.$val['id']); 
    28       echo '<p style="margin-left:15px;">'. $val['status']  . '</p>'; 
     30      echo '<p style="margin-left:15px;">Status: '. $s  . '</p>'; 
    2931      echo '<div class="butonright">'. $gags->confirmDel($val['id'], 'vclassrooms') .'</div>'; 
    3032 echo '</div>';