 
 (defn handler [site-navi]
   (let [space-id (session/get-in [:user :current-space :id] 0)
-        state (atom {:space-id space-id :badges [] :search "" :selected-issuer "" :selected-badges [] :select-all false :emails []})]
+        state (atom {:space-id space-id
+                     :badges []
+                     :search ""
+                     :selected-issuer ""
+                     :selected-badges []
+                     :select-all false
+                     :emails []
+                     :message {:content "" :subject ""}
+                     :sending_messages false})]
    (init-data space-id state)
    (fn []
-    (layout/default site-navi [content state]))))
+    (layout/default site-navi [content space-id state]))))

           [:span [:b (count @(cursor state [:emails])) " emails found"]]
           [:div#admin-report
            (reduce
             #(conj %1 ^{:key %2}[:li.list-group-item %2]) [:ul.list-group] @(cursor state [:emails]))]])]]]]])

(defn init-badges [space-id state]
  (ajax/POST




(defn content [space-id state]
  [:div#space
   [m/modal-window]
   [:p (t :extra-spaces/Aboutmessagetool)]
