Do hard word break on form titles to avoid horizontal scroll on
small displays. Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -4,16 +4,19 @@
|
||||
|
||||
{% smart_setting 'APPEARANCE_MAXIMUM_TITLE_LENGTH' as maximum_title_length %}
|
||||
|
||||
{% if title %}
|
||||
{{ title|truncatechars:maximum_title_length }}
|
||||
{% else %}
|
||||
{% if read_only %}
|
||||
{% blocktrans %}Details for: {{ object }}{% endblocktrans %}
|
||||
{# Avoid horizontal scroll on small displays #}
|
||||
<span style="word-break: break-all;">
|
||||
{% if title %}
|
||||
{{ title|truncatechars:maximum_title_length }}
|
||||
{% else %}
|
||||
{% if object %}
|
||||
{% blocktrans with object as object %}Edit: {{ object }}{% endblocktrans %}
|
||||
{% if read_only %}
|
||||
{% blocktrans %}Details for: {{ object }}{% endblocktrans %}
|
||||
{% else %}
|
||||
{% trans 'Create' %}
|
||||
{% if object %}
|
||||
{% blocktrans with object as object %}Edit: {{ object }}{% endblocktrans %}
|
||||
{% else %}
|
||||
{% trans 'Create' %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user