<div class="containerDashboard.containerDashboard">

    <div piwik-activity-indicator loading="containerDashboard.isLoading"></div>
    <div ng-show="!containerDashboard.isLoading">

        <div piwik-content-intro>
            <h2 piwik-enriched-headline inline-help="{{ 'TagManager_GettingStartedNotice'|translate }}" feature-name="Tag Manager">{{ 'TagManager_ContainerX'|translate:containerDashboard.container.name }}</h2>
            <p class="dashboardCreationDate">{{ 'TagManager_ContainerMetaInformation'|translate:containerDashboard.containerVersion.idcontainer:containerDashboard.availableContexts[containerDashboard.container.context]:containerDashboard.containerVersion.created_date_pretty }}
                <span ng-show="containerDashboard.containerVersion.description">
                <br />
                {{ 'General_Description'|translate }}: {{ containerDashboard.containerVersion.description }}
            </span></p>
        </div>

        <div class="row" style="margin-left: -0.75rem;">
            <div class="col m6 s12">
                <div piwik-content-block content-title="{{ containerDashboard.containerVersion.tags|length }} {{ 'TagManager_Tags'|translate }}">
                    <p> <span ng-show="containerDashboard.containerVersion.tags|length">
                        {{ 'TagManager_Names'|translate }}:
                            <span ng-repeat="tag in containerDashboard.containerVersion.tags|orderBy:'name':false">
                        <a ng-href="{{ containerDashboard.linkTo('manageTags', 'idTag=' + tag.idtag) }}" title="{{ 'TagManager_EntityDateTypeMetaInformation'|translate:tag.created_date_pretty:tag.updated_date_pretty:tag.type}}">{{ tag.name }}</a><span ng-show="!$last">, </span>
                        </span></span>
                    </p>
                    <hr />
                    <a class="btn-flat" ng-href="{{ containerDashboard.linkTo('manageTags') }}"><span class="icon-edit"></span> {{ 'TagManager_EditTags'|translate }}</a>
                    <a class="btn-flat" ng-href="{{ containerDashboard.linkTo('manageTags', 'idTag=0') }}"><span class="icon-add"></span> {{ 'TagManager_CreateNewTag'|translate }}</a>
                </div>
            </div>
            <div class="col m6 s12">
                <div piwik-content-block content-title="{{ containerDashboard.containerVersion.triggers|length }} {{ 'TagManager_Triggers'|translate }}">
                    <p> <span ng-show="containerDashboard.containerVersion.triggers|length">
                            {{ 'TagManager_Names'|translate }}:
                            <span ng-repeat="trigger in containerDashboard.containerVersion.triggers|orderBy:'name':false">
                            <a ng-href="{{ containerDashboard.linkTo('manageTriggers', 'idTrigger=' + trigger.idtrigger) }}"
                               title="{{ 'TagManager_EntityDateTypeMetaInformation'|translate:trigger.created_date_pretty:trigger.updated_date_pretty:trigger.type}}"
                                >{{ trigger.name }}</a><span ng-show="!$last">, </span></span>

                        </span>
                    </p>
                    <hr />
                    <a class="btn-flat" ng-href="{{ containerDashboard.linkTo('manageTriggers') }}"><span class="icon-edit"></span> {{ 'TagManager_EditTriggers'|translate }}</a>
                    <a class="btn-flat" ng-href="{{ containerDashboard.linkTo('manageTriggers', 'idTrigger=0') }}"><span class="icon-add"></span> {{ 'TagManager_CreateNewTrigger'|translate }}</a>
                </div>
            </div>
        </div>
        <div class="row" style="margin-left: -0.75rem;">
            <div class="col m6 s12">
                <div piwik-content-block  content-title="{{ containerDashboard.containerVersion.variables|length }} {{ 'TagManager_Variables'|translate }}">
                    <p> <span ng-show="containerDashboard.containerVersion.variables|length">
                        {{ 'TagManager_Names'|translate }}:
                            <span ng-repeat="variable in containerDashboard.containerVersion.variables|orderBy:'name':false">
                        <a ng-href="{{ containerDashboard.linkTo('manageVariables', 'idVariable=' + variable.idvariable) }}"
                           title="{{ 'TagManager_EntityDateTypeMetaInformation'|translate:variable.created_date_pretty:variable.updated_date_pretty:variable.type}}">{{ variable.name }}</a><span ng-show="!$last">, </span>
                        </span></span>
                    </p>
                    <hr />
                    <a class="btn-flat" ng-href="{{ containerDashboard.linkTo('manageVariables') }}"><span class="icon-edit"></span> {{ 'TagManager_EditVariables'|translate }}</a>
                    <a class="btn-flat" ng-href="{{ containerDashboard.linkTo('manageVariables', 'idVariable=0') }}"><span class="icon-add"></span> {{ 'TagManager_CreateNewVariable'|translate }}</a>
                </div>
            </div>
            <div class="col m6 s12">
                <div piwik-content-block  content-title="{{ containerDashboard.container.versions|length }} {{ 'TagManager_Versions'|translate }}">
                    <p> <span ng-show="containerDashboard.container.lastVersions|length">
                        {{ 'TagManager_LastVersions'|translate }}:
                            <span ng-repeat="lastVersion in containerDashboard.container.lastVersions">
                        <a ng-href="{{ containerDashboard.linkTo('manageVersions', 'idContainerVersion=' + lastVersion.idcontainerversion) }}" title="Created on {{ lastVersion.created_date_pretty }}, description: '{{ lastVersion.description }}'">{{ lastVersion.name }}</a><span ng-show="!$last">, </span>
                        </span></span>

                        <span ng-show="containerDashboard.container.releases|length">
                            <br/>
                        {{ 'TagManager_Environments'|translate }}:
                            <span ng-repeat="release in containerDashboard.container.releases">
                        <span title="{{ 'TagManager_ReleaseInfo'|translate:release.release_login:release.release_date_pretty }} {{ release.versionName }}">{{ release.environment|ucfirst }}</span><span ng-show="!$last">, </span>
                        </span></span>
                    </p>
                    <hr />
                    <a class="btn-flat" ng-href="{{ containerDashboard.linkTo('manageVersions') }}"><span class="icon-edit"></span> {{ 'TagManager_EditVersions'|translate }}</a>
                    <a class="btn-flat" ng-href="{{ containerDashboard.linkTo('manageVersions', 'idContainerVersion=0') }}"><span class="icon-add"></span> {{ 'TagManager_CreateNewVersion'|translate }}</a>
                </div>
            </div>
        </div>
    </div>

</div>