Skip to content

Commit

Permalink
资源当页超过16个时,显示头部批处理
Browse files Browse the repository at this point in the history
  • Loading branch information
qinggan committed Sep 14, 2023
1 parent f2bffd9 commit dd86136
Showing 1 changed file with 140 additions and 138 deletions.
278 changes: 140 additions & 138 deletions framework/view/res_index.html
Original file line number Diff line number Diff line change
@@ -1,139 +1,141 @@
<!-- include tpl=head_lay -->
<div class="layui-card">
<div class="layui-card-header">
{lang搜索}
<div class="layui-btn-group fr test-table-operate-btn" style="margin-bottom: 10px;">
<button class="layui-btn layui-btn-sm" onclick="$.admin_res.edit_local();void(0);">{lang编辑器图片配置}</button>
<button class="layui-btn layui-btn-sm" onclick="$.admin_res.update_pl_pictures();void(0);">{lang图片全部更新}</button>
<button class="layui-btn layui-btn-sm" onclick="$.win('{lang文件分类管理}','{url ctrl=rescate/}')">{lang文件分类管理}</button>
<button class="layui-btn layui-btn-sm" onclick="$.admin_res.add_file();void(0)">{lang添加资源}</button>
<button class="layui-btn layui-btn-sm layui-btn-danger" onclick="$.admin_res.clear_files();void(0)">{lang清理无效文件}</button>
</div>
</div>

<div class="layui-card-body">
<form method="post" action="{url ctrl=res/}" class="layui-form">
<div class="layui-form-item">
<div class="layui-inline">
<select id="cate_id" name="cate_id">
<option value="0">{lang请选择附件分类}</option>
<!-- $catelist AS $key=>$value -->
<option value="{$value.id}" {if $cate_id== $value.id} selected{/if}>{$value.title}</option>
<!-- /if -->
</select>
</div>
<div class="layui-inline">
<select id="myext" name="myext">
<option value="">{lang请选择附件类型}</option>
<!-- loop from=$filetypes key=$key value=$value id=$tmpid -->
<option value="{$value}" {if $myext == $value} selected{
/if}>{func strtoupper $value}</option>
<!-- /loop -->
</select>
</div>
<div class="layui-inline">
<input type="text" id="keywords" name="keywords" placeholder="{lang输入关键字}" value="{$keywords}" class="layui-input" />
</div>
<div class="layui-inline">
<input type="text" class="layui-input" id="start_date" name="start_date" placeholder="{lang开始时间}" value="{$start_date}">
</div>
<div class="layui-inline">
<input type="text" id="stop_date" name="stop_date" class="layui-input" placeholder="{lang结束时间}" value="{$stop_date}">
</div>
<div class="layui-inline">
<button class="layui-btn layuiadmin-btn-admin" lay-submit="" lay-filter="LAY-user-back-search">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
</button>
</div>
</div>
</form>

<div id="move_cate_html" class="hide">
<table>
<!-- loop from=$catelist key=$key value=$value id=$tmpid -->
<tr>
<td><input type="radio" name="newcate" id="newcate_{$value.id}" value="{$value.id}" {if $tmpid.num== 1} checked{/if} />
</td>
<td><label for="newcate_{$value.id}">{$value.title}<!-- if $value.typeinfos --> <span class="gray i">支持类型:{$value.typeinfos}</span><!-- /if --></label></td>
</tr>
<!-- /loop -->
</table>
</div>
<style type="text/css">

.layui-card-body:hover {
background-color: #F9F9F9;
}
</style>
</div>
</div>
<div class="layui-row">
<div class="layui-col-sm6">
<div class="layui-btn-group">
<input type="button" value="{lang全选}" onclick="$.checkbox.all('.checkbox input[type=checkbox]')" class="layui-btn layui-btn-sm"/>
<input type="button" value="{lang全不选}" onclick="$.checkbox.none('.checkbox input[type=checkbox]')" class="layui-btn layui-btn-sm"/>
<input type="button" value="{lang反选}" onclick="$.checkbox.anti('.checkbox input[type=checkbox]')" class="layui-btn layui-btn-sm"/>
</div>
<div class="layui-btn-group">
<input type="button" value="{lang移动分类}" onclick="$.admin_res.move_cate()" class="layui-btn layui-btn-sm"/>
<input type="button" value="{lang更新图片}" onclick="$.admin_res.pl_update()" class="layui-btn layui-btn-sm"/>
<input type="button" value="{lang删除}" onclick="$.admin_res.pl_delete()" class="layui-btn layui-btn-sm layui-btn-danger"/>
</div>
</div>
</div>
<div class="layui-row layui-col-space10 layui-form checkbox">
<!-- loop from=$rslist key=$key value=$value id=$tmpid -->
<div class="layui-col-sm6 layui-col-md4 layui-col-lg3" id="thumb_{$value.id}">
<div class="layui-card" style="min-height:165px;">
<div class="layui-card-header">
<input type="checkbox" name="attrid[]" title="{$value.id} - {func phpok_cut $value.title 10 …}" id="attrid_{$value.id}" value="{$value.id}" lay-skin="primary"/>
<!-- if $value.download -->, {lang下载次数} {$value.download} {lang次}<!-- /if -->
</div>
<div class="layui-card-body layui-clear">
<div class="layui-row layui-col-space10">
<div class="layui-col-sm6 layui-col-md3"><img src="{$value.ico}" style="width:100px;" /></div>
<div class="layui-col-sm6 layui-col-md9">
<div class="line1">{lang名称} {$value.name}</div>
<!-- if $value.folder --><div class="line1">{lang目录} {$value.folder}</div><!-- /if -->
<!-- if $value.addtime --><div class="line1">{lang时间} {func date "Y-m-d H:i:s" $value.addtime}</div><!-- /if -->
<!-- if $value.attr && $value.attr.width && $value.attr.height -->
<div>{lang宽高} {$value.attr.width} x {$value.attr.height}</div>
<!-- /if -->
<div class="layui-btn-group">
<input type="button" value="{lang修改}" class="layui-btn layui-btn-xs" onclick="$.admin_res.modify('{$value.id}')"/>
<input type="button" value="{lang预览}" class="layui-btn layui-btn-xs" onclick="$.admin_res.preview_attr('{$value.id}')"/>
<input type="button" value="{lang删除}" class="layui-btn layui-btn-xs layui-btn-danger" onclick="$.admin_res.file_delete('{$value.id}')"/>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /loop -->
</div>
<div class="layui-row">
<div class="layui-col-sm6">
<div class="layui-btn-group">
<input type="button" value="{lang全选}" onclick="$.checkbox.all('.checkbox input[type=checkbox]')" class="layui-btn layui-btn-sm"/>
<input type="button" value="{lang全不选}" onclick="$.checkbox.none('.checkbox input[type=checkbox]')" class="layui-btn layui-btn-sm"/>
<input type="button" value="{lang反选}" onclick="$.checkbox.anti('.checkbox input[type=checkbox]')" class="layui-btn layui-btn-sm"/>
</div>
<div class="layui-btn-group">
<input type="button" value="{lang移动分类}" onclick="$.admin_res.move_cate()" class="layui-btn layui-btn-sm"/>
<input type="button" value="{lang更新图片}" onclick="$.admin_res.pl_update()" class="layui-btn layui-btn-sm"/>
<input type="button" value="{lang删除}" onclick="$.admin_res.pl_delete()" class="layui-btn layui-btn-sm layui-btn-danger"/>
</div>
</div>
<div class="layui-col-sm6" style="text-align:right;"><!-- include tpl=pagelist --></div>
</div>

<script type="text/javascript">
layui.use('form', function () {
$('.checkbox_one').on('click', function () {
var obj = $('#' + $(this).attr('data-id'));
obj.prop('checked', true);
setTimeout("layui.form.render()", 100);
});
})
</script>
<!-- include tpl=head_lay -->
<div class="layui-card">
<div class="layui-card-header">
{lang搜索}
<div class="layui-btn-group fr test-table-operate-btn" style="margin-bottom: 10px;">
<button class="layui-btn layui-btn-sm" onclick="$.admin_res.edit_local();void(0);">{lang编辑器图片配置}</button>
<button class="layui-btn layui-btn-sm" onclick="$.admin_res.update_pl_pictures();void(0);">{lang图片全部更新}</button>
<button class="layui-btn layui-btn-sm" onclick="$.win('{lang文件分类管理}','{url ctrl=rescate/}')">{lang文件分类管理}</button>
<button class="layui-btn layui-btn-sm" onclick="$.admin_res.add_file();void(0)">{lang添加资源}</button>
<button class="layui-btn layui-btn-sm layui-btn-danger" onclick="$.admin_res.clear_files();void(0)">{lang清理无效文件}</button>
</div>
</div>

<div class="layui-card-body">
<form method="post" action="{url ctrl=res/}" class="layui-form">
<div class="layui-form-item">
<div class="layui-inline">
<select id="cate_id" name="cate_id">
<option value="0">{lang请选择附件分类}</option>
<!-- $catelist AS $key=>$value -->
<option value="{$value.id}" {if $cate_id== $value.id} selected{/if}>{$value.title}</option>
<!-- /if -->
</select>
</div>
<div class="layui-inline">
<select id="myext" name="myext">
<option value="">{lang请选择附件类型}</option>
<!-- loop from=$filetypes key=$key value=$value id=$tmpid -->
<option value="{$value}" {if $myext == $value} selected{
/if}>{func strtoupper $value}</option>
<!-- /loop -->
</select>
</div>
<div class="layui-inline">
<input type="text" id="keywords" name="keywords" placeholder="{lang输入关键字}" value="{$keywords}" class="layui-input" />
</div>
<div class="layui-inline">
<input type="text" class="layui-input" id="start_date" name="start_date" placeholder="{lang开始时间}" value="{$start_date}">
</div>
<div class="layui-inline">
<input type="text" id="stop_date" name="stop_date" class="layui-input" placeholder="{lang结束时间}" value="{$stop_date}">
</div>
<div class="layui-inline">
<button class="layui-btn layuiadmin-btn-admin" lay-submit="" lay-filter="LAY-user-back-search">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
</button>
</div>
</div>
</form>

<div id="move_cate_html" class="hide">
<table>
<!-- loop from=$catelist key=$key value=$value id=$tmpid -->
<tr>
<td><input type="radio" name="newcate" id="newcate_{$value.id}" value="{$value.id}" {if $tmpid.num== 1} checked{/if} />
</td>
<td><label for="newcate_{$value.id}">{$value.title}<!-- if $value.typeinfos --> <span class="gray i">支持类型:{$value.typeinfos}</span><!-- /if --></label></td>
</tr>
<!-- /loop -->
</table>
</div>
<style type="text/css">

.layui-card-body:hover {
background-color: #F9F9F9;
}
</style>
</div>
</div>
<!-- if($rslist && count($rslist) > 16) -->
<div class="layui-row">
<div class="layui-col-sm6">
<div class="layui-btn-group">
<input type="button" value="{lang全选}" onclick="$.checkbox.all('.checkbox input[type=checkbox]')" class="layui-btn layui-btn-sm"/>
<input type="button" value="{lang全不选}" onclick="$.checkbox.none('.checkbox input[type=checkbox]')" class="layui-btn layui-btn-sm"/>
<input type="button" value="{lang反选}" onclick="$.checkbox.anti('.checkbox input[type=checkbox]')" class="layui-btn layui-btn-sm"/>
</div>
<div class="layui-btn-group">
<input type="button" value="{lang移动分类}" onclick="$.admin_res.move_cate()" class="layui-btn layui-btn-sm"/>
<input type="button" value="{lang更新图片}" onclick="$.admin_res.pl_update()" class="layui-btn layui-btn-sm"/>
<input type="button" value="{lang删除}" onclick="$.admin_res.pl_delete()" class="layui-btn layui-btn-sm layui-btn-danger"/>
</div>
</div>
</div>
<!-- /if -->
<div class="layui-row layui-col-space10 layui-form checkbox">
<!-- loop from=$rslist key=$key value=$value id=$tmpid -->
<div class="layui-col-sm6 layui-col-md4 layui-col-lg3" id="thumb_{$value.id}">
<div class="layui-card" style="min-height:165px;">
<div class="layui-card-header">
<input type="checkbox" name="attrid[]" title="{$value.id} - {func phpok_cut $value.title 10 …}" id="attrid_{$value.id}" value="{$value.id}" lay-skin="primary"/>
<!-- if $value.download -->, {lang下载次数} {$value.download} {lang次}<!-- /if -->
</div>
<div class="layui-card-body layui-clear">
<div class="layui-row layui-col-space10">
<div class="layui-col-sm6 layui-col-md3"><img src="{$value.ico}" style="width:100px;" /></div>
<div class="layui-col-sm6 layui-col-md9">
<div class="line1">{lang名称} {$value.name}</div>
<!-- if $value.folder --><div class="line1">{lang目录} {$value.folder}</div><!-- /if -->
<!-- if $value.addtime --><div class="line1">{lang时间} {func date "Y-m-d H:i:s" $value.addtime}</div><!-- /if -->
<!-- if $value.attr && $value.attr.width && $value.attr.height -->
<div>{lang宽高} {$value.attr.width} x {$value.attr.height}</div>
<!-- /if -->
<div class="layui-btn-group">
<input type="button" value="{lang修改}" class="layui-btn layui-btn-xs" onclick="$.admin_res.modify('{$value.id}')"/>
<input type="button" value="{lang预览}" class="layui-btn layui-btn-xs" onclick="$.admin_res.preview_attr('{$value.id}')"/>
<input type="button" value="{lang删除}" class="layui-btn layui-btn-xs layui-btn-danger" onclick="$.admin_res.file_delete('{$value.id}')"/>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /loop -->
</div>
<div class="layui-row">
<div class="layui-col-sm6">
<div class="layui-btn-group">
<input type="button" value="{lang全选}" onclick="$.checkbox.all('.checkbox input[type=checkbox]')" class="layui-btn layui-btn-sm"/>
<input type="button" value="{lang全不选}" onclick="$.checkbox.none('.checkbox input[type=checkbox]')" class="layui-btn layui-btn-sm"/>
<input type="button" value="{lang反选}" onclick="$.checkbox.anti('.checkbox input[type=checkbox]')" class="layui-btn layui-btn-sm"/>
</div>
<div class="layui-btn-group">
<input type="button" value="{lang移动分类}" onclick="$.admin_res.move_cate()" class="layui-btn layui-btn-sm"/>
<input type="button" value="{lang更新图片}" onclick="$.admin_res.pl_update()" class="layui-btn layui-btn-sm"/>
<input type="button" value="{lang删除}" onclick="$.admin_res.pl_delete()" class="layui-btn layui-btn-sm layui-btn-danger"/>
</div>
</div>
<div class="layui-col-sm6" style="text-align:right;"><!-- include tpl=pagelist --></div>
</div>

<script type="text/javascript">
layui.use('form', function () {
$('.checkbox_one').on('click', function () {
var obj = $('#' + $(this).attr('data-id'));
obj.prop('checked', true);
setTimeout("layui.form.render()", 100);
});
})
</script>
<!-- include tpl=foot_lay -->

0 comments on commit dd86136

Please sign in to comment.