Changeset 620 for trunk/app/views/news
- Timestamp:
- 07/02/08 18:44:15 (5 months ago)
- Location:
- trunk/app/views/news
- Files:
-
- 5 modified
-
admin_add.ctp (modified) (4 diffs)
-
admin_edit.ctp (modified) (4 diffs)
-
admin_listing.ctp (modified) (3 diffs)
-
display.ctp (modified) (2 diffs)
-
view.ctp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/views/news/admin_add.ctp
r546 r620 3 3 echo $javascript->link('fckeditor/fckeditor'); 4 4 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'); 7 7 echo $html->getCrumbs(' / '); 8 8 echo $form->create('News', array('onsubmit'=>'return validateNew()')); 9 9 10 echo $html->div('title_section', 'Add new');10 echo $html->div('title_section', __('Add new', true)); 11 11 ?> 12 12 <table> 13 13 <tr> 14 14 <td> 15 <?php16 echo $form->input('News.title', array( "size" => 40, "maxlength"=> 120));15 <?php 16 echo $form->input('News.title', array('size' => 40, 'maxlength' => 120)); 17 17 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)); 23 22 echo $form->select('News.theme_id', $themes, null, null, null, false, false); 24 23 ?> 25 </td> 26 <td> 24 </td><td> 27 25 <?php 28 26 echo $form->input('News.reference', array('size'=> 30, 'maxlength'=> 250, 'value'=>'http://')); 29 27 ?> 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> 33 30 </td></tr> 34 31 … … 40 37 ?> 41 38 </td></tr> 42 <tr><td colspan="2">39 <tr><td> 43 40 <?php 44 41 echo $form->label('News.status', 'Published:' ); 45 42 echo $form->checkbox('News.status', array('value'=>1)); 46 43 ?> 47 </td> 48 <td> 44 </td><td> 49 45 <?php 50 46 echo $form->label('News.comments', 'Comments actived:' ); … … 52 48 ?> 53 49 </td> 54 <td >50 <td colspan="2"> 55 51 <?php 56 52 echo $form->label('News.end', 'Finish editing:'); … … 60 56 </tr> 61 57 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> 63 59 64 60 </table> -
trunk/app/views/news/admin_edit.ctp
r401 r620 1 1 <?php 2 2 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'); 5 5 echo $html->getCrumbs(' / '); 6 6 … … 14 14 <td> 15 15 <?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))); 17 17 echo $form->error('News.title', 'Title is required.'); 18 18 ?> … … 34 34 <?php 35 35 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)); 37 37 echo $fck->load('NewsBody', 'Karamelo'); 38 38 ?> … … 58 58 </td> 59 59 </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> 61 61 </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 ?> 11 6 <table class="tbadmin"> 12 13 7 <?php 14 //die(print_r($data));15 8 16 9 $th = array ('Edit', 'Title', 'Status', 'Delete'); 17 10 echo $html->tableHeaders($th); 18 foreach ($data as $key=>$val) 19 { 20 11 foreach ($data as $key=>$val): 12 $st = ($val['News']['status']) ? __('Published', true) : __('Draft', true); 21 13 $tr = array ( 22 14 $gags->sendEdit($val['News']['id'], 'news'), 23 15 $val['News']['title'], 24 $ gags->setStatus($val['News']['status']),16 $html->link($st, '/admin/news/change/'.$val['News']['status'].'/'.$val['News']['id']), 25 17 $gags->confirmDel($val['News']['id'], 'news') 26 18 ); … … 29 21 array('class'=>'evenRow',"onmouseover"=>"this.className='highlight'", "onmouseout"=>"this.className='evenRow'")); 30 22 31 } 23 endforeach; 32 24 ?> 33 25 </table> … … 36 28 // echo $pagination; 37 29 ?> 38 -
trunk/app/views/news/display.ctp
r604 r620 2 2 // die(debug($_SERVER)); 3 3 4 echo $html->div('title_portal', __( "news_campus", true));4 echo $html->div('title_portal', __('News on Campus', true)); 5 5 6 6 foreach ($data as $val): … … 47 47 false); 48 48 49 echo $news->socialNets($val['News']['id'], $val['News']['title']); // Social nets buttons49 echo $news->socialNets($val['News']['id'], $val['News']['title']); // Social nets buttons 50 50 51 52 53 51 echo '</div>'; 54 52 endforeach; -
trunk/app/views/news/view.ctp
r604 r620 1 1 <?php 2 2 // die(debug($data)); 3 echo $html->div('titnew', $data['News']['title']); 3 4 echo $html->div('news_title', $html->link($data['News']['title'], '/news/view/'. $data['News']['id'])); 4 5 5 6 echo $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']); … … 58 59 ?> 59 60 <fieldset> 60 <legend> Write comment:</legend>61 <legend><?php __('Write comment'); ?></legend> 61 62 <?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 />'); 63 64 echo $form->textarea('Discussion.comment', array('cols'=>60, 'rows'=>10)); 64 echo $form->end( 'Send comment');65 echo $form->end(__('Send comment', true)); 65 66 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')); 67 68 endif; 68 69 }
