#18427049 : add autoinstall module
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6915 201d5d3c-b55e-5fd7-737f-ddc643e51545
37
modules/autoinstall/tpl/config.html
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<!--%import("filter/insert_config.xml")-->
|
||||
<!--#include("header.html")-->
|
||||
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, insert_config)">
|
||||
<table cellspacing="0" class="rowTable">
|
||||
<tr>
|
||||
<th scope="col"><div>설치된 XE의 절대경로</div></th>
|
||||
<td>{_XE_PATH_}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col" rowspan="2"><div>설치된 XE의 FTP 절대경로 설정</div></th>
|
||||
<td>
|
||||
<input type="text" name="ftp_root_path" value="<!--@if($pwd && $pwd!='/')-->{$pwd}<!--@else-->{$config->ftp_root_path}<!--@end-->" class="inputTypeText w400" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<!--@if($list)-->
|
||||
<ul>
|
||||
<!--@foreach($list as $k => $v)-->
|
||||
<!--@if($v)-->
|
||||
<li> <a href="{getUrl('pwd',$pwd.$v)}">{$v}</a></li>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
</ul>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="row2">
|
||||
<th colspan="2" class="button" style="text-align:center">
|
||||
<span class="button black strong"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
47
modules/autoinstall/tpl/css/autoinstall.css
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
|
||||
.leftBox { width:180px; float:left; margin-right:30px; padding-bottom:30px; }
|
||||
|
||||
.leftBox .categoryBox { background-color:#F8F8F8; padding:10px; width:160px; overflow:hidden; }
|
||||
.leftBox .categoryBox h3 { padding:0 0 10px 0; margin:0 0 10px 0; white-space:nowrap; overflow:hidden; color:#48494E; font-size:11px; font-weight:normal; background:transparent url(../img/hrE1.gif) repeat-x scroll left bottom;}
|
||||
.leftBox .categoryBox h3 a { color:#48494E; font-size:12px; font-weight:bold; text-decoration:none; }
|
||||
.leftBox .categoryBox ul.category { margin:10px 0 0 0; padding:0; list-style:none; }
|
||||
.leftBox .categoryBox ul.category li { margin:0 0 10px 10px; }
|
||||
.leftBox .categoryBox ul.category li a.selected { font-weight:bold; color:#2893BB; }
|
||||
.leftBox .categoryBox ul.category li a { text-decoration:none; color:#7B7575; }
|
||||
.leftBox .categoryBox ul.category li span { font-family:verdana; font-size:10px; color:#999; }
|
||||
|
||||
.leftBox .categoryBox ul.resourceManage { margin:0; padding:10px 0 0 0; list-style:none; background:transparent url(../img/hrE1.gif) repeat-x scroll left top; }
|
||||
.leftBox .categoryBox ul.resourceManage li { background:url(../img/btnManage.gif) no-repeat 2px 2px; padding-left:14px; white-space:nowrap; overflow:hidden; margin-bottom:10px; }
|
||||
.leftBox .categoryBox ul.resourceManage li a { text-decoration:none; color:#747474; }
|
||||
.leftBox .categoryBox ul.resourceManage li a.selected { font-weight:bold; }
|
||||
|
||||
.leftBox .searchBox { padding:10px 0; text-align:center; background:transparent url(../img/hrE1.gif) repeat-x scroll left top;}
|
||||
.leftBox .searchBox input.input { border:1px solid #ddd; width:120px; height:16px;}
|
||||
.leftBox .searchBox input.submit { vertical-align:middle; }
|
||||
|
||||
.resourceContent { position:relative; *zoom:1; overflow:hidden; }
|
||||
|
||||
table.packageList {width:100%; height:100px; table-layout:fixed; border-bottom:1px solid #ddd; }
|
||||
table td { vertical-align:top; }
|
||||
table td.thumbnail { text-align:center; padding:10px 0; }
|
||||
table td.thumbnail img { border:1px solid #ccc; padding:2px; overflow:hidden; *zoom:1; }
|
||||
table td.title { height:18px; padding:10px 0 0 0;}
|
||||
table td.title h3 { padding:0; margin:0; }
|
||||
table td.title a {text-decoration:none; color:#000; }
|
||||
table td.description { padding:5px 0 0 0; color:#777; height:44px; white-space:normal; overflow:hidden; }
|
||||
table td.info { height:18px; }
|
||||
table td.info ul { list-style:none; padding:0; margin:0; }
|
||||
table td.info ul li { float:left; margin-right:20px; white-space:nowrap; }
|
||||
table td.info ul li.category a { text-decoration:none; color:#888; font-weight:bold; }
|
||||
table td.info ul li.voted { color:#666; font-family:tahoma; font-size:10px;}
|
||||
table td.info ul li.downloaded { background:url(../img/iconFile.gif) no-repeat left 2px; padding-left:16px; color:#666; font-family:tahoma; font-size:10px;}
|
||||
table td.info ul li.info { color:#aaa; font-family:tahoma; font-size:11px;}
|
||||
table td.info ul li.info a { text-decoration:none; color:#aaa; }
|
||||
table td.info ul li.author a { text-decoration:none; color:#444; }
|
||||
|
||||
ul.listOrder { margin:10px 0 0 0; padding:0 0 10px 0; text-align:left; background:transparent url(../img/hrE1.gif) repeat-x scroll left bottom;}
|
||||
ul.listOrder.asc li.arrow { background:url(../img/arrUp.gif) no-repeat right 2px; padding-right:10px; }
|
||||
ul.listOrder.desc li.arrow { background:url(../img/arrDown.gif) no-repeat right 2px; padding-right:10px; }
|
||||
ul.listOrder li { display:inline; margin-left:10px; }
|
||||
ul.listOrder li.arrow a { text-decoration:none; font-weight:bold; color:#2893BB; }
|
||||
ul.listOrder li a { text-decoration:none; color:#7B7575; }
|
||||
9
modules/autoinstall/tpl/filter/insert_config.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<filter name="insert_config" module="autoinstall" act="procAutoinstallAdminInsertConfig" confirm_msg_code="confirm_submit">
|
||||
<form>
|
||||
<node target="ftp_root_path" required="true" />
|
||||
</form>
|
||||
<response>
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
8
modules/autoinstall/tpl/header.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<h3 class="xeAdmin">autoinstall module <span class="gray">{$lang->cmd_management}</span></h3>
|
||||
|
||||
<div class="header4">
|
||||
<ul class="localNavigation">
|
||||
<li <!--@if($act=="dispAutoinstallAdminIndex")-->class="on"<!--@end-->><a href="{getUrl('act','dispAutoinstallAdminIndex')}">Index</a></li>
|
||||
<li <!--@if($act=="dispAutoinstallAdminConfig")-->class="on"<!--@end-->><a href="{getUrl('act','dispAutoinstallAdminConfig')}">Config</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
BIN
modules/autoinstall/tpl/img/arrDown.gif
Normal file
|
After Width: | Height: | Size: 60 B |
BIN
modules/autoinstall/tpl/img/arrUp.gif
Normal file
|
After Width: | Height: | Size: 60 B |
BIN
modules/autoinstall/tpl/img/arrowPagination.gif
Normal file
|
After Width: | Height: | Size: 98 B |
BIN
modules/autoinstall/tpl/img/btn_search.gif
Normal file
|
After Width: | Height: | Size: 605 B |
BIN
modules/autoinstall/tpl/img/hrE1.gif
Normal file
|
After Width: | Height: | Size: 43 B |
BIN
modules/autoinstall/tpl/img/starOff.gif
Normal file
|
After Width: | Height: | Size: 97 B |
BIN
modules/autoinstall/tpl/img/starOn.gif
Normal file
|
After Width: | Height: | Size: 127 B |
22
modules/autoinstall/tpl/index.html
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<!--#include("header.html")-->
|
||||
<!--%import("css/autoinstall.css")-->
|
||||
<!--%import("js/autoinstall.js")-->
|
||||
<div>
|
||||
<!--@if($show_ftp_note)-->
|
||||
{$lang->description_ftp_note}
|
||||
<!--@end-->
|
||||
<!--@if($need_update)-->
|
||||
<p>
|
||||
{$lang->need_update}</p>
|
||||
<!--@else-->
|
||||
<p>{$lang->description_update}</p>
|
||||
<!--@end-->
|
||||
<a href="#" onclick="doUpdate(); return false;" title="update">Update</a>
|
||||
</div>
|
||||
<div class="clear" ></div>
|
||||
|
||||
<!--#include("leftBox.html")-->
|
||||
<!--@if($item_list)-->
|
||||
<!--#include("list.html")-->
|
||||
<!--@end-->
|
||||
|
||||
35
modules/autoinstall/tpl/install.html
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<!--#include("header.html")-->
|
||||
<!--%import("css/autoinstall.css")-->
|
||||
<!--%import("js/autoinstall.js")-->
|
||||
<div class="resourceContent">
|
||||
<table class="packageList">
|
||||
<colgroup>
|
||||
<col width="150" /><col width="*" />
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td class="title" colspan="2">
|
||||
<h3>
|
||||
{$package->title} ver. {$package->version} ( <!--@if($package->installed)-->현재버전: {$package->cur_version} <!--@if($package->need_update)--> (업데이트가 필요합니다.)<!--@end--> <!--@else-->인스톨이 필요합니다. <!--@end--> )
|
||||
</h3>
|
||||
</td>
|
||||
</tr>
|
||||
<!--@if($package->depends)-->
|
||||
<tr>
|
||||
<td>의존하고 있는 프로그램</td>
|
||||
<td>
|
||||
<!--@foreach($package->depends as $dep)-->
|
||||
{$dep->title} ver. {$dep->version} -
|
||||
<!--@if($dep->installed)-->현재버전: {$dep->cur_version} <!--@if($dep->need_update)--> (업데이트가 필요합니다.)<!--@end--> <!--@else-->인스톨이 필요합니다. <!--@end-->
|
||||
<br />
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
설치를 진행하면 의존성이 있는 모든 프로그램을 함께 설치합니다. <!--@if(!$package->installed || $package->need_update)--><a href="#" onclick="doInstallPackage('{$package->package_srl}')">설치하기</a><!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
26
modules/autoinstall/tpl/js/autoinstall.js
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
function completeUpdate(ret_obj) {
|
||||
alert(ret_obj['message']);
|
||||
location.reload();
|
||||
}
|
||||
|
||||
function doUpdate() {
|
||||
var params = new Array();
|
||||
exec_xml('autoinstall', 'procAutoinstallAdminUpdateinfo', params, completeUpdate);
|
||||
}
|
||||
|
||||
function doInstallPackage(package_srl) {
|
||||
var params = new Array();
|
||||
params['package_srl'] = package_srl;
|
||||
exec_xml('autoinstall', 'procAutoinstallAdminPackageinstall', params, completeInstall);
|
||||
}
|
||||
|
||||
function completeUpdateNoMsg(ret_obj) {
|
||||
location.reload();
|
||||
}
|
||||
|
||||
function completeInstall(ret_obj) {
|
||||
alert(ret_obj['message']);
|
||||
var params = new Array();
|
||||
exec_xml('autoinstall', 'procAutoinstallAdminUpdateinfo', params, completeUpdateNoMsg);
|
||||
}
|
||||
|
||||
47
modules/autoinstall/tpl/leftBox.html
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<div class="leftBox">
|
||||
<div class="categoryBox">
|
||||
<h3><a href="{getUrl('category_srl','')}">{$lang->view_all_package}</a> <span>({$tCount})</span></h3>
|
||||
{@ $_pDepth = 0;}
|
||||
|
||||
<ul class="category">
|
||||
<!--@foreach($categories as $key => $val)-->
|
||||
<!--@if($_pDepth > $val->depth)-->
|
||||
<!--@for($i=$val->depth; $i<$_pDepth; $i++)-->
|
||||
</ul>
|
||||
</li>
|
||||
<!--@end-->
|
||||
{@ $_pDepth = $val->depth}
|
||||
<!--@end-->
|
||||
<li>
|
||||
<!--@if(count($val->children))-->
|
||||
<a href="{getUrl('category_srl',$val->category_srl,'childrenList',$val->childrenList)}"<!--@if($val->category_srl == $category_srl)--> class="selected"<!--@end-->>{$val->title}</a>
|
||||
<!--@else-->
|
||||
<a href="{getUrl('category_srl',$val->category_srl,'childrenList','')}"<!--@if($val->category_srl == $category_srl)--> class="selected"<!--@end-->>{$val->title}</a>
|
||||
<!--@end-->
|
||||
<!--@if($val->nPackages)-->
|
||||
<span>({$val->nPackages})</span>
|
||||
<!--@end-->
|
||||
<!--@if(count($val->children))-->
|
||||
{@$_pDepth++}
|
||||
<ul class="category">
|
||||
<!--@else-->
|
||||
</li>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
<!--@for($i=0;$i<$_pDepth;$i++)-->
|
||||
</ul>
|
||||
<!--@end-->
|
||||
</li>
|
||||
</ul>
|
||||
<div class="searchBox">
|
||||
<form action="{getUrl()}" method="get">
|
||||
<input type="hidden" name="category_srl" value="{$category_srl}" />
|
||||
<input type="hidden" name="module" value="admin" />
|
||||
<input type="hidden" name="act" value="dispAutoinstallAdminIndex" />
|
||||
<input type="text" name="search_keyword" value="{htmlspecialchars($search_keyword)}" class="input" />
|
||||
<input type="image" src="./img/btn_search.gif" class="submit" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
94
modules/autoinstall/tpl/list.html
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
<div class="resourceContent">
|
||||
<ul class="listOrder {$order_type}">
|
||||
<!--@if($order_target=='newest')-->
|
||||
<!--@if($order_type == 'desc')-->{@$_order_type = 'asc'}<!--@else-->{@$_order_type = 'desc'}<!--@end-->
|
||||
<!--@else-->
|
||||
{@$_order_type = 'desc'}
|
||||
<!--@end-->
|
||||
<li <!--@if($order_target=='newest')-->class="arrow"<!--@end-->><a href="{getUrl('order_target','newest','order_type',$_order_type)}">{$lang->order_newest}</a></li>
|
||||
<!--@if($order_target=='download')-->
|
||||
<!--@if($order_type == 'desc')-->{@$_order_type = 'asc'}<!--@else-->{@$_order_type = 'desc'}<!--@end-->
|
||||
<!--@else-->
|
||||
{@$_order_type = 'desc'}
|
||||
<!--@end-->
|
||||
<li <!--@if($order_target=='download')-->class="arrow"<!--@end-->><a href="{getUrl('order_target','download','order_type',$_order_type)}">{$lang->order_download}</a></li>
|
||||
<!--@if($order_target=='popular')-->
|
||||
<!--@if($order_type == 'desc')-->{@$_order_type = 'asc'}<!--@else-->{@$_order_type = 'desc'}<!--@end-->
|
||||
<!--@else-->
|
||||
{@$_order_type = 'desc'}
|
||||
<!--@end-->
|
||||
<li <!--@if($order_target=='popular')-->class="arrow"<!--@end-->><a href="{getUrl('order_target','popular','order_type',$_order_type)}">{$lang->order_popular}</a></li>
|
||||
</ul>
|
||||
|
||||
<!--@foreach($item_list as $key => $val)-->
|
||||
<table class="packageList">
|
||||
<colgroup>
|
||||
<col width="120" /><col width="*"/>
|
||||
</colgroup>
|
||||
<tr>
|
||||
{@ $target_url = $original_site."?mid=download&package_srl=".$val->package_srl; }
|
||||
<td rowspan="4" class="thumbnail"><a href="{$target_url}"><img src="{str_replace('./', $uri, $val->item_screenshot_url)}" width="100" height="100" alt="" /></a></td>
|
||||
<td class="title">
|
||||
<h3>
|
||||
<a href="{$target_url}">{htmlspecialchars($val->title)} ver. {htmlspecialchars($val->item_version)}</a>
|
||||
</h3>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td class="info">
|
||||
<ul>
|
||||
<!--@if($val->category_srl)--><li class="category"><a href="{getUrl('category_srl', $val->category_srl)}">{$categories[$val->category_srl]->title}</a></li><!--@end-->
|
||||
<li class="voted">
|
||||
<!--@for($i=0;$i<5;$i++)--><!--@if($i<$val->package_star)--><img src="./img/starOn.gif" alt="" /><!--@else--><img src="./img/starOff.gif" alt="" /><!--@end--><!--@end-->
|
||||
{sprintf("%0.1f",$val->package_voted/$val->package_voter*2)} /{number_format($val->package_voter)}
|
||||
</li>
|
||||
</li>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="description">{cut_str(htmlspecialchars($val->package_description),200)}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">
|
||||
<ul>
|
||||
<li class="info">
|
||||
{$lang->package_update} {zdate($val->item_regdate, "Y-m-d H:i")}
|
||||
/ {$lang->package_downloaded_count} : {number_format($val->package_downloaded)}
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">
|
||||
<ul>
|
||||
<li class="info">
|
||||
<!--@if($val->current_version)-->
|
||||
현재 설치 버전 : {$val->current_version}
|
||||
<!--@if($val->need_update == 'Y')-->
|
||||
<a href="{getUrl('act','dispAutoinstallAdminInstall','package_srl',$val->package_srl)}">업데이트</a>
|
||||
<!--@end-->
|
||||
<!--@else-->
|
||||
<a href="{getUrl('act','dispAutoinstallAdminInstall','package_srl',$val->package_srl)}">인스톨</a>
|
||||
<!--@end-->
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--@end-->
|
||||
|
||||
<div class="pagination">
|
||||
<a href="{getUrl('page','')}" class="prevEnd">{$lang->first_page}</a>
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
<!--@if($page == $page_no)-->
|
||||
<strong>{$page_no}</strong>
|
||||
<!--@else-->
|
||||
<a href="{getUrl('page',$page_no)}">{$page_no}</a>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
<a href="{getUrl('page',$page_navigation->last_page)}" class="nextEnd">{$lang->last_page}</a>
|
||||
</div>
|
||||
</div>
|
||||