Konova code improvements

* improves rendering of codes as string (short names will be used if existing)
* reduces selectable konova codes to leafs (as discussed with experts)
* automatically resizes the width of modal form fields to w-100
* adds/updates translations
This commit is contained in:
mipel
2021-08-24 14:50:51 +02:00
parent 06d74f8ccb
commit 9b2aaaa5fa
7 changed files with 126 additions and 95 deletions

View File

@@ -40,9 +40,10 @@ class KonovaCode(models.Model):
)
def __str__(self):
if self.is_leaf and self.parent:
return "{} > {}".format(self.parent.long_name, self.long_name)
return self.long_name
if self.short_name:
return "{} ({})".format(self.long_name, self.short_name)
else:
return self.long_name
class KonovaCodeList(models.Model):