diff --git a/README.md b/README.md index 1a312d5..b47d119 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ defined competence aspects. * [API documentation](http://dcm.bitplan.com/docs) ### Model -![Class Diagram](http://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/WolfgangFahl/dcm/main/dcm.puml?fmt=svg&version=4) +![Class Diagram](http://www.plantuml.com/plantuml/proxy?src=https://raw.githubusercontent.com/WolfgangFahl/dcm/main/dcm.puml?fmt=svg&version=5) ## Authors * [Wolfgang Fahl](http://www.bitplan.com/Wolfgang_Fahl) diff --git a/dcm.puml b/dcm.puml index fde9d9d..f9e909c 100644 --- a/dcm.puml +++ b/dcm.puml @@ -41,6 +41,7 @@ class dcm.dcm_core.CompetenceFacet { class dcm.dcm_core.CompetenceLevel { level: int icon: str + utf8_icon: str } class dcm.dcm_core.CompetenceTree { diff --git a/dcm/dcm_assessment.py b/dcm/dcm_assessment.py index c7f5670..4b3af3a 100644 --- a/dcm/dcm_assessment.py +++ b/dcm/dcm_assessment.py @@ -51,8 +51,12 @@ def setup_buttons(self): self.buttons = {} with ui.row() as self.row: for level in self.competence_tree.levels: + # generate a button to represent the level + button_label=level.name + if level.utf8_icon: + button_label=f"{level.utf8_icon} {level.name}" button = ui.button( - level.name, + button_label, icon=level.icon, color=level.color_code, on_click=lambda _args, l=level.level: self.handle_selection(l),