diff --git a/src/mycroft/breadcrumb.clj b/src/mycroft/breadcrumb.clj index 0a380ac..17099f8 100644 --- a/src/mycroft/breadcrumb.clj +++ b/src/mycroft/breadcrumb.clj @@ -29,7 +29,7 @@ (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 @@ -37,16 +37,16 @@ (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))]]))]) diff --git a/src/mycroft/data.clj b/src/mycroft/data.clj index cd69b98..26836aa 100644 --- a/src/mycroft/data.clj +++ b/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)