frame-0.1: A simple web framework.

Frame.View

Contents

Description

High level view helpers

Synopsis

Documentation

module Frame.GUI

module Frame.Data

class (FrameConfig m, FrameReader m) => FrameView m Source

Instances

General,

(-.-)Source

Arguments

:: Table r

Table

-> Attr f a

Attribute

-> String

''TableName.attributeName''

Convenience function for a stringed representation fo a table and attribute

titleSource

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

listSource

Arguments

:: (a -> Container)

List item generator

-> [a]

Items

-> [Class]

Classes

-> Container

List

Abstract list generator

errorListSource

Arguments

:: [String]

Errors

-> Maybe Container

Error list (if errors)

Helper function for generating a potential error list

textSource

Arguments

:: String

Text to use

-> Element

Element created

Creates element level text

linkSource

Arguments

:: URL

URL to use

-> String

Text to use

-> Element

The link

Creates a link with just a text element

Forms

formGenSource

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

formSource

Arguments

:: Label

Group label

-> [FormElement]

Form elements

-> [String]

Any classes

-> Container

The form

Helper function to create a simple form with a single group

formFieldSource

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

deleteLinkSource

Arguments

:: URL

Route for deletion

-> FormElement 

Helper function for a delete link

cancelLinkSource

Arguments

:: URL

Route for cancelation

-> FormElement 

Helper function for a cancel link

paragraphSource

Arguments

:: Element

Element

-> Container

Paragraph

Helper function to create a single simple element paragraph