1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-11-26 18:37:12 +00:00

Template formating on member app

This commit is contained in:
Alexandre Iooss 2020-08-23 14:21:31 +02:00
parent c64de202a6
commit e14c8734c2
6 changed files with 76 additions and 63 deletions

View File

@ -2,6 +2,7 @@
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% block contenttitle %}{% endblock %}
{# Use a fluid-width container #}
{% block containertype %}container-fluid{% endblock %}

View File

@ -1,8 +1,9 @@
{% load i18n static pretty_money perms %}
<div class="card bg-light shadow">
<div class="card-header text-center">
<h4> Club {{ club.name }} </h4>
</div>
{% load i18n pretty_money perms %}
<div class="card bg-light">
<h4 class="card-header text-center">
Club {{ club.name }}
</h4>
<div class="card-top text-center">
<a href="{% url 'member:club_update_pic' club.pk %}">
<img src="{{ club.note.display_image.url }}" class="img-thumbnail mt-2">
@ -14,7 +15,9 @@
<dd class="col-xl-6">{{ club.name }}</dd>
{% if club.parent_club %}
<dt class="col-xl-6"><a href="{% url 'member:club_detail' club.parent_club.pk %}">{% trans 'Club Parent'|capfirst %}</a></dt>
<dt class="col-xl-6">
<a href="{% url 'member:club_detail' club.parent_club.pk %}">{% trans 'Club Parent'|capfirst %}</a>
</dt>
<dd class="col-xl-6"> {{ club.parent_club.name }}</dd>
{% endif %}
@ -61,10 +64,12 @@
{% if not club.weiclub %}
<div class="card-footer text-center">
{% if can_add_members %}
<a class="btn btn-primary btn-sm my-1" href="{% url 'member:club_add_member' club_pk=club.pk %}" data-turbolinks="false"> {% trans "Add member" %}</a>
<a class="btn btn-primary btn-sm my-1" href="{% url 'member:club_add_member' club_pk=club.pk %}"
data-turbolinks="false"> {% trans "Add member" %}</a>
{% endif %}
{% if ".change_"|has_perm:club %}
<a class="btn btn-primary btn-sm my-1" href="{% url 'member:club_update' pk=club.pk %}" data-turbolinks="false"> {% trans "Edit" %}</a>
<a class="btn btn-primary btn-sm my-1" href="{% url 'member:club_update' pk=club.pk %}" data-turbolinks="false">
{% trans "Edit" %}</a>
{% endif %}
{% url 'member:club_detail' club.pk as club_detail_url %}
{%if request.path_info != club_detail_url %}

View File

@ -1,5 +1,4 @@
{% extends "member/club_detail.html" %}
{% load i18n static pretty_money django_tables2 crispy_forms_tags %}
{% block profile_content%}
{% include "member/picture_update.html" %}

View File

@ -1,9 +1,9 @@
{% load i18n pretty_money perms %}
<div class="card bg-light shadow">
<div class="card-header text-center">
<h4>{% trans "Account #" %}{{ user_object.pk }}</h4>
</div>
<div class="card bg-light">
<h4 class="card-header text-center">
{% trans "Account #" %}{{ user_object.pk }}
</h4>
<div class="card-top text-center">
<a href="{% url 'member:user_update_pic' user_object.pk %}">
<img src="{{ user_object.note.display_image.url }}" class="img-thumbnail mt-2">
@ -52,7 +52,6 @@
{% for alias in user_object.note.alias_set.all %}
<span class="badge badge-secondary">{{ alias }}</span>
{% endfor %}
</div>
<div class="card-footer">
<a class="btn btn-sm btn-secondary" href="{% url 'member:user_update_profile' user_object.pk %}">
@ -66,5 +65,7 @@
</div>
{% if user_object.pk == user_object.pk %}
<a class="small float-right text-decoration-none" href="{% url 'member:auth_token' %}">{% trans 'Manage auth token' %}</a>
<a class="small float-right text-decoration-none" href="{% url 'member:auth_token' %}">
{% trans 'Manage auth token' %}
</a>
{% endif %}

View File

@ -1,5 +1,4 @@
{% extends "member/profile_detail.html" %}
{% load i18n static pretty_money django_tables2 crispy_forms_tags %}
{% block profile_content%}
{% include "member/picture_update.html" %}

View File

@ -3,8 +3,14 @@
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% block contenttitle %}{% endblock %}
{% block content %}
<div class="card bg-light">
<h3 class="card-header text-center">
{{ title }}
</h3>
<div class="card-body">
<form method="post">
{% csrf_token %}
{{ form | crispy }}
@ -13,4 +19,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
{% trans "Save Changes" %}
</button>
</form>
</div>
</div>
{% endblock %}