{% extends "base.html" %}
{% load i18n wger_extras django_bootstrap_breadcrumbs %}
{% block title %}{{current_user|format_username}}{% endblock %}
{% block breadcrumbs %}
{% if current_user.userprofile.gym %}
{{ block.super }}
{% if perms.gym.manage_gyms %}
{% breadcrumb "Gyms" "gym:gym:list" %}
{% endif %}
{% breadcrumb_raw current_user.userprofile.gym "gym:gym:user-list" current_user.userprofile.gym.pk %}
{% breadcrumb_raw current_user|format_username "core:user:overview" current_user.pk %}
{% endif %}
{% endblock %}
{% block content %}
{% url 'core:user:trainer-login' current_user.pk as trainer_login %}
{% if perms.gym.gym_trainer %}
{% translate "Routines" %} ({% blocktranslate with number=10 %}last {{ number }}{% endblocktranslate %})
{% if perms.gym.gym_trainer %}
{% endif %}
{% translate "Date" %}
{% translate "Description" %}
{% translate "Number of logs (days)" %}
{% translate "Last activity" %}
{% for entry in routine_data %}
{{entry.routine.created}}
{{entry.logs|default:'-/-'}}
{{entry.last_log.date|default:'-/-'}}
{% empty %}
{% translate "No workouts found." %}
{% endfor %}
{% translate "Log" %} ({% blocktranslate with number=10 %}last {{ number }}{% endblocktranslate %})
{% if perms.gym.gym_trainer %}
{% endif %}
{% translate "Date" %}
{% translate "General impression" %}
{% translate "Notes" %}
{% translate "Time" %}
{% for log in session %}
{{log.datetime_start|date}}
{{log.get_impression_display}}
{{log.notes|default:'-/-'|truncatewords:6}}
{% if log.datetime_end %}
{{log.datetime_start|time:"H:i"}} - {{log.datetime_end|time:"H:i"}}
{% else %}
-/-
{% endif %}
{% empty %}
{% translate "Nothing found" %}
{% endfor %}
{% translate "Weight" %} ({% blocktranslate with number=5 %}last {{ number }}{% endblocktranslate %})
{% if perms.gym.gym_trainer %}
{% endif %}
{% translate "Date" %}
{% translate "Weight" %}
{% for weight in weight_entries %}
{{weight.date}}
{{weight.value}} {% trans_weight_unit 'kg' current_user %}
{% empty %}
{% translate "Nothing found" %}
{% endfor %}
{% translate "Nutrition plans" %} ({% blocktranslate with number=5 %}last {{ number }}{% endblocktranslate %})
{% if perms.gym.gym_trainer %}
{% endif %}
{% translate "Date" %}
{% translate "Description" %}
{% translate "Energy" %}
{% translate "Protein" %}
{% translate "Carbohydrates" %}
{% translate "Fat" %}
{% for nutrition_plan in nutrition_plans %}
{{nutrition_plan.creation_date}}
{{nutrition_plan.get_nutritional_values.total.energy|floatformat}} {% translate "kcal" %}
{{nutrition_plan.get_nutritional_values.total.protein|floatformat}} {% translate "g" context "weight unit, i.e. grams" %}
{{nutrition_plan.get_nutritional_values.total.carbohydrates|floatformat}} {% translate "g" context "weight unit, i.e. grams" %}
{{nutrition_plan.get_nutritional_values.total.fat|floatformat}} {% translate "g" context "weight unit, i.e. grams" %}
{% empty %}
{% translate "Nothing found" %}
{% endfor %}
{% endif %}
{% endblock %}
{% block sidebar %}
{% if perms.gym.manage_gyms or perms.gym.manage_gym %}
{% translate "Actions" %}
{% endif %}
{% translate "Details" %}
{% translate "Nr." %}
{{current_user.pk}}
{% translate "Name" %}
{{current_user.first_name}}
{% translate "Last name" %}
{{current_user.last_name}}
{% translate "Email" %}
{% if current_user.email %}
{{current_user.email}}
{% else %}
-/-
{% endif %}
{% translate "Phone" %}
{{ current_user.userprofile.address.phone|default:'-/-' }}
{% translate "Address" %}
{% if not current_user.userprofile.address.zip_code and not current_user.userprofile.address.city and not current_user.userprofile.address.street%}
-/-
{% else %}
{{current_user.userprofile.address.zip_code}} {{current_user.userprofile.address.city}}
{{current_user.userprofile.address.street}}
{% endif %}
{% translate "Registered" %}
{{current_user.date_joined}}
{% translate "Last login" %}
{{current_user.last_login}}
{% if perms.gym.manage_gym or perms.gym.manage_gyms %}
{% translate "Status" %}
{% if current_user.is_active %}
{% translate "Active" %}
{% else %}
{% translate "Inactive" %}
{% endif %}
{% endif %}
{# #}
{# Contract #}
{# #}
{% if perms.gym.add_contract %}
{% translate "Actions" %}
{% translate "Contracts" %} ({% blocktranslate with number=5 %}last {{ number }}{% endblocktranslate %})
{% for contract in contracts %}
{{ contract }}
{{ contract.date_start }}
{{ contract.amount }}
{% empty %}
{% translate "Nothing found" %}
{% endfor %}
{% endif %}
{# #}
{# Admin notes #}
{# #}
{% if perms.gym.add_adminusernote %}
{% translate "Actions" %}
{% translate "Notes" %} ({% blocktranslate with number=5 %}last {{ number }}{% endblocktranslate %})
{% for note in admin_notes %}
{{ note.timestamp_created }}
{{ note.note|truncatewords:10 }}
{% empty %}
{% translate "Nothing found" %}
{% endfor %}
{% endif %}
{# #}
{# Documents #}
{# #}
{% if perms.gym.add_userdocument %}
{% translate "Actions" %}
{% translate "Documents" %} ({% blocktranslate with number=5 %}last {{ number }}{% endblocktranslate %})
{% for document in current_user.userdocument_member.all %}
{{ document.timestamp_created }}
{{ document.name }}
{% empty %}
{% translate "Nothing found" %}
{% endfor %}
{% endif %}
{# #}
{# Gym configuration #}
{# #}
{% if perms.gym.change_gymuserconfig and current_user.gymuserconfig %}
{% translate "Actions" %}
{% endif %}
{% translate "Configuration" %}
{% translate 'Include in inactive overview' %}
{% if current_user.gymuserconfig.include_inactive %}
{% else %}
{% endif %}
{% endblock %}
{# #}
{# Options #}
{# #}
{% block options %}
{% if perms.gym.gym_trainer %}
{% if enable_login_button %}
{% else %}
{% translate "Log in as this user" %}
{% endif %}
{% endif %}
{% endblock %}