             [ring.util.response :refer :all]
             [ring.util.codec :refer [url-encode]]
             [clj-money.url :refer :all]
+            [clj-money.inflection :refer [humanize]]
             [clj-money.util :refer [format-number format-date]]
             [clj-money.validation :as validation]
             [clj-money.models.accounts :as accounts]

       [:div.col-md-3
        [:form {:action (format "/budgets/%s/items" budget-id)
                :method :post}
         (select-field item :account-id (account-options (:entity-id budget)) {:autofocus true})
         (number-input-field item :average)
         [:button.btn.btn-primary {:type :submit
                                   :title "Click here to save this budget item."} "Save"]

      [:table.table.table-striped
       (html
       (budget-header-row budget)
       (map budget-item-row (:items budget)))]
      [:a.btn.btn-primary {:href (format "/budgets/%s/items/new" (:id budget))} "Add"]
      "&nbsp;"
      [:a.btn.btn-default {:href (format "/entities/%s/budgets" (:entity-id budget))} "Back"]]])))
