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