      (button "start-brainstorming" "2. Start brainstorming")
      (button "start-voting" "3. Start voting")
      (button "show-voting-results" "4. Show voting results")])))
+
+(defn page-await-vote [referer]
+  (page "Awaiting voting..."
+        [:p "Do "
+         [:a {:href "/vote"} "vote for the best idea"]
+         " once voting is opened"]
+        (when referer
+          [:p "(Or "
+           [:a {:href referer} "go back"]
+           " where you came from.)"])))
 
 (defn has-voted? [{:keys [remote-addr session]}]
   (or

      xhr.send();
"))

(defn page-gamemaster []
  "Control page for the GameMaster: 1. task info, 2. show task to others, 3. start brainstorming?, 4. start voting, 5. show number voted, 6. show voting results"
  (page
   "GameMaster Control"
   [:h1 "You control the game!"]

   [:form#newGroupForm {:action "/team"}
    [:button.btn {:type "sumbit"} "Start a new team!"]]))

(defn page-team-idea [team-id idea published]
  "Form to submit name of team's gamification idea"
  (page
   "Idea"                               ; TODO better title
   (when published
     [:p.text-success "Your idea has been published"])
   [:form {:action (str "/team/" team-id "/idea"), :method "post"}
    [:label (str "Publish team " team-id "'s gamification idea:")
     [:br]
     [:input {:type "text", :name "idea", :value idea,
              :autofocus "true",
              :title "Describe your idea"}]]
    [:button.btn {:type "submit"} "Publish"]]
   [:p "Or "
    [:a {:href "/await-vote"} "await voting for the best idea"]
    " to be started"]))

(defn page-teams [teams]
  "Overveiw of all teams and their ideas"
