public function execute()
 {
     $sheet_id = $this->get('sheet_id', true);
     $this->checkRights($sheet_id);
     $sticky_model = new stickiesStickyModel();
     $this->response = $sticky_model->getBySheetId($sheet_id);
     $this->response['_element'] = 'sticky';
 }
示例#2
0
 protected function viewAction()
 {
     //mobile version
     $this->response = array();
     if ($this->sheet_id) {
         $stickies_model = new stickiesStickyModel();
         $this->response['stickies'] = $stickies_model->getBySheetId($this->sheet_id, array('id', 'content', 'color'));
         foreach ($this->response['stickies'] as &$sticky) {
             if (strlen($sticky['content']) > 120) {
                 $sticky['content'] = mb_substr($sticky['content'], 0, 80, 'utf-8') . '...';
             }
         }
         unset($sticky);
         $this->response['current_sheet'] = $this->sheet_model->getById($this->sheet_id);
     } else {
         $this->response['stickies'] = array();
     }
 }