diff --git a/src/wanijo/instance/view.clj b/src/wanijo/instance/view.clj index abc040c..2a488e3 100644 --- a/src/wanijo/instance/view.clj +++ b/src/wanijo/instance/view.clj @@ -48,18 +48,20 @@ [:small (h (:name instance))]] [:p [:small [:a {:href (path :instance-edit-form instance)} "Edit Instance"]]] - [:h2 "Properties"] - (for [prop (:properties instance) - :let [attr (:attribute prop) - type (:type attr) - render-fn (case type - "date" #(str (prettify-dt %)) - "markdown" md/md-to-html-string - :else #(str "
" % "
"))]] - (list [:h3 (h (:name attr))] - [:div {:class (str "instance-content " - "attr-type-" type)} - (render-fn (:value prop))])) + (when-not (empty? (:properties instance)) + [:section.properties + [:h2 "Properties"] + (for [prop (:properties instance) + :let [attr (:attribute prop) + type (:type attr) + render-fn (case type + "date" #(str (prettify-dt %)) + "markdown" md/md-to-html-string + :else #(str "" % "
"))]] + (list [:h3 (h (:name attr))] + [:div {:class (str "instance-content " + "attr-type-" type)} + (render-fn (:value prop))]))]) (when-not (empty? (:links-out instance)) [:section.links [:h2 "Outgoing Links"]