fix sorting n stuff

integration-tests
Josha von Gizycki 6 years ago
parent bd80169113
commit 377955daa3

@ -145,7 +145,7 @@
(l)-[:link_to]->(t:instance), (l)-[:link_to]->(t:instance),
(t)-[:of]->(s:schema) (t)-[:of]->(s:schema)
RETURN i, l, t, s RETURN i, l, t, s
ORDER BY l.created_at") ORDER BY s.name, t.name, t.created_at")
(defn outgoing-links! [uuid] (defn outgoing-links! [uuid]
(map (fn [row] (map (fn [row]

@ -47,12 +47,12 @@
" " " "
[:small (h (:name instance))]] [:small (h (:name instance))]]
[:p [:small [:p [:small
[:a {:href (path :instance-edit-form instance)}
"Edit Instance"]
" | "
[:a {:href (path :instance-list [:a {:href (path :instance-list
{:schema-uuid (-> instance :schema :uuid)})} {:schema-uuid (-> instance :schema :uuid)})}
"List Instances"]]] "Back to List"]
" | "
[:a {:href (path :instance-edit-form instance)}
"Edit Instance"]]]
(when-not (empty? (:properties instance)) (when-not (empty? (:properties instance))
[:section.properties [:section.properties
[:h2 "Properties"] [:h2 "Properties"]
@ -120,11 +120,17 @@
[:th "Created"] [:th "Created"]
[:th]]] [:th]]]
[:tbody [:tbody
(for [{:keys [link target schema]} (:links-out instance)] (for [{:keys [link target schema]} (:links-out instance)
:let [name (:name link)
empty (empty? name)
name (if empty [:i "empty"] (h name))]]
[:tr [:tr
[:td (h (:name link))] [:td name]
[:td (h (:name target))] [:td [:a {:href (path :instance-show target)}
[:td (h (:name schema))] (h (:name target))]]
[:td [:a {:href (path :instance-list
{:schema-uuid (:uuid schema)})}
(h (:name schema))]]
[:td (prettify-dt (:created_at link))] [:td (prettify-dt (:created_at link))]
[:td (hform/form-to [:delete (path :instance-link-delete [:td (hform/form-to [:delete (path :instance-link-delete
{:uuid (:uuid instance) {:uuid (:uuid instance)

Loading…
Cancel
Save