 (defn ^:export tag-show []
   (let [$tag-box ($ :#tag_box)
         tag (util/match-from-current-uri #"[^\/]+$")]
-    (backend-request (path-to "/tag?tag=" tag)
+    (backend-request (path-to "/tag")
       (fn [data]
         (if (string? data)
           (alert data)


(defn ^:export model-show []
  (let [model (util/match-from-current-uri #"[^\/]+$")]
    (backend-request (path-to "/model?model=" model)
      (fn [data]
        (create-sort-table ($ :#model_show_box)
              (generate-table "model_show_table" data
                              :row-partial view/model-row
                              :caption (str "Total: " (count data))
                              :fields [:name :url :desc :tags]))
        (make-table-editable)))))

(defn ^:export model-stats []
  (backend-request (path-to "/models")

    (-> (jq/find search-box :h2)
      (inner (str "Search results for '" query "'"))) 
    (.blur text-field)
    (backend-request (path-to "/mls") (partial create-search-table search-box) :data {:query query})
    (when callback (callback query))))

(defn create-url [$text $button]
  (backend-request (path-to "/add")
    (fn [data]
      (alert (format "Added '%s'" (jq/val $text)) :info)
      (jq/text $button "Add Url")
      (jq/val $text "")
      (jq/hide $text))
    :type "POST"
    :data {:input (jq/val $text)}))

(defn add-url [$text $button event]
  (if (jq/is $text ":visible")
