[Racket] Ferti hydroponic nutrient solver, redux.
Brand name can be an empty string.
This is not clean, but is required for now because of the (canonical-name, brand-name) database uniqueness constraint.
views.rkt
@@ -286,8 +286,9 @@
286
286
(a ((class "btn btn-danger") [href ,(format "/ferti/fertilizers/~a/destroy" id)])
287
287
"Supprimer")))
288
288
(page-template product-name
289
Removed:
`((h1 ((class "display-1 mb-3")) ,(or brand-name "Intrant générique"))
290
Removed:
(h5 ((class "display-5 mb-3")) ,product-name)
289
Added:
`((h1 ((class "display-1 mb-3")) ,product-name)
290
Added:
(h5 ((class "display-5 mb-3"))
291
Added:
,(if (non-empty-string? brand-name) brand-name "Intrant générique"))
291
292
,button-group
292
293
,table)))
293
294