/*
 * Author       : numplumz
 * Generated on : 23-Nov-2009 02:09:38
 * Version      : 3.0
 */
application "Plumz Ride Log"
{
    type = public
    date format = "dd-MMM-yyyy"
    time zone = "Greenwich"
    section Home
    {
        form  Plumz_Member_Ride_Log
        {
            displayname  =  "Input Ride Time"
            captcha = true
            success message  =  "Good time thanks for the input!"
            
            column
            {
                must  have  Password
                (
                    type  =  text
                    defaultvalue  =  "Password"
                    maxchar  =  8
                    tooltip  =  "Entry password required"
                )

                must  have  Rider
                (
                    type  =  picklist
                    values  =  {"Smiffy",   "Stew",   "Jack",   "Brownie",   "Paul M",   "Troy",   "Dave",   "Hollie",   "Bigring",   "Tom",   "Brad",   "Rich",   "Noddy",   "Ricky",   "Nick",   "Pilch",   "Glynn",   "Graham",   "Nige",   "Ron",   "Steve",   "Gregg",   "Burty",   "James",   "Dan"}
                    sortorder  =  ascending
                )

                must  have  Course
                (
                    type  =  picklist
                    values  =  {"1. Fermyn Flyer",   "2. Woodford",   "3. Kettering gravel lap",   "4. Hilly Hollies",   "5. Stanwick lakes",   "6. Pitsford",   "7. Garage Daze",   "8. BMX loop"}
                    tooltip  =  "Chose the correct course riden"
                )

                must  have  Date_field
                (
                    displayname  =  "Date"
                    type  =  date
                    tooltip  =  "Date of ride"
                )

                must  have  Currency_1
                (
                    displayname  =  "Time"
                    type  =  PEN
                    defaultvalue  =  00.00  
                    width  =  20
                    maxchar  =  5
                    tooltip  =  "input yout time in format shown"
                )

                official
                (
                    type  =  checkbox
                    private  =  true
                    defaultvalue  =  false
                    tooltip  =  "Timed officially (not self timed)"
                )

            }
            column
            {
                must  have  Conditions
                (
                    type  =  picklist
                    values  =  {"Wet and Muddy",   "Damp and bit slippy",   "Dry and Dusty"}
                    tooltip  =  "Indicate what it was like"
                )

                must  have  Night_or_day
                (
                    displayname  =  "Night or day"
                    type  =  picklist
                    values  =  {"Night",   "Day"}
                    tooltip  =  "Was it a night or Day lap"
                )

                must  have  Bike
                (
                    type  =  text
                    maxchar  =  20
                    tooltip  =  "which bike did you use"
                )

                Details
                (
                    type  =  textarea
                    tooltip  =  "Any othe info - tyres choice, or obstructins etc as a guide to why you went fast or slow."
                )

            }
            actions
            {
                on add
                {
                    Submit
                    (
                        type  =  submit
                        displayname  =  "Submit"
                    )
                    Reset
                    (
                        type  =  reset
                        displayname  =  "Reset"
                    )
                }
                on edit
                {
                    Update
                    (
                        type  =  submit
                        displayname  =  "Update"
                    )
                    Cancel
                    (
                        type  =  cancel
                        displayname  =  "Cancel"
                    )
                }
            }
        }

        list  Plumz_Member_Ride_Log_View
        {
            displayname = "Plumz ride records"
            show  all  rows  from  Plumz_Member_Ride_Log [Password == "bigring"]
            (
                Rider
                Currency_1 as "Time"
                Course
                Bike
                Conditions
                Date_field as "Date"
                Details
                Night_or_day as "Night or day"
                official
            )
            filters 
            (
                Rider
                Course
            )
            group by
            (
                Course   ascending
            )
            sort by
            (
                Currency_1   ascending
            )
            options
            (
                display rows = 30
            )
        }

    }

    section Admin
    {
        hide = true
        summary  All_added_Plumz_ride_records
        {
            displayname = "All added Plumz ride records"
            show  all  rows  from  Plumz_Member_Ride_Log [Password != "bigring"]
            (
                Date_field as "Date"
                Course
                Currency_1 as "Time"
                Bike
                Conditions
                Details
                Night_or_day as "Night or day"
                Password
            )
            filters 
            (
                Course
            )
            group by
            (
                Course   ascending
            )
            sort by
            (
                Currency_1   ascending
            )
        }

        list  non_password_entries
        {
            displayname = "non password entries"
            show  all  rows  from  Plumz_Member_Ride_Log [Password != "bigring"]
            (
                Rider
                Currency_1 as "Time"
                Course
                Bike
                Conditions
                Date_field as "Date"
                Details
                Night_or_day as "Night or day"
                official
            )
            filters 
            (
                Rider
                Course
            )
            group by
            (
                Course   ascending
            )
            sort by
            (
                Currency_1   ascending
            )
            options
            (
                display rows = 30
            )
        }

    }

    customize
    {
        layout = "pane left"
        base theme = "professional"
        color = "black"
    }
}
