mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-08 03:22:29 +09:00
Issue 2380: Admin UI Refactoring - Advanced - Layouts
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11610 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
2d4b235146
commit
b8eb83cd94
16 changed files with 219 additions and 1313 deletions
|
|
@ -122,28 +122,48 @@
|
|||
{
|
||||
foreach($_downloadedList as $dLayoutInfo)
|
||||
{
|
||||
$downloadedList[] = $dLayoutInfo->layout;
|
||||
$downloadedList[$dLayoutInfo->layout] = $dLayoutInfo->layout;
|
||||
$titleList[$dLayoutInfo->layout] = $dLayoutInfo->title;
|
||||
}
|
||||
}
|
||||
|
||||
// Get downloaded name list have no instance
|
||||
$noInstanceList = array_diff($downloadedList, $instanceList);
|
||||
foreach($noInstanceList as $layoutName)
|
||||
if($layout)
|
||||
{
|
||||
$insertArgs = new stdClass();
|
||||
$insertArgs->site_srl = $siteSrl;
|
||||
$insertArgs->layout_srl = getNextSequence();
|
||||
$insertArgs->layout = $layoutName;
|
||||
$insertArgs->title = $titleList[$layoutName];
|
||||
$insertArgs->layout_type = $layoutType;
|
||||
if(!count($instanceList) && $downloadedList[$layout])
|
||||
{
|
||||
$insertArgs = new stdClass();
|
||||
$insertArgs->site_srl = $siteSrl;
|
||||
$insertArgs->layout_srl = getNextSequence();
|
||||
$insertArgs->layout = $layout;
|
||||
$insertArgs->title = $titleList[$layout];
|
||||
$insertArgs->layout_type = $layoutType;
|
||||
|
||||
$oLayoutAdminController = getAdminController('layout');
|
||||
$oLayoutAdminController->insertLayout($insertArgs);
|
||||
$oLayoutAdminController = getAdminController('layout');
|
||||
$oLayoutAdminController->insertLayout($insertArgs);
|
||||
$isCreateInstance = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Get downloaded name list have no instance
|
||||
$noInstanceList = array_diff($downloadedList, $instanceList);
|
||||
foreach($noInstanceList as $layoutName)
|
||||
{
|
||||
$insertArgs = new stdClass();
|
||||
$insertArgs->site_srl = $siteSrl;
|
||||
$insertArgs->layout_srl = getNextSequence();
|
||||
$insertArgs->layout = $layoutName;
|
||||
$insertArgs->title = $titleList[$layoutName];
|
||||
$insertArgs->layout_type = $layoutType;
|
||||
|
||||
$oLayoutAdminController = getAdminController('layout');
|
||||
$oLayoutAdminController->insertLayout($insertArgs);
|
||||
$isCreateInstance = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
// If create layout instance, reload instance list
|
||||
if(count($noInstanceList))
|
||||
if($isCreateInstance)
|
||||
{
|
||||
$output = executeQueryArray('layout.getLayoutList', $args, $columnList);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue