mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-27 07:09:56 +09:00
iphone board
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6161 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ce3dd3a639
commit
f5a33e0912
3 changed files with 131 additions and 0 deletions
67
modules/board/board.iphone.php
Normal file
67
modules/board/board.iphone.php
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @class boardWAP
|
||||||
|
* @author haneul0318 (haneul0318@gmail.com)
|
||||||
|
* @brief board 모듈의 IPhone class
|
||||||
|
**/
|
||||||
|
|
||||||
|
class boardIPhone extends board {
|
||||||
|
function procIPhone(&$oIPhone)
|
||||||
|
{
|
||||||
|
if(!$this->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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
24
modules/board/tpl/iphone/list.html
Normal file
24
modules/board/tpl/iphone/list.html
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
<ul id="board_posts_{$page_navigation->cur_page}" selected="true" class="posts">
|
||||||
|
<li class="group">
|
||||||
|
<span class="left">Post List({$page_navigation->total_count})</span>
|
||||||
|
</li>
|
||||||
|
<!--@foreach($document_list as $val)-->
|
||||||
|
<li class="post_item">
|
||||||
|
<a href="{getUrl('document_srl',$val->document_srl,'nl','1')}" class="link">
|
||||||
|
<div class="post">
|
||||||
|
<span class="title"> {$val->getTitleText()} </span>
|
||||||
|
<span class="description">{$val->getRegdate()} [{$val->getNickName()}] comments({$val->getCommentCount()})</span>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<!--@end-->
|
||||||
|
<li class="pagination">
|
||||||
|
<!--@if($page_navigation->cur_page > $page_navigation->first_page)-->
|
||||||
|
<a href="{getUrl('page',$page_navigation->cur_page-1,'nl','1')}" class="previous">Page {$page_navigation->cur_page-1}</a>
|
||||||
|
<!--@end-->
|
||||||
|
<!--@if($page_navigation->cur_page < $page_navigation->last_page)-->
|
||||||
|
<a href="{getUrl('page',$page_navigation->cur_page+1,'nl','1')}" class="next">Page {$page_navigation->cur_page+1}</a>
|
||||||
|
<!--@end-->
|
||||||
|
<strong>{$page_navigation->cur_page}</strong>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
40
modules/board/tpl/iphone/view_document.html
Normal file
40
modules/board/tpl/iphone/view_document.html
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
<div id="view_document_{$oDocument->document_srl}" title="글 보기" selected="true" class="panel">
|
||||||
|
<h2>{$oDocument->getTitleText()}</h2>
|
||||||
|
<div class="content">
|
||||||
|
{$oDocument->getContent(false)}
|
||||||
|
</div>
|
||||||
|
<fieldset>
|
||||||
|
<ul class="content navigation">
|
||||||
|
<li><a href="#view_comment" class="link">댓글 보기 <span class="cnt">({$oDocument->getCommentCount()})</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul id="view_comment" title="댓글 보기" selected="false">
|
||||||
|
<li class="group">Comment List ({$oDocument->getCommentCount()})</li>
|
||||||
|
{@ $_comment_list = $oDocument->getComments() }
|
||||||
|
<!--@foreach($_comment_list as $key => $comment)-->
|
||||||
|
<li class="comment_item">
|
||||||
|
{@ $depth = $comment->get('depth') }
|
||||||
|
<!--@if($depth && $depth > 0)-->
|
||||||
|
<span class="re">
|
||||||
|
{@ $str_res = str_repeat("RE: ", $depth) }
|
||||||
|
{$str_res}
|
||||||
|
</span>
|
||||||
|
<!--@end-->
|
||||||
|
<span class="author">
|
||||||
|
{$comment->get('nick_name')}
|
||||||
|
</span>
|
||||||
|
<span class="regdate">
|
||||||
|
{$comment->getRegDate()}
|
||||||
|
</span>
|
||||||
|
<div class="content">
|
||||||
|
<!--@if(!$comment->isAccessible())-->
|
||||||
|
{$lang->msg_is_secret}
|
||||||
|
<!--@else-->
|
||||||
|
{$comment->getContent(false)}
|
||||||
|
<!--@end-->
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<!--@end-->
|
||||||
|
</ul>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue