<div class="builder listbuilder-box">
    {// 额外功能代码top }
    <?php if(isset($extra_html['top'])): ?>
        {$extra_html['top']}
    <?php endif; ?>

    <!-- Tab导航 -->
    <notempty name="tab_nav">
        <div class="builder-tabs">
            <div class="row">
                <div class="col-xs-12">
                    <ul class="nav nav-tabs">
                        <volist name="tab_nav.tab_list" id="tab">
                            <li class="<php>if($tab_nav['current_tab'] == $key) echo 'active';</php>"><a href="{$tab.href}">{$tab.title}</a></li>
                        </volist>
                    </ul>
                </div>
            </div>
        </div>
        <div class="form-group"></div>
    </notempty>

    <!-- 顶部工具栏按钮 -->
    <div class="builder-toolbar">
        <div class="row">
            <!-- 工具栏按钮 -->
            <notempty name="top_button_list">
                <div class="col-xs-12 col-sm-8 button-list clearfix">
                    <div class="form-group">
                        <volist name="top_button_list" id="button">
                            <a {$button.attribute|default=''}>{$button.title|default=''}</a>&nbsp;
                        </volist>
                    </div>
                </div>
            </notempty>

            <!-- 搜索框 -->
            <notempty name="search">
                <empty name="search_form_items">
                    <div class="col-xs-12 col-sm-4 clearfix">
                        <form class="form" method="get" action="{$search.url}">
                            <div class="form-group">
                                <div class="input-group search-form">
                                    <input type="text" name="keyword" class="search-input form-control" value="{:I('get.keyword')}" placeholder="{$search.title|default=''}">
                                    <span class="input-group-btn"><a class="btn btn-default search-btn"><i class="fa fa-search"></i></a></span>
                                </div>
                            </div>
                        </form>
                    </div>
                </empty>
            </notempty>
        </div>
    </div>

    <!-- 数据列表 -->
    <div class="builder-container">
        <div class="row">
            <div class="col-xs-12">
                <div class="builder-table">
                    <div class="panel panel-default table-responsive">
                        <table class="table table-bordered table-striped table-hover">
                            <thead>
                                <tr>
                                    <?php if($hide_left_checkbox === false): ?>
                                        <th class="list-ids" width="30">
                                            <div class="checkbox-inline lyui-control lyui-checkbox m-l-xs">
                                                <label class="checkbox-label">
                                                    <input type="checkbox" class="check-all" >
                                                    <span class="lyui-control-indicator"></span>
                                                </label>
                                            </div>
                                        </th>
                                    <?php endif; ?>
                                    <volist name="table_column_list" id="column">
                                        <th width="<?php if ($column['width']) {echo $column['width'];} else {echo 'auto';} ?>">
                                            {$column.title|htmlspecialchars}
                                        </th>
                                    </volist>
                                </tr>
                            </thead>
                            <tbody>
                                <volist name="table_data_list" id="data">
                                    <tr>
                                        <?php if($hide_left_checkbox === false): ?>
                                            <td>
                                                <div class="checkbox-inline lyui-control lyui-checkbox m-l-xs">
                                                    <label class="checkbox-label">
                                                        <input class="ids" type="checkbox" value="{$data[$table_data_list_key]|default=''}" name="ids[]">
                                                        <span class="lyui-control-indicator"></span>
                                                    </label>
                                                </div>
                                            </td>
                                        <?php endif; ?>
                                        <?php foreach ($table_column_list as $column) :?>
                                            <td>
                                                <?php if ($column['name'] === 'right_button') : ?>
                                                    <?php foreach ($data['right_button'] as $rb) : ?>
                                                        <a {$rb['attribute']|default=''}>{$rb['title']|default=''}</a>
                                                    <?php endforeach; ?>
                                                <?php else: ?>
                                                    {$data[$column['name']]|default=''}
                                                <?php endif; ?>
                                            </td>
                                        <?php endforeach; ?>
                                    </tr>
                                </volist>

                                <empty name="table_data_list">
                                    <tr class="builder-data-empty">
                                        <php>$tdcolspan = count($table_column_list)+1</php>
                                        <td class="text-center empty-info" colspan="{$tdcolspan}">
                                            <i class="fa fa-database"></i> 暂时没有数据<br>
                                            <span class="small">本系统由<a target="_blank" href="https://www.lingyun.net" class="text-muted">零云</a>强力驱动</span>
                                        </td>
                                    </tr>
                                </empty>
                            </tbody>
                        </table>
                    </div>

                    <notempty name="table_data_page">
                        <ul class="pagination">{$table_data_page}</ul>
                    </notempty>
                </div>
            </div>
        </div>
    </div>

    {// 额外功能代码bottom }
    <?php if(isset($extra_html['bottom'])): ?>
        {$extra_html['bottom']}
    <?php endif; ?>
</div>
