Table filters
* adds table filtering for InterventionTable * adds default ordering * moves user-access filtering from view to InterventionTableFiler * adds generic render_icn method for BaseTable (for usage with fontawesome5) * adds translations * improves table.html template
This commit is contained in:
@@ -37,6 +37,10 @@ Declare some basic colours
|
||||
color:var(--rlp-red);
|
||||
}
|
||||
|
||||
.rlp-r-inv{
|
||||
color:var(--rlp-red);
|
||||
}
|
||||
|
||||
html {
|
||||
position: relative;
|
||||
min-height: 100%;
|
||||
|
||||
@@ -126,6 +126,16 @@ class BaseTable(tables.tables.Table):
|
||||
icon
|
||||
)
|
||||
|
||||
def render_icn(self, tooltip: str = None, icn_class: str = None):
|
||||
"""
|
||||
Returns a rendered fontawesome icon
|
||||
"""
|
||||
return format_html(
|
||||
"<em title='{}' class='{}'></em>",
|
||||
tooltip,
|
||||
icn_class,
|
||||
)
|
||||
|
||||
|
||||
class ChoicesColumnForm(BaseForm):
|
||||
select = forms.ChoiceField(
|
||||
|
||||
Reference in New Issue
Block a user