mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
faceoff support
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8953 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
236bb1528b
commit
56b95cdb40
5 changed files with 55 additions and 50 deletions
|
|
@ -496,6 +496,8 @@
|
|||
if(!move_uploaded_file($file['tmp_name'], $user_layout_path . 'faceoff.tar')) exit();
|
||||
|
||||
$this->importLayout($layout_srl, $user_layout_path.'faceoff.tar');
|
||||
|
||||
$this->setRedirectUrl(Context::get('error_return_url'));
|
||||
}
|
||||
|
||||
function importLayout($layout_srl, $source_file) {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
// Set a layout list
|
||||
$oLayoutModel = &getModel('layout');
|
||||
$layout_list = $oLayoutModel->getDownloadedLayoutList('P', true);
|
||||
$layout_list[] = $oLayoutModel->getLayoutInfo('faceoff', null, 'P');
|
||||
Context::set('type', 'P');
|
||||
|
||||
$pcLayoutCount = $oLayoutModel->getInstalledLayoutCount('P');
|
||||
|
|
|
|||
|
|
@ -672,7 +672,7 @@
|
|||
$logged_info = Context::get('logged_info');
|
||||
// Display edit button for faceoff layout
|
||||
if(Context::get('module')!='admin' && strpos(Context::get('act'),'Admin')===false && ($logged_info->is_admin == 'Y' || $logged_info->is_site_admin)) {
|
||||
Context::addHtmlFooter("<div class=\"faceOffManager\"><a href=\"".getUrl('','mid',Context::get('mid'),'act','dispLayoutAdminLayoutModify','delete_tmp','Y')."\" class=\"buttonSet buttonLayoutEditor\"><span>".Context::getLang('cmd_layout_edit')."</span></a></div>");
|
||||
Context::addHtmlFooter('<div class="faceOffManager" style="height: 23px; position: fixed; right: 3px; top: 3px;"><a href="'.getUrl('','mid',Context::get('mid'),'act','dispLayoutAdminLayoutModify','delete_tmp','Y').'">'.Context::getLang('cmd_layout_edit').'</a></div>');
|
||||
}
|
||||
// Display menu when editing the faceOff page
|
||||
if(Context::get('act')=='dispLayoutAdminLayoutModify' && ($logged_info->is_admin == 'Y' || $logged_info->is_site_admin)) {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<customrules>
|
||||
<rule name="importExtension" type="regex" test="/\.(tar)$/i" />
|
||||
<rule name="importExtension" type="regex" test="/\.tar$/i" />
|
||||
</customrules>
|
||||
<fields>
|
||||
<field name="file['name']" required="true" rule="importExtension" />
|
||||
<field name="file" required="true" rule="importExtension" />
|
||||
<field name="layout_srl" required="true" rule="number" />
|
||||
</fields>
|
||||
</ruleset>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="form" action="./" method="post" enctype="multipart/form-data">
|
||||
<form class="form" ruleset="imageUpload" action="./" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="module" value="layout" />
|
||||
<input type="hidden" name="act" value="procLayoutAdminUserImageUpload" />
|
||||
<input type="hidden" name="layout_srl" value="{$layout_srl}" />
|
||||
|
|
@ -49,54 +49,56 @@
|
|||
</fieldset>
|
||||
|
||||
<block cond="$selected_layout->type == 'faceoff'">
|
||||
<h3 class="h3">{$lang->layout_migration}</h3>
|
||||
<p>{nl2br($lang->about_layout_migration)}</p>
|
||||
<fieldset class="section">
|
||||
<h3 class="h3">{$lang->layout_migration}</h3>
|
||||
<p>{nl2br($lang->about_layout_migration)}</p>
|
||||
|
||||
<table cellspacing="0" class="rowTable">
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->layout_export}</div></th>
|
||||
<td>
|
||||
<a href="{getUrl('','act','procLayoutAdminUserLayoutExport','layout_srl',$layout_srl)}" class="button black strong"><span>{$lang->layout_btn_export}</span></a>
|
||||
<p>{$lang->about_layout_export}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->layout_import}</div></th>
|
||||
<td>
|
||||
<form ruleset="userLayoutImport" action="{getUrl('')}" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="module" value="layout" />
|
||||
<input type="hidden" name="act" value="procLayoutAdminUserLayoutImport" />
|
||||
<input type="hidden" name="layout_srl" value="{$layout_srl}" />
|
||||
<input type="file" name="file" />
|
||||
<span class="button black strong"><button type="submit">{$lang->cmd_submit}</button></span>
|
||||
</form>
|
||||
<p>{$lang->about_layout_import}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<form class="form" ruleset="userLayoutImport" action="./" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="module" value="layout" />
|
||||
<input type="hidden" name="act" value="procLayoutAdminUserLayoutImport" />
|
||||
<input type="hidden" name="layout_srl" value="{$layout_srl}" />
|
||||
<ul>
|
||||
<li>
|
||||
<p class="q">{$lang->layout_export}</p>
|
||||
<p class="a"><span class="btn small"><a href="{getUrl('', 'act', 'procLayoutAdminUserLayoutExport', 'layout_srl', $layout_srl)}">{$lang->layout_btn_export}</a></span></p>
|
||||
<p class="desc">{$lang->about_layout_export}</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q">{$lang->layout_import}</p>
|
||||
<p class="a"><input type="file" name="file" /></p>
|
||||
<p class="desc">{$lang->about_layout_import}</p>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="btnArea">
|
||||
<span class="btn medium"><input type="submit" value="{$lang->cmd_submit}" /></span>
|
||||
</div>
|
||||
</form>
|
||||
</fieldset>
|
||||
</block>
|
||||
|
||||
<form id="fo_layout" class="form" ruleset="codeUpdate" action="./" method="post">
|
||||
<input type="hidden" name="layout_srl" value="{$layout_srl}" />
|
||||
<input type="hidden" name="act" value="procLayoutAdminCodeUpdate" />
|
||||
<fieldset class="section">
|
||||
<form id="fo_layout" class="form" ruleset="codeUpdate" action="./" method="post">
|
||||
<input type="hidden" name="layout_srl" value="{$layout_srl}" />
|
||||
<input type="hidden" name="act" value="procLayoutAdminCodeUpdate" />
|
||||
|
||||
<h3 class="h3">HTML</h3>
|
||||
<div>
|
||||
<textarea name="code" style="width:100%;height:300px;font-size:11px;">{$layout_code}</textarea>
|
||||
<!--@foreach($widget_list as $widget)-->
|
||||
<span class="btn"><a href="{getUrl('','module','widget','act','dispWidgetGenerateCode','selected_widget',$widget->widget,'module_srl',$module_srl)}" onclick="popopen(this.href,'GenerateCodeInPage');return false;">{$widget->title}</a></span>
|
||||
<!--@end-->
|
||||
</div>
|
||||
<h3 class="h3">HTML</h3>
|
||||
<div>
|
||||
<textarea name="code" style="width:100%;height:300px;font-size:11px;">{$layout_code}</textarea>
|
||||
<!--@foreach($widget_list as $widget)-->
|
||||
<span class="btn"><a href="{getUrl('','module','widget','act','dispWidgetGenerateCode','selected_widget',$widget->widget,'module_srl',$module_srl)}" onclick="popopen(this.href,'GenerateCodeInPage');return false;">{$widget->title}</a></span>
|
||||
<!--@end-->
|
||||
</div>
|
||||
|
||||
<h3 class="h3">CSS</h3>
|
||||
<div>
|
||||
<textarea name="code_css" style="width:100%;height:300px;font-size:11px;">{$layout_code_css}</textarea>
|
||||
</div>
|
||||
<div class="btnArea" style="float: left" >
|
||||
<span class="btn medium"><button type="submit" name="mode" value="reset">{$lang->cmd_reset}</button></span>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn medium"><button type="button" onclick="doPreviewLayoutCode();">{$lang->cmd_preview}</button></span>
|
||||
<span class="btn medium"><button type="submit" name="mode" value="save">{$lang->cmd_save}</button></span>
|
||||
</div>
|
||||
</form>
|
||||
<h3 class="h3">CSS</h3>
|
||||
<div>
|
||||
<textarea name="code_css" style="width:100%;height:300px;font-size:11px;">{$layout_code_css}</textarea>
|
||||
</div>
|
||||
<div class="btnArea" style="float: left" >
|
||||
<span class="btn medium"><button type="submit" name="mode" value="reset">{$lang->cmd_reset}</button></span>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn medium"><button type="button" onclick="doPreviewLayoutCode();">{$lang->cmd_preview}</button></span>
|
||||
<span class="btn medium"><button type="submit" name="mode" value="save">{$lang->cmd_save}</button></span>
|
||||
</div>
|
||||
</form>
|
||||
</fieldset>
|
||||
Loading…
Add table
Add a link
Reference in a new issue