Changeset 620

Show
Ignore:
Timestamp:
07/02/08 18:44:15 (3 months ago)
Author:
aarkerio
Message:

In spanish please

Location:
trunk/app
Files:
11 modified

Legend:

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

    r540 r620  
    3838        $order      = "News.id DESC"; 
    3939                     
    40         $limit      = 10; 
    41          
    42         $this->set('data', $this->News->findAll($conditions, $fields, $order)); 
     40        $limit      = 8; 
     41         
     42        $this->set('data', $this->News->findAll($conditions, $fields, $order, $limit)); 
    4343         
    4444        $this->Portal->statics(); // Charge Portal components aka Sidebars 
     
    126126   
    127127  // change user status actived/no actived 
    128   public function admin_change($id, $status) 
     128  public function admin_change($status, $news_id) 
    129129  {   
    130130     $this->data['News']['status'] = ($status == 0 ) ? 1 : 0; 
    131131      
    132      $this->data['News']['id']     = $id; 
     132     $this->data['News']['id']     = $news_id; 
    133133      
    134      if ($this->News->save($this->data['News'])) 
    135      { 
    136            $this->msgFlash('News status changed', '/admin/news/listing'); 
    137      } 
     134     if ($this->News->save($this->data['News'])): 
     135           $this->msgFlash(__('Status modified', true), '/admin/news/listing'); 
     136     endif; 
    138137  } 
    139138   
  • trunk/app/locale/spa/LC_MESSAGES/default.po

    r617 r620  
    11msgid  "Delete" 
    2 msgstr "Remover" 
     2msgstr "Eliminar" 
    33 
    44msgid  "Edit" 
     
    1717msgstr "Archivo" 
    1818 
     19msgid  "Send comment" 
     20msgstr "Enviar comentario" 
     21 
     22msgid  "Write comment" 
     23msgstr "Comentar" 
     24 
     25msgid  "write" 
     26msgstr "escribe" 
     27 
     28msgid  "Total votes" 
     29msgstr "Votos totales" 
     30 
    1931msgid  "File saved" 
    2032msgstr "Archivo guardado" 
     
    4153msgstr "Inicio" 
    4254 
     55msgid  "Title" 
     56msgstr "Título" 
     57 
    4358msgid  "logged_in" 
    4459msgstr "Estás logeado como" 
     
    4661msgid  "from_dep" 
    4762msgstr "Desde la redaccion" 
     63      
     64msgid  "Are you sure to want to delete this?" 
     65msgstr "¿Está seguro de eliminar este registro?" 
    4866 
    4967msgid  "about_college" 
     
    200218msgstr "Publicado" 
    201219 
     220msgid  "Draft" 
     221msgstr "Borrador" 
     222 
     223msgid  "Status modified" 
     224msgstr "Estado modificado" 
     225 
    202226msgid  "Hidden" 
    203227msgstr "Oculto" 
  • trunk/app/views/elements/poll.ctp

    r458 r620  
    1010  $poll = $session->read('poll'); 
    1111   
    12   if ( $poll != null &&  $Element["Poll"]['Poll']['id'] == $poll) // the user has already voted, show poll results 
    13   { 
     12  if ( $poll != null &&  $Element["Poll"]['Poll']['id'] == $poll): // the user has already voted, show poll results 
     13   
    1414    $total_votes = 0; 
    1515     
    16     foreach ($Element["Poll"]["Pollrow"] as $key => $val)  
    17     { 
    18         $total_votes += $val["vote"];  // the total votes 
    19     } 
     16    foreach ($Element["Poll"]["Pollrow"] as $key => $val): 
     17         $total_votes += $val["vote"];  // the total votes 
     18    endforeach; 
    2019     
    21     echo "<p><b>" . $Element["Poll"]['Poll']['question'] ."</b></p>"; 
     20    echo $html->para('negrita', $Element['Poll']['Poll']['question']); 
    2221     
    23     foreach ($Element["Poll"]["Pollrow"] as $key => $val)  
    24     {         
    25              if ($val["vote"] > 0) 
    26              { 
    27                   $percent = ($val["vote"] * 100) / $total_votes;  // % = votes * 100 / total 
    28              } 
    29              else 
    30              { 
     22    foreach ($Element['Poll']['Pollrow'] as $val):         
     23             if ($val['vote'] > 0): 
     24                  $percent = ($val['vote'] * 100) / $total_votes;  // % = votes * 100 / total 
     25             else: 
    3126                  $percent = 0; 
    32              } 
     27         endif; 
    3328             $width   = number_format($percent, 0); 
    3429             echo '<p><b>'.$val['answer'].'</b> '.number_format($percent, 2).'% <br />';  
    3530             echo $html->image('static/poll/'.$val["color"].'.png', array("height"=>"10", "width"=>$width, "alt"=>$val["answer"], "title"=>$val["answer"]) ); 
    3631             echo "  ". $val['vote']; 
    37     } 
     32   endforeach; 
    3833     
    39     echo '<p class="negrita">Total votes:' . $total_votes . '</p>';  
    40   } 
    41   else // the user has no voted, print the form 
    42   { 
     34    echo $html->para('negrita', __('Total votes', true).':' . $total_votes);  
     35  
     36  else: // the user has no voted, print the form 
     37 
    4338    echo $ajax->form(); 
    4439     
    4540    $array   = array(); 
    4641     
    47     echo "<p><b>" . $Element["Poll"]['Poll']['question'] ."</b></p>"; 
     42    echo $html->para('negrita', $Element['Poll']['Poll']['question']); 
    4843     
    49     echo $form->hidden('Pollrow.poll_id', array("value"=>$Element["Poll"]['Poll']['id']));  // Poll_id 
     44    echo $form->hidden('Pollrow.poll_id', array('value'=>$Element['Poll']['Poll']['id']));  // Poll_id 
    5045     
    51     foreach ($Element["Poll"]['Pollrow'] as $key=>$val) 
    52     { 
    53        $array[$val['id']] = $val['answer'];  // construct id->value array 
    54     } 
     46    foreach ($Element['Poll']['Pollrow'] as $val): 
     47         $array[$val['id']] = $val['answer'];  // construct id->value array 
     48    endforeach; 
    5549     
    5650    echo '<span style="font-size:7pt">'; 
     
    6458        )); 
    6559    echo '</span></form>'; 
    66    } 
    67  
     60  endif; 
    6861?> 
    6962</div> 
  • trunk/app/views/helpers/gags.php

    r455 r620  
    1414   public function confirmDel($id, $model)  
    1515   { 
     16     $msg   = __('Are you sure to want to delete this?', true);    
     17     $strB  = $this->Form->create($model, array('action'=>'/admin_delete/'.$id, "onsubmit"=>"return confirm('".$msg."')")); 
     18     $strB .= $this->Form->end(__('Delete', true)); 
    1619         
    17         $strB  = $this->Form->create($model, array('action'=>'/admin_delete/'.$id, "onsubmit"=>"return confirm('Are you sure to delete?')")); 
    18         $strB .= $this->Form->end('Delete'); 
    19          
    20         return $strB; 
     20     return $strB; 
    2121   } 
    2222    
     
    2525         
    2626        $strB  = $this->Form->create($model, array('action'=>'admin_edit/'.$id)); 
    27         $strB .= $this->Form->end('Edit'); 
     27        $strB .= $this->Form->end(__('Edit', true)); 
    2828         
    2929        return $strB; 
     
    3333   { 
    3434            
    35            $status = ( $s == 1 ) ? 'Published' : 'Draft'; 
     35           $status = ( $s == 1 ) ? __('Published', true) : __('Draft', true); 
    3636            
    3737           return $status; 
  • trunk/app/views/layouts/admin.ctp

    r613 r620  
    55<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
    66 <head> 
    7   <title>Karamelo</title> 
     7  <title>Karamelo::cPanel</title> 
    88<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> 
    99<!--[if gte IE 5.5]> 
  • trunk/app/views/news/admin_add.ctp

    r546 r620  
    33   echo $javascript->link('fckeditor/fckeditor');  
    44 
    5    echo $html->addCrumb('Control Tools', '/admin/entries/start');  
    6    echo $html->addCrumb('News', '/admin/news/listing'); 
     5   echo $html->addCrumb('Control Panel', '/admin/entries/start');  
     6   echo $html->addCrumb(__('News', true), '/admin/news/listing'); 
    77   echo $html->getCrumbs(' / '); 
    88   echo $form->create('News', array('onsubmit'=>'return validateNew()'));  
    99 
    10    echo $html->div('title_section', 'Add new'); 
     10   echo $html->div('title_section', __('Add new', true)); 
    1111?> 
    1212<table> 
    1313<tr> 
    1414<td> 
    15   <?php  
    16       echo $form->input('News.title', array("size" => 40, "maxlength" => 120)); 
     15 <?php  
     16      echo $form->input('News.title', array('size' => 40, 'maxlength' => 120)); 
    1717      echo $form->error('News.title', 'Title is required.');  
    18   ?> 
    19 </td> 
    20 <td> 
    21   <?php  
    22     echo $form->label('News.theme_id', 'Theme:'); 
     18 ?> 
     19</td><td> 
     20 <?php  
     21    echo $form->label('News.theme_id', __('Theme', true)); 
    2322    echo $form->select('News.theme_id', $themes, null, null, null, false, false);       
    2423  ?> 
    25 </td> 
    26 <td> 
     24</td><td> 
    2725<?php  
    2826   echo $form->input('News.reference', array('size'=> 30, 'maxlength'=> 250, 'value'=>'http://'));  
    2927 ?> 
    30 </td> 
    31 <td> 
    32   <?php echo $html->link($html->image('admin/myimages.jpg', array("alt"=>"My Images", "title"=>"My Images")), '#', array("onclick"=>"javascript:window.open('/admin/images/listing/set', 'blank', 'toolbar=no, scrollbars=yes,width=700,height=500')"), null, false) ?></p> 
     28</td><td> 
     29 <?php echo $html->link($html->image('admin/myimages.jpg', array("alt"=>"My Images", "title"=>"My Images")), '#', array("onclick"=>"javascript:window.open('/admin/images/listing/set', 'blank', 'toolbar=no, scrollbars=yes,width=700,height=500')"), null, false) ?></p> 
    3330</td></tr> 
    3431 
     
    4037  ?> 
    4138</td></tr> 
    42 <tr><td colspan="2"> 
     39<tr><td> 
    4340  <?php  
    4441     echo $form->label('News.status', 'Published:' ); 
    4542     echo $form->checkbox('News.status', array('value'=>1));  
    4643  ?> 
    47 </td> 
    48  <td> 
     44</td><td> 
    4945  <?php  
    5046     echo $form->label('News.comments', 'Comments actived:' ); 
     
    5248  ?> 
    5349</td> 
    54 <td> 
     50<td  colspan="2"> 
    5551   <?php  
    5652     echo $form->label('News.end', 'Finish editing:'); 
     
    6056</tr> 
    6157   
    62 <tr><td colspan="4">  <?php echo $form->end('Save'); ?> </td></tr> 
     58<tr><td colspan="4">  <?php echo $form->end(__('Save', true)); ?> </td></tr> 
    6359 
    6460</table> 
  • trunk/app/views/news/admin_edit.ctp

    r401 r620  
    11<?php  
    22  echo $javascript->link('fckeditor/fckeditor'); 
    3   echo $html->addCrumb('Control Tools', '/admin/entries/start');  
    4   echo $html->addCrumb('News', '/admin/news/listing');  
     3  echo $html->addCrumb('Control Panel', '/admin/entries/start');  
     4  echo $html->addCrumb(__('News', true), '/admin/news/listing');  
    55  echo $html->getCrumbs(' / ');  
    66 
     
    1414<td> 
    1515<?php  
    16   echo $form->input('News.title', array('size' => 40, 'maxlength' => 120)); 
     16  echo $form->input('News.title', array('size' => 40, 'maxlength' => 120, 'label'=>__('Title', true))); 
    1717  echo $form->error('News.title', 'Title is required.');  
    1818?> 
     
    3434  <?php  
    3535     echo $form->label('News.Body', 'Body:') . '<br />'; 
    36      echo $form->textarea('News.body', array('cols'=>80, 'rows'=>35));  
     36     echo $form->textarea('News.body', array('cols'=>90, 'rows'=>35));  
    3737     echo $fck->load('NewsBody', 'Karamelo');  
    3838  ?> 
     
    5858</td> 
    5959</tr> 
    60 <tr><td colspan="4">  <?php echo $form->end('Save'); ?></td></tr> 
     60<tr><td colspan="4"> <?php echo $form->end(__('Save', true)); ?></td></tr> 
    6161</table> 
  • trunk/app/views/news/admin_listing.ctp

    r407 r620  
    1 <div class="title_section">News</div> 
    2  
    3 <p> 
    4   <?php  
    5      echo $html->link($html->image('actions/new.png', array("alt"=>"Add new", "title"=>"Add new")), '/admin/news/add', null, false, false); 
    6      echo $html->link($html->image('static/forum.gif', array("alt"=>"See comments", "title"=>"See comments")), '/admin/discussions/listing', null, false, false); 
    7   ?> 
    8  
    9 </p> 
    10  
     1<?php 
     2  echo $html->div('title_section', __('News', true)); 
     3  echo $html->link($html->image('actions/new.png', array("alt"=>"Add new", "title"=>"Add new")), '/admin/news/add', null, false, false); 
     4  echo $html->link($html->image('static/forum.gif', array("alt"=>"See comments", "title"=>"See comments")), '/admin/discussions/listing', null, false, false); 
     5?> 
    116<table class="tbadmin"> 
    12  
    137<?php 
    14 //die(print_r($data)); 
    158 
    169$th = array ('Edit', 'Title', 'Status', 'Delete'); 
    1710echo $html->tableHeaders($th);   
    18 foreach ($data as $key=>$val) 
    19     { 
    20              
     11foreach ($data as $key=>$val): 
     12       $st = ($val['News']['status']) ? __('Published', true) : __('Draft', true);      
    2113       $tr = array ( 
    2214        $gags->sendEdit($val['News']['id'], 'news'), 
    2315        $val['News']['title'], 
    24         $gags->setStatus($val['News']['status']), 
     16        $html->link($st, '/admin/news/change/'.$val['News']['status'].'/'.$val['News']['id']), 
    2517        $gags->confirmDel($val['News']['id'], 'news') 
    2618        ); 
     
    2921                                array('class'=>'evenRow',"onmouseover"=>"this.className='highlight'", "onmouseout"=>"this.className='evenRow'")); 
    3022     
    31     } 
     23endforeach; 
    3224?> 
    3325</table> 
     
    3628// echo $pagination;  
    3729?> 
    38  
  • trunk/app/views/news/display.ctp

    r604 r620  
    22// die(debug($_SERVER)); 
    33 
    4 echo $html->div('title_portal', __("news_campus", true)); 
     4echo $html->div('title_portal', __('News on Campus', true)); 
    55 
    66foreach ($data as $val): 
     
    4747                           false); 
    4848       
    49 echo $news->socialNets($val['News']['id'], $val['News']['title']); // Social nets buttons 
     49  echo $news->socialNets($val['News']['id'], $val['News']['title']); // Social nets buttons 
    5050       
    51      
    52  
    5351  echo '</div>'; 
    5452endforeach; 
  • trunk/app/views/news/view.ctp

    r604 r620  
    11<?php 
    22// die(debug($data)); 
    3 echo $html->div('titnew', $data['News']['title']); 
     3 
     4echo $html->div('news_title', $html->link($data['News']['title'], '/news/view/'. $data['News']['id'])); 
    45 
    56echo $html->div('redaccion', __('from_dep', true).'<i> '.$data['Theme']['theme'].'</i>, posted by '.$html->link($data['User']['username'], '/users/about/'.$data['User']['username']).' on '. $data['News']['created']);  
     
    5859?> 
    5960<fieldset> 
    60    <legend>Write comment:</legend> 
     61   <legend><?php __('Write comment'); ?></legend> 
    6162<?php  
    62     echo $form->label('Discussion.comment', '<b>'. $session->read('Auth.User.username') . '</b>  write:').'<br />';  
     63    echo $form->label('Discussion.comment', '<b>'. $session->read('Auth.User.username') .'</b> '.  __('write', true) . ':<br />'); 
    6364    echo $form->textarea('Discussion.comment', array('cols'=>60, 'rows'=>10)); 
    64     echo $form->end('Send comment'); 
     65    echo $form->end(__('Send comment', true)); 
    6566 else: 
    66     echo $html->para(null, $html->link('Login to write comments', '/users/login'));  
     67    echo $html->para(null, $html->link(__('Login to write comments', true), '/users/login'));  
    6768 endif;  
    6869}  
  • trunk/app/webroot/css/portal/portal.css

    r604 r620  
    213213 
    214214#page { 
    215     width: 760px; 
     215    width: 800px; 
    216216    margin: 0 auto; 
    217217} 
     
    221221#content { 
    222222    float: right; 
    223     width: 519px; 
     223    width: 600px; 
    224224} 
    225225 
     
    232232#sidebar { 
    233233    float: left; 
    234     width: 200px; 
    235     padding: 0 20px 0 0; 
     234    width: 180px; 
     235    padding: 0 10px 0 0; 
    236236    border-right: 1px dotted #DCDCDC; 
    237237}