Skip to content
Snippets Groups Projects
Commit 784b1284 authored by Olimpia Magliulo's avatar Olimpia Magliulo
Browse files

Fix attribute table overflow/wordwrap

+twig indentation
parent 5c6c9c53
No related branches found
No related tags found
No related merge requests found
......@@ -3,20 +3,21 @@
{% for name, values in items %}
<tr class="{{ cycle(['odd', 'even'], loop.index0) }}">
{% block namecol %}
<td class="attrname">{{ name }}</td>
{% endblock %}
{% block namecol -%}
<td class="attrname">{{ name }}</td>
{%- endblock %}
<td class="attrvalue">
{% for value in values %}
{% if loop.length>1 and loop.first %}<ul>{% endif %}
{% if loop.length>1 %}<li>{% endif %}
<td class="attrvalue">{% spaceless %}
{% for value in values %}
{% if loop.length>1 and loop.first %}<ul>{% endif %}
{% if loop.length>1 %}<li>{% endif -%}
{% block value %}{% endblock %}
{% block value %}{% endblock %}
{% if loop.length>1 %}</li>{% endif %}
{% if loop.length>1 and loop.last %}</ul>{% endif %}
{% endfor %}
{% if loop.length>1 %}</li>{% endif %}
{% if loop.length>1 and loop.last %}</ul>{% endif %}
{% endfor %}
{% endspaceless -%}
</td>
</tr>
{% endfor %}
......
......@@ -14,24 +14,22 @@
<h2>{{ 'Your attributes'|trans }}</h2>
{% set items = attributes %}
{% embed '_table.twig' %}
{% embed '_table.twig' -%}
{% block namecol %}
{% block namecol -%}
{% set attr = ('{attributes:attribute_'~(name|lower)~'}') %}
{% set translated = attr|trans %}
<td class="attrname">{% if translated != attr %} {{ translated }} <br>{% endif %} <samp>{{ name }}</samp></td>
{% endblock %}
{% block value %}
{% if name =='jpegPhoto'%}
{% block value -%}
{% if name =='jpegPhoto'-%}
<img src="data:image/jpeg;base64,{{ value }}" />
{% else %}
{{ value }}
{% endif %}
{% else %}{{ value }}{% endif -%}
{% endblock %}
{% endembed %}
{%- endembed %}
{% if nameid %}
......
......@@ -510,8 +510,15 @@ span.fa, i.fa {
TABLES
************************************************************ */
.pure-table-attributes{
table-layout: fixed;
width:100%;
}
.attrname{
text-align: right;
}
.attrvalue{
overflow-wrap: break-word;
}
table.attributes ul{
padding: inherit;
}
......
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