#@ucenter_layout()

#define script()
<script>
    function doDelFavorite(id) {
        if (confirm("确定要删除该内容吗？")) {
            ajaxGet("#(CPATH)/ucenter/product/doDelFavorite?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>Product Favorites</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: 30%">标题</th>
                                <th>摘要</th>
                                <th style="width: 90px">时间</th>
                            </tr>
                            #for(favorite : page.list ??)
                            <tr class="jp-actiontr">
                                <td>
                                    <strong>
                                        <a href="#(CPATH)#(favorite.link ??)" target="_blank">#(favorite.title
                                            ??)</a>
                                    </strong>
                                    <div class="jp-actionblock">
                                        <div class="jp-actionitem">
                                            <a href="#(CPATH)#(favorite.link ??)" target="_blank">查看</a> |
                                            <a href="javascript:;" onclick="doDelFavorite('#(favorite.id??)')"
                                               class="red-action">删除</a>
                                        </div>
                                    </div>
                                </td>
                                <td>#(favorite.summary??)</td>
                                <td>#date(favorite.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
