.
This commit is contained in:
+32
-8
@@ -79,8 +79,15 @@ class CaseTable(tables.Table):
|
||||
class Meta:
|
||||
model = Case
|
||||
template_name = "django_tables2/bootstrap4.html"
|
||||
fields = ("title", "description", "history", "condition", "created_date", "author")
|
||||
sequence = ("view", "series" )
|
||||
fields = (
|
||||
"title",
|
||||
"description",
|
||||
"history",
|
||||
"condition",
|
||||
"created_date",
|
||||
"author",
|
||||
)
|
||||
sequence = ("view", "series")
|
||||
|
||||
|
||||
class PopupLinkColumn(tables.Column):
|
||||
@@ -122,7 +129,14 @@ class SeriesTable(tables.Table):
|
||||
class Meta:
|
||||
model = Series
|
||||
template_name = "django_tables2/bootstrap4.html"
|
||||
fields = ("modality","description", "examination", "plane", "contrast", "author")
|
||||
fields = (
|
||||
"modality",
|
||||
"description",
|
||||
"examination",
|
||||
"plane",
|
||||
"contrast",
|
||||
"author",
|
||||
)
|
||||
sequence = ("view", "popup", "images", "case")
|
||||
|
||||
def render_popup(self, value, record):
|
||||
@@ -132,8 +146,12 @@ class SeriesTable(tables.Table):
|
||||
record.pk,
|
||||
)
|
||||
|
||||
|
||||
class ConditionTable(tables.Table):
|
||||
name = tables.Column(linkify=('atlas:condition_detail', {'pk': tables.A('pk')}), verbose_name="Condition")
|
||||
name = tables.Column(
|
||||
linkify=("atlas:condition_detail", {"pk": tables.A("pk")}),
|
||||
verbose_name="Condition",
|
||||
)
|
||||
|
||||
edit = tables.LinkColumn(
|
||||
"atlas:condition_update", text="Edit", args=[A("pk")], orderable=False
|
||||
@@ -153,12 +171,14 @@ class ConditionTable(tables.Table):
|
||||
fields = ("primary", "subspecialty")
|
||||
sequence = ("name",)
|
||||
|
||||
def render_synonym2(self, value):
|
||||
return value
|
||||
def render_synonym2(self, value, record):
|
||||
return f"{value}, {record.get_synonym()}"
|
||||
|
||||
|
||||
class FindingTable(tables.Table):
|
||||
name = tables.Column(linkify=('atlas:finding_detail', {'pk': tables.A('pk')}), verbose_name="Finding")
|
||||
name = tables.Column(
|
||||
linkify=("atlas:finding_detail", {"pk": tables.A("pk")}), verbose_name="Finding"
|
||||
)
|
||||
edit = tables.LinkColumn(
|
||||
"atlas:finding_update", text="Edit", args=[A("pk")], orderable=False
|
||||
)
|
||||
@@ -176,8 +196,12 @@ class FindingTable(tables.Table):
|
||||
fields = ("name", "primary")
|
||||
sequence = ("name",)
|
||||
|
||||
|
||||
class StructureTable(tables.Table):
|
||||
name = tables.Column(linkify=('atlas:structure_detail', {'pk': tables.A('pk')}), verbose_name="Structure")
|
||||
name = tables.Column(
|
||||
linkify=("atlas:structure_detail", {"pk": tables.A("pk")}),
|
||||
verbose_name="Structure",
|
||||
)
|
||||
edit = tables.LinkColumn(
|
||||
"atlas:structure_update", text="Edit", args=[A("pk")], orderable=False
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user