mirror of https://gitlab.crans.org/bde/nk20
Tweaked trust back display
This commit is contained in:
parent
6a69590a82
commit
d81b1f2710
|
@ -36,7 +36,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
|
||||
<div class="card bg-light mb-3">
|
||||
<h3 class="card-header text-center">
|
||||
{% trans "People trusting you" %}
|
||||
{% trans "People having you as a friend" %}
|
||||
</h3>
|
||||
{% render_table trusted_by %}
|
||||
</div>
|
||||
|
|
|
@ -183,14 +183,15 @@ class TrustedTable(tables.Table):
|
|||
template_name = "django_tables2/bootstrap4.html"
|
||||
|
||||
show_header = False
|
||||
trusting = tables.Column(attrs={'td': {'class': 'text-center'}})
|
||||
trusting = tables.Column(attrs={
|
||||
'td': {'class': 'text-center', 'width':'100%'}})
|
||||
|
||||
trust_back = tables.Column(
|
||||
verbose_name=_("Trust back"),
|
||||
accessor="pk",
|
||||
attrs={
|
||||
'td': {
|
||||
'class': 'col-sm-1',
|
||||
'class': '',
|
||||
'id': lambda record: "trust_back_" + str(record.pk),
|
||||
}
|
||||
},
|
||||
|
@ -203,10 +204,10 @@ class TrustedTable(tables.Table):
|
|||
return ""
|
||||
val = '<button id="'
|
||||
val += str(record.pk)
|
||||
val += '" class="btn btn-success btn-sm" \
|
||||
val += '" class="btn btn-success btn-sm text-nowrap" \
|
||||
onclick="create_trust(' + str(record.trusted.pk) + ',' + \
|
||||
str(record.trusting.pk) + ')">'
|
||||
val += str(_("Trust back"))
|
||||
val += str(_("Add back"))
|
||||
val += '</button>'
|
||||
return mark_safe(val)
|
||||
|
||||
|
|
Loading…
Reference in New Issue