{% extends 'GestionBundle:Layout:baseAdmin.html.twig' %}


{% block content %}
    <nav class="navbar navbar-fixed-top navbar-dark bg-inverse">
        <a class="navbar-brand" href="{{path('admin_homepage')}}" style="margin-right: 100px">GPC : Espace Admin</a>
        <ul class="nav navbar-nav">
            <li class="nav-item">
                <a class="nav-link active" href="{{path('composant_index')}}">Composant Logiciel<span class="sr-only">(current)</span></a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="{{path('produit_index')}}">Produit Logiciel</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="{{path('version_index')}}">Version Composant</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="{{path('version_produit_index')}}">Version Produit</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="{{path('admin_homepage_users')}}">Utilisateur</a>
            </li>
            <li class="nav-item">
                <a style="margin-left: 150px;" class="nav-link" href="{{ path('fos_user_security_logout') }}">Déconnexion</a>
            </li>
        </ul>
    </nav>

    <div class="container">
        <div class="starter-template">
            <h1>Ajouter nouveau Composant</h1>
            <br>
            {{ form_start(form) }}

            {#            {{ form_widget(form) }}#}
            {{ form_label(form.titre) }}
            {{ form_widget(form.titre) }}
            <br>
            {{ form_label(form.type) }}
            {{ form_widget(form.type) }}
            <br>
            {{ form_label(form.nature) }}
            {{ form_widget(form.nature) }}
            <br>
            {{ form_label(form.licence) }}
            {{ form_widget(form.licence) }}
            <br>
            {{ form_label(form.cout) }}
            {{ form_widget(form.cout) }}
            <br>
            {{ form_label(form.version.version) }}
            {{ form_widget(form.version.version) }}
            <br>
            <input class="btn btn-success" type="submit" value="Ajouter" />
            {{ form_widget(form._token) }}
            {#            {{ form_end(form) }}#}
            </form>

            <br><br>
            <a class="btn btn-info" href="{{ path('composant_index') }}">Retour à la liste</a>


        </div>
    {% endblock content %}
