{% extends 'base.html' %}
{% load buttons %}
{% load helpers %}
{% load perms %}
{% load plugins %}
{% load static %}
{% load tz %}

{% block header %}
    <div class="row noprint">
        {% with list_url=object|validated_viewname:"list" %}
        <div class="col-sm-8 col-md-9">
            <ol class="breadcrumb">
            {% block breadcrumbs %}
                {% if list_url %}
                <li><a href="{% url list_url %}">
                    {{ verbose_name_plural|bettertitle }}
                </a></li>
                {% endif %}
                {% block extra_breadcrumbs %}{% endblock extra_breadcrumbs %}
                <li>{{ object|hyperlinked_object }}</li>
            {% endblock breadcrumbs %}
            </ol>
        </div>
        {% if list_url %}
        <div class="col-sm-4 col-md-3">
            <form action="{% url list_url %}" method="get">
                <div class="input-group">
                    <input type="text" name="q" class="form-control" placeholder="Search {{ verbose_name_plural }}" />
                    <span class="input-group-btn">
                        <button type="submit" class="btn btn-primary">
                            <span class="mdi mdi-magnify" aria-hidden="true"></span>
                        </button>
                    </span>
                </div>
            </form>
        </div>
        {% endif%}
        {% endwith %}
    </div>

    <div class="pull-right noprint">
    {% block buttons %}
        {% plugin_buttons object %}
        {% block extra_buttons %}{% endblock extra_buttons %}
        {% consolidate_detail_view_action_buttons %}
    {% endblock buttons %}
    </div>

    {% block masthead %}
        <h1>
            {% block title %}{{object.display|default:object}}{% endblock %}
        </h1>
    {% endblock masthead %}
{% endblock header %}

{% block content %}
    <div class="tab-content">
        <div id="main">
            <div class="row">
                <div class="col-md-6">
                    {% block content_left_page %}{% endblock content_left_page %}
                    {% include 'inc/custom_fields/panel.html' with custom_fields=object.get_custom_field_groupings_basic computed_fields=object.get_computed_fields_grouping_basic computed_fields_advanced_ui=False %}
                    {% include 'inc/relationships_panel.html' %}
                    {% include 'extras/inc/tags_panel.html' %}
                    {% plugin_left_page object %}
                </div>
                <div class="col-md-6">
                    {% block content_right_page %}{% endblock content_right_page %}
                    {% plugin_right_page object %}
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    {% block content_full_width_page %}{% endblock content_full_width_page %}
                    {% plugin_full_width_page object %}
                </div>
            </div>
        </div>
    </div>
{% endblock content %}
