@@ -15,8 +15,7 @@ import styled.*
1515import utils.Language
1616
1717external interface FooterProps : Props {
18- var language: Language // TODO
19- var polyglot: Polyglot // TODO
18+
2019}
2120
2221class FooterState : State {
@@ -39,67 +38,70 @@ class Footer : RComponent<FooterProps, FooterState>() {
3938 }
4039
4140 override fun RBuilder.render () {
42- styledFooter {
43- css {
44- + FooterStyle .footerContainer
45- }
46- styledDiv {
41+ context.LocalizationContext .Consumer { localizationContext ->
42+ val polyglot = localizationContext?.polyglot ? : Polyglot ()
43+ styledFooter {
4744 css {
48- + FooterStyle .footerColumn
45+ + FooterStyle .footerContainer
4946 }
50- styledSpan {
47+ styledDiv {
5148 css {
52- + FooterStyle .footerTitleLarge
49+ + FooterStyle .footerColumn
50+ }
51+ styledSpan {
52+ css {
53+ + FooterStyle .footerTitleLarge
54+ }
55+ + " validator-wrapper"
56+ }
57+ styledSpan {
58+ css {
59+ + FooterStyle .footerTitleSmall
60+ }
61+ + state.validatorWrapperVersion
62+ }
63+ styledSpan {
64+ css {
65+ + FooterStyle .footerTitleSmall
66+ }
67+ + (polyglot.t(" footer_running_version" ) + state.validatorVersion)
5368 }
54- + " validator-wrapper"
5569 }
56- styledSpan {
70+ styledDiv {
5771 css {
58- + FooterStyle .footerTitleSmall
72+ + FooterStyle .footerColumn
73+ }
74+ footerLineItem {
75+ href = " https://github.com/hapifhir/org.hl7.fhir.validator-wrapper"
76+ icon = " images/github_white.png"
77+ label = polyglot.t(" footer_github" )
78+ }
79+ footerLineItem {
80+ href = " https://github.com/hapifhir/org.hl7.fhir.validator-wrapper/issues/new/choose"
81+ icon = " images/bug_report_white.png"
82+ label = polyglot.t(" footer_create_issue" )
83+ }
84+ footerLineItem {
85+ href =
86+ " https://github.com/hapifhir/org.hl7.fhir.validator-wrapper/releases/latest/download/validator-wrapper.jar"
87+ icon = " images/download_white.png"
88+ label = polyglot.t(" footer_download_app" )
5989 }
60- + state.validatorWrapperVersion
6190 }
62- styledSpan {
91+ styledDiv {
6392 css {
64- + FooterStyle .footerTitleSmall
93+ + FooterStyle .footerColumn
94+ }
95+ footerLineItem {
96+ href = " https://confluence.hl7.org/display/FHIR/Using+the+FHIR+Validator"
97+ icon = " images/documentation_white.png"
98+ label = polyglot.t(" footer_doc" )
99+ }
100+ footerLineItem {
101+ href = " ../swagger-ui/index.html"
102+ icon = " images/documentation_white.png"
103+ label = polyglot.t(" footer_openapi" )
65104 }
66- + (props.polyglot.t(" footer_running_version" ) + state.validatorVersion)
67- }
68- }
69- styledDiv {
70- css {
71- + FooterStyle .footerColumn
72- }
73- footerLineItem {
74- href = " https://github.com/hapifhir/org.hl7.fhir.validator-wrapper"
75- icon = " images/github_white.png"
76- label = props.polyglot.t(" footer_github" )
77- }
78- footerLineItem {
79- href = " https://github.com/hapifhir/org.hl7.fhir.validator-wrapper/issues/new/choose"
80- icon = " images/bug_report_white.png"
81- label = props.polyglot.t(" footer_create_issue" )
82- }
83- footerLineItem {
84- href =
85- " https://github.com/hapifhir/org.hl7.fhir.validator-wrapper/releases/latest/download/validator-wrapper.jar"
86- icon = " images/download_white.png"
87- label = props.polyglot.t(" footer_download_app" )
88- }
89- }
90- styledDiv {
91- css {
92- + FooterStyle .footerColumn
93- }
94- footerLineItem {
95- href = " https://confluence.hl7.org/display/FHIR/Using+the+FHIR+Validator"
96- icon = " images/documentation_white.png"
97- label = props.polyglot.t(" footer_doc" )
98- }
99- footerLineItem {
100- href = " ../swagger-ui/index.html"
101- icon = " images/documentation_white.png"
102- label = props.polyglot.t(" footer_openapi" )
103105 }
104106 }
105107 }
0 commit comments