Ported Yesod.Helpers.Crud to work with 0.7.x and added to exported modules. I think this is desirable since none of the other modules export its functionality.
This commit is contained in:
parent
8a97f4fe11
commit
ec911c2b58
@ -12,7 +12,8 @@ module Yesod.Helpers.Crud
|
|||||||
, defaultCrud
|
, defaultCrud
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Yesod.Yesod
|
-- import Yesod
|
||||||
|
import Yesod.Core
|
||||||
import Yesod.Widget
|
import Yesod.Widget
|
||||||
import Yesod.Dispatch
|
import Yesod.Dispatch
|
||||||
import Yesod.Content
|
import Yesod.Content
|
||||||
@ -20,7 +21,7 @@ import Yesod.Handler
|
|||||||
import Text.Hamlet
|
import Text.Hamlet
|
||||||
import Yesod.Form
|
import Yesod.Form
|
||||||
import Language.Haskell.TH.Syntax
|
import Language.Haskell.TH.Syntax
|
||||||
|
import Yesod.Persist
|
||||||
-- | An entity which can be displayed by the Crud subsite.
|
-- | An entity which can be displayed by the Crud subsite.
|
||||||
class Item a where
|
class Item a where
|
||||||
-- | The title of an entity, to be displayed in the list of all entities.
|
-- | The title of an entity, to be displayed in the list of all entities.
|
||||||
@ -196,7 +197,7 @@ crudHelper title me isPost = do
|
|||||||
|
|
||||||
-- | A default 'Crud' value which relies about persistent and "Yesod.Form".
|
-- | A default 'Crud' value which relies about persistent and "Yesod.Form".
|
||||||
defaultCrud
|
defaultCrud
|
||||||
:: (PersistEntity i, PersistBackend (YesodDB a (GHandler (Crud a i) a)),
|
:: (PersistEntity i, PersistBackend (YesodDB a (GGHandler (Crud a i) a IO)),
|
||||||
YesodPersist a)
|
YesodPersist a)
|
||||||
=> a -> Crud a i
|
=> a -> Crud a i
|
||||||
defaultCrud = const Crud
|
defaultCrud = const Crud
|
||||||
|
|||||||
@ -16,6 +16,7 @@ library
|
|||||||
, yesod-core >= 0.7 && < 0.8
|
, yesod-core >= 0.7 && < 0.8
|
||||||
, time >= 1.1.4 && < 1.3
|
, time >= 1.1.4 && < 1.3
|
||||||
, hamlet >= 0.7 && < 0.8
|
, hamlet >= 0.7 && < 0.8
|
||||||
|
, yesod-persistent >= 0.0.0.0 && < 0.0.1
|
||||||
, persistent >= 0.4 && < 0.5
|
, persistent >= 0.4 && < 0.5
|
||||||
, template-haskell
|
, template-haskell
|
||||||
, transformers >= 0.2.2 && < 0.3
|
, transformers >= 0.2.2 && < 0.3
|
||||||
@ -33,6 +34,7 @@ library
|
|||||||
Yesod.Form.Jquery
|
Yesod.Form.Jquery
|
||||||
Yesod.Form.Nic
|
Yesod.Form.Nic
|
||||||
Yesod.Form.Profiles
|
Yesod.Form.Profiles
|
||||||
|
Yesod.Helpers.Crud
|
||||||
ghc-options: -Wall
|
ghc-options: -Wall
|
||||||
|
|
||||||
source-repository head
|
source-repository head
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user