Skip to content
Permalink
Browse files

Clean up generated code

  • Loading branch information...
swlkr committed Mar 12, 2019
1 parent d2ac034 commit 7b8c2a5074b9a7f3068c63f3dd090907fd1392ea
Showing with 6 additions and 4 deletions.
  1. +6 −4 resources/generators/code.clj.txt
@@ -1,6 +1,6 @@
(ns __table__
(:require [coast]
[components :refer [container link-to table thead tbody td th tr button-to text-muted mr2 dl dd dt submit input label]]))
[components :refer [container tc link-to table thead tbody td th tr button-to text-muted mr2 dl dd dt submit input label]]))


(defn index [request]
@@ -9,10 +9,12 @@
:order id
:limit 10])]
(container {:mw 8}
(link-to (coast/url-for ::build) "New")
(when (not (empty? rows))
(link-to (coast/url-for ::build) "New __table__"))

(when (empty? rows)
(text-muted "No rows"))
(tc
(link-to (coast/url-for ::build) "New __table__")))

(when (not (empty? rows))
(table
@@ -99,7 +101,7 @@
(coast/update)
(coast/rescue))]
(if (nil? errors)
(coast/redirect-to ::view __table__)
(coast/redirect-to ::index)
(edit (merge request errors)))))


0 comments on commit 7b8c2a5

Please sign in to comment.
You can’t perform that action at this time.