- Timestamp:
- 08/27/08 20:54:25 (3 months ago)
- Location:
- trunk/app
- Files:
-
- 2 modified
-
controllers/replies_controller.php (modified) (1 diff)
-
views/vclassrooms/admin_record.ctp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/replies_controller.php
r696 r742 41 41 } 42 42 43 /** --- ADMIN METHODS ---**/43 /**=== ADMIN METHODS ===**/ 44 44 45 public function admin_points($reply_id, $sense) 46 { 47 $points = (int) $this->Reply->field('points', array('Reply.id'=>$reply_id)); 48 49 $points = ($sense == 'up' ) ? ($points + 1) : ($points - 1); 50 51 $this->data['Reply']['id'] = $reply_id; 52 53 $this->data['Reply']['points'] = $points; 54 55 if ($this->Reply->save($this->data)): 56 $this->set('points', $points); 57 $this->render('admin_points', 'ajax'); 58 endif; 59 } 60 45 61 public function admin_edit($id = null) 46 62 { -
trunk/app/views/vclassrooms/admin_record.ctp
r741 r742 152 152 '/admin/replies/points/'.$re['Reply']['id'].'/down', 153 153 array('update' => $div_id, 154 'loading '=>"Element.show('load ingre');",155 'after' =>'tp('.$data['User']['id'].','.$data['Vclassroom']['id'].')', 156 'complete'=>"Element.hide('load ingre');Effect.Appear(".$div_id.")"),null,false);154 'loading '=>"Element.show('loadreply');", 155 'after' =>'tp('.$data['User']['id'].','.$data['Vclassroom']['id'].')', 156 'complete'=>"Element.hide('loadreply');Effect.Appear(".$div_id.")"),null,false); 157 157 echo $ajax->link($html->image('static/aupmod.png', array('alt'=>__('Points up', true), 'title'=>__('Points up', true))), 158 158 '/admin/replies/points/'.$re['Reply']['id'].'/up', 159 159 array('update' => $div_id, 160 160 'after' =>'tp('.$data['User']['id'].','.$data['Vclassroom']['id'].')', 161 'loading '=>"Element.show('load ingre')",162 'complete'=>"Element.hide('load ingre');Effect.Appear(".$div_id.")"),null,false);161 'loading '=>"Element.show('loadreply')", 162 'complete'=>"Element.hide('loadreply');Effect.Appear(".$div_id.")"),null,false); 163 163 echo '</div>'; 164 164 $rpoints += $re['Reply']['points']; //sum … … 166 166 e('</div>'); 167 167 endforeach; 168 e($html->div(null, $html->image('static/loading.gif', array('alt'=>'Loading')),array('id'=>'load ingre', 'style'=>'display:none;')));168 e($html->div(null, $html->image('static/loading.gif', array('alt'=>'Loading')),array('id'=>'loadreply', 'style'=>'display:none;'))); 169 169 else: 170 170 echo $html->para(null, 'No reply found');
