 
 (defn toggle-visibility [visibility-atom]
   (ajax/POST
-     (path-for "/obpv1/user/profile/set_visibility")
-     {:params  {:visibility (if (= "internal" @visibility-atom) "public" "internal")}
-      :handler (fn [new-value]
-                 (reset! visibility-atom new-value)
-                 )}))
+    (path-for "/obpv1/user/profile/set_visibility")
+    {:params  {:visibility (if (= "internal" @visibility-atom) "public" "internal")}
+     :handler (fn [new-value]
+                (reset! visibility-atom new-value)
+                )}))
 
 (defn profile-visibility-input [visibility-atom]
   [:div.col-xs-12

    [:div
     (if-not owner?
       [:div.col-xs-12[:div.pull-right
         (connect-user user-id)]]
        )

     [:div {:id "profile"}
      [:div.col-xs-12

              :checked   (= "public" @visibility-atom)}]
     (t :user/Publishandshare)]]])

#_(defn badge-grid-element [element-data]
    (let [{:keys [id image_file name description issuer_content_name issuer_content_url user_endorsements_count]} element-data]
      ;[:div {:class "col-xs-12 col-sm-6 col-md-4" :key id}
      [:div {:class "media grid-container"}
       [:div.media-content
        (if image_file
          [:div.media-left
           [:a {:href "#";(path-for (str "/badge/info/" id))
                :on-click #(set-new-view [:badge :info] {:badge-id id})}
            [:img {:src (str "/" image_file)
                   :alt name}]]])
        [:div.media-body
         [:div.media-heading
          [:a.heading-link {:href "#"
                            :on-click #(set-new-view [:badge :info] {:badge-id id})}
           name]]
         [:div.media-issuer
          [:p issuer_content_name]]
         (when (pos? user_endorsements_count)
           [:div.text-center [:i.fa.fa-handshake-o {:style {:font-size "18px"}}]])]]]
      ;]
      ))

(defn badge-grid-element [element-data]
  (let [{:keys [id image_file name description issuer_content_name issuer_content_url user_endorsements_count]} element-data]
    [:div {:class "media grid-container"}
     [:div.media-content
     [:a {:href "#" :on-click #(set-new-view [:badge :info] {:badge-id id})}

      (when image_file [:div.media-left [:img {:src (str "/" image_file)}]])
      [:div.media-body
       [:div.media-heading name]
       [:div.media-issuer [:p issuer_content_name]]
       (when (pos? user_endorsements_count) [:div.badge-view.text-center [:i.fa.fa-handshake-o]])]
      ]]]))

(defn page-grid-element [element-data profile_picture]
  (let [{:keys [id name first_name last_name badges mtime]} element-data
