Moved birthdate into separate table.
This commit is contained in:
parent
2c4d35e2dd
commit
c28e0a90dd
12 changed files with 225 additions and 94 deletions
templates
|
@ -77,14 +77,14 @@
|
|||
{{ container_title('<i class="fas fa-birthday-cake fa-fw"></i> Happy Birthday!') }}
|
||||
|
||||
{% for birthday in birthdays %}
|
||||
{% set age = birthday.info.age %}
|
||||
{% set age = birthday.age %}
|
||||
<a class="landing__latest" style="--user-colour: {{ birthday.colour }}" href="{{ url('user-profile', {'user': birthday.info.id}) }}">
|
||||
<div class="landing__latest__avatar">{{ avatar(birthday.info.id, 50, birthday.info.name) }}</div>
|
||||
<div class="landing__latest__content">
|
||||
<div class="landing__latest__username">
|
||||
{{ birthday.info.name }}
|
||||
</div>
|
||||
{% if age > 0 %}
|
||||
{% if age is not null %}
|
||||
<div class="landing__latest__joined">
|
||||
Turned {{ age }} today!
|
||||
</div>
|
||||
|
|
|
@ -42,13 +42,12 @@
|
|||
{% endif %}
|
||||
|
||||
{% set hasCountryCode = profile_user.countryCode != 'XX' %}
|
||||
{% set age = profile_user.age %}
|
||||
{% set hasAge = age > 0 %}
|
||||
{% set hasAge = profile_age is not null %}
|
||||
{% if hasCountryCode or hasAge %}
|
||||
<div class="profile__header__country">
|
||||
{% if hasCountryCode %}<div class="flag flag--{{ profile_user.countryCode|lower }}"></div>{% endif %}
|
||||
<div class="profile__header__country__name">
|
||||
{% if hasCountryCode %}{{ profile_user.countryCode|country_name }}{% endif %}{% if hasAge %}{% if hasCountryCode %}, {% endif %}{{ age }} year{{ age != 's' ? 's' : '' }} old{% endif %}
|
||||
{% if hasCountryCode %}{{ profile_user.countryCode|country_name }}{% endif %}{% if hasAge %}{% if hasCountryCode %}, {% endif %}{{ profile_age }} year{{ profile_age != 1 ? 's' : '' }} old{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
@ -213,14 +213,14 @@
|
|||
<div class="profile__birthdate__title">
|
||||
Day
|
||||
</div>
|
||||
{{ input_select('birthdate[day]', ['-']|merge(range(1, 31)), profile_user.hasBirthdate ? profile_user.birthdate.day : 0, '', '', true, 'profile__birthdate__select profile__birthdate__select--day') }}
|
||||
{{ input_select('birthdate[day]', ['-']|merge(range(1, 31)), birthdate_info.day|default(0), '', '', true, 'profile__birthdate__select profile__birthdate__select--day') }}
|
||||
</label>
|
||||
|
||||
<label class="profile__birthdate__label">
|
||||
<div class="profile__birthdate__title">
|
||||
Month
|
||||
</div>
|
||||
{{ input_select('birthdate[month]', ['-']|merge(range(1, 12)), profile_user.hasBirthdate ? profile_user.birthdate.month : 0, '', '', true, 'profile__birthdate__select profile__birthdate__select--month') }}
|
||||
{{ input_select('birthdate[month]', ['-']|merge(range(1, 12)), birthdate_info.month|default(0), '', '', true, 'profile__birthdate__select profile__birthdate__select--month') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
@ -229,7 +229,7 @@
|
|||
<div class="profile__birthdate__title">
|
||||
Year (may be left empty)
|
||||
</div>
|
||||
{{ input_select('birthdate[year]', ['-']|merge(range(null|date('Y'), null|date('Y') - 100)), profile_user.birthdate.year|default(0), '', '', true, 'profile__birthdate__select profile__birthdate__select--year') }}
|
||||
{{ input_select('birthdate[year]', ['-']|merge(range(null|date('Y'), null|date('Y') - 100)), birthdate_info.year|default(0), '', '', true, 'profile__birthdate__select profile__birthdate__select--year') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue