   (let [state (atom {:id badge-id})]
     (init-user-badge-endorsement state)
     (fn []
-      (let [endorsements (:user-badge-endorsements @state)
+      (let [endorsements (filter #(= (:status %) "accepted") (:user-badge-endorsements @state))
             badge-endorsements? (pos? (count @badge-endorsements))]
         (when (seq endorsements)
           [:div;.row {:id "badge-contents"}

     [:div.panel-body
      [:div.table  {:summary (t :badge/Endorsements)}
       (reduce (fn [r endorsement]
                 (let [{:keys [id endorsee_id endorser_id profile_picture first_name last_name name image_file content status user_badge_id mtime]} endorsement
                       endorser (str first_name " " last_name)]
                   (conj r [:div.list-item.row.flip
                            [:a {:href "#" :on-click #(do
                                                        (.preventDefault %)

        [:div.profile-image
         [:img.img-responsive.img-thumbnail
          {:src (profile-picture profile_picture)
           :alt (or issuer_name (str first_name " " last_name))}]]]
       [:div.col-md-8
        [:h4 (or issuer_name (str first_name " " last_name))]
        (when (= status "pending") [:p [:span.label.label-info label]])]]]]))

(defn user-endorsement-content [params]
  (fn []
    (let [{:keys [endorsement state]} @params
          {:keys [id profile_picture name first_name last_name image_file content user_badge_id issuer_id issuer_name endorsee_id status]} endorsement]
      [:div.row.flip {:id "badge-info"}
       [:div.col-md-3
        [:div.badge-image [:img.badge-image {:src (str "/" image_file)}]]]
