/*
 * Author       : friendlyghost
 * Generated on : 23-Nov-2009 01:26:21
 * Version      : 3.0
 */
application "Brendan Cooper Social Media Resource"
{
    type = public
    date format = "dd-MMM-yyyy"
    time zone = "America/Los_Angeles"
    section Home
    {
        form  Input
        {
            displayname  =  "Brendan's Social Media Resource - Data Input"
            captcha = true
            success message  =  "Thanks for contributing! Regards, Brendan Cooper (brendancooper.com)"
            
            Resource
            (
                type  =  picklist
                values  =  {"Blog indexes",   "Feedburner",   "Google Analytics",   "Blogs",   "Brandpulse",   "Forums",   "Google Documents",   "Google Earth",   "Google Reader",   "Google Trends",   "Message boards",   "News searches",   "Blog searches",   "Onalytica",   "Online personalised radio",   "Online Report Creator Tool",   "Online databases",   "Picture sharing",   "Podcasts",   "Skype",   "Slideshare",   "Social networks",   "Virtual worlds",   "Wikis",   "RSS",   "Video sharing"}
                sortorder  =  ascending
            )

            Activity
            (
                type  =  picklist
                values  =  {"Promotion",   "Corporate Social Responsibility (CSR)",   "Research",   "Interviews",   "Speeches",   "Ongoing campaign",   "Conference briefings/support",   "Collaboration",   "Brainstorming",   "Announcements",   "Trend analysis",   "News tracking",   "Campaign measurement",   "Crisis management",   "Pitch/outreach",   "Viral",   "Media relations",   "Blogger relations"}
                sortorder  =  ascending
            )

            must  have  Description
            (
                type  =  textarea
            )

            Link
            (
                type  =  url
                enable   linkname
            )

            must  have  Theory_proof
            (
                displayname  =  "Theory/proof?"
                type  =  radiobuttons
                values  =  {"Theory",   "Proof"}
            )

            actions
            {
                on add
                {
                    Submit
                    (
                        type  =  submit
                        displayname  =  "Submit"
                    )
                    Reset
                    (
                        type  =  reset
                        displayname  =  "Reset"
                    )
                }
                on edit
                {
                    Update
                    (
                        type  =  submit
                        displayname  =  "Update"
                        on success
                        {
                            sendmail
                            (
                                To       :  zoho.adminuserid, "yourname@domain.com" 
                                From     :  zoho.adminuserid 
                                Subject  :  "Subject of the email" 
                                Message  :  "Your message" 
                            )
                        }
                    )
                    Cancel
                    (
                        type  =  cancel
                        displayname  =  "Cancel"
                    )
                }
            }
        }

        list  Brendan_Cooper_s_Social_Media_Resource_Data_View
        {
            displayname = "Brendan Cooper's Social Media Resource - Data View"
            show  all  rows  from  Input 
            (
                Activity
                Resource
                Description
                Link
                Theory_proof as "Theory/proof?"
            )
            filters 
            (
                Resource
                Activity
                Theory_proof
            )
            options
            (
                display rows = 100
            )
            permission
            (
                add = true
                duplicate = true
                edit = true
            )
        }

    }

}
