Skip to content

Commit

Permalink
Apply changes discussed in pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
amalloy committed Oct 8, 2011
1 parent 0c623f3 commit cbec197
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
9 changes: 1 addition & 8 deletions resources/public/css/style.css
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -232,19 +232,12 @@ img.gravatar{
padding-bottom: 5px;; padding-bottom: 5px;;
} }


#user-table{ #user-table, #server-user-table{
float: left; float: left;
width: 100%; width: 100%;
padding: 15px; padding: 15px;
} }


#server-user-table{
float: left;
width: 100%;
padding: 15px;
}


/* /*
* By default only show the text label for the "Following" column on * By default only show the text label for the "Following" column on
* the users page. If they have javascript turned on (detected * the users page. If they have javascript turned on (detected
Expand Down
4 changes: 3 additions & 1 deletion src/foreclojure/datatable.clj
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@


(def datatable-routes (def datatable-routes
(-> (routes (-> (routes
(GET "/datatable/users" [& more] {:body (user-datatable-query more)})) (GET "/datatable/users" [& more]
{:body (user-datatable-query more)
:status 200}))
(wrap-json))) (wrap-json)))
18 changes: 10 additions & 8 deletions src/foreclojure/users.clj
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -138,14 +138,16 @@
(when (session/session-get :user) (when (session/session-get :user)
(with-user [{:keys [_id following]}] (with-user [{:keys [_id following]}]
[_id (set following)]))] [_id (set following)]))]
(into [] (map-indexed (fn [rownum {:keys [_id email position rank user contributor solved]}] (into [] (map-indexed
[rank (fn [rownum {:keys [_id email position rank user contributor solved]}]
(str [rank
(html (gravatar-img {:email email :class "gravatar"})) (html (list
(html [:a.user-profile-link {:href (str "/user/" user)} user (when contributor [:span.contributor " *"])])) (gravatar-img {:email email :class "gravatar"})
(count solved) [:a.user-profile-link {:href (str "/user/" user)}
(html (following-checkbox user-id following _id user))]) user (when contributor [:span.contributor " *"])]))
user-set)))) (count solved)
(html (following-checkbox user-id following _id user))])
user-set))))


(def-page all-users-page [] (def-page all-users-page []
{:title "All 4Clojure Users" {:title "All 4Clojure Users"
Expand Down

0 comments on commit cbec197

Please sign in to comment.