Add display name (first_name) shown instead of username on user-facing UI
All checks were successful
Docker / build (release) Successful in 8s

This commit is contained in:
krek0 2026-05-17 07:11:37 +02:00
parent 28f279a4ab
commit b57f9092aa
5 changed files with 21 additions and 3 deletions

View file

@ -85,7 +85,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<li class="nav-item">
{% url 'photologue:pl-gallery-owner' slug=gallery.slug owner=owner.id as url %}
<a class="nav-link {% if request.path_info == url %}active{% endif %}" href="{{ url }}">
{% if owner.get_full_name %}{{ owner.get_full_name }}{% else %}{{ owner.username }}{% endif %}
{{ owner.first_name|default:owner.username }}
</a>
</li>
{% endfor %}
@ -114,7 +114,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
data-height="{{ item.thumbnail_height|default:1 }}">
<img src="{{ item.get_thumbnail_url }}" data-lazy="{{ item.get_thumbnail_url }}"
class="{% if not item.is_public %}photo-private{% endif %}"
alt="{{ item.title }}{% if not item.is_video and item.date_taken %} - {{ item.date_taken|date }} {{ item.date_taken|time }}{% endif %}{% if item.owner.get_full_name %} - {{ item.owner.get_full_name }}{% else %} - {{ item.owner.username }}{% endif %}{% if not item.is_video and item.license %} - {{ item.license }}{% endif %}{% if not item.is_public %} - !PRIVATE!{% endif %}">
alt="{{ item.title }}{% if not item.is_video and item.date_taken %} - {{ item.date_taken|date }} {{ item.date_taken|time }}{% endif %} - {{ item.owner.first_name|default:item.owner.username }}{% if not item.is_video and item.license %} - {{ item.license }}{% endif %}{% if not item.is_public %} - !PRIVATE!{% endif %}">
</a>
{% endfor %}
</div>