.
This commit is contained in:
@@ -9,6 +9,7 @@ from .models import (
|
||||
Series,
|
||||
Structure,
|
||||
Finding,
|
||||
Subspecialty,
|
||||
)
|
||||
|
||||
from django.utils.html import format_html
|
||||
@@ -279,3 +280,27 @@ class PathologicalProcessTable(tables.Table):
|
||||
template_name = "django_tables2/bootstrap4.html"
|
||||
fields = ("name",)
|
||||
sequence = ("name",)
|
||||
|
||||
class SubspecialtyTable(tables.Table):
|
||||
name = tables.Column(
|
||||
linkify=("atlas:subspecialty_detail", {"pk": tables.A("pk")}),
|
||||
verbose_name="Subspecialty",
|
||||
)
|
||||
|
||||
#edit = tables.LinkColumn(
|
||||
# "atlas:subspecialty_update", text="Edit", args=[A("pk")], orderable=False
|
||||
#)
|
||||
#delete = tables.LinkColumn(
|
||||
# "atlas:subspecialty_delete", text="Delete", args=[A("pk")], orderable=False
|
||||
#)
|
||||
selection = tables.CheckBoxColumn(accessor="pk", orderable=False)
|
||||
|
||||
class Meta:
|
||||
model = Subspecialty
|
||||
template_name = "django_tables2/bootstrap4.html"
|
||||
fields = ("primary", "subspecialty")
|
||||
sequence = ("name",)
|
||||
|
||||
def render_synonym(self, value, record):
|
||||
return format_html(record.get_synonym_link())
|
||||
return f"{record.get_synonym_link()}"
|
||||
|
||||
Reference in New Issue
Block a user