Skip to content
Snippets Groups Projects
Commit 01d42fee authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Add Twig-template for consentAdmin

parent 37ee031b
No related branches found
No related tags found
No related merge requests found
{% set pagetitle = '{consentAdmin:consentadmin:consentadmin_header}'|trans %}
{% extends "base.twig" %}
{% block preload %}
<link rel="stylesheet" type="text/css" href="{{ basepathurl }}assets/css/consentAdmin.css" />
{% endblock %}
{% block postload %}
<script src="{{ baseurlpath }}assets/js/consentAdmin.js"></script>
<script src="{{ baseurlpath }}assets/js/consentSimpleAjax.js"></script>
{% endblock %}
{% block content %}
<h2>{{ '{consentAdmin:consentadmin:consentadmin_header}'|trans }}</h2>
<p>{{ '{consentAdmin:consentadmin:consentadmin_description1}'|trans }}</p>
<table>
<tr>
<th colspan="2" width="80%">{{ '{consentAdmin:consentadmin:service_provider_header}'|trans }}</th>
<th width="140">{{ '{consentAdmin:consentadmin:status_header}'|trans }}</th>
</tr>
{% for spName, spValues in spList %}
{% if loop.index0 % 2 == 0 %}
{% set rowClass = 'row0' %}
{% else %}
{% set rowClass = 'row1' %}
{% endif %}
<tr class="{{ rowClass }}">
<td>
<span class='caSPName'>
<span title='{{ spValues.description|escape('html') }}'>
{% if spValues.serviceurl is defined %}
{{ spValues.name|escape('html') }}
{% else %}
<a href="{{ spValues.serviceurl }}" style="color: black; font-weight: bold">{{ spValues.name|escape('html') }}</a>
{% endif %}
</span>
<span style="font-size: 80%" onclick="javascript:toggleShowAttributes({{ loop.index0 }});">
<span id="showing_{{ loop.index0 }}">{{ '{consentAdmin:consentadmin:show}'|trans }}</span>
<span id="hiding_{{ loop.index0 }}" style="display: none">{{ '{consentAdmin:consentadmin:hide}'|trans }}</span>
{{ '{consentAdmin:consentadmin:attributes_text}'|trans }}
</span>
</span>
</td>
<td class="caAttributes">
<div id="attributes_{{ loop.index0 }}" style="display: none">
{% if showDescription %}
<p>{{ '{consentAdmin:consentadmin:consentadmin_purpose}'|trans }}{{ spValues.description|escape('html') }}</p>
{% endif %}
<ul>
{% for attrName, attrValue in spValues.attributes_by_sp %}
{% if attrValue|length > 1 %}
<li>{{ attrName|escape('html') }}:
<ul>
{% for valKey, value in attrValue %}
<li>{{ value|escape('html') }}</li>
{% endfor %}
</ul>
</li>
{% else %}
<li>{{ attrName|escape('html') }}: {{ attrValue|first|escape('html') }}</li>
{% endif %}
{% endfor %}
</ul>
</div>
</td>
<td class="caAllowed">
<input onclick="javascript:checkConsent(this.value, {{ loop.index0 }}, this.checked)" value='{{ spValues.consentValue }}' type='checkbox'{% if spValues.consentStatus == 'ok'%} checked="checked"{% endif %} /><span id="consentText{{ loop.index0 }}">{% if spValues.consentStatus == 'changed' %}attributes has changed{% endif %}</span>
</td>
</tr>
{% endfor %}
</table>
<p>{{ '{consentAdmin:consentadmin:consentadmin_description2}'|trans|raw }}</p>
<h2>Logout</h2>
<p><a href="{{ baseurlpath }}consentAdmin.php?logout=1">Logout</a></p>
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment