.
This commit is contained in:
+14
-6
@@ -1,7 +1,15 @@
|
||||
import django_tables2 as tables
|
||||
from django_tables2.utils import A
|
||||
|
||||
from .models import Case, Condition, PathalogicalProcess, Presentation, Series, Structure, Finding
|
||||
from .models import (
|
||||
Case,
|
||||
Condition,
|
||||
PathalogicalProcess,
|
||||
Presentation,
|
||||
Series,
|
||||
Structure,
|
||||
Finding,
|
||||
)
|
||||
|
||||
from django.utils.html import format_html
|
||||
|
||||
@@ -161,7 +169,7 @@ class ConditionTable(tables.Table):
|
||||
)
|
||||
selection = tables.CheckBoxColumn(accessor="pk", orderable=False)
|
||||
|
||||
#synonym = tables.ManyToManyColumn(verbose_name="Synonyms")
|
||||
# synonym = tables.ManyToManyColumn(verbose_name="Synonyms")
|
||||
synonym = tables.Column(empty_values=())
|
||||
parent = tables.ManyToManyColumn(verbose_name="Parents")
|
||||
|
||||
@@ -188,7 +196,7 @@ class FindingTable(tables.Table):
|
||||
)
|
||||
selection = tables.CheckBoxColumn(accessor="pk", orderable=False)
|
||||
|
||||
#synonym = tables.ManyToManyColumn(verbose_name="Synonyms")
|
||||
# synonym = tables.ManyToManyColumn(verbose_name="Synonyms")
|
||||
synonym = tables.Column(empty_values=())
|
||||
parent = tables.ManyToManyColumn(verbose_name="Parents")
|
||||
|
||||
@@ -201,6 +209,7 @@ class FindingTable(tables.Table):
|
||||
def render_synonym(self, value, record):
|
||||
return format_html(record.get_synonym_link())
|
||||
|
||||
|
||||
class StructureTable(tables.Table):
|
||||
name = tables.Column(
|
||||
linkify=("atlas:structure_detail", {"pk": tables.A("pk")}),
|
||||
@@ -214,7 +223,7 @@ class StructureTable(tables.Table):
|
||||
)
|
||||
selection = tables.CheckBoxColumn(accessor="pk", orderable=False)
|
||||
|
||||
#synonym = tables.ManyToManyColumn(verbose_name="Synonyms")
|
||||
# synonym = tables.ManyToManyColumn(verbose_name="Synonyms")
|
||||
synonym = tables.Column(empty_values=())
|
||||
parent = tables.ManyToManyColumn(verbose_name="Parents")
|
||||
|
||||
@@ -227,6 +236,7 @@ class StructureTable(tables.Table):
|
||||
def render_synonym(self, value, record):
|
||||
return format_html(record.get_synonym_link())
|
||||
|
||||
|
||||
class PresentationTable(tables.Table):
|
||||
name = tables.Column(
|
||||
linkify=("atlas:condition_detail", {"pk": tables.A("pk")}),
|
||||
@@ -264,8 +274,6 @@ class PathologicalProcessTable(tables.Table):
|
||||
)
|
||||
selection = tables.CheckBoxColumn(accessor="pk", orderable=False)
|
||||
|
||||
subspecialty = tables.ManyToManyColumn(verbose_name="Parents")
|
||||
|
||||
class Meta:
|
||||
model = PathalogicalProcess
|
||||
template_name = "django_tables2/bootstrap4.html"
|
||||
|
||||
Reference in New Issue
Block a user