Ejemplo n.º 1
0
 public function executeListStatus()
 {
     $c = new Criteria();
     $c->add(JobPeer::CODE, 'pmb_menu/listStatus');
     $job = JobPeer::doSelectOne($c);
     $cw = new Criteria();
     $cw->add(JobInformationPeer::JOB_ID, $job->getId());
     $job_information = JobInformationPeer::doSelectOne($cw);
     $public_information = PublicInformationPeer::retrieveByPk($job_information->getPublicInformationId());
     $job_category = JobCategoryPeer::retrieveByPk($job_information->getJobCategoryId());
     $this->job = $job;
     $this->job_information = $job_information;
     $this->job_category = $job_category;
     $this->public_information = $public_information;
 }
Ejemplo n.º 2
0
        ?>
							</p>
						</td>
                        <td><?php 
        echo $job_information->getMenuOrder() ? $job_information->getMenuOrder() : '-';
        ?>
</td>
                        <td><?php 
        echo $job_information->getDisplayMenu() ? __('yes') : __('no');
        ?>
</td>
                        <td>
						<?php 
        $c = new Criteria();
        $c->add(JobInformationPeer::JOB_ID, $job_information->getId());
        $job_info = JobInformationPeer::doSelectOne($c);
        if ($job_info) {
            echo $job_info->getJobCategoryId() ? $job_info->getJobCategory()->toString() : '-';
        } else {
            echo '-';
        }
        ?>
</td>
						<td>
						<?php 
        if ($job_info) {
            echo $job_info->getPublicInformationId() ? $job_info->getPublicInformation()->getSubject() : '-';
        } else {
            echo '-';
        }
        ?>
Ejemplo n.º 3
0
 public function executeEdit()
 {
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $c = new Criteria();
     $c->add(JobPeer::CODE, $this->getModuleName());
     $jobs = JobPeer::doSelectOne($c);
     $acl = AclPeer::retrieveByPK($group_id, $jobs->getId());
     if (!$acl) {
         $this->forward('default', 'error404');
     }
     $this->can_add = $acl->getAddPriv() == 1;
     $this->can_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $job = JobPeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($job);
     $c = new Criteria();
     $c->add(JobInformationPeer::JOB_ID, $job->getId());
     $job_information = JobInformationPeer::doSelectOne($c);
     if ($job_information) {
         $this->job_information = $job_information;
     } else {
         $this->job_information = new JobInformation();
     }
     $actions = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
     if ($acl->getRemovePriv()) {
         array_push($actions, array('name' => 'delete', 'url' => 'job_information/delete?id=' . $job->getId(), 'color' => 'red'));
     }
     array_push($actions, array('name' => 'cancel', 'url' => 'job_information/list', 'color' => 'white'));
     $this->subtitle = $job->toString() . ' - id:' . $job->getId();
     $this->type = 'edit';
     $this->job = $job;
     $this->actions = $actions;
     $cw = new Criteria();
     $cw->add(JobPeer::PARENT, 1078);
     $cw->addAscendingOrderByColumn('menu_order');
     $parent = JobPeer::doSelectOne($cw);
     $cr = new Criteria();
     $cton1 = $cr->getNewCriterion(JobPeer::PARENT, $parent->getParent(), Criteria::IN);
     $cton2 = $cr->getNewCriterion(JobPeer::ID, $jobs->getId(), Criteria::NOT_IN);
     $cton3 = $cr->getNewCriterion(JobPeer::CODE, 'public_information_category/list', Criteria::NOT_IN);
     $cton4 = $cr->getNewCriterion(JobPeer::CODE, 'public_information/listArticle', Criteria::NOT_IN);
     $cton5 = $cr->getNewCriterion(JobPeer::CODE, 'job_information/list', Criteria::NOT_IN);
     $cton6 = $cr->getNewCriterion(JobPeer::CODE, 'job_category', Criteria::NOT_IN);
     $cton5->addAnd($cton6);
     $cton4->addAnd($cton5);
     $cton3->addAnd($cton4);
     $cton2->addAnd($cton3);
     $cton1->addAnd($cton2);
     $cr->add($cton1);
     $modules = JobPeer::doSelect($cr);
     $this->modules = $modules;
     $actions2 = array(array('name' => '<span>Kategori Artikel</span>', 'url' => 'job_category/list', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Artikel Web</span>', 'url' => 'public_information/listArticle', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>Kategori Menu</span>', 'url' => 'job_category/list', 'color' => 'sky'));
     array_push($actions2, array('name' => '<span>' . $jobs->getName() . '</span>', 'url' => $jobs->getCode(), 'color' => 'sun', 'type' => 'direct'));
     $this->actions2 = $actions2;
 }