内容管理列表批处理扩展

任意应用etc/admincp下以目标应用名首字母大写开头如:Article,所在页面如index.batch.json,多个配置可在batch加上任意数字

格式:

app/article/etc/admincp/Article.index.batch.json

app/article/etc/admincp/Article.index.batch1.json

app/spider/etc/admincp/SpiderProject.index.batch

app/test/etc/admincp/Article.index.batch.json

app/test/etc/admincp/Node.list.batch.json

app/plugin/etc/admincp/Article.index.batch3.json

{
    "pubdate=now": {
        "name": "更新发布时间",
        "icon": "clock",
        "sort": 1,
        "call": "default"
    },
    "status=1&pubdate=now": {
        "name": "发布并更新时间",
        "icon": "clock",
        "sort": 2,
        "call": "default",
        "show": {
            "stype": ["!=", "normal"]
        }
    },
    "status=0": {
        "name": "转为草稿",
        "icon": "inbox",
        "sort": 3,
        "call": "default"
    },
    "status=1": {
        "name": "发布",
        "icon": "check",
        "sort": 4,
        "call": "default",
        "show": {
            "stype": ["!=", "normal"]
        }
    },
    "status=2": {
        "name": "移入回收站",
        "icon": "trash-alt",
        "sort": 5,
        "call": "default"
    },
    "purge": {
        "name": "清除缓存",
        "icon": "",
        "sort": 7,
        "call": "purge"
    },
    "thumb": {
        "name": "提取缩略图",
        "icon": "image",
        "sort": 8,
        "call": "thumb"
    }
}

按钮

显示需要加载

<?php AdmincpBatch::group(); ?>

操作框

app/article/views/batch.html

app/article/views/category/batch.html

app/spider/views/project/batch.html

或者直接 写在页面里

<div batch="操作名称">

</div>

例如:

<div batch="poid">
    <div class="input-group input-group-sm">
        <label class="input-group-text" for="poid">发布规则</label>
        <input name="BatchData[poid]" type="text" data-source='/spiderPost/selectpage' class="form-control" i="cms:ui:selectpicker" placeholder="请选择发布规则" value="">
    </div>
</div>

20240305184920.jpg