Refactor table row selection logic and remove associated CSS styles for improved clarity and maintainability
This commit is contained in:
+3
-3
@@ -1,7 +1,7 @@
|
||||
import django_tables2 as tables
|
||||
from django_tables2.utils import A
|
||||
|
||||
from generic.tables import SeriesImageColumn
|
||||
from generic.tables import SeriesImageColumn, SelectionTable
|
||||
|
||||
from .models import (
|
||||
Case,
|
||||
@@ -25,7 +25,7 @@ from easy_thumbnails.exceptions import InvalidImageFormatError
|
||||
from django.db.models import Prefetch
|
||||
|
||||
|
||||
class CaseTable(tables.Table):
|
||||
class CaseTable(SelectionTable):
|
||||
def __init__(self, data=None, *args, **kwargs):
|
||||
# Optimize prefetching for casecollection_set
|
||||
#case_collections_prefetch = Prefetch(
|
||||
@@ -190,7 +190,7 @@ class CaseTable(tables.Table):
|
||||
)
|
||||
sequence = ("view", )
|
||||
order_by = "-created_date"
|
||||
attrs = {"class": "table row-selector"}
|
||||
attrs = {"class": "table"}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user