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