{% extends 'assets/base.html' %}
{% load bob %}
{% load i18n %}
{% load assets %}

{% block sidebar_search%}
    <div class="form search-form well well-small" id="sidebar_search">
        {% trans "Hint: you can use quotation marks for exact matches." %}
        <hr>
        {% form form=form method="GET" action='' submit_label='Search' css_class=''%}
    </div>
{% endblock %}

{% block content %}
    {% if items_count %}
      <div class="alert alert-info">
          <strong data-searched-items="{{items_count}}">{{items_count}}</strong>
          {% trans "items found" %}
      </div>
    {% endif %}
    <h3>{{header}}</h3>
        <table id='assets_table' class="table table-bordered table-striped">
        {% table_header columns url_query sort fugue_icons=1 sort_variable_name=sort_variable_name %}
            <tbody>
            {% for row in bob_page %}
            <tr>
                {% for column in columns %}
                    {% render_cell column row %}
                {% endfor %}
            </tr>
            {% endfor %}
            </tbody>
        </table>

        {% pagination bob_page url_query=url_query show_all=0 show_csv=1 fugue_icons=1 export_variable_name=export_variable_name %}
        <div id="eta"></div>
        <div class="progress" id="async-progress">
            <div class="bar"></div>
        </div>
        <div class="btn-group pull-left">
            <a class="btn dropdown-toggle btn-primary" data-toggle="dropdown" href="#">
                {% trans "Bulk actions..." %}
                <span class="caret"></span>
            </a>
            <ul class="dropdown-menu">
                {% if asset_reports_enable %}
                    <li>
                        <a href="#" id='post_invoice_report_selected'>
                            {% trans "Invoice report from selected" %}
                        </a>
                    </li>
                    <li class="divider"></li>
                {% endif %}
                <li>
                    <a href="#" id='post_edit_all'>{% trans "Edit selected" %}</a>
                </li>
            </ul>
        </div>
        {% block extra_actions %}{% endblock %}
{% endblock %}
