{% 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 class="disabled section-title">
                    <a href="#" style="">
                        {% trans "Create invoice report" %}
                    </a>
                </li>
                <li class="dropdown-menu-indended">
                    <a href="#" id='post_invoice_report_selected'>
                        {% trans "from selected assets" %}
                    </a>
                </li>
                <li class="dropdown-menu-indended">
                    <a href="#" id='post_invoice_report_search_query'>
                        {% trans "from search query" %}
                    </a>
                </li>
                <li class="divider"></li>
            {% endif %}
        </ul>
    </div>
{% endblock %}
