| 39 | | /** ===== ADMIN METHODS ====== **/ |
| 40 | | public function admin_listing($paginate=0, $limit=20) |
| 41 | | { |
| 42 | | $this->layout = 'admin'; |
| 43 | | |
| 44 | | $this->pageTitle = __('Comments on entries', true); |
| 45 | | |
| 46 | | //$this->Comment->bindModel(array('belongsTo'=> array('News' =>array('className'=> 'News', 'foreignKey'=> 'new_id' )))); |
| 47 | | |
| 48 | | $this->paginate['fields'] = array('Comment.id','Entry.id','Entry.title','Comment.id','Comment.comment', 'Comment.created', 'Comment.user_id', 'Comment.status', 'User.username'); |
| 49 | | $this->paginate['conditions'] = null; |
| 50 | | $this->paginate['order'] = "Comment.id DESC"; |
| 51 | | $this->paginate['limit'] = 30; |
| 52 | | $data = $this->paginate('Comment'); |
| 53 | | $this->set(compact('data')); |
| 54 | | |
| 55 | | } |
| 56 | | |
| 57 | | // change status enabled/disabled actived |
| 58 | | public function admin_change($comment_id, $status) |
| 59 | | { |
| | 39 | /** ===== ADMIN METHODS ====== **/ |
| | 40 | // change status enabled/disabled actived |
| | 41 | public function admin_change($comment_id, $status) |
| | 42 | { |