Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apis_ontology/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class Meta:
"place",
"label",
"alternative_names",
"tibetan_transliteration",
"start",
"latitude",
"longitude",
Expand All @@ -51,6 +52,7 @@ class PersonForm(TibscholEntityForm):
field_order = [
"name",
"alternative_names",
"tibetan_transliteration",
"start",
"end",
"gender",
Expand All @@ -66,6 +68,7 @@ class WorkForm(TibscholEntityForm):
field_order = [
"name",
"alternative_names",
"tibetan_transliteration",
"original_language",
"subject_vocab",
"start",
Expand All @@ -82,6 +85,7 @@ class InstanceForm(TibscholEntityForm):
field_order = [
"name",
"alternative_names",
"tibetan_transliteration",
"start",
"availability",
"tibschol_ref",
Expand Down
6 changes: 2 additions & 4 deletions apis_ontology/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from django.utils.safestring import mark_safe
from django.utils.html import format_html
import re
from .templatetags.entity_display import display_entity_name
from django.db.models import OuterRef, Subquery
from django.db.models import Value
from django.db.models.functions import Coalesce
Expand Down Expand Up @@ -78,7 +79,7 @@ def render_comments(self, value):
)

def render_name(self, record):
return str(record)
return display_entity_name(record, getattr(self, 'request', None))

def value_name(self, record):
return getattr(record, "label", getattr(record, "name", ""))
Expand Down Expand Up @@ -218,9 +219,6 @@ class Meta(TibscholEntityMixinTable.Meta):
fields = ["name"]
# exclude = ["id", "desc", "view", "edit", "noduplicate", "delete"]

def render_name(self, record):
return str(record)

export_lifedate_start = tables.Column(
accessor="start", verbose_name="Life date start", visible=False
)
Expand Down