Minor fixes and tidyings
This commit is contained in:
parent
8e0ad87e04
commit
9d086f7028
|
@ -447,8 +447,8 @@
|
|||
(defn construct-link-property
|
||||
[entity]
|
||||
{:tag :property
|
||||
:attrs {:name (safe-name (str (:name (:attrs entity)) "_id") :sql)
|
||||
:column (safe-name (str (:name (:attrs entity)) "_id") :sql)
|
||||
:attrs {:name (safe-name (str (singularise (:name (:attrs entity))) "_id") :sql)
|
||||
:column (safe-name (str (singularise (:name (:attrs entity))) "_id") :sql)
|
||||
:type "entity"
|
||||
:entity (:name (:attrs entity))
|
||||
:farkey (safe-name (first (key-names entity)) :sql)}})
|
||||
|
|
|
@ -150,7 +150,7 @@
|
|||
'auto-selmer-routes
|
||||
(cons
|
||||
'(GET
|
||||
"/index"
|
||||
"/admin"
|
||||
request
|
||||
(route/restricted
|
||||
(apply (resolve-handler "index") (list request))))
|
||||
|
|
|
@ -405,9 +405,11 @@
|
|||
"time" "time"
|
||||
"text")
|
||||
base-name (:property (:attrs field))
|
||||
search-name (if
|
||||
search-name (safe-name
|
||||
(if
|
||||
(= (:type (:attrs property)) "entity")
|
||||
(str base-name "_expanded") base-name)]
|
||||
(str base-name "_expanded") base-name)
|
||||
:sql)]
|
||||
(hash-map
|
||||
:tag :th
|
||||
:content
|
||||
|
@ -480,16 +482,17 @@
|
|||
{:tag :td :content
|
||||
(let
|
||||
[p (first (filter #(= (:name (:attrs %)) (:property (:attrs field))) (all-properties entity)))
|
||||
s (safe-name (:name (:attrs p)) :sql)
|
||||
e (first
|
||||
(filter
|
||||
#(= (:name (:attrs %)) (:entity (:attrs p)))
|
||||
(children-with-tag application :entity)))
|
||||
c (str "{{ record." (:property (:attrs field)) " }}")]
|
||||
c (str "{{ record." s " }}")]
|
||||
(if
|
||||
(= (:type (:attrs p)) "entity")
|
||||
[{:tag :a
|
||||
:attrs {:href (edit-link e application (list (:name (:attrs p))))}
|
||||
:content [(str "{{ record." (:property (:attrs field)) "_expanded }}")]}]
|
||||
:content [(str "{{ record." s "_expanded }}")]}]
|
||||
[c]))})
|
||||
(children-with-tag list-spec :field))
|
||||
[{:tag :td
|
||||
|
|
Loading…
Reference in a new issue