<a href="#!" class="fullScreen"><?php echo Yii::t('main', 'Full screen'); ?> </a> <?php $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array(array('name' => 'user_id', 'value' => CHtml::encode($model->user->name)), array('name' => 'description'), array('name' => '', 'type' => 'raw', 'value' => CHtml::link(Yii::t('main', 'Update Project'), array('update', 'id' => $model->id)) . ' ' . CHtml::link(Yii::t('main', 'Delete Project'), array('delete', 'id' => $model->id), array('onclick' => 'return confirm("' . Yii::t('main', '?') . '")')))))); ?> <h3><?php echo Yii::t('main', 'Diagram'); ?> </h3> <?php $this->widget('application.widgets.GhantProject', array('projectID' => $model->getPrimaryKey(), 'readonly' => !ProjectHelper::accessEditProject($model->getPrimaryKey()))); ?> <script type="text/javascript"> $(function(){ console.log(1); function checkFullScreen() { if($.cookie('fullscreen') == 1) { $('#page').addClass('fullscreen'); } else { $('#page').removeClass('fullscreen'); } } $('.fullScreen').click(function(){ $.cookie('fullscreen', $('#page').hasClass('fullscreen') ? 0 : 1); checkFullScreen(); return false;
/** * * @return boolean */ public function allowEditProject() { $projectID = Yii::app()->request->getParam('id'); return ProjectHelper::accessEditProject($projectID); }
/** * * @param int $pid Project ID * @param type $editing * @param type $gantt_mode */ public function actionProcessor($pid, $editing = '', $gantt_mode = '') { $ids = isset($_POST['ids']) ? explode(',', $_POST['ids']) : array(); foreach ($ids as $id) { //check access if (!ProjectHelper::accessEditProject($pid, $id)) { $this->xmlOutputError('Error access', $id); continue; } $data = $this->loadDataByID($id); $status = isset($data['!nativeeditor_status']) ? $data['!nativeeditor_status'] : ''; $methodName = 'ghant_' . $gantt_mode . $status; if (method_exists($this, $methodName)) { call_user_func_array(array($this, $methodName), array($id, $data, $pid)); } else { $this->xmlOutputError('Method not found [' . $methodName . ']', $id); } } $this->xmlOutputFlush(); }