Files
OMS/app/desktop/view/common/recycle.html
2026-01-04 19:08:31 +08:00

74 lines
2.4 KiB
HTML

<!--
Copyright 2012-2026 ShopeX (https://www.shopex.cn)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div class="dialog-content-head">
<select name="recyle_type" id="recyle_type">
<option value="_ALL_"><{t}>选择所有<{/t}></option>
<{foreach from=$item_type item=item}>
<option value="<{$item.item_type}>"><{$item.item_type}></option>
<{/foreach}>
</select>
</div>&nbsp;
<form class="tableform" id="recycle_form" action="index.php?ctl=recycle&act=action_recycle" method="POST">
<table class="gridlist">
<col class="col-select" />
<col />
<col />
<col />
<thead>
<tr>
<th><input class="sellist" type="checkbox" onclick="this.blur()"/></th>
<th><{t}>标题<{/t}></th>
<th><{t}>类型<{/t}></th>
<th><{t}>删除时间<{/t}></th>
</tr>
</thead>
<tbody>
<{foreach from=$items item=item}>
<tr>
<td><input type="checkbox" value="<{$item.item_id}>" name="item_id[]" class="sel"></td>
<td><{$item.item_title}></td>
<td><{$item.item_type}></td>
<td><{$item.drop_time|date_format:"%Y-%m-%d %H:%I:%S"}></td>
<td></td>
</tr>
<{/foreach}>
</tbody>
</table>
</form>
<{pager data=$pager}>
<div class="table-action">
<{button label=$___dekstop="恢复所选"|t:'desktop' onclick="recycle(event,1);"}>
<{button label=$___dekstop="彻底删除"|t:'desktop' onclick="recycle(event,2);"}>
</div>
<script>
function recycle(event,case_){
var form = $('recycle_form');
if(case_==1){
form.set('action','index.php?app=desktop&ctl=recycle&act=recycle_restore');
}else{
form.set('action','index.php?app=desktop&ctl=recycle&act=recycle_delete');
}
form.fireEvent('submit',new Event(event));
}
$$('#recyle_type','option').addEvent('change',function(e){
new Request({url:'index.php?ctl=recycle&act=recycle_show&p[0]='+this.value+'&p[1]=1',update:this.getParent('.dialog-box')}).send();
});
</script>