utf-8 shenanigans

integration-tests
Josha von Gizycki 6 years ago
parent e19376ad03
commit 144a071d85

@ -1,6 +1,7 @@
(ns wanijo.framework.view
(:require [hiccup.page :refer
[html5 include-css include-js]]
[hiccup.form :as hform]
[wanijo.framework.routing :refer [path]]))
(defn btnlink
@ -11,6 +12,10 @@
[:button {:class clss}
caption]]))
(defn delete-btn []
(hform/submit-button {:class "delete-btn"}
"☒ Delete!"))
(defn layout!
[& {:keys [content title session]
:or {content []
@ -39,7 +44,7 @@
(when authed?
[:section.header-content
(btnlink (path :schema-overview)
"Schemas"
"Schemas"
"header-content__link")
(btnlink (path :auth-logout)
"Logout!"
@ -47,11 +52,11 @@
[:nav
(when authed?
[:section.schemas
[:h2 "Created Schemas"]
[:h2 "Created Schemas"]
[:ul
(for [schema (:created-schemas session)]
[:li (:name schema)])]
[:h2 "Other Schemas"]
[:h2 "Other Schemas"]
[:ul
(for [schema (:other-schemas session)]
[:li (:name schema)])]])]

@ -62,7 +62,6 @@
(hform/submit-button "Create"))])))
(defn show-schema! [schema attrs access-form req]
(println access-form)
(view/layout!
:session (:session req)
:content
@ -73,7 +72,7 @@
(form/render-widgets form schema req)
(hform/hidden-field "uuid" (:uuid schema))
(hform/submit-button "Edit"))
[:h2 "Assign to users"]
[:h3 "Assign to users"]
(hform/form-to [:post (path :schema-assign)]
(form/render-widgets access-form schema req)
(hform/hidden-field "uuid" (:uuid schema))
@ -100,4 +99,4 @@
(hform/form-to {:class "inline"}
[:delete (path :schema-delete schema)]
(anti-forgery-field)
(hform/submit-button {:class "delete-btn"} "Delete!"))]))
(view/delete-btn))]))

Loading…
Cancel
Save