Changeset 638 for trunk/app/controllers/annotations_controller.php
- Timestamp:
- 07/10/08 18:28:49 (5 months ago)
- Files:
-
- 1 modified
-
trunk/app/controllers/annotations_controller.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/annotations_controller.php
r632 r638 14 14 class AnnotationsController extends AppController { 15 15 16 public $paginate = array('limit' => 20, 'page' => 1); 17 16 18 public function add() 17 19 { … … 26 28 $this->Annotation->create(); 27 29 28 if ($this->Annotation->save($this->data ['Annotation'])):30 if ($this->Annotation->save($this->data)): 29 31 $this->msgFlash(__('Comment added', true), $this->data['Annotation']['redirect_to'].'/#comments'); 30 32 endif; … … 32 34 } 33 35 34 /** ===== ADMIN METHODS ====== **/ 36 /** ===== ADMIN METHODS ====== **/ 37 public function admin_listing() 38 { 39 $this->layout = 'admin'; 40 41 $this->PageTitle = __('Comments', true); 42 43 $this->paginate['conditions'] = array('Lesson.user_id'=>$this->Auth->user('id')); 44 45 $this->paginate['fields'] = array("id", "comment", "created", "user_id", "status"); 46 47 $this->paginate['order'] = array('Annotation.id' => 'DESC'); 48 49 $data = $this->paginate('Annotation'); 50 51 $this->set(compact('data')); 52 } 35 53 36 54 // change status enabled/disabled actived
