<div class="gray-bg">
    <div class="wrapper wrapper-content">
        <div class="row">
            <div class="col-lg-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <div class="form-inline">
                            <form method="get" action="/message/templateList">
                                <a class="btn btn-primary btn-sm" href="/message/addHistory">新增消息</a>
                                <input class="btn btn-primary btn-sm" type="submit" value="搜索" style="float: right"/>
                                <input type="text" id="searchkey" name="message_title" placeholder="请输入消息标题" style="float:right; width: 150px; height: 30px; margin-right: 5px;"/>
                            </form>
                        </div>
                    </div>

                    {{--@if(count($lists)>0)--}}
                    <div class="ibox-content">
                        <div class="dataTables_wrapper form-inline dt-bootstrap">
                            <div class="row">
                                <div class="col-sm-12">
                                    <table class="table table-striped table-bordered table-hover">
                                        <thead>
                                        <tr role="row">
                                            <th style="width:100px;" class="text-center">消息编号</th>
                                            <th style="width:100px;" class="text-center">发送时间</th>
                                            <th style="width:150px;" class="text-center">消息标题</th>
                                            <th style="width:100px;" class="text-center">消息内容</th>
                                            <th style="width:100px;" class="text-center">消息渠道</th>
                                            <th style="width:100px;" class="text-center">推送人员</th>
                                            <th style="width:100px;" class="text-center">推送状态</th>
                                        </tr>
                                        </thead>

                                        <tbody>
                                            @foreach($info as $obj)
                                                <tr role="row" style="text-align: center">
                                                    <td>{{ $obj->log_id }}</td>
                                                    <td>{{ $obj->actual_send_time }}</td>
                                                    <td>{{ $obj->title }}</td>
                                                    <td>{{ $obj->content }}</td>
                                                    <?php
                                                    switch ($obj->channel_type)
                                                    {
                                                        case 1:
                                                            $obj->channel_type = "站内信";
                                                            break;
                                                        case 2:
                                                            $obj->channel_type = "短信";
                                                            break;
                                                        case 3:
                                                            $obj->channel_type = "邮箱";
                                                            break;
                                                        case 4:
                                                            $obj->channel_type = "微信通知";
                                                            break;
                                                        default:
                                                            break;
                                                    }
                                                    ?>
                                                    <td>{{ $obj->channel_type }}</td>
                                                    <td>{{ $obj->obj_user }}</td>
                                                    <?php
                                                    switch ($obj->status)
                                                    {
                                                        case -3:
                                                            $obj->status = "已取消";
                                                            break;
                                                        case -2:
                                                            $obj->status = "待发送";
                                                            break;
                                                        case -1:
                                                            $obj->status = "发送失败";
                                                            break;
                                                        case 1:
                                                            $obj->status = "发送成功";
                                                            break;
                                                        default:
                                                            break;
                                                    }
                                                    ?>
                                                    <td>{{  $obj->status }}</td>
                                                </tr>
                                        @endforeach

                                        </tbody>

                                    </table>
                                    {{--{!! $lists->links() !!}--}}
                                </div>
                            </div>
                            {{--<div class="row" id="my_list_paginate"></div>--}}
                        </div>
                    </div>
                    {{--@else--}}
                    {{--<div style="text-align: center">--}}
                    {{--<label>很抱歉,暂无数据</label>--}}
                    {{--</div>--}}
                    {{--@endif--}}
                </div>
            </div>
        </div>
    </div>
</div>