                   [:td.name [:a {:href "#"
                                  :on-click #(do
                                               (mo/open-modal [:badge :info] {:badge-id id})
-                                        ;(b/open-modal id false init-data state)
+                                              ;(b/open-modal id false init-data state)
                                               (.preventDefault %)) } name]]
                   [:td congratulation_count]
                   [:td (if latest_congratulation (date-from-unix-time (* 1000 latest_congratulation)))]]))]])]))

                      (for [badge badges
                            :let [{:keys [id image_file name]} badge]]
                        [:a {:href "#"
                                 :on-click #(do
                                              (mo/open-modal [:badge :info] {:badge-id id})
                                        ;(b/open-modal id false init-data state)
                                              (.preventDefault %)) }
                         [:img.badge-icon {:src (str "/"  image_file) :title name :alt name}]]))])))]))

(defn content [state]

     [m/modal-window]
     [:h1.uppercase-header
      (t :badge/Badgestatistics)]
     [:p (t :connections/Statisticspageinfo)]
     [:h3 (t :badge/Totalbadges) ": " badge_count " " (t :badge/Expired) ": " expired_badge_count]
     [views-panel badge_views visible-area-atom]
     [congratulations-panel badge_congratulations visible-area-atom]
     [issuers-panel badge_issuers visible-area-atom]]))

(def initial-state {:visible_area nil
                    :badge_count nil
                    :expired_badge_count nil
                    :badge_views []
