issue 151 add filebox manager view

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9025 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
devjin 2011-09-05 07:20:41 +00:00
parent 34cbe1eb82
commit b4cc9a1345
5 changed files with 113 additions and 4 deletions

View file

@ -169,6 +169,10 @@
'module'=>'file',
'subMenu'=>array('fileUpload'),
),
20=>array(
'module'=>'module',
'subMenu'=>array('filebox'),
),
);
$oMemberModel = &getModel('member');
@ -246,6 +250,7 @@
case 'adminConfiguration':
case 'adminMenuSetup':
case 'fileUpload':
case 'filebox':
return 'configuration';
break;
default:

View file

@ -17,6 +17,7 @@
<action name="dispModuleAdminModuleGrantSetup" type="view" standalone="true" />
<action name="dispModuleAdminCopyModule" type="view" standalone="true" />
<action name="dispModuleAdminLangcode" type="view" standalone="true" menu_name="multilingual" menu_index="true" />
<action name="dispModuleAdminFileBox" type="view" menu_name="filebox" menu_index="true" />
<action name="dispModuleFileBox" type="view" standalone="true" />
<action name="dispModuleFileBoxAdd" type="view" standalone="true" />
@ -73,5 +74,18 @@
<title xml:lang="mn">Multilingual</title>
<title xml:lang="tr">Multilingual</title>
</menu>
<menu name="filebox">
<title xml:lang="en">FileBox</title>
<title xml:lang="ko">파일박스</title>
<title xml:lang="zh-CN">FileBox</title>
<title xml:lang="jp">FileBox</title>
<title xml:lang="es">FileBox</title>
<title xml:lang="ru">FileBox</title>
<title xml:lang="fr">FileBox</title>
<title xml:lang="zh-TW">FileBox</title>
<title xml:lang="vi">FileBox</title>
<title xml:lang="mn">FileBox</title>
<title xml:lang="tr">FileBox</title>
</menu>
</menus>
</module>

View file

@ -210,5 +210,16 @@
// Set a template file
$this->setTemplateFile('module_langcode');
}
function dispModuleAdminFileBox(){
$oModuleModel = &getModel('module');
$output = $oModuleModel->getModuleFileBoxList();
$page = Context::get('page');
$page = $page?$page:1;
Context::set('filebox_list', $output->data);
Context::set('page_navigation', $output->page_navigation);
Context::set('page', $page);
$this->setTemplateFile('adminFileBox');
}
}
?>

View file

@ -650,10 +650,9 @@
if (!$ajax)
{
$url = getUrl('','module','module','act','dispModuleFileBox','input',Context::get('input'),'filter',$vars->filter);
$url = html_entity_decode($url);
$vars = Context::set('url',$url);
$this->setTemplateFile('move_filebox_list');
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispModuleAdminFileBox');
header('location:'.$returnUrl);
return;
}
else
{

View file

@ -0,0 +1,80 @@
<!--%load_js_plugin("filebox")-->
<h1 class="h1">File Box</h1>
<div class="fileBox">
<form action="" class="portlet form" method="post" enctype="multipart/form-data">
<input type="hidden" name="module" value="module" />
<input type="hidden" name="act" value="procModuleFileBoxAdd" />
<input type="hidden" name="vid" value="{$vid}" />
<input type="hidden" name="filter" value="{$filter}" />
<input type="hidden" name="input" value="{$input}" />
<h2>파일 올리기</h2>
<span class="more"><a href="#fileUp" class="tgAnchor" data-effect="slide" data-duration="200">보기/숨김</a></span>
<div class="tgContent" id="fileUp">
<p>
<label for="fileDescription">{$lang->description}</label> <input type="text" name="comment" id="fileDescription" /><br />
<label for="file">{$lang->file}</label> <input type="file" name="addfile" id="file"/>
</p>
<div class="btnArea">
<span class="btn"><input type="submit" value="{$lang->cmd_save}" /></span>
</div>
</div>
</form>
<form action="" class="form">
<ul>
<li loop="$filebox_list=>$key,$val">
<p class="q">{$val->comment}</p>
<p class="a">
<!--@if($val->fileextension=='swf')-->
<object height="100" width="100" flashvars="" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" xmlns="http://www.w3.org/1999/xhtml">
<param value="{getUrl('')}{$val->filename}" name="movie" xmlns="http://www.w3.org/1999/xhtml" />
<param value="transparent" name="wmode" xmlns="http://www.w3.org/1999/xhtml" />
<param value="sameDomain" name="allowScriptAccess" xmlns="http://www.w3.org/1999/xhtml" />
<param value="high" name="quality" xmlns="http://www.w3.org/1999/xhtml" />
<embed height="100" width="100" wmode="transparent" flashvars="" autostart="false" src="{getUrl('')}{$val->filename}" xmlns="http://www.w3.org/1999/xhtml" />
</object>
<!--@elseif(in_array($val->fileextension,array('gif','png','jpg','jpeg')))-->
<img src="{getUrl('')}{$val->filename}" style="max-height:100px" />
<!--@end-->
</p>
<button type="button" class="side text" onclick="XE.filebox.deleteFile('{$val->module_filebox_srl}');" >{$lang->cmd_delete}</button>
</li>
</ul>
</form>
</div>
<form action="" class="pagination" method="post">
<input type="hidden" name="error_return_url" value="" />
<input type="hidden" name="module" value="{$module}" />
<input type="hidden" name="act" value="{$act}" />
<input cond="$order_target" type="hidden" name="order_target" value="{$order_target}" />
<input cond="$order_type" type="hidden" name="order_type" value="{$order_type}" />
<input cond="$category_srl" type="hidden" name="category_srl" value="{$category_srl}" />
<input cond="$childrenList" type="hidden" name="childrenList" value="{$childrenList}" />
<input cond="$search_keyword" type="hidden" name="search_keyword" value="{$search_keyword}" />
<a href="{getUrl('page', '')}" class="direction">&laquo; FIRST</a>
<block cond="$page_navigation->first_page + $page_navigation->page_count > $page_navigation->last_page && $page_navigation->page_count != $page_navigation->total_page">
<a href="{getUrl('page', '')}">1</a>
<a href="#goTo" class="tgSimple" title="{$lang->cmd_go_to_page}">...</a>
</block>
<!--@while($page_no = $page_navigation->getNextPage())-->
{@$last_page = $page_no}
<strong cond="$page_no == $page">{$page_no}</strong>
<a cond="$page_no != $page" href="{getUrl('page', $page_no)}">{$page_no}</a>
<!--@end-->
<block cond="$last_page != $page_navigation->last_page">
<a href="#goTo" class="tgSimple" title="{$lang->cmd_go_to_page}">...</a>
<a href="{getUrl('page', $page_navigation->last_page)}">{$page_navigation->last_page}</a>
</block>
<a href="{getUrl('page', $page_navigation->last_page)}" class="direction">LAST &raquo;</a>
<span id="goTo" class="tgContent">
<input name="page" title="{$lang->cmd_go_to_page}" />
<button type="submit">Go</button>
</span>
</form>