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 committed 2021-08-24 14:50:51 +02:00
1 parent 2469bde7ee
commit 24a6b7fd37
7 files changed
+126 -95

No files matched your search

+4 -3
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):