mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
issue 70 admin setup modified.
add gnb logo add gnb title git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8888 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
06e6799316
commit
df4d760117
6 changed files with 112 additions and 37 deletions
|
|
@ -190,6 +190,71 @@
|
|||
$this->setRedirectUrl($redirectUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief admin config update
|
||||
**/
|
||||
function procAdminUpdateConfig()
|
||||
{
|
||||
$adminTitle = Context::get('adminTitle');
|
||||
$file = $_FILES['adminLogo'];
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$oAdminConfig = $oModuleModel->getModuleConfig('admin');
|
||||
|
||||
if($file['tmp_name'])
|
||||
{
|
||||
$target_path = 'files/attach/images/admin/';
|
||||
FileHandler::makeDir($target_path);
|
||||
|
||||
// Get file information
|
||||
list($width, $height, $type, $attrs) = @getimagesize($file['tmp_name']);
|
||||
if($type == 3) $ext = 'png';
|
||||
elseif($type == 2) $ext = 'jpg';
|
||||
else $ext = 'gif';
|
||||
|
||||
$target_filename = sprintf('%s%s.%s.%s', $target_path, 'adminLogo', date('YmdHis'), $ext);
|
||||
@move_uploaded_file($file['tmp_name'], $target_filename);
|
||||
|
||||
$oAdminConfig->adminLogo = $target_filename;
|
||||
}
|
||||
if($adminTitle) $oAdminConfig->adminTitle = strip_tags($adminTitle);
|
||||
|
||||
if($oAdminConfig)
|
||||
{
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertModuleConfig('admin', $oAdminConfig);
|
||||
}
|
||||
|
||||
$this->setMessage('success_updated', 'info');
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAdminMenuSetup');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief admin logo delete
|
||||
**/
|
||||
function procAdminDeleteLogo()
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$oAdminConfig = $oModuleModel->getModuleConfig('admin');
|
||||
|
||||
FileHandler::removeFile(_XE_PATH_.$oAdminConfig->adminLogo);
|
||||
unset($oAdminConfig->adminLogo);
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertModuleConfig('admin', $oAdminConfig);
|
||||
|
||||
$this->setMessage('success_deleted', 'info');
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAdminMenuSetup');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Insert favorite
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -99,12 +99,19 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Admin logo, title setup
|
||||
$configObject = $oModuleModel->getModuleConfig('admin');
|
||||
$gnbTitleInfo->adminTitle = $configObject->adminTitle?$configObject->adminTitle:'XE Admin';
|
||||
$gnbTitleInfo->adminLogo = $configObject->adminLogo?$configObject->adminLogo:'modules/admin/tpl/img/xe.h1.png';
|
||||
|
||||
$browserTitle = 'Dashboard';
|
||||
if($subMenuTitle) $browserTitle = $subMenuTitle;
|
||||
$browserTitle .= ' - XE Admin';
|
||||
$browserTitle .= ' - '.$gnbTitleInfo->adminTitle;
|
||||
|
||||
Context::set('gnbUrlList', $menu->list);
|
||||
Context::set('parentSrl', $parentSrl);
|
||||
Context::set('gnb_title_info', $gnbTitleInfo);
|
||||
Context::setBrowserTitle($browserTitle);
|
||||
}
|
||||
|
||||
|
|
@ -320,10 +327,14 @@
|
|||
**/
|
||||
function dispAdminMenuSetup()
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$configObject = $oModuleModel->getModuleConfig('admin');
|
||||
|
||||
$oMenuAdminModel = &getAdminModel('menu');
|
||||
$output = $oMenuAdminModel->getMenuByTitle('__XE_ADMIN__');
|
||||
|
||||
Context::set('menu_srl', $output->menu_srl);
|
||||
Context::set('config_object', $configObject);
|
||||
$this->setTemplateFile('menu_setup');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@
|
|||
<action name="procAdminInsertThemeInfo" type="controller" standalone="true" ruleset="insertThemeInfo" />
|
||||
<action name="procAdminToggleFavorite" type="controller" ruleset="toggleFavorite" />
|
||||
<action name="procAdminEnviromentGatheringAgreement" type="controller" standalone="true" />
|
||||
<action name="procAdminUpdateConfig" type="controller" standalone="true" />
|
||||
<action name="procAdminDeleteLogo" type="controller" standalone="true" />
|
||||
|
||||
<action name="getAdminFTPList" type="model" standalone="true" />
|
||||
<action name="getSiteAllList" type="model" standalone="true" />
|
||||
|
|
@ -32,17 +34,17 @@
|
|||
<title xml:lang="tr">General</title>
|
||||
</menu>
|
||||
<menu name="adminMenuSetup" type="all">
|
||||
<title xml:lang="en">Admin Menu Setup</title>
|
||||
<title xml:lang="ko">관리자 메뉴 설정</title>
|
||||
<title xml:lang="zh-CN">Admin Menu Setup</title>
|
||||
<title xml:lang="jp">Admin Menu Setup</title>
|
||||
<title xml:lang="es">Admin Menu Setup</title>
|
||||
<title xml:lang="ru">Admin Menu Setup</title>
|
||||
<title xml:lang="fr">Admin Menu Setup</title>
|
||||
<title xml:lang="zh-TW">Admin Menu Setup</title>
|
||||
<title xml:lang="vi">Admin Menu Setup</title>
|
||||
<title xml:lang="mn">Admin Menu Setup</title>
|
||||
<title xml:lang="tr">Admin Menu Setup</title>
|
||||
<title xml:lang="en">Admin Setup</title>
|
||||
<title xml:lang="ko">관리자 설정</title>
|
||||
<title xml:lang="zh-CN">Admin Setup</title>
|
||||
<title xml:lang="jp">Admin Setup</title>
|
||||
<title xml:lang="es">Admin Setup</title>
|
||||
<title xml:lang="ru">Admin Setup</title>
|
||||
<title xml:lang="fr">Admin Setup</title>
|
||||
<title xml:lang="zh-TW">Admin Setup</title>
|
||||
<title xml:lang="vi">Admin Setup</title>
|
||||
<title xml:lang="mn">Admin Setup</title>
|
||||
<title xml:lang="tr">Admin Setup</title>
|
||||
</menu>
|
||||
<menu name="theme" type="site">
|
||||
<title xml:lang="en">Theme</title>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<div class="xe">
|
||||
<p class="skipNav"><a href="#content">Skip Navigation</a></p>
|
||||
<div class="header">
|
||||
<h1><a href="{getUrl('','module','admin')}"><img src="img/xe.h1.png" width="33" height="32" alt="XE" /> Super Admin</a></h1>
|
||||
<h1><a href="{getUrl('','module','admin')}"><img src="{getUrl('')}{$gnb_title_info->adminLogo}" alt="{$gnb_title_info->adminTitle}" /> {$gnb_title_info->adminTitle}</a></h1>
|
||||
<div class="siteTool">
|
||||
<a href="#moveSiteList" class="i tgAnchor" data-effect="slide" data-duration="100">Move to Site</a>
|
||||
<div class="tgContent" id="moveSiteList">
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
</div>
|
||||
<div class="account">
|
||||
<ul>
|
||||
<li><a href="{getUrl('', 'act', 'dispMemberInfo')}" target="_blank">{$logged_info->email_address}</a></li>
|
||||
<li><a href="{getUrl('', 'module', 'admin', 'act', 'dispMemberAdminInfo', 'is_admin', 'Y', 'member_srl', $logged_info->member_srl)}">{$logged_info->email_address}</a></li>
|
||||
<li><a href="{getUrl('', 'module','admin','act','procAdminLogout')}">Log-out</a></li>
|
||||
<li><a href="#language" class="tgAnchor language" data-effect="slide" data-duration="100">Language</a>
|
||||
<ul class="tgContent" id="language">
|
||||
|
|
|
|||
|
|
@ -4,40 +4,36 @@
|
|||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form action="" class="form">
|
||||
<h1 class="h1">Admin Setting</h1>
|
||||
<form action="./" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="act" value="procAdminUpdateConfig" />
|
||||
<fieldset class="section">
|
||||
<h2 class="h2">Title</h2>
|
||||
<h2 class="h2">{$lang->title}</h2>
|
||||
<ul class="form">
|
||||
<li>
|
||||
<p class="q">
|
||||
<label for="adminTitle">관리자 페이지 제목</label>
|
||||
</p>
|
||||
<p class="a">
|
||||
<input type="text" id="adminTitle" value="Naradesign">
|
||||
</p>
|
||||
<p class="q"><label for="adminTitle">관리자 페이지 제목</label></p>
|
||||
<p class="a"><input type="text" name="adminTitle" id="adminTitle" value="{$config_object->adminTitle}" /></p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q">
|
||||
<label for="adminLogo">관리자 페이지 로고</label>
|
||||
</p>
|
||||
<p class="a"> <img src="http://dece24.xpressengine.com/xeAdmin/img/xe.h1.png">
|
||||
<button type="button" class="text">Delete</button>
|
||||
</p>
|
||||
<p class="q"><label for="adminLogo">관리자 페이지 로고</label></p>
|
||||
<p class="a">
|
||||
<input type="file" id="adminLogo">
|
||||
<!--@if($config_object->adminLogo)-->
|
||||
<img src="{getUrl('').$config_object->adminLogo}" />
|
||||
<button type="submit" value="procAdminDeleteLogo" name="act" class="text">{$lang->cmd_delete}</button>
|
||||
<!--@end-->
|
||||
</p>
|
||||
<p class="a"><input type="file" name="adminLogo" id="adminLogo" /></p>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="btnArea"><span class="btn small"><button value="procMenuAdminArrangeItem" name="act" type="submit">{$lang->cmd_save}</button></span></p>
|
||||
<p class="btnArea"><span class="btn small"><button value="procAdminUpdateConfig" name="act" type="submit">{$lang->cmd_save}</button></span></p>
|
||||
</fieldset>
|
||||
</form>
|
||||
<form id="listForm" action="./" class="siteMap" method="post">
|
||||
<input type="hidden" name="act" value="procMenuAdminDeleteItem" />
|
||||
<input type="hidden" name="menu_srl" value="{$menu_srl}" />
|
||||
<input type="hidden" name="menu_item_srl" value="" />
|
||||
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin', 'act', 'dispAdminMenuSetup')}" />
|
||||
<h2 class="h2">Menu</h2>
|
||||
<input type="hidden" name="act" value="procMenuAdminDeleteItem" />
|
||||
<input type="hidden" name="menu_srl" value="{$menu_srl}" />
|
||||
<input type="hidden" name="menu_item_srl" value="" />
|
||||
<input type="hidden" name="success_return_url" value="{getUrl('', 'module', 'admin', 'act', 'dispAdminMenuSetup')}" />
|
||||
<fieldset class="section">
|
||||
<h1 class="h1">{$lang->menu_gnb_sub['adminMenuSetup']}</h1>
|
||||
<div class="adminMenu portlet">
|
||||
<ul class="lined">
|
||||
<li class="parent" loop="$gnbUrlList=>$key,$value">
|
||||
|
|
@ -51,6 +47,7 @@
|
|||
</ul>
|
||||
<p class="btnArea"><span class="btn small"><button value="procMenuAdminArrangeItem" name="act" type="submit">{$lang->cmd_save}</button></span></p>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<div class="modal" id="editMenu">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue