From d81b1f2710f719795c0951359ae2fc0acae48d6f Mon Sep 17 00:00:00 2001
From: Nicolas Margulies <nicomarg@crans.org>
Date: Wed, 28 Sep 2022 10:28:47 +0200
Subject: [PATCH] Tweaked trust back display

---
 apps/member/templates/member/profile_trust.html | 2 +-
 apps/note/tables.py                             | 9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/apps/member/templates/member/profile_trust.html b/apps/member/templates/member/profile_trust.html
index 5a65462e..b89f05f6 100644
--- a/apps/member/templates/member/profile_trust.html
+++ b/apps/member/templates/member/profile_trust.html
@@ -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>
diff --git a/apps/note/tables.py b/apps/note/tables.py
index 3e6e4f0a..0a0fd4ed 100644
--- a/apps/note/tables.py
+++ b/apps/note/tables.py
@@ -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)
 
-- 
GitLab