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:
2022-10-12 16:26:01 +02:00
parent 729a8f991c
commit 20c9950b7f
9 changed files with 31 additions and 82 deletions

View File

@@ -111,22 +111,3 @@ class EmaTable(BaseTable, TableRenderMixin, TableOrderMixin):
icn_filled=recorded,
)
return format_html(html)
def render_e(self, value, record: Ema):
""" Renders the editable column for a EMA
Args:
value (str): The identifier value
record (Ema): The EMA 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)