#@ucenter_layout()
#define script()
<script>
    function doDelComment(id) {
        if (confirm("确定要删除这条评论吗？删除后不可恢复")) {
            ajaxGet("#(CPATH)/ucenter/article/doCommentDel?id=" + id)
        }
    }

</script>
#end

#define css()
<style>
    strong p {
        display: inline;
    }
</style>
#end

#define content()
<div class="content-wrapper">

    <section class="content-header">
        <h1>
            文章评论
            <small>Article Comments</small>
        </h1>
    </section>


    <section class="content">

        <div class="row">
            <div class="col-xs-12">
                <div class="box box-primary">
                    <div class="box-header with-border">

                    </div>
                    <!-- /.box-header -->
                    <div class="box-body ">

                        <table class="table table-striped">
                            <tbody>
                            <tr>
                                <th style="width: 40%">内容</th>
                                <th>回复至</th>
                                <th style="width: 50px"><i class="fa fa-commenting"></i></th>
                                <th style="width: 90px">发布时间</th>
                                <th style="width: 60px">操作</th>
                            </tr>
                            #for(comment : page.list ??)
                            <tr class="jp-actiontr">
                                <td>
                                    #(comment.content ??)
                                    <strong>
                                        #if(comment.isUnaudited()) (待审核) #end
                                    </strong>
                                </td>
                                <td>
                                    <a href="#(comment.article.url ??)" target="_blank">
                                        #(comment.article.title ??)
                                    </a>
                                </td>
                                <td>#(comment.comment_count ??)</td>
                                <td>#date(comment.created)</td>
                                <td><a href="javascript:;" onclick="doDelComment('#(comment.id)')" >删除</a></td>
                            </tr>
                            #end

                            </tbody>
                        </table>
                    </div>
                    <!-- /.box-body -->
                    <div class="box-footer">
                        <div class="row">
                            <div class="col-sm-12">
                                #@_paginate()
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.box -->
            </div>
        </div>

    </section>


</div>
#end
