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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user