Changeset 758 for trunk

Show
Ignore:
Timestamp:
09/07/08 13:00:56 (2 months ago)
Author:
aarkerio
Message:

Update models

Location:
trunk/app
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/controllers/messages_controller.php

    r722 r758  
    557557 *   
    558558 */ 
    559  public function admin_delete($id=null) 
    560  { 
    561    //die(debug($this->data['Message'])); 
    562  
    563    foreach ($this->data['Message'] as $v): 
     559 public function admin_delete($message_id=null) 
     560 { 
     561   if ($this->data['Message']): 
     562      foreach ($this->data['Message'] as $v): 
    564563         if ( $v != 0 ): 
    565564                 $this->Message->del($v); 
    566565         endif; 
    567    endforeach; 
    568  
     566      endforeach; 
     567   else: 
     568      $this->Message->del($message_id); 
     569   endif; 
    569570   $this->msgFlash(__('Data removed', true),'/admin/messages/listing'); 
    570571 } 
  • trunk/app/locale/spa/LC_MESSAGES/default.po

    r755 r758  
    1111msgstr "Ya has encontrado este tesoro" 
    1212 
     13msgid  "You must select at least one message" 
     14msgstr "Debes seleccionar al menos un mensaje" 
     15 
    1316msgid  "Reports" 
    1417msgstr "Reportes" 
     
    439442msgid  "Data saved" 
    440443msgstr "Datos guardados" 
     444 
     445msgid  "Data removed" 
     446msgstr "Datos eliminados" 
    441447 
    442448msgid  "Categories Forums" 
  • trunk/app/views/elements/admin_menu.ctp

    r633 r758  
    1111                                                          $html->link(__('Add eCourse', true), '/admin/ecourses/add'), 
    1212                                                                  $html->link(__('eClassrooms', true), '/admin/vclassrooms/listing'), 
    13                                                                   $html->link(__('Forums', true), '/admin/catforums/listing') 
     13                                                                  $html->link(__('Forums', true), '/admin/catforums/listing'), 
     14                                                                  $html->link(__('Messages', true), '/admin/messages/listing') 
    1415                                                             ), 
    1516             $html->link('Webquests', '/admin/webquests/listing'), 
  • trunk/app/views/helpers/fpdf.php

    r756 r758  
    2020  public function __construct($orientation='P',$unit='mm',$format='Letter')  
    2121  {  
    22     $this->pdf = new myFPDF($orientation, $unit, $format); 
     22    $this->pdf = new myFPDF(null, null, $format); 
    2323    $this->pdf->SetFont('Arial','B',10); 
    2424  } 
     
    2727  { 
    2828    $string  =  utf8_decode($data);  // UTF-8 
    29     $this->pdf->Cell(0,2,$string,0,1,'L'); 
     29    // Cell(float w [, float h [, string txt [, mixed border [, int ln [, string align [, boolean fill [, mixed link]]]]]]]) 
     30    $this->pdf->Cell(0,3,$string,0,1,'L'); 
    3031    $this->pdf->Ln(2); 
    3132  } 
  • trunk/app/views/messages/admin_listing.ctp

    r684 r758  
    77 
    88if ( $session->read('Auth.User.group_id') == 1): // if user belongs to admin group 
    9    echo '<div style="position:absolute;right:300px;top:35px;">'; 
    10    echo $html->link($html->image('admin/message_board.gif', array("alt"=>"General Message", "title"=>"General Message")), '/admin/messages/general', null, false, false); 
     9   echo '<div style="position:absolute;right:300px;top:75px;">'; 
     10   echo $html->link($html->image('admin/message_board.gif', array('alt'=>'General Message', 'title'=>'General Message')), '/admin/messages/general', null, false, false); 
    1111   echo '</div>'; 
    1212endif; 
     
    8484        var j = 0; 
    8585        for (i = 0; i < document.privmsg_list.length; i++) 
    86         { 
    87             if (document.privmsg_list.elements[i].checked == true) 
     86    { 
     87        if (document.privmsg_list.elements[i].checked == true) 
    8888            { 
    8989                j++; 
    9090            } 
    91         } 
     91    } 
    9292        //alert('Inside '+ j); 
    9393         
    9494        if (j == 0 ) 
    9595        { 
    96             alert('You must select at least one message'); 
     96            alert('<?php __('You must select at least one message');?>'); 
    9797            return false; 
    9898        } 
  • trunk/app/views/vclassrooms/admin_export.ctp

    r756 r758  
    4545  endif; 
    4646 endforeach;     
    47  
    48  echo $fpdf->fpdfOutput('class_report.pdf');     
     47  
     48 $vname =  str_replace(' ','_', 'Karamelo_'.$group['Vclassroom']['name'].'_'.date('l jS \of F Y')); 
     49 echo $fpdf->fpdfOutput($vname.'.pdf');     
    4950?>