 
 (def row-height-px 56)
 
+(def disabled-text
+  (str "This workspace contains controlled access data. You can only access the contents of this workspace if you are "
+       "dbGaP authorized for TCGA data and have linked your FireCloud account to your eRA Commons account."))
 
 (react/defc StatusCell
   {:render
    (fn [{:keys [props]}]
-     (let [status (get-in props [:data :status])]
-       [:a {:href (nav/create-href (:nav-context props) (get-in props [:data :href]))
+     (let [{:keys [nav-context data]} props
+           {:keys [href status disabled?]} data]
+       [:a {:href (if disabled?
+                    "javascript:;"
+                    (nav/create-href nav-context href))
             :style {:display "block" :backgroundColor (style/color-for-status status)
                     :margin "2px 0 0 2px" :height (- row-height-px 4)
-                    :position "relative"}}
+                    :cursor (when disabled? "default")
+                    :WebkitFilter (when disabled? "grayscale()")
+                    :position "relative"}
+            :title (when disabled? disabled-text)}
         [:span {:style {:display "block" :backgroundColor "rgba(0,0,0,0.2)"
                         :position "absolute" :top 0 :right 0 :bottom 0 :left 0}}]
         (style/center {}

      (fn [index segment]
        (if (zero? index)
          {:text "Workspaces" :href "#workspaces"}
          {:text (replace (js/decodeURIComponent segment) ":" "/")
           :href (str "#" (join "/" (subvec segments 0 (inc index))))}))
      segments)))


          :num-total-rows (count (:workspaces props))
          :->row (fn [ws]
                   (let [ws-name (get-workspace-name-string ws)
                         ws-href (let [x (ws "workspace")] (str (x "namespace") ":" (x "name")))
                         disabled? (= (ws "accessLevel") "NO ACCESS")]
                     [{:name ws-name :href ws-href :status (:status ws) :disabled? disabled?}
                      {:name ws-name :href ws-href :status (:status ws) :disabled? disabled?
                       :protected? (get-in ws ["workspace" "realm"])}
                      (get-workspace-description ws)
                      (ws "accessLevel")
                      nil]))}]]))})


