Table improvements
* enhances visualization of editable column on tables
* simplifies code
* enhances visualization of parcel_group column on tables
* WIP: Ordering on intervention table is odd. Same results are being displayed on page 2. Needs further analysis and fixing!
This commit is contained in:
@@ -146,22 +146,3 @@ class InterventionTable(BaseTable, TableRenderMixin, TableOrderMixin):
|
||||
)
|
||||
return format_html(html)
|
||||
|
||||
def render_e(self, value, record: Intervention):
|
||||
""" Renders the editable column for an intervention
|
||||
|
||||
Args:
|
||||
value (str): The identifier value
|
||||
record (Intervention): The intervention record
|
||||
|
||||
Returns:
|
||||
|
||||
"""
|
||||
html = ""
|
||||
has_access = record.is_shared_with(self.user)
|
||||
|
||||
html += self.render_icn(
|
||||
tooltip=_("Full access granted") if has_access else _("Access not granted"),
|
||||
icn_class="fas fa-edit rlp-r-inv" if has_access else "far fa-edit",
|
||||
)
|
||||
return format_html(html)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user