Compare commits

..

No commits in common. '506bee914b125b218dfed8bb1fa6b4e1767fa0c7' and 'cf7af4d65fdb1fd778dad12380701517ac567800' have entirely different histories.

@ -104,11 +104,6 @@ body {
font-family: 'jetbrains-mono';
}
.breadcrumb img {
height: 1.4rem;
margin: 0 .6rem;
}
.breadcrumb-item + .breadcrumb-item::before {
content: "//";
}
@ -135,49 +130,3 @@ h1 {
h2 {
font-weight: bold;
}
.tbl-toolbar {
display: flex;
margin-bottom: .5rem;
padding-top: .2rem;
padding-right: .2rem;
}
.tbl-toolbar .row-info {
flex-grow: 99;
}
.tbl-toolbar .rows::before {
content: " (";
}
.tbl-toolbar .rows::after {
content: " Zeilen)";
}
.tbl-toolbar .search {
display: inline;
width: auto;
}
.tbl-toolbar button {
margin-left: .5rem;
}
.tbl-toolbar .prev::after {
content: " << ";
}
.tbl-toolbar .next::after {
content: " >> ";
}
table [data-sort="desc"]::after {
content: "⇩";
display: inline;
}
table [data-sort="asc"]::after {
content: "⇧";
diplay: inline;
}

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg width="68.013" height="198.4" version="1.1" viewBox="0 0 68.013 198.4" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><metadata><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata>
<style type="text/css">
.st0{fill:#565656;}
.st1{fill:#FFCC00;}
.st2{fill:#FFFFFF;}
</style>
<path class="st1" d="m60.513 198.4h-25.2c-4.1 0-7.5-3.4-7.5-7.5v-35h-20.3c-2.7 0-5.1-1.4-6.5-3.7-1.3-2.3-1.4-5.2 0-7.5l26.8-47.2v-90c0-4.1 3.4-7.5 7.5-7.5h25.2c4.1 0 7.5 3.4 7.5 7.5s-3.4 7.5-7.5 7.5h-17.7v84.5c0 1.3-0.3 2.6-1 3.7l-21.4 37.7h14.9c4.1 0 7.5 3.4 7.5 7.5v35h17.7c4.1 0 7.5 3.4 7.5 7.5s-3.3 7.5-7.5 7.5z" fill="#fc0"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

@ -99,8 +99,7 @@ document.addEventListener('DOMContentLoaded', function () {
const btn = document.createElement('button')
btn.classList.add('prev')
btn.classList.add('pg-btn')
btn.classList.add('btn')
btn.classList.add('btn-light')
btn.innerText = 'Prev'
return btn;
}
@ -108,8 +107,7 @@ document.addEventListener('DOMContentLoaded', function () {
const btn = document.createElement('button')
btn.classList.add('next')
btn.classList.add('pg-btn')
btn.classList.add('btn')
btn.classList.add('btn-light')
btn.innerText = 'Next'
return btn
}
@ -132,7 +130,6 @@ document.addEventListener('DOMContentLoaded', function () {
function searchBox() {
const input = document.createElement('input')
input.classList.add('search')
input.classList.add('form-control')
input.type = 'search'
input.placeholder = 'search...'
return input
@ -271,9 +268,6 @@ document.addEventListener('DOMContentLoaded', function () {
}
document.querySelectorAll('table').forEach(function (tbl) {
if (tbl.classList.contains('no-sort')) {
return
}
const ctx = addToolbar(tbl)
changePage(ctx, 0)
enableSorting(ctx)

@ -61,14 +61,14 @@
:coc
(assoc :key coc-key)))
(neo4j/defquery instance
"MATCH (i:instance {uuid:{uuid}})
RETURN i")
(defn instance! [uuid]
(-> (neo4j/exec-query! instance
(neo4j/defquery level
"MATCH (level:instance {uuid:{uuid}})
RETURN level")
(defn level! [uuid]
(-> (neo4j/exec-query! level
{:uuid uuid})
first
:i))
:level))
(neo4j/defquery modules-with-comps
"MATCH (level:instance {uuid:{level_uuid}}),
@ -99,22 +99,3 @@
{:level_uuid "140962fb-f55e-45ab-87fc-680c012bd8dc"
:moduleschema_uuid (:module schema-uuids)
:compschema_uuid (:component schema-uuids)}))
(neo4j/defquery modules-and-levels
"MATCH (role:instance {uuid:{role_uuid}}),
(lschema:schema {uuid:{levelschema_uuid}}),
(level:instance)-[:of]->(lschema),
(role)--(:link)--(level),
(mschema:schema {uuid:{moduleschema_uuid}}),
(module:instance)-[:of]->(mschema),
(level)--(:link)--(module)
RETURN module, level
ORDER BY level, module")
(defn modules-and-levels! [role-uuid]
(neo4j/exec-query! modules-and-levels
{:role_uuid role-uuid
:moduleschema_uuid (:module schema-uuids)
:levelschema_uuid (:level schema-uuids)}))
(comment
(modules-and-levels! "d97628f4-477d-49d7-a1c1-2fd643a0ee65")
(instance! "d97628f4-477d-49d7-a1c1-2fd643a0ee65"))

@ -11,26 +11,15 @@
(view-public/show-coc (db-public/coc! coc-key)
(db-public/roles-with-levels-of-coc! coc-key)))
(defn show-level [coc-key level-uuid]
(view-public/show-level
(defn show-modules [coc-key level-uuid]
(view-public/show-modules
(db-public/coc! coc-key)
(db-public/instance! level-uuid)
(db-public/level! level-uuid)
(db-public/modules-with-comps! level-uuid)))
(defn show-role [coc-key role-uuid]
(view-public/show-role
(db-public/coc! coc-key)
(db-public/instance! role-uuid)
(db-public/modules-and-levels! role-uuid)))
(defroutes routes
(GET (register! :public-index "/public") [] (index))
(GET (register! :public-coc "/public/:coc")
[coc]
(show-coc coc))
(GET (register! :public-level "/public/:coc/level/:level")
(GET (register! :public-coc-roles "/public/:coc") [coc] (show-coc coc))
(GET (register! :public-role-modules "/public/:coc/:level")
[coc level]
(show-level coc level))
(GET (register! :public-role "/public/:coc/role/:role")
[coc role]
(show-role coc role)))
(show-modules coc level)))

@ -3,27 +3,16 @@
[hiccup.core :refer [h]]
[wanijo.infrastructure.routing :refer [path]]))
(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]
(defn layout [content]
(html5
[:head
[:meta {:charset "utf-8"}]
[:meta {:name "viewport"
:content "width=device-width,initial-scale=1,shrink-to-fit=no"}]
[:title title " - Moxie!"]
[:title "Moxie!"]
(include-css "/css/bootstrap.min.css"
"/css/public.css")
(include-js "/js/bootstrap.min.js"
"/js/scripts.js")]
(include-js "/js/bootstrap.min.js")]
[:body
[:nav.navbar.navbar-expand-lg.sticky-top
[:a.navbar-brand {:href (path :public-index)}
@ -41,19 +30,18 @@
[:menu.global-nav
[:ol.global-nav__card-nav
[:li.global-nav__card-nav-item
[:a.global-nav__link {:href (path :public-coc {:coc "dev"})}
[:a.global-nav__link {:href (path :public-coc-roles {:coc "dev"})}
"Development"]]
[:li.global-nav__card-nav-item
[:a.global-nav__link {:href (path :public-coc {:coc "prk"})}
[:a.global-nav__link {:href (path :public-coc-roles {:coc "prk"})}
"Projekte"]]
[:li.global-nav__card-nav-item
[:a.global-nav__link {:href (path :public-coc {:coc "req"})}
[:a.global-nav__link {:href (path :public-coc-roles {: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"]
@ -65,11 +53,10 @@
(defn show-coc [coc roles-with-levels]
(layout
(h (:name coc))
[[:main.main
[:h1 "CoC " (h (:name coc))]
[:div.table-responsive
[:table.table.no-sort
[:table.table
[:thead
[:tr
[:th "Rolle"]
@ -81,31 +68,30 @@
(list
[:tr
[:td {:rowspan (max 1 (count levels))}
[:a {:href (path :public-role
{:coc (:key coc)
:role (:uuid role)})}
(h (:name role))]]
(h (:name role))]
[:td
[:a {:href (path :public-level
[:a {:href (path :public-role-modules
{:coc (:key coc)
:level (:uuid level)})}
(h (:name level))]]]
(for [level (rest levels)]
[:tr
[:td [:a {:href (path :public-level
[:td [:a {:href (path :public-role-modules
{:coc (:key coc)
:level (:uuid level)})}
(h (:name level))]]])))]]]]
(breadcrumb
[:li.breadcrumb-item.active (h (:name coc))])]))
[:nav
[:ol.breadcrumb
[:li.breadcrumb-item
[:a {:href (path :public-index)} "Start"]]
[:li.breadcrumb-item.active (h (:name coc))]]]]))
(defn show-level [coc level modules-with-comps]
(defn show-modules [coc level modules-with-comps]
(layout
(h (:name level))
[[:main.main
[:h1 "Erfahrungsstufe " (h (:name level))]
[:div.table-responsive
[:table.table.no-sort
[:table.table
[:thead
[:tr
[:th "Modul"]
@ -122,35 +108,12 @@
(for [compo (rest comps)]
[:tr
[:td (h (:name compo))]])))]]]]
(breadcrumb
[:nav
[:ol.breadcrumb
[:li.breadcrumb-item
[:a {:href (path :public-index)} "Start"]]
[:li.breadcrumb-item
[:a {:href (path :public-coc
[:a {:href (path :public-coc-roles
{:coc (:key coc)})}
(h (:name coc))]]
[: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))])]))
[:li.breadcrumb-item.active (h (:name level))]]]]))

Loading…
Cancel
Save