Show
Ignore:
Timestamp:
07/01/08 19:06:58 (5 months ago)
Author:
aarkerio
Message:

Little fixes

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/ecourses/admin_vclassrooms.ctp

    r396 r617  
    11<?php 
    2 //exit(print_r($data)); 
     2//die(debug($data)); 
    33 
    4 echo $html->addCrumb('Control Tools', '/admin/entries/start'); 
     4echo $html->addCrumb('Control Panel', '/admin/entries/start'); 
    55echo $html->addCrumb('Courses', '/admin/ecourses/listing');  
    66echo $html->getCrumbs(' / ');  
     
    88$str =  'Classrooms  on ' . $data['Ecourse']['title']; 
    99 
    10 if ( isset( $historic ) ) 
    11 { 
     10if ( isset( $historic ) ): 
    1211   $str .= ' (filed)'; 
    13 } 
     12endif; 
    1413 
    1514echo $html->div('title_section', $str); 
    1615 
    17  echo  $html->para(null, $html->link($html->image('static/vgroups.gif', array("alt"=>"Add new group", "title"=>"Add new group")),  '/admin/vclassrooms/add/'.$data['Ecourse']['id'], null, null, false)); 
    1816 
    19 if ( count($data['Vclassroom']) < 1 ) 
    20 { 
    21   echo $html->div('notice', 'No classrooms yet'); 
    22 } 
     17if ( count($data['Vclassroom']) < 1 ): 
     18    e($html->div('notice', 'No classrooms yet')); 
     19    $img = 'admin/vgroups-gray.gif';  
     20else: 
     21    $img = 'static/vgroups.gif';    
     22endif; 
    2323 
    24 foreach ($data['Vclassroom'] as $val) 
    25 { 
     24echo  $html->para(null, $html->link($html->image($img, array("alt"=>"Add new group", "title"=>"Add new group")),  '/admin/vclassrooms/add/'.$data['Ecourse']['id'], null, null, false)); 
     25 
     26 
     27foreach ($data['Vclassroom'] as $val): 
    2628 $s = ($val['status'] == 1) ? 'Enabled' : 'Filed'; 
    2729 
    2830      $tmp  =  $html->div('butonright', $gags->sendEdit($val['id'], 'Vclassroom')); 
    2931      $tmp .=  $html->link($val['name'], '/admin/vclassrooms/members/'.$val['id']); 
     32      $tmp .=  $html->div(null, 'Secret:'. $val['secret']); 
    3033      $tmp .=  $html->para(null, 'Status: '.$html->link($s,'/admin/vclassrooms/change/'.$val['id'].'/'.$val['status'].'/'.$val['ecourse_id'])); 
    3134      $tmp .=  $html->div('butonright', $gags->confirmDel($val['id'], 'Vclassroom')); 
    3235 
    3336      echo $html->div('grayblock', $tmp); 
    34 } 
     37endforeach; 
    3538 
    36 if ( !isset( $historic ) ) 
    37 { 
     39if ( !isset( $historic ) ): 
    3840echo $html->link( 
    3941                $html->image('admin/historic.png', array('alt'=>'Filed classrooms', 'title'=>'Filed classrooms')),  
    4042                '/admin/ecourses/vclassrooms/'.$data['Ecourse']['id'].'/historic', null, null, false); 
    41 } 
     43endif; 
    4244?>