Frame.View
Description
High level view helpers
- module Frame.GUI
- module Frame.Data
- module Database.HaskellDB.BoundedList
- class (FrameConfig m, FrameReader m) => FrameView m
- (-.-) :: Table r -> Attr f a -> String
- title :: FrameView m => String -> m Data -> m Data
- list :: (a -> Container) -> [a] -> [Class] -> Container
- errorList :: [String] -> Maybe Container
- text :: String -> Element
- link :: URL -> String -> Element
- formGen :: FrameView m => Table r -> [FormElement] -> [String] -> m Container
- form :: Label -> [FormElement] -> [String] -> Container
- formField :: FieldName -> Label -> FormValue -> Maybe Int -> [String] -> Bool -> FormElement
- submitButton :: FormElement
- deleteLink :: URL -> FormElement
- cancelLink :: URL -> FormElement
- paragraph :: Element -> Container
Documentation
module Frame.GUI
module Frame.Data
class (FrameConfig m, FrameReader m) => FrameView m Source
Instances
| (FrameConfig m, FrameReader m) => FrameView m |
General,
Convenience function for a stringed representation fo a table and attribute
Arguments
| :: FrameView m | |
| => String | The title of the View |
| -> m Data | The ViewPart to wrap |
| -> m Data | The resulting Data type |
The title function wraps a ViewPart in a View if not an Ajax request
Abstract list generator
Helper function for generating a potential error list
Creates a link with just a text element
Forms
Arguments
| :: FrameView m | |
| => Table r | The table for which the form will be gotten |
| -> [FormElement] | A set of form elements to append to the form |
| -> [String] | A set of form fields to hide/not display |
| -> m Container | The form |
Generates a form based on a database description
Arguments
| :: Label | Group label |
| -> [FormElement] | Form elements |
| -> [String] | Any classes |
| -> Container | The form |
Helper function to create a simple form with a single group
Arguments
| :: FieldName | |
| -> Label | |
| -> FormValue | Set value of field |
| -> Maybe Int | Potential length restriction of the field |
| -> [String] | List of errors |
| -> Bool | Is the form field hidden? |
| -> FormElement | The field |
Helper function for creating a form field
submitButton :: FormElementSource
Helper function for a submit button
Arguments
| :: URL | Route for cancelation |
| -> FormElement |
Helper function for a cancel link