mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +09:00
issue 877 add instance of layout list page
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10836 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
2d285e60d1
commit
0ba9a26f9b
6 changed files with 116 additions and 33 deletions
|
|
@ -11,8 +11,8 @@
|
|||
<action name="dispLayoutAdminMobileContent" type="view" standalone="true" />
|
||||
|
||||
<action name="dispLayoutAdminInstalledList" type="view" admin_index="true" menu_name="installedLayout" menu_index="true" />
|
||||
<action name="dispLayoutAdminInstalledMobileList" type="view" menu_name="installedLayout" />
|
||||
<action name="dispLayoutAdminInstanceList" type="view" menu_name="installedLayout" />
|
||||
<action name="dispLayoutAdminAllInstanceList" type="view" menu_name="installedLayout" />
|
||||
<action name="dispLayoutAdminInsert" type="view" menu_name="installedLayout" />
|
||||
<action name="dispLayoutAdminModify" type="view" menu_name="installedLayout" />
|
||||
<action name="dispLayoutAdminEdit" type="view" menu_name="installedLayout" />
|
||||
|
|
|
|||
|
|
@ -1004,6 +1004,12 @@
|
|||
<value xml:lang="en"><![CDATA[Layouts]]></value>
|
||||
<value xml:lang="jp"><![CDATA[インストールされているレイアウト]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[已安裝版面]]></value>
|
||||
</item>
|
||||
<item name="instance_layout">
|
||||
<value xml:lang="ko"><![CDATA[생성된 레이아웃]]></value>
|
||||
<value xml:lang="en"><![CDATA[Instance of layout]]></value>
|
||||
<value xml:lang="jp"><![CDATA[インストールされているレイアウト]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[已安裝版面]]></value>
|
||||
|
||||
</item>
|
||||
<item name="faceoff_export">
|
||||
|
|
|
|||
|
|
@ -20,25 +20,30 @@
|
|||
* @return void
|
||||
**/
|
||||
function dispLayoutAdminInstalledList() {
|
||||
$type = Context::get('type');
|
||||
$type = ($type != 'M') ? 'P' : 'M';
|
||||
|
||||
// Set a layout list
|
||||
$oLayoutModel = &getModel('layout');
|
||||
$layout_list = $oLayoutModel->getDownloadedLayoutList('P', true);
|
||||
$layout_list = $oLayoutModel->getDownloadedLayoutList($type, true);
|
||||
if(!is_array($layout_list))
|
||||
{
|
||||
$layout_list = array();
|
||||
}
|
||||
|
||||
// get Theme layout
|
||||
$oAdminModel = &getAdminModel('admin');
|
||||
$themeList = $oAdminModel->getThemeList();
|
||||
$themeLayoutList = array();
|
||||
foreach($themeList as $themeInfo){
|
||||
if(strpos($themeInfo->layout_info->name, '.') === false) continue;
|
||||
$themeLayoutList[] = $oLayoutModel->getLayoutInfo($themeInfo->layout_info->name, null, 'P');
|
||||
if($type == 'P')
|
||||
{
|
||||
// get Theme layout
|
||||
$oAdminModel = &getAdminModel('admin');
|
||||
$themeList = $oAdminModel->getThemeList();
|
||||
$themeLayoutList = array();
|
||||
foreach($themeList as $themeInfo){
|
||||
if(strpos($themeInfo->layout_info->name, '.') === false) continue;
|
||||
$themeLayoutList[] = $oLayoutModel->getLayoutInfo($themeInfo->layout_info->name, null, 'P');
|
||||
}
|
||||
$layout_list = array_merge($layout_list, $themeLayoutList);
|
||||
$layout_list[] = $oLayoutModel->getLayoutInfo('faceoff', null, 'P');
|
||||
}
|
||||
$layout_list = array_merge($layout_list, $themeLayoutList);
|
||||
$layout_list[] = $oLayoutModel->getLayoutInfo('faceoff', null, 'P');
|
||||
Context::set('type', 'P');
|
||||
|
||||
$pcLayoutCount = $oLayoutModel->getInstalledLayoutCount('P');
|
||||
$mobileLayoutCount = $oLayoutModel->getInstalledLayoutCount('M');
|
||||
|
|
@ -61,29 +66,47 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Display a installed mobile layout list
|
||||
* @return void
|
||||
* Display list of pc layout all instance
|
||||
* @return void|Object (void : success, Object : fail)
|
||||
*/
|
||||
function dispLayoutAdminInstalledMobileList() {
|
||||
// Set a layout list
|
||||
$oLayoutModel = &getModel('layout');
|
||||
$layout_list = $oLayoutModel->getDownloadedLayoutList('M', true);
|
||||
Context::set('type', 'M');
|
||||
function dispLayoutAdminAllInstanceList()
|
||||
{
|
||||
$type = Context::get('type');
|
||||
|
||||
if (!in_array($type, array('P', 'M'))) $type = 'P';
|
||||
|
||||
$oLayoutModel = &getModel('layout');
|
||||
|
||||
$pcLayoutCount = $oLayoutModel->getInstalledLayoutCount('P');
|
||||
$mobileLayoutCount = $oLayoutModel->getInstalledLayoutCount('M');
|
||||
Context::set('pcLayoutCount', $pcLayoutCount);
|
||||
Context::set('mobileLayoutCount', $mobileLayoutCount);
|
||||
$this->setTemplateFile('installed_layout_list');
|
||||
|
||||
$security = new Security($layout_list);
|
||||
$layout_info = $security->encodeHTML('..', '..author..');
|
||||
$columnList = array('layout_srl', 'layout', 'module_srl', 'title', 'regdate');
|
||||
$_layout_list = $oLayoutModel->getLayoutInstanceList(0, $type, null, $columnList);
|
||||
|
||||
foreach($layout_list as $no => $layout_info)
|
||||
$layout_list = array();
|
||||
foreach($_layout_list as $item)
|
||||
{
|
||||
$layout_list[$no]->description = nl2br(trim($layout_info->description));
|
||||
if(!$layout_list[$item->layout])
|
||||
{
|
||||
$layout_list[$item->layout] = array();
|
||||
$layout_info = $oLayoutModel->getLayoutInfo($item->layout, null, $type);
|
||||
if ($layout_info)
|
||||
{
|
||||
$layout_list[$item->layout]['title'] = $layout_info->title;
|
||||
}
|
||||
}
|
||||
|
||||
$layout_list[$item->layout][] = $item;
|
||||
}
|
||||
|
||||
Context::set('layout_list', $layout_list);
|
||||
|
||||
$this->setTemplateFile('layout_all_instance_list');
|
||||
|
||||
$security = new Security();
|
||||
$security->encodeHTML('layout_list..');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
15
modules/layout/tpl/caption.html
Normal file
15
modules/layout/tpl/caption.html
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<caption>
|
||||
<a cond="$type == 'M'" href="{getUrl('act', 'dispLayoutAdminInstalledList', 'type', 'P')}">PC({$pcLayoutCount})</a>
|
||||
<block cond="$type != 'M'">PC({$pcLayoutCount})</block>
|
||||
|
|
||||
<a cond="$type != 'M'" href="{getUrl('act', 'dispLayoutAdminInstalledList', 'type', 'M')}">Mobile({$mobileLayoutCount})</a>
|
||||
<block cond="$type == 'M'">Mobile({$mobileLayoutCount})</block>
|
||||
<span class="side"><button type="button" class="text"><span class="hide">{$lang->simple_view}</span><span class="show">{$lang->detail_view}</span></button></span>
|
||||
</caption>
|
||||
<caption>
|
||||
<a cond="$act != 'dispLayoutAdminAllInstanceList'" href="{getUrl('act', 'dispLayoutAdminAllInstanceList', 'layout_srl', '')}">{$lang->instance_layout}</a>
|
||||
<block cond="$act == 'dispLayoutAdminAllInstanceList'">{$lang->instance_layout}</block>
|
||||
|
|
||||
<a cond="$act != 'dispLayoutAdminInstalledList'" href="{getUrl('act', 'dispLayoutAdminInstalledList')}">{$lang->installed_layout}</a>
|
||||
<block cond="$act == 'dispLayoutAdminInstalledList'">{$lang->installed_layout}</block>
|
||||
</caption>
|
||||
|
|
@ -1,14 +1,7 @@
|
|||
<include target="header.html" />
|
||||
<div class="table even easyList dsTg">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<caption>
|
||||
<a cond="$act != 'dispLayoutAdminInstalledList'" href="{getUrl('act', 'dispLayoutAdminInstalledList')}">PC({$pcLayoutCount})</a>
|
||||
<block cond="$act == 'dispLayoutAdminInstalledList'">PC({$pcLayoutCount})</block>
|
||||
|
|
||||
<a cond="$act != 'dispLayoutAdminInstalledMobileList'" href="{getUrl('act', 'dispLayoutAdminInstalledMobileList')}">Mobile({$mobileLayoutCount})</a>
|
||||
<block cond="$act == 'dispLayoutAdminInstalledMobileList'">Mobile({$mobileLayoutCount})</block>
|
||||
<span class="side"><button type="button" class="text"><span class="hide">{$lang->simple_view}</span><span class="show">{$lang->detail_view}</span></button></span>
|
||||
</caption>
|
||||
<include target="caption.html" />
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="title">{$lang->layout_name}</th>
|
||||
|
|
@ -55,4 +48,4 @@
|
|||
</block>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
46
modules/layout/tpl/layout_all_instance_list.html
Normal file
46
modules/layout/tpl/layout_all_instance_list.html
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<include target="header.html" />
|
||||
<load target="js/adminList.js" usecdn="true" />
|
||||
|
||||
<script type="text/javascript">
|
||||
xe.lang.confirm_delete = '{$lang->confirm_delete}';
|
||||
</script>
|
||||
<div class="table even easyList">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<include target="caption.html" />
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="nowr">{$lang->number}</th>
|
||||
<th scope="col" class="nowr">{$lang->layout_name}</th>
|
||||
<th scope="col" class="title">{$lang->title}</th>
|
||||
<th scope="col" class="nowr">{$lang->regdate}</th>
|
||||
<th scope="col" class="nowr">{$lang->cmd_layout_management}</th>
|
||||
<th scope="col" class="nowr">{$lang->cmd_layout_edit}</th>
|
||||
<th scope="col" class="nowr">{$lang->cmd_delete}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{@$count=1}
|
||||
<!--@foreach($layout_list as $layout)-->
|
||||
{@$layout_name = $layout['title']}
|
||||
{@unset($layout['title'])}
|
||||
<tr loop="$layout => $no, $item">
|
||||
<td class="nowr" rowspan="{count($layout)}" cond="$no === 0" >{$count++}</td>
|
||||
<td class="nowr" rowspan="{count($layout)}" cond="$no === 0" >{$layout_name}</td>
|
||||
<td class="title">{$item->title}</td>
|
||||
<td class="nowr">{zdate($item->regdate, "Y-m-d")}</td>
|
||||
<td class="nowr"><a href="{getUrl('act', 'dispLayoutAdminModify', 'layout_srl', $item->layout_srl)}">{$lang->cmd_layout_management}</a></td>
|
||||
<td class="nowr"><a href="{getUrl('act', 'dispLayoutAdminEdit', 'layout_srl', $item->layout_srl)}">{$lang->cmd_layout_edit}</a></td>
|
||||
<td class="nowr">
|
||||
<form class="layout_delete_form" ruleset="deleteLayout" action="./" method="post">
|
||||
<input type="hidden" name="module" value="layout" />
|
||||
<input type="hidden" name="act" value="procLayoutAdminDelete" />
|
||||
<input type="hidden" name="layout_srl" value="{$item->layout_srl}" />
|
||||
|
||||
<input class="text" type="submit" value="{$lang->cmd_delete}" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue