Created
June 9, 2010 13:18
-
-
Save christianberg/431458 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn side-bar [] | |
(let [ui (users/user-info)] | |
[:div#sidebar | |
[:h3 "Current User"] | |
(if-let [user (:user ui)] | |
[:ul | |
[:li "Logged in as " (.getEmail user)] | |
[:li (link-to (.createLogoutURL (:user-service ui) "/") "Logout")]] | |
[:ul | |
[:li "Not logged in"] | |
[:li (link-to (.createLoginURL (:user-service ui) "/") "Login")]] | |
) | |
[:h3 "Navigation"] | |
[:ul | |
[:li (link-to "/" "Main page")] | |
(if (and (:user ui) (.isUserAdmin (:user-service ui))) | |
[:li (link-to "/admin/new" "Create new post (Admin only)")])] | |
[:h3 "External Links"] | |
[:ul | |
[:li (link-to "http://compojureongae.posterous.com/" "Blog")] | |
[:li (link-to "http://github.com/christianberg/compojureongae" "Source Code")]]])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment