mirror of https://gitlab.crans.org/bde/nk20
Smaller membership renew btn
This commit is contained in:
parent
e3785e11f1
commit
1fd37bb1ce
|
@ -96,8 +96,8 @@ class MembershipTable(tables.Table):
|
||||||
t = pretty_money(value)
|
t = pretty_money(value)
|
||||||
|
|
||||||
# If it is required and if the user has the right, the renew button is displayed.
|
# If it is required and if the user has the right, the renew button is displayed.
|
||||||
if record.club.membership_start is not None:
|
if record.club.membership_start is not None \
|
||||||
if record.date_start < record.club.membership_start: # If the renew is available
|
and record.date_start < record.club.membership_start:
|
||||||
if not Membership.objects.filter(
|
if not Membership.objects.filter(
|
||||||
club=record.club,
|
club=record.club,
|
||||||
user=record.user,
|
user=record.user,
|
||||||
|
@ -113,9 +113,13 @@ class MembershipTable(tables.Table):
|
||||||
)
|
)
|
||||||
if PermissionBackend.check_perm(get_current_authenticated_user(),
|
if PermissionBackend.check_perm(get_current_authenticated_user(),
|
||||||
"member:add_membership", empty_membership): # If the user has right
|
"member:add_membership", empty_membership): # If the user has right
|
||||||
t = format_html(t + ' <a class="btn btn-warning" href="{url}">{text}</a>',
|
renew_url = reverse_lazy('member:club_renew_membership',
|
||||||
url=reverse_lazy('member:club_renew_membership',
|
kwargs={"pk": record.pk})
|
||||||
kwargs={"pk": record.pk}), text=_("Renew"))
|
t = format_html(
|
||||||
|
t + ' <a class="btn btn-sm btn-warning" title="{text}"'
|
||||||
|
' href="{renew_url}"><i class="fa fa-repeat"></i></a>',
|
||||||
|
renew_url=renew_url, text=_("Renew")
|
||||||
|
)
|
||||||
return t
|
return t
|
||||||
|
|
||||||
def render_roles(self, record):
|
def render_roles(self, record):
|
||||||
|
|
|
@ -26,7 +26,8 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
<div class="card bg-light">
|
<div class="card bg-light">
|
||||||
<div class="card-header position-relative" id="historyListHeading">
|
<div class="card-header position-relative" id="historyListHeading">
|
||||||
<a class="stretched-link font-weight-bold text-decoration-none" {% if "note.view_note"|has_perm:user_object.note %}
|
<a class="stretched-link font-weight-bold text-decoration-none"
|
||||||
|
{% if "note.view_note"|has_perm:user_object.note %}
|
||||||
href="{% url 'note:transactions' pk=user_object.note.pk %}" {% endif %}>
|
href="{% url 'note:transactions' pk=user_object.note.pk %}" {% endif %}>
|
||||||
<i class="fa fa-euro"></i> {% trans "Transaction history" %}
|
<i class="fa fa-euro"></i> {% trans "Transaction history" %}
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in New Issue