.
This commit is contained in:
+11
-3
@@ -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
|
||||
|
||||
@@ -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")}),
|
||||
@@ -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