mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 14:38:24 +02:00
Add some forms
This commit is contained in:
14
templates/member/my_account.html
Normal file
14
templates/member/my_account.html
Normal file
@ -0,0 +1,14 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load i18n crispy_forms_filters %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post">
|
||||
{{ form|crispy }}
|
||||
<input type="submit" class="btn btn-primary btn-block" value="{% trans "Submit" %}">
|
||||
</form>
|
||||
|
||||
<hr>
|
||||
|
||||
<a class="btn btn-secondary btn-block" href="{% url "password_change" %}">{% trans "Update my password" %}</a>
|
||||
{% endblock %}
|
69
templates/member/tfjmuser_detail.html
Normal file
69
templates/member/tfjmuser_detail.html
Normal file
@ -0,0 +1,69 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load getconfig i18n django_tables2 static %}
|
||||
|
||||
{% block content %}
|
||||
<div class="card bg-light shadow">
|
||||
<div class="card-header text-center">
|
||||
<h4>{{ user }}</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<dl class="row">
|
||||
<dt class="col-xl-6 text-right">{% trans 'role'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ user.get_role_display }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'team'|capfirst %}</dt>
|
||||
<dd class="col-xl-6"><a href="{% url "tournament:team_detail" pk=user.team.pk %}">{{ user.team }}</a></dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'birth date'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ user.birth_date }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'gender'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ user.get_gender_display }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'address'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ user.address }}, {{ user.postal_code }}, {{ user.city }}{% if user.country != "France" %}, {{ user.country }}{% endif %}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'email'|capfirst %}</dt>
|
||||
<dd class="col-xl-6"><a href="mailto:{{ user.email }}">{{ user.email }}</a></dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'phone number'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ user.phone_number }}</dd>
|
||||
|
||||
{% if user.role == '3participant' %}
|
||||
<dt class="col-xl-6 text-right">{% trans 'school'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ user.school }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'class'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ user.get_student_class_display }}</dd>
|
||||
|
||||
{% if user.responsible_name %}
|
||||
<dt class="col-xl-6 text-right">{% trans 'responsible name'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ user.responsible_name }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if user.responsible_phone %}
|
||||
<dt class="col-xl-6 text-right">{% trans 'responsible phone'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ user.responsible_phone }}</dd>
|
||||
{% endif %}
|
||||
|
||||
{% if user.responsible_email %}
|
||||
<dt class="col-xl-6 text-right">{% trans 'responsible email'|capfirst %}</dt>
|
||||
<dd class="col-xl-6"><a href="{{ user.responsible_email }}">{{ user.responsible_email }}</a></dd>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if user.role == '2coach' %}
|
||||
<dt class="col-xl-6 text-right">{% trans 'description'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ user.description }}</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<h4>{% trans "Documents" %}</h4>
|
||||
|
||||
{# TODO Display documents #}
|
||||
{% endblock %}
|
11
templates/tournament/add_organizer.html
Normal file
11
templates/tournament/add_organizer.html
Normal file
@ -0,0 +1,11 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load i18n crispy_forms_filters %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<input type="submit" class="btn btn-primary btn-block" value="{% trans "Submit" %}">
|
||||
</form>
|
||||
{% endblock %}
|
@ -19,18 +19,21 @@
|
||||
<dd class="col-xl-6">{{ team.tournament }}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'coachs'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ team.encadrants.all|join:", " }}</dd>
|
||||
<dd class="col-xl-6">{% autoescape off %}{{ team.linked_encadrants|join:", " }}{% endautoescape %}</dd>
|
||||
|
||||
<dt class="col-xl-6 text-right">{% trans 'participants'|capfirst %}</dt>
|
||||
<dd class="col-xl-6">{{ team.participants.all|join:", " }}</dd>
|
||||
<dd class="col-xl-6">{% autoescape off %}{{ team.linked_participants|join:", " }}{% endautoescape %}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
{% if user.admin or user in team.tournament.organizers.all %}
|
||||
<div class="card-footer text-center">
|
||||
<button class="btn btn-secondary">{% trans "Edit team" %}</button>
|
||||
<a href="{% url "tournament:team_update" pk=team.pk %}"><button class="btn btn-secondary">{% trans "Edit team" %}</button></a>
|
||||
{% if user.admin and team.invalid %}
|
||||
<button class="btn btn-danger">{% trans "Delete team" %}</button>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<button name="delete" class="btn btn-danger">{% trans "Delete team" %}</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
11
templates/tournament/team_form.html
Normal file
11
templates/tournament/team_form.html
Normal file
@ -0,0 +1,11 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load i18n crispy_forms_filters %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<input type="submit" class="btn btn-primary btn-block" value="{% trans "Submit" %}">
|
||||
</form>
|
||||
{% endblock %}
|
@ -39,15 +39,15 @@
|
||||
|
||||
{% if user.is_authenticated and user.admin %}
|
||||
<div class="alert alert-info">
|
||||
<a href="mailto:contact@tfm.org?subject=TFJM²%20{{ "TFJM_YEAR"|get_env }}&bcc={{ team_users_emails|join:"," }}">{% trans "Send a mail to all people in this tournament" %}</a><br>
|
||||
<a href="mailto:contact@tfm.org?subject=TFJM²%20{{ "TFJM_YEAR"|get_env }}&bcc={{ valid_team_users_emails|join:"," }}">{% trans "Send a mail to all people in this tournament that are in a valid team" %}</a>
|
||||
<a href="mailto:contact@tfjm.org?subject=TFJM²%20{{ "TFJM_YEAR"|get_env }}&bcc={{ team_users_emails|join:"," }}">{% trans "Send a mail to all people in this tournament" %}</a><br>
|
||||
<a href="mailto:contact@tfjm.org?subject=TFJM²%20{{ "TFJM_YEAR"|get_env }}&bcc={{ valid_team_users_emails|join:"," }}">{% trans "Send a mail to all people in this tournament that are in a valid team" %}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if user.admin or user in tournament.organizers.all %}
|
||||
<div class="card-footer text-center">
|
||||
<button class="btn btn-secondary">{% trans "Edit tournament" %}</button>
|
||||
<a href="{% url "tournament:update" pk=tournament.pk %}"><button class="btn btn-secondary">{% trans "Edit tournament" %}</button></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
11
templates/tournament/tournament_form.html
Normal file
11
templates/tournament/tournament_form.html
Normal file
@ -0,0 +1,11 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% load i18n crispy_forms_filters %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<input type="submit" class="btn btn-primary btn-block" value="{% trans "Submit" %}">
|
||||
</form>
|
||||
{% endblock %}
|
@ -5,8 +5,8 @@
|
||||
{% block content %}
|
||||
{% if user.is_authenticated and user.admin %}
|
||||
<div class="alert alert-info">
|
||||
<a href="mailto:contact@tfm.org?subject=TFJM²%20{{ "TFJM_YEAR"|get_env }}&bcc={{ team_users_emails|join:"," }}">{% trans "Send a mail to all people that are in a team" %}</a><br>
|
||||
<a href="mailto:contact@tfm.org?subject=TFJM²%20{{ "TFJM_YEAR"|get_env }}&bcc={{ valid_team_users_emails|join:"," }}">{% trans "Send a mail to all people that are in a valid team" %}</a>
|
||||
<a href="mailto:contact@tfjm.org?subject=TFJM²%20{{ "TFJM_YEAR"|get_env }}&bcc={{ team_users_emails|join:"," }}">{% trans "Send a mail to all people that are in a team" %}</a><br>
|
||||
<a href="mailto:contact@tfjm.org?subject=TFJM²%20{{ "TFJM_YEAR"|get_env }}&bcc={{ valid_team_users_emails|join:"," }}">{% trans "Send a mail to all people that are in a valid team" %}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% render_table table %}
|
||||
|
Reference in New Issue
Block a user