#@ucenter_layout()
#define script()
<script>
    function doDelComment(id) {
        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>
                            </tr>
                            #for(comment : page.list ??)
                            <tr class="jp-actiontr">
                                <td>
                                    <strong>
                                        <a href="#(CPATH)/admin/article/commentEdit/#(comment.id)">#(comment.content ??)</a>
                                        #if(comment.isUnaudited()) (待审核) #end
                                    </strong>
                                    <div class="jp-actionblock">
                                        <div class="jp-actionitem">
                                            <a href="#(CPATH)/ucenter/article/commentEdit/#(comment.id)">编辑</a> |
                                            <a href="javascript:;" onclick="doDelComment('#(comment.id)')"
                                               class="red-action">永久删除</a>
                                        </div>
                                    </div>
                                </td>
                                <td>
                                    <a href="#(comment.article.url ??)" target="_blank">
                                        #(comment.article.title ??)
                                    </a>
                                </td>
                                <td>#(comment.comment_count ??)</td>
                                <td>#date(comment.created)</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
