ugm_creative_adm_icon_b3.html
<{$Navigation}>
<{if $op=="op_list"}>
<script type='text/javascript'>
$(document).ready(function(){
$('#sort').sortable({ opacity: 0.6, cursor: 'move', update: function() {
var order = $(this).sortable('serialize') + '&op=op_update_sort';
$.post('<{$action}>', order, function(theResponse){
$('#save_msg').html(theResponse);//傳回訊息
});
}
});
});
</script>
<div class="container-fluid">
<div id="save_msg"></div>
<form action='<{$action}>' method='post' id='myForm'>
<div class="row">
<div class="col-md-3">
<{$kind_form}>
</div>
<div class="col-md-9">
<span class="text-danger"><{$kind_description}></span>
</div>
</div>
<table id="form_table" class="table table-bordered table-striped table-hover table-responsive">
<thead>
<tr>
<th class="col-md-1 text-center">圖示</th>
<th class="col-md-4 text-center"><{$smarty.const._MD_UGMMOUDEL_SLIDER_TITLE}></th>
<th class="col-md-3 text-center"><{$smarty.const._MD_UGMMOUDEL_KIND_URL}></th>
<th class="col-md-1 text-center"><{$smarty.const._MD_UGMMOUDEL_KIND_TARGET_1}></th>
<th class="col-md-1 text-center"><{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE}></th>
<th class="col-md-2 text-center">
<a href="<{$action}>?op=op_form&kind=<{$kind}>" class="btn btn-xs btn-primary"><{$smarty.const._ADD}></a>
</th>
</tr>
</thead>
<tbody id='sort'>
<{foreach item=row key=id from=$rows}>
<tr id='tr_<{$row.sn}>'>
<!-- 圖示-->
<td class="text-center">
<i class="fa <{$row.icon}>"></i>
</td>
<!-- 類別名稱-->
<td class="text-left">
<input type="text" name="title[<{$row.sn}>]" value="<{$row.title}>" id="title_<{$row.sn}>" class="validate[required] form-control">
</td>
<!-- 網址-->
<td>
<input type="text" name="url[<{$row.sn}>]" value="<{$row.url}>" id="url_<{$row.sn}>" class="form-control">
</td>
<!-- 外連-->
<td class="text-center">
<{if $row.target}>
<a href='<{$action}>?op=op_update_target&sn=<{$row.sn}>&target=0&kind=<{$kind}>' title='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}>' atl='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}>'><img src='<{$xoops_url}>/modules/<{$DIRNAME}>/images/on.png' /></a>
<{else}>
<a href='<{$action}>?op=op_update_target&sn=<{$row.sn}>&target=1&kind=<{$kind}>' title='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}>' atl='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}>'><img src='<{$xoops_url}>/modules/<{$DIRNAME}>/images/off.png' /></a>
<{/if}>
</td>
<!-- 狀態-->
<td class="text-center">
<{if $row.enable}>
<a href='<{$action}>?op=op_update_enable&sn=<{$row.sn}>&enable=0&kind=<{$kind}>' title='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}>' atl='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}>'><img src='<{$xoops_url}>/modules/<{$DIRNAME}>/images/on.png' /></a>
<{else}>
<a href='<{$action}>?op=op_update_enable&sn=<{$row.sn}>&enable=1&kind=<{$kind}>' title='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}>' atl='<{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}>'><img src='<{$xoops_url}>/modules/<{$DIRNAME}>/images/off.png' /></a>
<{/if}>
</td>
<!-- 功能-->
<td class="text-center">
<a href="<{$action}>?op=op_form&sn=<{$row.sn}>&kind=<{$kind}>" class="btn btn-xs btn-success">
<{$smarty.const._EDIT}>
</a>
<a href="javascript:op_delete_js(<{$row.sn}>);" class="btn btn-xs btn-danger">
<{$smarty.const._DELETE}>
</a>
<img src="<{$xoops_url}>/modules/tadtools/treeTable/images/updown_s.png" style="cursor: s-resize;" alt="<{$smarty.const._TAD_SORTABLE}>" title="<{$smarty.const._TAD_SORTABLE}>">
</td>
</tr>
<{/foreach}>
</tbody>
<tfoot>
<tr>
<td colspan=6 class="text-center">
<input type='hidden' name='op' value="op_all_insert">
<input type='hidden' name='kind' value="<{$kind}>">
<button type="submit" class="btn btn-primary"><{$smarty.const._SUBMIT}></button>
</td>
</tr>
</tfoot>
</table>
</form>
</div>
<{/if}>
<{if $op=="op_form"}>
<div class="container-fluid">
<div class='row'>
<form action='<{$action}>' method='post' id='myForm' enctype="multipart/form-data">
<table id='form_table' class='table table-bordered table-condensed'>
<!--圖示標題-->
<tr>
<th class='text-center'><{$smarty.const._MD_UGMMOUDEL_SLIDER_TITLE}></th>
<td>
<input type='text' name='title' value='<{$DBV.title}>' id='title' class='validate[required] form-control'>
</td>
</tr>
<!--圖示摘要-->
<tr>
<th class='text-center'>摘要</th>
<td>
<textarea class="form-control" rows="5" id="content" name="content"><{$DBV.content}></textarea>
</td>
</tr>
<!--網址-->
<tr>
<th class='text-center'><{$smarty.const._MD_UGMMOUDEL_KIND_URL}></th>
<td>
<input type='text' name='url' value='<{$DBV.url}>' id='url' class='form-control' placeholder="http://" >
</td>
</tr>
<!--類別狀態-->
<tr>
<th class='text-center'><{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE}></th>
<td>
<input type='radio' name='enable' id='enable_1' value='1' <{if $DBV.enable==1}>checked<{/if}>>
<label for='enable_1'><{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_1}></label>
<input type='radio' name='enable' id='enable_0' value='0' <{if $DBV.enable==0}>checked<{/if}>>
<label for='enable_0'><{$smarty.const._MD_UGMMOUDEL_KIND_ENABLE_0}></label>
</td>
</tr>
<!--目標狀態-->
<tr>
<th class='text-center'><{$smarty.const._MD_UGMMOUDEL_KIND_TARGET}></th>
<td>
<input type='radio' name='target' id='target_1' value='1' <{if $DBV.target==1}>checked<{/if}>>
<label for='target_1'><{$smarty.const._MD_UGMMOUDEL_KIND_TARGET_1}></label>
<input type='radio' name='target' id='target_0' value='0' <{if $DBV.target==0}>checked<{/if}>>
<label for='target_0'><{$smarty.const._MD_UGMMOUDEL_KIND_TARGET_0}></label>
</td>
</tr>
<!--圖示-->
<tr>
<th class='text-center'>圖示</th>
<td>
<link rel="stylesheet" type="text/css" href="<{xoAppUrl modules/ugm_tools/class/fontawesome-iconpicker/css/fontawesome-iconpicker.min.css}>">
<script type="text/javascript" src="<{xoAppUrl modules/ugm_tools/class/fontawesome-iconpicker/js/fontawesome-iconpicker.min.js}>"></script>
<script type='text/javascript'>
$(document).ready(function(){
$('.icp').iconpicker();
});
</script>
<div class="col-md-3">
<div class="form-group">
<div class="input-group">
<input name="icon" data-placement="bottomRight" class="form-control icp icp-auto" value="<{$DBV.icon}>" type="text" />
<span class="input-group-addon"></span>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td colspan='2' class='text-center'>
<input type='hidden' name='op' value='<{$DBV.op}>'>
<input type='hidden' name='ofsn' value='<{$DBV.ofsn}>'>
<input type='hidden' name='sn' value='<{$DBV.sn}>'>
<input type='hidden' name='kind' value='<{$DBV.kind}>'>
<button type='submit' class='btn btn-primary'><{$smarty.const._SUBMIT}></button>
</th>
</tr>
</table>
</form>
</div>
</div>
<{/if}>