         [:div.col-xs-12
          [input {:name "Description" :rows 5 :cols 40 :atom evidence-description-atom } true]]]
 
-       [:div.form-group
+       [:div.form-group.pages
         [:label.col-xs-12 "Resource"]
         [:div {:style {:margin "10px"}}
-         [:a {:style {:margin "10px"} :href "#"  :on-click #(toggle-url-input state)} [:i.fa.fa-link] (t :admin/Url)]
-         [:a {:href "#" } [:i.fa.fa-file] (t :page/File)]]
+         [:a {:style {:margin "10px"} :href "#"  :on-click #(toggle-input-mode :url_input state true)} [:i.fa.fa-link] (t :admin/Url)]
+         [:a {:href "#" :on-click #(do (toggle-input-mode :resource_input state nil)
+                                     #_(swap! state assoc :tab [resource-tab data state init-data])
+                                     ) } [:i.fa.fa-file] (t :page/File)]]
 
         (if @url-input-enabled?
           [:div.col-md-9
            [input {:name "evidence-url" :atom evidence-url-atom :type "url"}]])
+        (if @resource-input-enabled?
+          [:div.col-md-9
+           [resources-grid state]
+           ]
+          )
         ]
 
        [:div


(defn evidence-block [data state init-data]
  [:div
      [:div.form-group
   [:label {:class "col-md-12 sub-heading" :for "evidence"} (t :badge/Evidence)]

    [:div.col-md-9
    [:i.fa.fa-plus-square]
    [:a {:href "#" :on-click #(do (.preventDefault %)
                                (swap! state assoc :tab [evidence-form data state init-data] :tab-no 2))} "Add new evidence"]]
   ]])

(defn evidence-modal [state]
  (fn []

(ns salava.badge.ui.evidence
  (:require [salava.core.ui.modal :as mo]
            [reagent.core :refer [cursor atom]]
            [salava.core.i18n :refer [t]]
            [reagent.session :as session]
            [salava.core.ui.helper :refer [plugin-fun path-for hyperlink base-url]]
            [salava.core.ui.ajax-utils :as ajax]
            [salava.core.time :refer [date-from-unix-time]]
            [clojure.string :refer [blank? includes?]]
            [salava.file.icons :refer [file-icon]]))

(defn input [input-data textarea?]
  (let [{:keys [name atom placeholder type error-message-atom rows cols]} input-data]
