                     (dom/br nil)
                     (dom/strong nil (get-in data [:issues :info])))
            (vlib/panel-wrapper
-             (let [view (get-in data [:layout :template])]
-               (cond
-                 (= view :login) (om/build login-form {})
-                 :else (discussion-elements data))))
+             (template-dispatcher data))
            (when (get-in data [:layout :add?])
              (om/build add-element {}))))
 

                                         :onClick   #(com/dispatch-add-action statement (lib/get-selection))}
                                    "Submit"))))))

(defn main-content-view
  [data]
  (dom/div nil

            [discuss.integration :as integration]
            [discuss.utils.common :as lib]
            [discuss.utils.views :as vlib]
            [discuss.references :as ref]
            [discuss.sidebar :as sidebar]))

;;;; Auxiliary functions
