       "&trail=|query&method=xml"
 ))
 
-(defn modal [organism]
+(defn modal
+  "visual component - modal popup to show the query in search status sidebar"
+  [organism]
   [:div.fade {:on-click
       (fn [e]
         (.stopPropagation js/e)

(ns gointermod.nav
    (:require [re-frame.core :as re-frame]))

(defn build-url [organism]
  (str "http://"
      (:url (:mine organism))
      "/loadQuery.do?skipBuilder=true&query="

    ]]]
  )

(defn prep-status-details
  "status bar for a given mine"
  [organism]

  [:div
    (cond
      (= (:status (:status organism)) :loading)
        [:span.loading "Loading . . ."]
      (= (:status (:status organism)) :error)
        [:span.error "Error loading results"]
      (= (:status (:status organism)) :na)
        [:span.na "No search performed"]
      (= (:status (:status organism)) :success)
        [:span.success (:details (:status organism)) " results"]
      )
   (let [status (:status organism)
         active-modal (re-frame/subscribe [:active-modal])
         active (= @active-modal (:id organism))]
