|
|
@ -67,8 +67,14 @@
|
|
|
|
[:div {:class (str "instance-content "
|
|
|
|
[:div {:class (str "instance-content "
|
|
|
|
"attr-type-" type)}
|
|
|
|
"attr-type-" type)}
|
|
|
|
(render-fn (:value prop))]))])
|
|
|
|
(render-fn (:value prop))]))])
|
|
|
|
|
|
|
|
(when (or (seq (:links-out instance))
|
|
|
|
|
|
|
|
(seq (:links-in instance)))
|
|
|
|
|
|
|
|
[:section.visualisation
|
|
|
|
|
|
|
|
[:h2 "Visualisation"]
|
|
|
|
|
|
|
|
[:image {:src (path :instance-link-viz instance)
|
|
|
|
|
|
|
|
:alt "SVG Visualisation"}]])
|
|
|
|
(when (seq (:links-out instance))
|
|
|
|
(when (seq (:links-out instance))
|
|
|
|
[:section.links
|
|
|
|
[:section.links-out
|
|
|
|
[:h2 "Outgoing Links"]
|
|
|
|
[:h2 "Outgoing Links"]
|
|
|
|
[:table
|
|
|
|
[:table
|
|
|
|
[:thead
|
|
|
|
[:thead
|
|
|
@ -90,12 +96,29 @@
|
|
|
|
{:schema-uuid (:uuid schema)})}
|
|
|
|
{:schema-uuid (:uuid schema)})}
|
|
|
|
(h (:name schema))]]
|
|
|
|
(h (:name schema))]]
|
|
|
|
[:td (prettify-dt (:created_at link))]])]]])
|
|
|
|
[:td (prettify-dt (:created_at link))]])]]])
|
|
|
|
(when (or (seq (:links-out instance))
|
|
|
|
(when (seq (:links-in instance))
|
|
|
|
(seq (:links-in instance)))
|
|
|
|
[:section.links-in
|
|
|
|
[:section.visualisation
|
|
|
|
[:h2 "Incoming Links"]
|
|
|
|
[:h2 "Visualisation"]
|
|
|
|
[:table
|
|
|
|
[:image {:src (path :instance-link-viz instance)
|
|
|
|
[:thead
|
|
|
|
:alt "SVG Visualisation"}]])]))
|
|
|
|
[:tr
|
|
|
|
|
|
|
|
[:th "Name"]
|
|
|
|
|
|
|
|
[:th "Instance"]
|
|
|
|
|
|
|
|
[:th "Schema"]
|
|
|
|
|
|
|
|
[:th "Created"]]]
|
|
|
|
|
|
|
|
[:tbody
|
|
|
|
|
|
|
|
(for [{:keys [link source schema]} (:links-in instance)
|
|
|
|
|
|
|
|
:let [name (:name link)
|
|
|
|
|
|
|
|
empty (empty? name)
|
|
|
|
|
|
|
|
name (if empty [:i "empty"] (h name))]]
|
|
|
|
|
|
|
|
[:tr
|
|
|
|
|
|
|
|
[:td name]
|
|
|
|
|
|
|
|
[:td [:a {:href (path :instance-show source)}
|
|
|
|
|
|
|
|
(h (:name source))]]
|
|
|
|
|
|
|
|
[:td [:a {:href (path :instance-list
|
|
|
|
|
|
|
|
{:schema-uuid (:uuid schema)})}
|
|
|
|
|
|
|
|
(h (:name schema))]]
|
|
|
|
|
|
|
|
[:td (prettify-dt (:created_at link))]])]]])]))
|
|
|
|
|
|
|
|
|
|
|
|
(defn edit! [instance form form-data schemas req]
|
|
|
|
(defn edit! [instance form form-data schemas req]
|
|
|
|
(view/layout!
|
|
|
|
(view/layout!
|
|
|
@ -120,7 +143,7 @@
|
|
|
|
(anti-forgery-field)
|
|
|
|
(anti-forgery-field)
|
|
|
|
(view/delete-btn))
|
|
|
|
(view/delete-btn))
|
|
|
|
(when (seq (:links-out instance))
|
|
|
|
(when (seq (:links-out instance))
|
|
|
|
[:section.links
|
|
|
|
[:section.links-out
|
|
|
|
[:h2 "Outgoing Links"]
|
|
|
|
[:h2 "Outgoing Links"]
|
|
|
|
[:table
|
|
|
|
[:table
|
|
|
|
[:thead
|
|
|
|
[:thead
|
|
|
|