mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-02 16:52:16 +09:00
XE Smartphone 애드온에서 iui를 제거하고 자체 제작한 UI 로 변경
(아직 PC 브라우저에서 최적화 되었고 iphone, 옴니아등에서의 최적화는 다시 진행할 예정입니다) cafeXE, planet, page모듈에서도 스마트폰에 어울리는 컨텐츠로 스마트폰 환경을 제공하도록 수정 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6283 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4f8e98ddb0
commit
e48e2900e4
45 changed files with 590 additions and 1150 deletions
|
|
@ -1,67 +1,44 @@
|
|||
<?php
|
||||
/**
|
||||
* @class boardWAP
|
||||
* @class boardSmartphone
|
||||
* @author haneul0318 (haneul0318@gmail.com)
|
||||
* @brief board 모듈의 IPhone class
|
||||
* @brief board 모듈의 SmartPhone IPhone class
|
||||
**/
|
||||
|
||||
class boardSPhone extends board {
|
||||
function procSmartPhone(&$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)
|
||||
{
|
||||
function procSmartPhone(&$oSmartPhone) {
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
|
||||
if(!$this->grant->list || $this->module_info->consultation == 'Y') return $oSmartPhone->setContent(Context::getLang('msg_not_permitted'));
|
||||
|
||||
$oDocument = Context::get('oDocument');
|
||||
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/smartphone', "view_document");
|
||||
return $content;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->dispList();
|
||||
if(Context::get('comment') == 'true' && $oDocument->getCommentCount()) {
|
||||
Context::set('comment_list', $oDocument->getComments());
|
||||
$comment_page_navigation = $oDocument->comment_page_navigation;
|
||||
if($comment_page_navigation) {
|
||||
if($comment_page_navigation->cur_page > $comment_page_navigation->first_page) $oSmartPhone->setPrevUrl(getUrl('cpage',$comment_page_navigation->cur_page-1));
|
||||
if($comment_page_navigation->cur_page < $comment_page_navigation->last_page) $oSmartPhone->setNextUrl(getUrl('cpage',$comment_page_navigation->cur_page+1));
|
||||
}
|
||||
$oSmartPhone->setParentUrl(getUrl('comment',''));
|
||||
$tpl_file = 'comment_list';
|
||||
} else {
|
||||
$oSmartPhone->setParentUrl(getUrl('document_srl',''));
|
||||
$tpl_file = 'view_document';
|
||||
}
|
||||
} else {
|
||||
$page_navigation = Context::get('page_navigation');
|
||||
if($page_navigation) {
|
||||
if($page_navigation->cur_page > $page_navigation->first_page) $oSmartPhone->setPrevUrl(getUrl('page',$page_navigation->cur_page-1));
|
||||
if($page_navigation->cur_page < $page_navigation->last_page) $oSmartPhone->setNextUrl(getUrl('page',$page_navigation->cur_page+1));
|
||||
}
|
||||
$tpl_file = 'list';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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/smartphone', "list");
|
||||
return $content;
|
||||
$content = $oTemplate->compile($this->module_path.'tpl/smartphone', $tpl_file);
|
||||
$oSmartPhone->setContent($content);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
14
modules/board/tpl/smartphone/comment_list.html
Normal file
14
modules/board/tpl/smartphone/comment_list.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<ul class="smartPhoneList">
|
||||
<li class="title">{$oDocument->getCommentCount()} comments<!--@if($oDocument->comment_page_navigation)-->, {$oDocument->comment_page_navigation->cur_page}/{$oDocument->comment_page_navigation->last_page} pages<!--@end--></li>
|
||||
|
||||
<!--@foreach($comment_list as $val)-->
|
||||
<li class="item">
|
||||
<span class="title">{$val->getContent(false)}</span>
|
||||
<span class="info">
|
||||
{$val->getRegdate()}
|
||||
[{$val->getNickName()}]
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<!--@end-->
|
||||
</ul>
|
||||
|
|
@ -1,24 +1,17 @@
|
|||
<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>
|
||||
<ul class="smartPhoneList">
|
||||
<li class="title">{$page_navigation->total_count} items, {$page_navigation->cur_page}/{$page_navigation->last_page} pages</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>
|
||||
<li class="item">
|
||||
<a href="{getUrl('document_srl',$val->document_srl)}">
|
||||
<span class="title">{$val->getTitleText()}</span>
|
||||
<span class="info">
|
||||
{$val->getRegdate()}
|
||||
[{$val->getNickName()}]
|
||||
<!--@if($val->getCommentCount())-->comments({$val->getCommentCount()})<!--@end-->
|
||||
</span>
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -1,40 +1,12 @@
|
|||
<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 class="smartPhoneContent">
|
||||
<div class="info">
|
||||
<span class="author">{$oDocument->getNickName()}</span>
|
||||
<span class="date">{$oDocument->getRegdate()}</span>
|
||||
</div>
|
||||
</li>
|
||||
<!--@end-->
|
||||
</ul>
|
||||
|
||||
{$oDocument->getContent(false)}
|
||||
|
||||
<!--@if($oDocument->getCommentCount())-->
|
||||
<div class="link"><a href="{getUrl('comment','true')}">{$lang->replies} : {$oDocument->getCommentCount()}</a></div>
|
||||
<!--@end-->
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue