Changeset 759
- Timestamp:
- 09/07/08 18:55:25 (2 months ago)
- Location:
- trunk/app
- Files:
-
- 4 modified
-
controllers/messages_controller.php (modified) (2 diffs)
-
views/messages/admin_listing.ctp (modified) (3 diffs)
-
views/messages/admin_write.ctp (modified) (1 diff)
-
views/vclassrooms/admin_members.ctp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/messages_controller.php
r758 r759 416 416 417 417 public function admin_deliver() 418 { 419 $this->layout = 'ajax'; 420 418 { 421 419 if (!empty($this->data['Message'])): 422 420 423 $this->Sanitize = new Sanitize; 424 425 $this->Sanitize->html($this->data['Message']["title"]); 426 427 $this->Sanitize->html($this->data['Message']["body"]); 428 429 $this->Message->create(); 430 431 if ($this->Message->save($this->data['Message'])): 432 $this->__sendMail($this->data['Message']["user_id"]); 433 endif; 421 $this->Sanitize = new Sanitize; 422 423 $this->Sanitize->html($this->data['Message']['title']); 424 425 $this->Sanitize->html($this->data['Message']['body']); 426 427 $this->data['Message']['sender_id'] = $this->Auth->user('id'); 428 429 if ($this->Message->save($this->data)): 430 $this->__sendMail($this->data['Message']['user_id']); 431 endif; 432 $this->msgFlash(__('Message sent', true), '/admin/vclassrooms/members/'.$this->data['Message']['vclassroom_id']); 434 433 endif; 435 434 } … … 520 519 } 521 520 522 public function admin_write($user_id )521 public function admin_write($user_id, $vclassroom_id) 523 522 { 524 $this->layout = 'admin'; 525 526 $this->pageTitle = 'Write Message'; 527 528 $this->set('user_id', $user_id); 529 } 530 523 $this->layout = 'admin'; 524 $this->pageTitle = __('Write message', true); 525 $this->set('user_id', $user_id); 526 $this->set('vclassroom_id', $vclassroom_id); 527 } 528 531 529 private function __sendMessage($email, $vclassroom_id) 532 530 { -
trunk/app/views/messages/admin_listing.ctp
r758 r759 16 16 //exit(print_r($data)); 17 17 18 $th = array( 'Flag', 'Subject', 'From', 'Date', 'Mark');18 $th = array(__('Flag', true), __('Subject', true), __('From', true), __('Date', true), __('Mark', true)); 19 19 echo '<table class="tbadmin">'; 20 20 echo $html->tableHeaders($th); … … 24 24 { 25 25 case 0: 26 $status = 'New';26 $status = __('New', true); 27 27 $img = 'message_n.gif'; 28 28 break; 29 29 case 1: 30 $status = 'Readed';30 $status = __('Readed', true); 31 31 $img = 'message_r.gif'; 32 32 break; 33 33 case 2: 34 $status = 'Reply';34 $status = __('Reply', true); 35 35 $img = 'message_e.gif'; 36 36 break; … … 53 53 54 54 if ( count($data) > 0 ): 55 echo $html->link(__('Mark all', true), "javascript:select_switch(true)", array("style"=>"font-size:7pt")) . ' | '; 56 echo $html->link(__('Unmark all', true), "javascript:select_switch(false)", array("style"=>"font-size:7pt")) . '<br /><br />'; 57 55 echo $html->link(__('Mark all', true), "javascript:select_switch(true)", array('style'=>'font-size:7pt')) . ' | '; 56 echo $html->link(__('Unmark all', true), "javascript:select_switch(false)", array('style'=>'font-size:7pt')) . '<br /><br />'; 58 57 echo $form->end(__('Delete marked', true)); 59 58 endif; -
trunk/app/views/messages/admin_write.ctp
r541 r759 1 1 <?php 2 echo $html->div(' sec_title', 'Write message');2 echo $html->div('title_section', __('Write message', true)); 3 3 echo $form->create('Message', array('action'=>'deliver','onsubmit'=>'return chkForm()')); 4 4 echo $form->hidden('Message.user_id', array('value'=> $user_id)); 5 echo $form->hidden('Message.vclassroom_id', array('value'=> $vclassroom_id)); 5 6 ?> 6 7 <fieldset> 7 <legend> Write Message:</legend>8 <legend><?php __('Write message'); ?></legend> 8 9 <?php 9 echo $session->read('Auth.User.username') . " writes: <br />";10 echo $session->read('Auth.User.username') . ' '. __('writes', true).': <br />'; 10 11 echo $form->input('Message.title', array('size'=> 35, 'maxlength'=>50)) . "<br />"; 11 12 12 echo $form->label('Message.body', 'Message:');13 echo $form->label('Message.body', __('Message', true) ); 13 14 echo $form->textarea('Message.body', array('cols'=>30, 'rows'=>10)); 14 15 15 echo $form->end( 'Send message');16 echo $form->end(__('Send', true)); 16 17 ?> 17 18 </fieldset> -
trunk/app/views/vclassrooms/admin_members.ctp
r739 r759 20 20 21 21 echo $html->link( 22 $html->image('static/icon_webquest.jpg', array( "alt"=>"Link webquest", "title"=>"Link webquest", "style"=>"margin-right:12px")22 $html->image('static/icon_webquest.jpg', array('alt'=>'Link webquest', 'title'=>'Link webquest', 'style'=>'margin-right:12px') 23 23 ), '#', array("onclick"=>$w), null, null, false); 24 24 25 25 echo $html->link( 26 $html->image('static/icon_treasure.jpg', array( "alt"=>"Link Treasure", "title"=>"Link Treasure", "style"=>"margin-right:12px")26 $html->image('static/icon_treasure.jpg', array('alt'=>'Link Treasure', 'title'=>'Link Treasure', 'style'=>'margin-right:12px') 27 27 ), '#', array("onclick"=>$r), null, null, false); 28 28 29 29 echo $html->link( 30 $html->image('admin/forums_icon.png', array( "alt"=>"Add forum", "title"=>"Add forum", "style"=>"margin-right:12px")30 $html->image('admin/forums_icon.png', array('alt'=>'Add forum', 'title'=>'Add forum', 'style'=>'margin-right:12px') 31 31 ), '#', array("onclick"=>$r), null, null, false); 32 32 … … 85 85 $html->link($val['email'], 'mailto:'.$val['email']), 86 86 $html->link($html->image('admin/compose_on.gif', array('alt'=>__('Compose to', true) .' '.$val['username'], 'title'=>__('Compose to', true) .' '.$val['username'])), 87 '/admin/messages/write/'.$val['id'] , null, null, false),87 '/admin/messages/write/'.$val['id'].'/'.$data['Vclassroom']['id'], null, null, false), 88 88 $html->link($html->image('static/unlink.png', array('alt'=>__('Unlink', true), 'title'=>__('Unlink', true))), 89 89 '/admin/vclassrooms/unlink/'.$val['id'].'/'.$data['Vclassroom']['id'], null, null, false),
