|
|
|
@ -3,16 +3,27 @@
|
|
|
|
|
[hiccup.core :refer [h]]
|
|
|
|
|
[wanijo.infrastructure.routing :refer [path]]))
|
|
|
|
|
|
|
|
|
|
(defn layout [content]
|
|
|
|
|
(defn breadcrumb [& links]
|
|
|
|
|
[:nav
|
|
|
|
|
[:ol.breadcrumb
|
|
|
|
|
(into
|
|
|
|
|
[:li.breadcrumb-item
|
|
|
|
|
[:a {:href (path :public-index)}
|
|
|
|
|
[:img {:src "/img/klammer.svg"}]
|
|
|
|
|
"Start"]]
|
|
|
|
|
links)]])
|
|
|
|
|
|
|
|
|
|
(defn layout [title content]
|
|
|
|
|
(html5
|
|
|
|
|
[:head
|
|
|
|
|
[:meta {:charset "utf-8"}]
|
|
|
|
|
[:meta {:name "viewport"
|
|
|
|
|
:content "width=device-width,initial-scale=1,shrink-to-fit=no"}]
|
|
|
|
|
[:title "Moxie!"]
|
|
|
|
|
[:title title " - Moxie!"]
|
|
|
|
|
(include-css "/css/bootstrap.min.css"
|
|
|
|
|
"/css/public.css")
|
|
|
|
|
(include-js "/js/bootstrap.min.js")]
|
|
|
|
|
(include-js "/js/bootstrap.min.js"
|
|
|
|
|
"/js/scripts.js")]
|
|
|
|
|
[:body
|
|
|
|
|
[:nav.navbar.navbar-expand-lg.sticky-top
|
|
|
|
|
[:a.navbar-brand {:href (path :public-index)}
|
|
|
|
@ -30,18 +41,19 @@
|
|
|
|
|
[:menu.global-nav
|
|
|
|
|
[:ol.global-nav__card-nav
|
|
|
|
|
[:li.global-nav__card-nav-item
|
|
|
|
|
[:a.global-nav__link {:href (path :public-coc-roles {:coc "dev"})}
|
|
|
|
|
[:a.global-nav__link {:href (path :public-coc {:coc "dev"})}
|
|
|
|
|
"Development"]]
|
|
|
|
|
[:li.global-nav__card-nav-item
|
|
|
|
|
[:a.global-nav__link {:href (path :public-coc-roles {:coc "prk"})}
|
|
|
|
|
[:a.global-nav__link {:href (path :public-coc {:coc "prk"})}
|
|
|
|
|
"Projekte"]]
|
|
|
|
|
[:li.global-nav__card-nav-item
|
|
|
|
|
[:a.global-nav__link {:href (path :public-coc-roles {:coc "req"})}
|
|
|
|
|
[:a.global-nav__link {:href (path :public-coc {:coc "req"})}
|
|
|
|
|
"Req. Eng."]]]]
|
|
|
|
|
(into [:div.content] content)]]))
|
|
|
|
|
|
|
|
|
|
(defn index []
|
|
|
|
|
(layout
|
|
|
|
|
"Index"
|
|
|
|
|
[[:main.main
|
|
|
|
|
[:h1 "Schön, dass du da bist!"]
|
|
|
|
|
[:h2 "Willkommen auf der TRIO-Wissensplattform"]
|
|
|
|
@ -53,10 +65,11 @@
|
|
|
|
|
|
|
|
|
|
(defn show-coc [coc roles-with-levels]
|
|
|
|
|
(layout
|
|
|
|
|
(h (:name coc))
|
|
|
|
|
[[:main.main
|
|
|
|
|
[:h1 "CoC " (h (:name coc))]
|
|
|
|
|
[:div.table-responsive
|
|
|
|
|
[:table.table
|
|
|
|
|
[:table.table.no-sort
|
|
|
|
|
[:thead
|
|
|
|
|
[:tr
|
|
|
|
|
[:th "Rolle"]
|
|
|
|
@ -68,30 +81,31 @@
|
|
|
|
|
(list
|
|
|
|
|
[:tr
|
|
|
|
|
[:td {:rowspan (max 1 (count levels))}
|
|
|
|
|
(h (:name role))]
|
|
|
|
|
[:a {:href (path :public-role
|
|
|
|
|
{:coc (:key coc)
|
|
|
|
|
:role (:uuid role)})}
|
|
|
|
|
(h (:name role))]]
|
|
|
|
|
[:td
|
|
|
|
|
[:a {:href (path :public-role-modules
|
|
|
|
|
[:a {:href (path :public-level
|
|
|
|
|
{:coc (:key coc)
|
|
|
|
|
:level (:uuid level)})}
|
|
|
|
|
(h (:name level))]]]
|
|
|
|
|
(for [level (rest levels)]
|
|
|
|
|
[:tr
|
|
|
|
|
[:td [:a {:href (path :public-role-modules
|
|
|
|
|
[:td [:a {:href (path :public-level
|
|
|
|
|
{:coc (:key coc)
|
|
|
|
|
:level (:uuid level)})}
|
|
|
|
|
(h (:name level))]]])))]]]]
|
|
|
|
|
[:nav
|
|
|
|
|
[:ol.breadcrumb
|
|
|
|
|
[:li.breadcrumb-item
|
|
|
|
|
[:a {:href (path :public-index)} "Start"]]
|
|
|
|
|
[:li.breadcrumb-item.active (h (:name coc))]]]]))
|
|
|
|
|
(breadcrumb
|
|
|
|
|
[:li.breadcrumb-item.active (h (:name coc))])]))
|
|
|
|
|
|
|
|
|
|
(defn show-modules [coc level modules-with-comps]
|
|
|
|
|
(defn show-level [coc level modules-with-comps]
|
|
|
|
|
(layout
|
|
|
|
|
(h (:name level))
|
|
|
|
|
[[:main.main
|
|
|
|
|
[:h1 "Erfahrungsstufe " (h (:name level))]
|
|
|
|
|
[:div.table-responsive
|
|
|
|
|
[:table.table
|
|
|
|
|
[:table.table.no-sort
|
|
|
|
|
[:thead
|
|
|
|
|
[:tr
|
|
|
|
|
[:th "Modul"]
|
|
|
|
@ -108,12 +122,35 @@
|
|
|
|
|
(for [compo (rest comps)]
|
|
|
|
|
[:tr
|
|
|
|
|
[:td (h (:name compo))]])))]]]]
|
|
|
|
|
[:nav
|
|
|
|
|
[:ol.breadcrumb
|
|
|
|
|
[:li.breadcrumb-item
|
|
|
|
|
[:a {:href (path :public-index)} "Start"]]
|
|
|
|
|
(breadcrumb
|
|
|
|
|
[:li.breadcrumb-item
|
|
|
|
|
[:a {:href (path :public-coc-roles
|
|
|
|
|
[:a {:href (path :public-coc
|
|
|
|
|
{:coc (:key coc)})}
|
|
|
|
|
(h (:name coc))]]
|
|
|
|
|
[:li.breadcrumb-item.active (h (:name level))]]]]))
|
|
|
|
|
[:li.breadcrumb-item.active (h (:name level))])]))
|
|
|
|
|
|
|
|
|
|
(defn show-role [coc role modules-and-levels]
|
|
|
|
|
(layout
|
|
|
|
|
(h (:name role))
|
|
|
|
|
[[:main.main
|
|
|
|
|
[:h1 "Rolle " (h (:name role))]
|
|
|
|
|
[:div.table-responsive
|
|
|
|
|
[:table.table
|
|
|
|
|
[:thead
|
|
|
|
|
[:tr
|
|
|
|
|
[:th "Modul"]
|
|
|
|
|
[:th "Qualifikationsstufe"]]]
|
|
|
|
|
[:tbody
|
|
|
|
|
(for [{:keys [module level]} modules-and-levels]
|
|
|
|
|
[:tr
|
|
|
|
|
[:td (h (:name module))]
|
|
|
|
|
[:td
|
|
|
|
|
[:a {:href (path :public-level
|
|
|
|
|
{:coc (:key coc)
|
|
|
|
|
:level (:uuid level)})}
|
|
|
|
|
(h (:name level))]]])]]]]
|
|
|
|
|
(breadcrumb
|
|
|
|
|
[:li.breadcrumb-item
|
|
|
|
|
[:a {:href (path :public-coc {:coc (:key coc)})}
|
|
|
|
|
(h (:name coc))]]
|
|
|
|
|
[:li.breadcrumb-item.active (h (:name role))])]))
|
|
|
|
|