Josha von Gizycki 5 years ago
parent 26cb212462
commit daa8d11c4d

@ -81,6 +81,16 @@ body {
padding-left: 2rem;
}
.content {
grid-column: 2;
}
.breadcrumb {
margin-left: 4vw;
margin-right: 4vw;
margin-top: 1.5rem;
}
.landing-container, .main {
grid-column: 2;
padding: 3rem;

@ -24,3 +24,13 @@
(neo4j/exec-query! roles-of-coc
{:coc_uuid (get coc-instance-uuids coc-key)
:roleschema_uuid (:role schema-uuids)})))
(neo4j/defquery coc
"MATCH (coc:instance {uuid:{uuid}})
RETURN coc")
(defn coc! [coc-key]
(-> (neo4j/exec-query! coc
{:uuid (get coc-instance-uuids coc-key)})
first
:coc
(assoc :key coc-key)))

@ -7,10 +7,10 @@
(defn index []
(view-public/index))
(defn show-coc [coc]
(view-public/show-coc coc
(db-public/roles-of-coc! coc)))
(defn show-roles [coc-key]
(view-public/show-coc (db-public/coc! coc-key)
(db-public/roles-of-coc! coc-key)))
(defroutes routes
(GET (register! :public-index "/public") [] (index))
(GET (register! :public-coc "/public/:coc") [coc] (show-coc coc)))
(GET (register! :public-coc "/public/:coc") [coc] (show-roles coc)))

@ -38,7 +38,7 @@
[:li.global-nav__card-nav-item
[:a.global-nav__link {:href (path :public-coc {:coc "req"})}
"Req. Eng."]]]]
(into [:main.main] content)]]))
(into [:div.content] content)]]))
(defn index []
(layout
@ -52,7 +52,8 @@
(defn show-coc [coc roles]
(layout
[[:h1 "CoC " coc]
[[:main.main
[:h1 "CoC " (h (:name coc))]
[:table.table
[:thead
[:tr
@ -60,4 +61,7 @@
[:tbody
(for [role roles]
[:tr
[:td (h (:name role))]])]]]))
[:td (h (:name role))]])]]]
[:nav
[:ol.breadcrumb
[:li.breadcrumb-item.active (h (:name coc))]]]]))

Loading…
Cancel
Save