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