summaryrefslogtreecommitdiff
path: root/views.rkt
diff options
context:
space:
mode:
Diffstat (limited to 'views.rkt')
-rw-r--r--views.rkt17
1 files changed, 10 insertions, 7 deletions
diff --git a/views.rkt b/views.rkt
index b4292c1..0258157 100644
--- a/views.rkt
+++ b/views.rkt
@@ -226,12 +226,15 @@
(define nutrient-value (hash-ref (nutrient-measurement-values nm) n 0))
`(tr (td ,(nutrient-french-name n))
(td ((class "text-end font-monospace")) ,(round 2 nutrient-value)))))))
- (page-template title
- `((h1 ((class "display-1 mb-3")) ,title)
- (a ((class "btn btn-danger")
- [href ,(format "/ferti/measurements/destroy/~a" (nutrient-measurement-id nm))])
- "Supprimer relevé")
- ,table)))
+ (define button-group
+ `(div ((class "btn-group"))
+ (a ((class "btn btn-primary")
+ [href ,(format "/ferti/measurements/~a/edit" (nutrient-measurement-id nm))])
+ "Modifier relevé")
+ (a ((class "btn btn-danger")
+ [href ,(format "/ferti/measurements/~a/destroy" (nutrient-measurement-id nm))])
+ "Supprimer relevé")))
+ (page-template title `((h1 ((class "display-1 mb-3")) ,title) ,button-group ,table)))
(define (show-rotation-page cr)
(define title (format "Assolement du ~a" (normal-date (crop-rotation-date cr))))
@@ -247,7 +250,7 @@
(page-template title
`((h1 ((class "display-1 mb-3")) ,title)
(a ((class "btn btn-danger")
- [href ,(format "/ferti/rotations/destroy/~a" (crop-rotation-id cr))])
+ [href ,(format "/ferti/rotations/~a/destroy" (crop-rotation-id cr))])
"Supprimer assolement")
,table)))
Copyright 2019--2026 Marius PETER