diff --git a/modules/board/board.iphone.php b/modules/board/board.iphone.php new file mode 100644 index 000000000..3a75fd4f1 --- /dev/null +++ b/modules/board/board.iphone.php @@ -0,0 +1,67 @@ +grant->list || $this->module_info->consultation == 'Y') return $oIPhone->setContent(Context::getLang('msg_not_permitted')); + $act = Context::get('act'); + if(method_exists($this, $act)) + { + $this->{$act}(); + } + else + { + $document_srl = Context::get('document_srl'); + if($document_srl) + return $this->dispContent($document_srl); + else + return $this->dispList(); + } + } + + function dispContent($document_srl) + { + $oDocumentModel = &getModel('document'); + $oDocument = $oDocumentModel->getDocument($document_srl); + if($oDocument->isExists()) { + // 권한 확인 + if(!$this->grant->view) return Context::getLang('msg_not_permitted'); + + Context::setBrowserTitle($oDocument->getTitleText()); + Context::set('oDocument', $oDocument); + $oTemplate = new TemplateHandler(); + $content = $oTemplate->compile($this->module_path.'tpl/iphone', "view_document"); + return $content; + } + else + { + return $this->dispList(); + } + + } + + function dispList() + { + if(!$this->grant->list || $this->module_info->consultation == 'Y') return Context::getLang('msg_not_permitted'); + $oDocumentModel = &getModel('document'); + $args->module_srl = $this->module_srl; + $args->page = Context::get('page');; + $args->list_count = 8; + $args->sort_index = $this->module_info->order_target?$this->module_info->order_target:'list_order'; + $args->order_type = $this->module_info->order_type?$this->module_info->order_type:'asc'; + $output = $oDocumentModel->getDocumentList($args, $this->except_notice); + $document_list = $output->data; + Context::set('document_list', $document_list); + $page_navigation = $output->page_navigation; + Context::set('page_navigation',$page_navigation); + $oTemplate = new TemplateHandler(); + $content = $oTemplate->compile($this->module_path.'tpl/iphone', "list"); + return $content; + } + } +?> diff --git a/modules/board/tpl/iphone/list.html b/modules/board/tpl/iphone/list.html new file mode 100644 index 000000000..fe5e357fb --- /dev/null +++ b/modules/board/tpl/iphone/list.html @@ -0,0 +1,24 @@ + diff --git a/modules/board/tpl/iphone/view_document.html b/modules/board/tpl/iphone/view_document.html new file mode 100644 index 000000000..e3fd611ab --- /dev/null +++ b/modules/board/tpl/iphone/view_document.html @@ -0,0 +1,40 @@ +
+

{$oDocument->getTitleText()}

+
+{$oDocument->getContent(false)} +
+
+ +
+
+ +