                                     :className "discuss-avatar-main img-responsive img-circle"})
                       (dom/span nil (str (t :common :hello) " " (lib/get-nickname) "!"))))))
 
-(defn login-form
-  {:deprecated 0.4}
-  [_ owner]
-  (reify
-    om/IInitState
-    (init-state [_]
-      {:nickname ""
-       :password ""})
-    om/IRenderState
-    (render-state [_ {:keys [nickname password]}]
-      (dom/div nil
-               (om/build error-view {})
-               (vlib/view-header (t :common :login))
-               (dom/p #js {:className "text-center"} (t :login :hhu-ldap))
-               (dom/div #js {:className "input-group"}
-                        (dom/span #js {:className "input-group-addon"}
-                                  (vlib/fa-icon "fa-user fa-fw"))
-                        (dom/input #js {:className   "form-control"
-                                        :onChange    #(vlib/commit-component-state :nickname % owner)
-                                        :value       nickname
-                                        :placeholder (t :login :nickname)}))
-               (dom/div #js {:className "input-group"}
-                        (dom/span #js {:className "input-group-addon"}
-                                  (vlib/fa-icon "fa-key fa-fw"))
-                        (dom/input #js {:className   "form-control"
-                                        :onChange    #(vlib/commit-component-state :password % owner)
-                                        :value       password
-                                        :type        "password"
-                                        :placeholder (t :login :password)}))
-               (dom/button #js {:className "btn btn-default"
-                                :onClick   #(auth/login nickname password)
-                                :disabled  (not (and (pos? (count nickname))
-                                                     (pos? (count password))))}
-                           (t :common :login))))))
-
-;; Views
-(defn item-view
-  {:deprecated 0.4}
-  [item _owner]
-  (reify
-    om/IDidUpdate
-    (did-update [_ _ _]
-      (let [radio (gdom/getElement (lib/prefix-name (str "item-list-radio-" (:id item))))]
-        (set! (.-checked radio) false)))                    ;; Uncheck radio button on reload
-    om/IRender
-    (render [_]
-      (dom/div #js {:className "radio"}
-               (dom/label #js {}
-                          (dom/input #js {:id        (lib/prefix-name (str "item-list-radio-" (:id item)))
-                                          :type      "radio"
-                                          :className (lib/prefix-name "dialog-items")
-                                          :name      (lib/prefix-name "dialog-items-group")
-                                          :onClick   #(com/item-click (:id item) (:url item))
-                                          :value     (:url item)})
-                          " "
-                          (vlib/safe-html (string/join (str " <i>" (t :common :and) "</i> ") (map :title (:premises item))))))))) ; get all premises of item and add an "and" between them
-
-(defn items-view
-  "Show discussion items."
-  {:deprecated 0.4}
-  [data]
-  (reify om/IRender
-    (render [_]
-      (dom/div nil
-               (apply dom/ul #js {:id (lib/prefix-name "items-main")}
-                      (map #(om/build item-view % (lib/unique-react-key-dict)) (get-in data [:items :elements])))))))
-
-
-(defn init-view
-  "Show button if discussion has not been initialized yet."
-  []
-  (dom/div #js {:key       (lib/get-unique-key)
-                :className "text-center"}
-           (bs/button-primary com/init-with-references! (t :common :start-discussion))))
-
-(defn discussion-elements
-  {:deprecated 0.4}
-  [data]
-  (if-not (empty? (:discussion @lib/app-state))
-    (dom/div #js {:key (lib/get-unique-key)}
-             (om/build bubbles/view data)
-             (om/build items-view data))
-    (init-view)))
 
 (defn- remove-selection-then-reference!
   "Remove selection on first click, then the reference if available."

(ns discuss.views
  (:require [om.core :as om :include-macros true]
            [om.dom :as dom :include-macros true]
            [om.next :as nom :refer-macros [defui]]
            [clojure.string :as string]
            [goog.dom :as gdom]
            [sablono.core :as html :refer-macros [html]]
            [discuss.components.bubbles :as bubbles]
            [discuss.components.clipboard :as clipboard]



;; -----------------------------------------------------------------------------
;; Views

(defui ErrorAlert
  Object
  (render [this]
          (let [{:keys [layout/error]} (om/props this)]
            (when (seq error)
              (html
               [:div.alert.alert-info.alert-dismissable {:role "alert"}
