.
This commit is contained in:
+47
-2
@@ -1,7 +1,7 @@
|
||||
import django_tables2 as tables
|
||||
from django_tables2.utils import A
|
||||
|
||||
from .models import Case, Condition, Series, Structure, Finding
|
||||
from .models import Case, Condition, PathalogicalProcess, Presentation, Series, Structure, Finding
|
||||
|
||||
from django.utils.html import format_html
|
||||
|
||||
@@ -225,4 +225,49 @@ class StructureTable(tables.Table):
|
||||
sequence = ("name",)
|
||||
|
||||
def render_synonym(self, value, record):
|
||||
return format_html(record.get_synonym_link())
|
||||
return format_html(record.get_synonym_link())
|
||||
|
||||
class PresentationTable(tables.Table):
|
||||
name = tables.Column(
|
||||
linkify=("atlas:condition_detail", {"pk": tables.A("pk")}),
|
||||
verbose_name="Presentation",
|
||||
)
|
||||
|
||||
edit = tables.LinkColumn(
|
||||
"atlas:condition_update", text="Edit", args=[A("pk")], orderable=False
|
||||
)
|
||||
delete = tables.LinkColumn(
|
||||
"atlas:condition_delete", text="Delete", args=[A("pk")], orderable=False
|
||||
)
|
||||
selection = tables.CheckBoxColumn(accessor="pk", orderable=False)
|
||||
|
||||
subspecialty = tables.ManyToManyColumn(verbose_name="Parents")
|
||||
|
||||
class Meta:
|
||||
model = Presentation
|
||||
template_name = "django_tables2/bootstrap4.html"
|
||||
fields = ()
|
||||
sequence = ("name",)
|
||||
|
||||
|
||||
class PathologicalProcessTable(tables.Table):
|
||||
name = tables.Column(
|
||||
linkify=("atlas:condition_detail", {"pk": tables.A("pk")}),
|
||||
verbose_name="PathologicalProcess",
|
||||
)
|
||||
|
||||
edit = tables.LinkColumn(
|
||||
"atlas:condition_update", text="Edit", args=[A("pk")], orderable=False
|
||||
)
|
||||
delete = tables.LinkColumn(
|
||||
"atlas:condition_delete", text="Delete", args=[A("pk")], orderable=False
|
||||
)
|
||||
selection = tables.CheckBoxColumn(accessor="pk", orderable=False)
|
||||
|
||||
subspecialty = tables.ManyToManyColumn(verbose_name="Parents")
|
||||
|
||||
class Meta:
|
||||
model = PathalogicalProcess
|
||||
template_name = "django_tables2/bootstrap4.html"
|
||||
fields = ()
|
||||
sequence = ("name",)
|
||||
Reference in New Issue
Block a user