Skip to content

Commit

Permalink
little improvement over activity creating form
Browse files Browse the repository at this point in the history
  • Loading branch information
humorless committed Jul 20, 2024
1 parent 903bf4f commit b5465fb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
24 changes: 12 additions & 12 deletions src/co/gaiwan/compass/html/sessions.clj
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@
[:div
[:label {:for "location"} "Location"]
[:select {:id "location" :name "location"}
[:option {:value "depot"} "Het Depot - main stage"]
[:option {:value "depot"} "Het Depot - Bar"]
[:option {:value "hal5"} "Hal 5 - zone A"]
[:option {:value "hal5"} "Hal 5 - zone B"]
[:option {:value "hal5"} "Hal 5 - HoC Café"]
[:option {:value "hal5"} "Hal 5 - Foodcourt"]
[:option {:value "hal5"} "Hal 5 - park"]
[:option {:value "hal5"} "Hal 5 - outside seating"]
[:option {:value "hal5"} "Hal 5 - long table"]]]
[:option {:value "depot-main-stage"} "Het Depot - main stage"]
[:option {:value "depot-baar"} "Het Depot - Bar"]
[:option {:value "hal5-zone-a"} "Hal 5 - zone A"]
[:option {:value "hal5-zone-b"} "Hal 5 - zone B"]
[:option {:value "hal5-hoc-cafe"} "Hal 5 - HoC Café"]
[:option {:value "hal5-foodcourt"} "Hal 5 - Foodcourt"]
[:option {:value "hal5-park"} "Hal 5 - park"]
[:option {:value "hal5-outside-seating"} "Hal 5 - outside seating"]
[:option {:value "hal5-long-table"} "Hal 5 - long table"]]]

[:div
[:label {:for "capacity"} "Capacity"]
Expand All @@ -115,10 +115,10 @@

[:div
[:label {:for "requires_ticket"} "Requires Ticket?"]
[:input {:id "requires_ticket" :name "requires_ticket" :type "checkbox"}]]
[:input {:id "requires_ticket" :name "requires-ticket?" :type "checkbox"}]]

[:div
[:label {:for "published"} "Published?"]
[:input {:id "published" :name "published" :type "checkbox"}]]
[:label {:for "published"} "Published/Visible?"]
[:input {:id "published" :name "published?" :type "checkbox"}]]

[:input {:type "submit" :value "Create"}]]]))
13 changes: 11 additions & 2 deletions src/co/gaiwan/compass/routes/sessions.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"
(:require
[co.gaiwan.compass.html.sessions :as h]
[ring.util.response :as response]))
[ring.util.response :as response]
[co.gaiwan.compass.db :as db]))

(defn new-session [req]
(if-not (:identity req)
Expand All @@ -17,7 +18,15 @@
{:html/head [:title "Create new session"]
:html/body [h/session-form {}]}))

(defn save-session [{:keys [params]}]
(defn save-session
"Save session to Datomic
The typical params is:
{:name \"dsafa\", :type \"talk\",
:location \"depot-main-stage\", :capacity \"34\",
:description \"dsafa\", :requires-ticket? \"on\"
:published? \"on\"}"
[{:keys [params]}]
;; TODO save to datomic
{:html/body [:p "OK " (pr-str params)]})

Expand Down

0 comments on commit b5465fb

Please sign in to comment.