Move some buttons, my account form is now working

This commit is contained in:
Yohann D'ANELLO 2020-05-15 02:44:59 +02:00
parent f01537719b
commit 9ba4d88e3d
5 changed files with 12 additions and 11 deletions

View File

@ -217,7 +217,7 @@ class ProfileListView(AdminMixin, SingleTableView):
queryset = TFJMUser.objects.order_by("role", "last_name", "first_name")
table_class = UserTable
template_name = "member/profile_list.html"
extra_context = dict(title=_("All profiles"))
extra_context = dict(title=_("All profiles"), type="all")
class OrphanedProfileListView(AdminMixin, SingleTableView):
@ -229,7 +229,7 @@ class OrphanedProfileListView(AdminMixin, SingleTableView):
.order_by("role", "last_name", "first_name")
table_class = UserTable
template_name = "member/profile_list.html"
extra_context = dict(title=_("Orphaned profiles"))
extra_context = dict(title=_("Orphaned profiles"), type="orphaned")
class OrganizersListView(AdminMixin, SingleTableView):
@ -241,7 +241,7 @@ class OrganizersListView(AdminMixin, SingleTableView):
.order_by("role", "last_name", "first_name")
table_class = UserTable
template_name = "member/profile_list.html"
extra_context = dict(title=_("Organizers"))
extra_context = dict(title=_("Organizers"), type="organizers")
class ResetAdminView(AdminMixin, View):

View File

@ -113,14 +113,6 @@
{% endif %}
{% endif %}
{% endif %}
{% if user.admin %}
<li class="nav-item active">
<a class="nav-link" href="{% url "tournament:add" %}"><i class="fas fa-calendar-plus"></i> {% trans "Add a tournament" %}</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="{% url "tournament:add_organizer" %}"><i class="fas fa-user-plus"></i> {% trans "Add an organizer" %}</a>
</li>
{% endif %}
{% if user.organizes %}
<li class="nav-item active">
<a class="nav-link" href="{% url "tournament:all_solutions" %}"><i class="fas fa-lightbulb"></i> {% trans "Solutions" %}</a>

View File

@ -4,6 +4,7 @@
{% block content %}
<form method="post">
{% csrf_token %}
{{ form|crispy }}
<input type="submit" class="btn btn-primary btn-block" value="{% trans "Submit" %}">
</form>

View File

@ -4,4 +4,8 @@
{% block content %}
{% render_table table %}
{% if user.admin %}
<hr>
<a class="btn btn-block btn-secondary" href="{% url "tournament:add_organizer" %}"><i class="fas fa-user-plus"></i> {% trans "Add an organizer" %}</a>
{% endif %}
{% endblock %}

View File

@ -10,4 +10,8 @@
</div>
{% endif %}
{% render_table table %}
{% if type == "organizers" and user.is_authenticated and user.admin %}
<hr>
<a class="btn btn-block btn-secondary" href="{% url "tournament:add" %}"><i class="fas fa-calendar-plus"></i> {% trans "Add a tournament" %}</a>
{% endif %}
{% endblock %}