Changeset 732 for trunk/app/views

Show
Ignore:
Timestamp:
08/21/08 18:11:48 (3 months ago)
Author:
aarkerio
Message:

Little bugs fixed

Location:
trunk/app/views/vclassrooms
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/vclassrooms/admin_record.ctp

    r731 r732  
    66 echo $html->getCrumbs(' / '); 
    77 
    8  echo '<br /><br />'; 
    9  echo '<div style="border: 1px dotted black;width:80%;padding:9px;margin:0 auto;">'; 
     8 echo '<div style="border: 1px dotted black;width:80%;padding:9px;margin:15px auto;">'; 
    109 echo $html->div('title_section', $data['User']['name']); 
    1110 echo $html->div(null, $html->link($data['User']['email'], $data['User']['email'])); 
     
    136135 endif; 
    137136    
    138  
    139137 echo '<h1>'.__('Participations in forums', true).'</h1>'; 
    140  
    141138 if ( count($data['replies']) > 0 ): 
    142139   // Replies on forums. Model: Topic 
     
    173170 
    174171 // Participations, model:  Participation 
    175  $ppoints = (int) 0;  // participation points  
     172 $ppoints = (int) 0;  // participation points 
     173 echo '<h1>'.__('Participations', true).'</h1>';  
    176174 if ( count($data['participations']) > 0 ): 
    177    echo '<h1>'.__('Participations', true).'</h1>'; 
    178175   foreach ($data['participations'] as $p): 
    179176   e('<div style="border:1px dotted gray;padding:4px;margin:2px;height:20px;">'); 
     
    204201    e('</div>'); 
    205202    endforeach; 
    206     e($html->div(null, $html->image('static/loading.gif', array('alt'=>'Loading'), array('id'=>'loadingpa', 'style'=>'display:none')))); 
     203 
     204  e($html->div(null, $html->image('static/loading.gif', array('alt'=>'Loading')), array('style'=>'display:none;', 'id'=>'loadingpa'))); 
    207205       
    208206 else: 
    209207    echo  $html->para(null, __('No participation found', true)); 
     208 endif; 
     209 
     210 // Reports, model:  Report 
     211 $repoints = (int) 0;  // participation points 
     212 echo '<h1>'.__('Reports', true).'</h1>';  
     213 if ( count($data['reports']) > 0 ): 
     214   foreach ($data['reports'] as $r): 
     215   e('<div style="border:1px dotted gray;padding:4px;margin:2px;height:20px;">'); 
     216 
     217   $div_id = 're'.$r['Report']['id']; 
     218  
     219   $repoints += (int) $r['Report']['points']; 
     220   
     221   echo $html->div(null, $r['Report']['points'].' '.__('points',true),  array('id'=>$div_id,'style'=>'width:150px;float:left;')); 
     222 
     223   echo '<div style="width:450px;float:right;">';     
     224   echo __('Report', true).': '. $html->link($r['Report']['description'], '#', array('title'=>__('View reply', true), 'onclick'=>"window.open('/admin/participations/show/".$r['Report']['id']."','mywin','left=20,top=20,width=700,height=700,toolbar=0,resizable=1')")).'  '; 
     225 
     226     echo $ajax->link($html->image('static/adownmod.png', array('alt'=>__('Points down', true), 'title'=>__('Points down', true))) , 
     227                           '/admin/reports/points/'.$r['Report']['id'].'/down', 
     228                        array('update'     => $div_id, 
     229                              'loading'    =>"Element.show('loadingrep');", 
     230                                  'interactive'=>'tp('.$data['User']['id'].','.$data['Vclassroom']['id'].')', 
     231                          'complete'   =>"Element.hide('loadingrep');Effect.Appear(".$div_id.");"),null,false); 
     232     echo $ajax->link($html->image('static/aupmod.png', array('alt'=>__('Points up', true), 'title'=>__('Points up', true))), 
     233                           '/admin/reports/points/'.$r['Report']['id'].'/up', 
     234                        array('update'     => $div_id, 
     235                                  'loading'    =>"Element.show('loadingrep');", 
     236                                  'interactive'=>'tp('.$data['User']['id'].','.$data['Vclassroom']['id'].')', 
     237                          'complete'   =>"Element.hide('loadingrep');Effect.Appear(".$div_id.");"),null,false); 
     238 
     239      e('</div>'); 
     240    e('</div>'); 
     241    endforeach; 
     242 
     243  e($html->div(null, $html->image('static/loading.gif', array('alt'=>'Loading')), array('style'=>'display:none;', 'id'=>'loadingrep'))); 
     244 
     245 else: 
     246    echo  $html->para(null, __('No reports found', true)); 
    210247 endif; 
    211248 
     
    213250 echo  $html->div(null, 'Webquests ' .__('points', true) .': '. $wpoints); 
    214251 echo  $html->div(null, __('Participations', true) .' '. __('points', true) .': '. $ppoints, array('id'=>'parpoints')); 
    215   
    216  $points = ($tpoints + $wpoints + $rpoints + $ppoints); 
     252 echo  $html->div(null, __('Reports', true) .' '. __('points', true) .': '. $repoints, array('id'=>'reppoints')); 
     253  
     254 $points = ($tpoints + $wpoints + $rpoints + $ppoints + $repoints); 
    217255  
    218256 echo  $ajax->div('totalpoints') . '<b>'.__('Total points', true).': ' . $points .'</b>'. $ajax->divEnd('totalpoints'); 
  • trunk/app/views/vclassrooms/upload.ctp

    r675 r732  
    99<?php 
    1010 echo $form->label('Report.file', __('File', true). ': '); 
    11  echo $form->file('Report.file').'<br /><br />'; 
    12    
     11 echo $form->file('Report.file').'<br /><br />';   
    1312 
    14  echo $form->input('Report.description', array('size'=>40, 'maxlength'=>100, 'label'=>__('Description', true))); 
     13 echo $form->input('Report.description', array('size'=>40, 'maxlength'=>40, 'label'=>__('Description', true))); 
    1514 echo $form->end(__('Upload', true));  
    1615?>