{% extends 'layouts/admin.twig' %}

{% block content %}

    <ul class="breadcrumbs el">
        <li><a href="/admin/">Admin</a> /</li>
        <li class="end">Bundles</li>
    </ul>

    <h1>{{ title }}</h1>

    <ul class="tabnav el">
        <li class="{{ selected_tab == 'manage' ? 'selected' : '' }}">
            <a href="{{ route('admin-bundle-types') }}">All</a>
        </li>
    </ul>


    {% include 'admin/messages.twig' %}

    <p>
        Bundles can be used for:
        <ul>
            <li> - PACK CREATOR pages (this type of bundle will have a URL),</li>
            <li> - GROUP BUY products (a container product will use this type of bundle).</li>
        </ul>
    </p>

    <table id="js_manage_bundle_types">

        <thead>
            <tr>
                <th>#</th>
                <th>Name</th>
                <th>Url</th>
                <th>Actions</th>
            </tr>
        </thead>

        <tbody>
            {% for bundle_type in bundle_types %}
            <tr>
                <th>{{ bundle_type.id }}</th>
                <th>{{ bundle_type.name }}</th>
                <th>{{ bundle_type.url }}</th>
                <th><a href="{{ route('admin-bundle-types-edit', [ bundle_type.id ], false) }}">Edit</a></th>
            </tr>
            {% endfor %}
        </tbody>

    </table>

    <hr />

    <script>

    $(document).ready(function() {
        $('#js_manage_bundle_types').DataTable({
            "searching": false,
            "lengthChange": false,
            "paging": false,
            "info": false,
        });
    } );

    </script>

{% endblock %}

