 
 (defn story-editor [story & [script]]
   [:div {:id "create"}
-   [:input {:id "disable-upload" 
+   [:input {:id "disable-upload"
             :type :hidden
             :value (when settings/disable-upload "1")}]
    [:p "script"]

  [stories & [hide-author]]
  [:ul
   (for [{:keys [id title synopsis username]} stories]
     [:li 
      [:a {:href (urlfor/story username id)} title]
      (when-not hide-author 
        [:span " — " synopsis " "]    
        [:i [:a {:href (urlfor/user-index username)}
             " [ by " username " ]"]])])]) 

(defn story-control-list
  ([stories & args]
   [:ul
    (for [{:keys [id title username]} stories]
      [:li 
       [:a {:href (urlfor/story username id)} 
        title]
       " "
       [:a {:href (urlfor/story-edit username id)} "[edit]"]
       " "
       [:a {:href (urlfor/story-delete username id)} "[delete]"]])]))

(defn input-field 
  ([name & {:keys [label errors type value]}]
   (let [fk (keyword name)
         label (or label name)]
     [:p (str label ": ") 
      [:input {:name name :value value :type type}]
      [:span.error (fk errors)]])))


    (editing-options)]]
  )

(defn story-link [story & [title]]
  [:a {:href (urlfor/story (:username story) (:id story))}
   (or (:title story) title)])

(defn user-link [username]
  [:a {:href (urlfor/user-index username)}
   username])


