Skip to content
Browse files

reenable breadcrumbs

  • Loading branch information...
1 parent 7292001 commit 63194bd816dd096320aa75b65067db50b1d3e425 @stuarthalloway stuarthalloway committed Sep 27, 2010
Showing with 10 additions and 11 deletions.
  1. +9 −9 src/mycroft/breadcrumb.clj
  2. +1 −2 src/mycroft/data.clj
View
18 src/mycroft/breadcrumb.clj
@@ -29,24 +29,24 @@
(get {:mycroft.data/deref "@" :mycroft.data/meta "<meta>"} selector-component selector-component))
(defn render
- [ns var {:keys [selector]}]
+ [ns var {:keys [selectors]}]
[:div {:id "breadcrumb"}
(if ns (top-link) "ns")
(when ns
[:span " « "
(if var (namespace-link ns) ns)])
(when var
[:span " / "
- (if selector (var-link (.ns var) (.sym var)) (.sym var))])
+ (if selectors (var-link (.ns var) (.sym var)) (.sym var))])
- (when selector
- (let [first-crumb (if (= ::deref (first selector)) 2 1)]
+ (when selectors
+ (let [first-crumb (if (= ::deref (first selectors)) 2 1)]
[:span
- (->> (map (fn [n] (subvec selector 0 n)) (range first-crumb (count selector)))
- (map (fn [partial-selector]
+ (->> (map (fn [n] (subvec selectors 0 n)) (range first-crumb (count selectors)))
+ (map (fn [partial-selectors]
[:span
" » "
- [:a {:href (str "?" (options->query-string {:selectors partial-selector}))}
- (breadcrumb-text (last partial-selector)) ]])))
- [:span " » " (breadcrumb-text (last selector))]]))])
+ [:a {:href (str "?" (options->query-string {:selectors partial-selectors}))}
+ (breadcrumb-text (last partial-selectors)) ]])))
+ [:span " » " (breadcrumb-text (last selectors))]]))])
View
3 src/mycroft/data.clj
@@ -22,7 +22,7 @@
(= (namespace selector) "mycroft.data")))
(defn add-selector
- "Update the options by adding a selector to the end of the
+ "Update the options by adding a selector to the end of the
selectors already included."
[options s]
(let [options (if (:selectors options)
@@ -210,7 +210,6 @@
(defn render-table
[content {:keys [headers] :as options}]
- (println "options are " options)
(if (seq content)
(if headers
(render-table-with-headers content options)

0 comments on commit 63194bd

Please sign in to comment.
Something went wrong with that request. Please try again.