index.html 5.4 KB
<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('comment/index')}">所有评论</a></li>
    </ul>

    <form method="post" class="js-ajax-form margin-top-20">

        <div class="table-actions">
            <!--<button class="btn btn-sm btn-primary js-ajax-submit" type="submit">{:lang('SORT')}</button>-->
            <button class="btn btn-sm btn-success js-ajax-submit" type="submit"
                    data-action="{:url('comment/toggle',array('display'=>1))}" data-subcheck="true">通过
            </button>
            <button class="btn btn-sm btn-danger js-ajax-submit" type="submit"
                    data-action="{:url('comment/toggle',array('hide'=>1))}" data-subcheck="true">驳回
            </button>
        </div>

        <php>$status=array('1'=>'通过','0'=>'待审核','2'=>'驳回');</php>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="50"><label><input type="checkbox" class="js-check-all" data-direction="x"
                                             data-checklist="js-check-x"></label></th>
                <!--<th width="50">{:lang('SORT')}</th>-->
                <th width="100">ID</th>
                <th width="100">昵称</th>
                <th width="100">头像</th>
                <th width="200">原文地址</th>
                <th width="150">{:lang('STATUS')}</th>
                <th width="300">评论内容</th>
                <th width="80">{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="comment" item="vo">
                <tr>
                    <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
                               value="{$vo.id}"></td>
                    <td>{$vo.id}</td>
                    <td>{$vo.nickname}</td>
                    <td>
                        <notempty name="vo.avatar">
                            <img width="25" height="25" src="{:cmf_get_image_url($vo.avatar)}"/>
                            <else/>
                            <img width="25" height="25" src="__TMPL__/public/assets/images/headicon.png"/>
                        </notempty>
                    </td>
                    <td>
                        <a href="{$vo.url}" target="_blank">{$vo.url}</a>
                    </td>
                    <td>
                        <switch name="vo.status">
                            <case value="0">
                                <span class="label label-default">
                                    {$status[$vo['status']]}
                                </span>
                            </case>
                            <case value="1">
                                <span class="label label-success">
                                    {$status[$vo['status']]}
                                </span>
                            </case>
                            <case value="2">
                                <span class="label label-default">
                                    {$status[$vo['status']]}
                                </span>
                            </case>
                            <default/>
                            <span class="label label-default">
                                {$status[$vo['status']]}
                            </span>
                        </switch>
                    </td>
                    <td>
                        <p style="width:300px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="{$vo.content}">{$vo.content}</p></td>
                    <td>
                        <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('comment/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">
                            {:lang('DELETE')}
                        </a>
                    </td>
                </tr>
            </foreach>
            </tbody>
            <!--<tfoot>-->
            <!--<tr>-->
                <!--<th width="16">-->
                    <!--<label>-->
                        <!--<input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">-->
                    <!--</label>-->
                <!--</th>-->
                <!--<th width="50">{:lang('SORT')}</th>-->
                <!--<th width="50">ID</th>-->
                <!--<th>{:lang('NAME')}</th>-->
                <!--<th>链接地址</th>-->
                <!--<th width="50">{:lang('STATUS')}</th>-->
                <!--<th width="120">{:lang('ACTIONS')}</th>-->
            <!--</tr>-->
            <!--</tfoot>-->
        </table>
        <!--<div class="table-actions">-->
            <!--<button class="btn btn-sm btn-primary js-ajax-submit" type="submit">{:lang('SORT')}</button>-->
            <!--<button class="btn btn-sm btn-success js-ajax-submit" type="submit"-->
                    <!--data-action="{:url('link/toggle',array('display'=>1))}" data-subcheck="true">{:lang('DISPLAY')}-->
            <!--</button>-->
            <!--<button class="btn btn-sm btn-danger js-ajax-submit" type="submit"-->
                    <!--data-action="{:url('link/toggle',array('hide'=>1))}" data-subcheck="true">{:lang('HIDE')}-->
            <!--</button>-->
        <!--</div>-->

    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>