コード例 #1
0
 public function process()
 {
     \CADB\Lib\importResource('app-field-edit');
     $context = \CADB\Model\Context::instance();
     $this->layout = 'admin';
     $this->taxonomy = \CADB\Taxonomy\DBM::getTaxonomyList();
     $this->fields = \CADB\Organize::getFieldInfo(0);
 }
コード例 #2
0
 public function process()
 {
     $context = \CADB\Model\Context::instance();
     \CADB\Lib\importResource('app-guide-edit');
     $this->layout = 'admin';
     if (!$this->params['nid']) {
         \CADB\Lib\Error('모범단체협약서 번호를 입력하세요.');
     }
     if (!$this->themes) {
         $this->themes = $context->getProperty('service.themes');
     }
     $this->fields = \CADB\Guide::getFieldInfo(1);
     $this->guide = \CADB\Guide\DBM::getGuide($this->params['nid']);
     if (!$this->guide) {
         \CADB\Lib\Error('존재하지않는 모범단체협약서입니다.');
     }
     $this->taxonomylist = \CADB\Taxonomy\DBM::getTaxonomyList();
     $taxonomys = \CADB\Guide\DBM::getTaxonomy($this->guide['cid']);
     $this->taxonomy = \CADB\Taxonomy::getTaxonomy($taxonomys);
     $taxonomy_terms = \CADB\Taxonomy::getTaxonomyTerms($taxonomys);
     foreach ($taxonomy_terms as $c => $taxo) {
         foreach ($taxo as $t => $term) {
             $this->taxonomy_terms[$c][$term['parent']][$t] = $term;
         }
     }
     $this->current_taxonomys = $taxonomys;
     $clauses = \CADB\Guide\DBM::getClauses($this->params['nid']);
     $c = 0;
     foreach ($clauses as $i => $cl) {
         if (!$c) {
             $this->preamble = \CADB\Guide::getClause($cl['id']);
         }
         if (!$cl['parent']) {
             $cl['nsubs'] = 0;
             $cl['articles'] = array();
             $this->indexes[$i] = $cl;
             $index_map[$cl['id']] = $i;
         } else {
             $idx = $index_map[$cl['parent']];
             $this->indexes[$idx]['articles'][] = $cl;
             $this->indexes[$idx]['nsubs']++;
         }
         $c++;
     }
     if ($this->preamble) {
         $this->preamble['terms'] = \CADB\Guide\DBM::getClauseTerms($this->guide['vid'], $this->preamble['id']);
     }
 }
コード例 #3
0
 public function process()
 {
     $this->layout = 'admin';
     $this->fullscreen = true;
     $this->fields = \CADB\Fields::getFields('all');
     $this->taxonomies = \CADB\Taxonomy\DBM::getTaxonomyList();
     $this->taxonomy_terms = \CADB\Taxonomy\DBM::getAllTaxonomyTerms();
     foreach ($this->params as $k => $v) {
         if ($k == 'action' || $k == 'name' || $k == 'start' || $k == 'end') {
             $args[$k] = $v;
         }
     }
     \CADB\Log\DBM::initQuery($args);
     $this->total_cnt = \CADB\Log\DBM::totalCnt();
     $this->page = $this->params['page'] ? $this->params['page'] : 1;
     $this->limit = $this->params['limit'] ? $this->params['limit'] : 50;
     $this->total_page = (int) (($this->total_cnt - 1) / $this->limit) + 1;
     if ($this->total_cnt && $this->page <= $this->total_page) {
         $this->logs = \CADB\Log\DBM::getList($this->page, $this->limit);
     }
     $this->queryString = "?" . $this->makeQuery($args);
     $this->pagelink = \CADB\Lib\url("admin/logs") . "?" . $this->makeQuery($args);
 }
コード例 #4
0
 private function delete()
 {
     \CADB\Taxonomy\DBM::delete($this->taxonomy);
     $this->cid = $this->params['cid'];
     \CADB\RespondJson::ResultPage(array($this->cid, '삭제되었습니다.'));
 }