{% extends "SsoBackendBundle:WsApplicationAttribute:base.html.twig" %}
{% block title %}{{ parent() }} - Show{% endblock %}

{% block body %}
    <h2>Attribute View</h2>
    <ul class="list-group">
        <li class="list-group-item">
            <div class="labelview">Id</div>
            {{ entity.id }}&nbsp;
        </li>
        <li class="list-group-item">
            <div class="labelview">Name</div>
            {{ entity.Name }}&nbsp;
        </li>
        <li class="list-group-item">
            <div class="labelview">Type</div>
            {{ entity.Type }}&nbsp;
        </li>
        <li class="list-group-item">
            <div class="labelview">Display Type</div>
            {{ entity.displayType }}&nbsp;
        </li>
        {% if entity.displayType == 'dropdown' %}
            <li class="list-group-item">
                <div class="labelview">Options</div>
                {% for label,value in entity.attributeOptions %}
                    {{ label }} ({{ value }}){% if not loop.last %},{% endif %}
                {% endfor %}
                &nbsp;
            </li>
        {% endif %}
        <li class="list-group-item">
            <div class="labelview">Application Name</div>
            {% if entity.Application %}{{ entity.Application.Name }}{% else %}-{% endif %}&nbsp;
        </li>
    </ul>
    <ul class="record_actions clearfix">
        <li>
            <a class="btn btn-success" href="{{ path('_admin_backend_webservice_application_attribute') }}">
                Back to the list
            </a>
        </li>
        <li>
            <a class="btn btn-primary pull-left"
               href="{{ path('_admin_backend_webservice_application_attribute_edit', { 'attributeId': entity.id }) }}">
                Edit Attribute
            </a>
        </li>
        <li>
            {{ form(delete_form) }}
        </li>
    </ul>

{% endblock %}
