{extend name="layout:home" /}
{block name="container"}
<div class="layui-tab layui-tab-card">
    {include file="layout/admin_items" /}
    <div class="layui-tab-content page-tab-content">
        <!-- 搜索框开始 -->
        <!--<div class="search-form">
        <form class="" method="post">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <input type="text" name="title"  placeholder="输入名称或联系人或电话" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-inline">
                    <input type="text" class="layui-input" name="timeRang" id="timeRang" placeholder="选择时间段" style="width: 170px;">
                </div>
                <div class="layui-inline">
                    <button type="submit" class="layui-btn search-subBtn">搜索</button>
                </div>
            </div>
        </form>
        </div>-->
        <!-- 搜索框结束 -->
        <table class="layui-table lay-even">
            <colgroup>
                <col width="150">
                <col width="200">
                <col>
            </colgroup>
            <thead>
            <tr>
                <th>标题</th>
                <th>内容</th>
                <th>英文简称</th>
                <th>所属</th>
                <th>背景颜色</th>
                <th>背景图片</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            {if count($information)}
                {volist name="information" id="value"}
                <tr>
                    <td>{$value.homeinformation_name}</td>
                    <td><?php echo mb_substr($value->homeinformation_content,0,30, 'utf-8');?>...</td>
                    <td>{$value.homeinformation_en}</td>
                    <td>{$value.homeinformation_type}</td>
                    <td>{$value.homeinformation_bgcolor}</td>
                    <td>
                        {if $value.homeinformation_bgImg}
                        <img src="{$Think.HOME_SITE_ROOT}{$value.homeinformation_bgImg}" style="width: 100px;height: 100px">
                        {/if}
                    </td>
                    <td>
                        <a href="javascript:dsLayerOpen('{:url('Homeinfo/edit',['homeinformation_id'=>$value.homeinformation_id])}','编辑-{$value.homeinformation_name}')" class="layui-btn layui-btn-xs"><i class="layui-icon layui-icon-edit"></i>{$Think.lang.ds_edit}</a>
                    </td>
                </tr>
                {/volist}
            {else}
            <td>无数据</td>
            {/if}
            </tbody>
        </table>
    </div>
</div>
<script type="text/javascript">
    layui.use('laydate', function(){
      var laydate = layui.laydate;

      //执行一个laydate实例
      laydate.render({
        elem: '#creatTime' //指定元素
      });
        laydate.render({
            elem:'#timeRang',
            range:true,
            format: 'yyyy/MM/dd',
            done: function(value, date){
                /* 时间选择完成后的回调 */
            }
        })
    });
</script>
{/block}
