{% load i18n %}

    <div class="daiquiri-widget daiquiri-metadata-display">
        <div ng-hide="service.active">
            Please select a schema, table, column or function in the browser above.
        </div>
        <div ng-show="service.active">
            <div class="pull-right">
                <a href="" class="fa fa-pencil" title="{% trans 'Update' %}"
                    ng-click="service.openFormModal(service.active.resource, false)">
                </a>
                <a href="" class="fa fa-file-text" title="{% trans 'Update description' %}"
                    ng-show="service.active.resource === 'schemas' || service.active.resource === 'tables'"
                    ng-click="service.openFormModal(service.active.resource, false, 'description')">
                </a>
                <a href="" class="fa fa-graduation-cap" title="{% trans 'Update attribution' %}"
                    ng-show="service.active.resource === 'schemas' || service.active.resource === 'tables'"
                    ng-click="service.openFormModal(service.active.resource, false, 'attribution')">
                </a>
                <a href="" class="fa fa-user" title="{% trans 'Update creators' %}"
                    ng-show="service.active.resource === 'schemas' || service.active.resource === 'tables'"
                    ng-click="service.openFormModal(service.active.resource, false, 'creators')">
                </a>
                <a href="" class="fa fa-user-plus" title="{% trans 'Update contributors' %}"
                    ng-show="service.active.resource === 'schemas' || service.active.resource === 'tables'"
                    ng-click="service.openFormModal(service.active.resource, false, 'contributors')">
                </a>
                <a href="" class="fa fa-trash" title="{% trans 'Delete' %}"
                    ng-click="service.openDeleteModal(service.active.resource, false)">
                </a>
            </div>

            <div class="daiquiri-metadata-display-title">
                <strong ng-show="service.active.resource === 'schemas'">{% trans 'Schema' %}</strong>
                <strong ng-show="service.active.resource === 'tables'">{% trans 'Table' %}</strong>
                <strong ng-show="service.active.resource === 'columns'">{% trans 'Column' %}</strong>
                <strong ng-show="service.active.resource === 'functions'">{% trans 'Function' %}</strong>
                <span>{$ service.active.label $}</span>
            </div>

            <dl class="dl-horizontal">
                <div ng-repeat="(key, value) in service.active"
                    ng-hide="['resource', 'groups', 'schema', 'table', 'creators', 'contributors'].indexOf(key) != -1">

                    <dt>{$ key | ucfirst | removeUnderscores $}</dt>
                    <dd>{$ value $}&nbsp;</dd>

                </div>
            </dl>
        </div>
    </div>
