text: {% extends base_template %}
  {% load i18n %}
  
  {% load xadmin_tags %}
  
  {% block extrastyle %}
  {{ block.super }}
  <style type="text/css">
    .btn-toolbar{margin-top: 0;}
    #content-block.full-content{margin-left: 0;}
  </style>
  {% endblock %}
  {% block bodyclass %}change-list{% endblock %}
  
  {% block nav_title %}
      {% if brand_icon %}<i class="{{brand_icon}}"></i> {% endif %}{{brand_name}}
  {% endblock %}
  
  {% if not ext_ui %}
  {% block nav_toggles %}
  {% include "xadmin/includes/toggle_menu.html" %}
  {% if has_add_permission %}
    <a href="{{add_url}}" class="navbar-toggle pull-right"><i class="fa fa-plus"></i></a>
  {% endif %}
  <button class="navbar-toggle pull-right" data-toggle="collapse" data-target=".content-navbar .navbar-collapse">
    <i class="fa fa-filter"></i>
  </button>
  {% endblock %}
  {% endif %}
  
  {% block nav_btns %}
  {% if cl.pop %}
    <a href="#" id="confirm_select" class="btn btn-primary {% if cl.select_close %}select_close{% endif %}"><i class="fa fa-plus"></i> 确认选择</a>
  {% else %}
    {% if has_add_permission %}
      <a href="{{add_url}}" class="btn btn-primary"><i class="fa fa-plus"></i> 
      创建</a>
    {% endif %}
    {{ nav_buttons }}
  {% endif %}
  {% endblock nav_btns %}
  
  {% block nav_middle %}
    {% view_block 'results_bottom' %}
  {% endblock %}
  
  
  {% block nav_form %}
    <div class="btn-toolbar pull-right clearfix">
      {% view_block 'top_toolbar' %}
  
  	{% if cl.col_ctrl %}
      <div class="btn-group" title="设置显示列">
        <a class="dropdown-toggle btn btn-default btn-sm" data-toggle="dropdown" href="#">
          <i class="fa fa-cog"></i> </span>
        </a>
        <ul class="dropdown-menu model_fields pull-right" role="menu" aria-labelledby="dLabel">
          <li><a href="{{clean_select_field_url}}"><i class="fa fa-refresh"></i> 恢复显示列</a></li>
          <li class="divider"></li>
          {% for f, selected, flink in model_fields %}
          <li><a href="{{flink}}">
            {% if selected %}<i class="fa fa-check"></i>{% else %}<i class="fa fa-blank"></i>{% endif %}
            {{f.verbose_name}}</a></li>
          {% endfor %}
        </ul>
      </div>
  	{% endif %}
  <!--
      {% block toolbar_layouts %}
      <div class="btn-group layout-btns" data-toggle="buttons">
        <label class="btn btn-default btn-sm layout-normal active">
          <input type="radio"> <i class="fa fa-th-large"></i>
        </label>
        <label class="btn btn-default btn-sm layout-condensed">
          <input type="radio"> <i class="fa fa-th"></i>
        </label>
        {% view_block 'top_layout_btns' %}
      </div>
      {% endblock toolbar_layouts %}
  
      {% block toolbar_fullscreen %}
      <div class="btn-group layout-btns" data-toggle="buttons-checkbox">
        <button type="button" class="btn btn-default btn-sm layout-full"><i class="fa fa-expand"></i></button>
        {% view_block 'top_check_btns' %}
      </div>
      {% endblock toolbar_fullscreen %}
  -->
      {% view_block 'top_btns' %}
    </div>
  {% endblock %}
  
  {% block content %}
  
  {% ifequal cl.filter_list_position 'left' %}
  <div class="row">
  <div class="col-md-2">
      {% view_block 'grid_left' %}
  </div>
  <div class="col-md-10">
  {% endifequal %}
  
  {% if cl.list_tabs %}
  <div class="nav-tabs-custom">
  <ul class="nav nav-tabs">
      {% for tab_url,tab_title in cl.list_tabs %}
      <li class="{% ifequal cur_tab forloop.counter0 %}active{% endifequal %}"><a href="{{ tab_url }}&_tab={{ forloop.counter0 }}">{{ tab_title }}</a></li>
      {% endfor %}
  </ul>
  {% endif %}
  
  
  
  
  
  
  
    
    <form id="changelist-form" action="" method="post"{% view_block 'result_list_form' %}>{% csrf_token %}
    {% view_block 'results_top' %}
    <div class="results table-responsive">
  
      {% ifequal cl.filter_list_position 'top' %}
      <div class=" btn-group">
          {% view_block 'grid_top' %}
      </div>
      {% endifequal %}
  
    {% if results %}
    {% block results_grid %}
    <table class="table table-bordered table-striped table-hover">
      {% block results_grid_head %}
      <thead>
        <tr>{% for o in result_headers.cells %}
          <th {{o.tagattrs}}>
            {% if o.btns %}
              <div class="pull-right">
                {% for b in o.btns %}
                  {{b|safe}}
                {% endfor %}
              </div>
            {% endif %}
            {% if o.menus %}
              <div class="dropdown pull-left">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                  {{ o.label }}
                </a>
                <ul class="dropdown-menu" role="menu">
                  {% for m in o.menus %}
                    {{m|safe}}
                  {% endfor %}
                </ul>
              </div>
            {% else %}
              {{ o.label }}
            {% endif %}
          </th>{% endfor %}
        </tr>
        {% view_block 'result_head' %}
      </thead>
      {% endblock results_grid_head %}
      {% block results_grid_body %}
      <tbody>
      {% for row in results %}
        <tr class="grid-item{% if row.css_class %} {{row.css_class}}{%endif%}">{% for o in row.cells %}
          <td {{o.tagattrs}}>
            {% if o.btns %}
              <div class="btn-group pull-right">
                {% for b in o.btns %}
                  {{b|safe}}
                {% endfor %}
              </div>
            {% endif %}
            {% if o.menus %}
              <div class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                  {{ o.label }}
                </a>
                <ul class="dropdown-menu">
                  {% for m in o.menus %}
                    {{m|safe}}
                  {% endfor %}
                </ul>
              </div>
            {% else %}
              {{ o.label }}
            {% endif %}
          </td>
        {% endfor %}</tr>
        {% view_block 'result_row' row %}
      {% endfor %}
      </tbody>
      {% endblock results_grid_body %}
    </table>
    {% endblock results_grid %}
    {% else %}
      <p class="well">{% firstof cl.no_data_tips '无数据' %}</p>
    {% endif %}
    </div>
  
    <input type="hidden" id="action" name="action" value=""/>
    <input type="hidden" id="select-across" name="select_across" value=""/>
  
  {% if not ext_ui and cl.result_count %}
  <div class="form-actions well well-sm">
    {% view_block 'results_bottom' %}
  </div>
  {% endif %}
    </form>
  
  {% if ext_ui %}
   <div class="box-footer">
    <ul class="pagination pagination-sm no-margin pull-right">
      {% view_block 'pagination' 'small' %}
    </ul>
   </div>
  </div>
  
  {% else %}
    <ul class="pagination">
      {% view_block 'pagination' %}
    </ul>
  {% endif %}
  
  {% if cl.list_tabs %}
  </div>
  {% endif %}
  
  
  {% ifequal cl.filter_list_position 'left' %}
  </div>
  </div>
  {% endifequal %}
  
  {% endblock %}
  