Changeset 624

Show
Ignore:
Timestamp:
07/04/08 14:25:17 (3 months ago)
Author:
aarkerio
Message:

Internatiantilzation

Location:
trunk/app
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/config/sql/postgresql/vclassrooms.sql

    r436 r624  
    88    "ecourse_id" int NOT NULL REFERENCES ecourses(id) ON DELETE CASCADE, 
    99    "secret" varchar(6),   -- secret code to allow students register by themselves 
     10    "sdate" date NOT NULL DEFAULT now(), --starting date 
     11    "fdate" date NOT NULL DEFAULT now(), -- finish date 
    1012    "access" smallint NOT NULL DEFAULT 0 -- public / only with code 
    1113); 
  • trunk/app/controllers/vclassrooms_controller.php

    r617 r624  
    143143 public function admin_listing($historic = null) 
    144144 { 
    145       $this->layout = 'admin'; 
    146       $conditions = array("Vclassroom.user_id"=>$this->Auth->user('id'), "Vclassroom.status"=>1); 
    147       $fields     = array('id', 'name', 'created', 'user_id', 'ecourse_id', 'status'); 
    148       $order      = "Vclassroom.id DESC"; 
    149        
    150       if ($historic === 'historic') 
    151       { 
     145  $this->layout = 'admin'; 
     146  $conditions = array("Vclassroom.user_id"=>$this->Auth->user('id'), "Vclassroom.status"=>1); 
     147  $fields     = array('id', 'name', 'created', 'user_id', 'ecourse_id', 'status'); 
     148  $order      = "Vclassroom.id DESC"; 
     149       
     150  if ($historic === 'historic'): 
    152151    $conditions['Vclassroom.status'] = 0; 
    153152        $this->set('historic', true); 
    154       } 
    155  
    156       $this->pageTitle = 'eClass'; 
    157        
    158       $this->set('data', $this->Vclassroom->findAll($conditions, $fields, $order, null, null, 2)); 
     153  endif; 
     154 
     155  $this->pageTitle = 'eClass'; 
     156       
     157  $this->set('data', $this->Vclassroom->findAll($conditions, $fields, $order, null, null, 2)); 
    159158 } 
    160159 
     
    261260 
    262261   if (!empty($this->data["Vclassroom"])): 
    263         $this->Sanitize = new Sanitize; 
    264          
    265         $this->Sanitize->clean($this->data["Vclassroom"]);  
    266  
    267         $this->data["Vclassroom"]["user_id"] = $this->Auth->user('id'); 
    268         
    269         $this->Vclassroom->create(); 
    270          
    271       if ($this->Vclassroom->save($this->data["Vclassroom"])): 
     262     $this->Sanitize = new Sanitize; 
     263         
     264     $this->Sanitize->clean($this->data['Vclassroom']);  
     265 
     266     $this->data['Vclassroom']['user_id'] = $this->Auth->user('id'); 
     267 
     268     $this->Vclassroom->create(); 
     269         
     270     if ($this->Vclassroom->save($this->data["Vclassroom"])): 
    272271               $this->msgFlash('vClassroom added', '/admin/ecourses/vclassrooms/'.$this->data["Vclassroom"]["ecourse_id"]); 
    273       endif; 
     272     endif; 
    274273   else:      
    275274          $this->data = $this->Vclassroom->Ecourse->read(null, $ecourse_id); 
     
    342341 } 
    343342  
    344  public function admin_delete($id, $ecourse_id) 
    345  { 
    346     if ($this->Vclassroom->del($id)): 
    347        $this->msgFlash('Classroom deleted','/admin/ecourses/vclassrooms/'.$ecourse_id); 
     343 public function admin_delete($vclassroom_id, $ecourse_id) 
     344 { 
     345    if ($this->Vclassroom->del($vclassroom_id)): 
     346       $this->msgFlash(__('vClassroom deleted', true),'/admin/ecourses/vclassrooms/'.$ecourse_id); 
    348347    else: 
    349348           $this->flash('Error, call support', '/admin/ecourses/vclassrooms/'.$ecourse_id); 
  • trunk/app/locale/spa/LC_MESSAGES/default.po

    r620 r624  
    22msgstr "Eliminar" 
    33 
     4msgid  "Starting date" 
     5msgstr "Fecha de inicio" 
     6 
     7msgid  "Finishing date" 
     8msgstr "Fecha de fin de curso" 
     9 
     10msgid  "New Group for e-Course" 
     11msgstr "Nuevo grupo para el e-Course" 
     12 
     13msgid  "Filed classrooms" 
     14msgstr "Grupos archivados" 
     15 
     16msgid  "Edit vClass" 
     17msgstr "Editar vClass" 
     18 
    419msgid  "Edit" 
    520msgstr "Editar" 
     21 
     22msgid  "New Lesson" 
     23msgstr "Nueva lección" 
     24 
     25msgid  "Edit Lesson" 
     26msgstr "Editar lección" 
    627 
    728msgid  "New eCourse" 
  • trunk/app/views/ecourses/admin_vclassrooms.ctp

    r617 r624  
    2525 
    2626 
     27$msg   = __('Are you sure to want to delete this?', true);    
     28 
    2729foreach ($data['Vclassroom'] as $val): 
    2830 $s = ($val['status'] == 1) ? 'Enabled' : 'Filed'; 
    2931 
    30       $tmp  =  $html->div('butonright', $gags->sendEdit($val['id'], 'Vclassroom')); 
    31       $tmp .=  $html->link($val['name'], '/admin/vclassrooms/members/'.$val['id']); 
    32       $tmp .=  $html->div(null, 'Secret:'. $val['secret']); 
    33       $tmp .=  $html->para(null, 'Status: '.$html->link($s,'/admin/vclassrooms/change/'.$val['id'].'/'.$val['status'].'/'.$val['ecourse_id'])); 
    34       $tmp .=  $html->div('butonright', $gags->confirmDel($val['id'], 'Vclassroom')); 
    35  
    36       echo $html->div('grayblock', $tmp); 
     32   $tmp  =  $html->div('butonright', $gags->sendEdit($val['id'], 'Vclassroom')); 
     33   $tmp .=  $html->link($val['name'], '/admin/vclassrooms/members/'.$val['id']); 
     34   $tmp .=  $html->div(null, 'Secret:'. $val['secret']); 
     35   $tmp .=  $html->para(null, 'Status: '.$html->link($s,'/admin/vclassrooms/change/'.$val['id'].'/'.$val['status'].'/'.$val['ecourse_id'])); 
     36   $tmp .=  $html->div('butonright',  
     37   $form->create('Vclassroom', array('action'=>'/admin_delete/'.$val['id'].'/'.$val['ecourse_id'], "onsubmit"=>"return confirm('".$msg."')")). 
     38   $form->end(__('Delete', true))); 
     39   echo $html->div('grayblock', $tmp); 
    3740endforeach; 
    3841 
    3942if ( !isset( $historic ) ): 
    4043echo $html->link( 
    41                 $html->image('admin/historic.png', array('alt'=>'Filed classrooms', 'title'=>'Filed classrooms')),  
     44                $html->image('admin/historic.png', array('alt'=>__('Filed classrooms', true), 'title'=>__('Filed classrooms', true))),  
    4245                '/admin/ecourses/vclassrooms/'.$data['Ecourse']['id'].'/historic', null, null, false); 
    4346endif; 
  • trunk/app/views/lessons/admin_add.ctp

    r585 r624  
    66 
    77<fieldset> 
    8 <legend>Add Lesson</legend> 
     8<legend><?php __('New Lesson'); ?></legend> 
    99<table> 
    1010<tr><td> 
    11   <?php 
     11<?php 
    1212     echo $form->input('Lesson.title', array("size" => 50, "maxlength" => 120)); 
    1313     echo $form->error('Lesson.title', 'Title is required.');  
    14   ?> 
     14?> 
    1515  </td> 
    1616  <td> 
     
    4444  ?> 
    4545  </td></tr> 
    46   <tr><td colspan="3"> </fieldset> 
    47   <?php echo $form->end('Save'); ?> 
     46  <tr><td colspan="3">  
     47  <?php echo $form->end(__('Save', true)); ?> 
     48</fieldset> 
    4849</td></tr> 
    4950</table> 
  • trunk/app/views/lessons/admin_edit.ctp

    r585 r624  
    1212?> 
    1313<fieldset> 
    14 <legend>Edit Lesson: <?php echo $this->data['Lesson']['title']; ?></legend> 
     14<legend><?php __('Edit Lesson');?> : <?php echo $this->data['Lesson']['title']; ?></legend> 
    1515<table> 
    1616<tr><td> 
     
    5151     ?> 
    5252  </td></tr> 
    53   <tr><td colspan="3"> </fieldset> 
    54   <?php echo $form->end('Save'); ?> 
     53  <tr><td colspan="3">  
     54  <?php echo $form->end(__('Save', true)); ?> 
     55</fieldset> 
    5556</td></tr> 
    5657</table> 
  • trunk/app/views/vclassrooms/admin_add.ctp

    r617 r624  
    1212?> 
    1313<fieldset> 
    14   <legend>New Group for e-Course: <?php echo $this->data['Ecourse']['title']; ?></legend>   
    15   <?php   
    16     echo $form->input('Vclassroom.name', array('size' => 40, 'maxlength' => 60));  
    17      
    18     echo $form->label('Vclassroom.status', 'Enabled:');   
    19     echo $form->checkbox('Vclassroom.status', array('value'=>1)); 
     14  <legend><?php __('New Group for e-Course'); ?>:<?php echo $this->data['Ecourse']['title']; ?></legend>   
     15<?php   
     16 echo $form->input('Vclassroom.name', array('size' => 40, 'maxlength' => 60));  
    2017  
     18 echo $form->input('Vclassroom.sdate',array('type'=>'date','label'=>__('Starting date', true), 'dateFormat'=>'DMY')); 
     19  
     20 echo $html->para(null, '<br />'); 
    2121 
    22     echo $form->input('Vclassroom.secret', array('size' => 7, 'maxlength' => 6)); 
    23     echo $form->end('Save');  
     22 echo $form->input('Vclassroom.fdate',array('type'=>'date','label'=>__('Finishing date', true), 'dateFormat'=>'DMY')); 
     23 
     24 echo $form->input('Vclassroom.secret', array('size' => 7, 'maxlength' => 6)); 
     25 
     26 echo $form->label('Vclassroom.status', __('Enabled', true));  
     27 echo $form->checkbox('Vclassroom.status', array('value'=>1)); 
     28 
     29 echo $form->end('Save');  
    2430?> 
    2531</fieldset> 
  • trunk/app/views/vclassrooms/admin_edit.ctp

    r617 r624  
    11<?php  
    2  //exit(var_dump($this->data)); 
     2//exit(debug($this->data)); 
    33 echo $javascript->link('fckeditor/fckeditor'); 
    44 echo $html->addCrumb('Control Panel', '/admin/entries/start');   
     
    1111 
    1212<fieldset> 
    13   <legend>Edit Group</legend>  
     13  <legend><?php __('Edit vClass');?></legend>  
    1414<?php 
    15     echo $form->input('Vclassroom.name', array('size' => 40, 'maxlength' => 60));  
     15 echo $form->input('Vclassroom.name', array('size' => 40, 'maxlength' => 60));  
    1616 
    17     echo $form->label('Vclassroom.status', 'Status:'); 
    18     echo $form->checkbox('Vclassroom.status');  
     17 echo $form->input('Vclassroom.sdate',array('type'=>'date','label'=>__('Starting date', true), 'dateFormat'=>'DMY')); 
    1918 
    20      echo $form->input('Vclassroom.secret', array('size' => 6, 'maxlength' => 6)) 
     19 echo $form->input('Vclassroom.fdate',array('type'=>'date','label'=>__('Finishing date', true), 'dateFormat'=>'DMY')); 
     20 
     21 echo $form->label('Vclassroom.status', 'Status:'); 
     22 echo $form->checkbox('Vclassroom.status');  
     23 
     24 echo $form->input('Vclassroom.secret', array('size' => 6, 'maxlength' => 6)); 
     25 
     26 echo $form->end(__('Save', true));  
    2127?> 
    22  <div style="clear:both"></div> 
    23  <?php echo $form->end('Save'); ?> 
    2428</fieldset> 
    2529</div>