This commit is contained in:
Ross
2021-12-05 18:47:00 +00:00
parent bdaf5fc151
commit 088369e0a5
5 changed files with 85 additions and 8 deletions
+26 -1
View File
@@ -133,8 +133,11 @@ class SeriesTable(tables.Table):
)
class ConditionTable(tables.Table):
#edit = tables.LinkColumn(
# "atlas:condition_update", text="Edit", args=[A("pk")], orderable=False
#)
edit = tables.LinkColumn(
"atlas:condition_update", text="Edit", args=[A("pk")], orderable=False
"atlas:condition_update", text=A("name"), args=[A("pk")], orderable=False
)
view = tables.LinkColumn(
"atlas:condition_detail", text="View", args=[A("pk")], orderable=False
@@ -152,3 +155,25 @@ class ConditionTable(tables.Table):
template_name = "django_tables2/bootstrap4.html"
fields = ("name", "primary", "subspecialty")
sequence = ()
class FindingTable(tables.Table):
edit = tables.LinkColumn(
"atlas:finding_update", text="Edit", args=[A("pk")], orderable=False
)
view = tables.LinkColumn(
"atlas:finding_detail", text="View", args=[A("pk")], orderable=False
)
delete = tables.LinkColumn(
"atlas:finding_delete", text="Delete", args=[A("pk")], orderable=False
)
selection = tables.CheckBoxColumn(accessor="pk", orderable=False)
synonym = tables.ManyToManyColumn(verbose_name="Synonyms")
parent = tables.ManyToManyColumn(verbose_name="Parents")
class Meta:
model = Finding
template_name = "django_tables2/bootstrap4.html"
fields = ("name", "primary", "subspecialty")
sequence = ()