/*
 * Author       : template
 * Generated on : 22-Nov-2009 23:02:19
 * Version      : 3.0
 */
application "Issue Manager"
{
    type = public
    allow html = true
    date format = "dd-MMM-yyyy"
    time zone = "America/Los_Angeles"
    section Submit_an_Issue
    {
        displayname = "Submit an Issue"
        form  New_Issue
        {
            displayname  =  "New Issue"
            
            Public_Release
            (
                displayname  =  "Public Release"
                type  =  radiobuttons
                values  =  {"Yes",   "No"}
            )

            must  have  Issue_Title
            (
                displayname  =  "Issue Title"
                type  =  text
            )

            Description
            (
                type  =  textarea
                width  =  6 , 47
            )

            Submitted_by
            (
                displayname  =  "Submitted by"
                type  =  text
                maxchar  =  50
            )

            Category
            (
                type  =  picklist
                values  =  {"Forms",   "Views",   "Page",   "Status Messages",   "Look and Feel",   "Tabs",   "User Management",   "Application",   "Others"}
                sortorder  =  ascending
            )

            Priority
            (
                type  =  picklist
                values  =  {"High",   "Medium",   "Low"}
            )

            Assigned_To
            (
                displayname  =  "Assigned To"
                type  =  picklist
                values  =  {"Charles",   "Muthu",   "Raffic",   "Sriram",   "Vasee"}
            )

            Status
            (
                type  =  picklist
                values  =  {"Open",   "Closed",   "In Progress",   "On hold"}
            )

            Comments
            (
                type  =  textarea
                width  =  4 , 47
            )

            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"
                    )
                }
            }
        }

    }

    section Views
    {
        list  See_All_Issues
        {
            displayname = "See All Issues"
            show  all  rows  from  New_Issue 
            (
                Issue_Title as "Issue Title"
                Description
                Submitted_by as "Submitted by"
                Category
                Priority
                Assigned_To as "Assigned To"
                Status
                Comments
            )
            filters 
            (
                Category
                Priority
                Assigned_To
                Status
                "Internal"  :  Submitted_by.contains("@adventnet.com")
            )
            options
            (
                display rows = 100
            )
            permission
            (
                add = true
                edit = true
                delete = true
            )
        }

    }

    section Another_view
    {
        displayname = "Another view"
        list  Public_Release
        {
            displayname = "Public Release"
            show  all  rows  from  New_Issue 
            (
                Issue_Title as "Issue Title"
                Description
                Submitted_by as "Submitted by"
                Status
                Comments
                Public_Release as "Public Release"
            )
            filters 
            (
                Public_Release
                Status
            )
            options
            (
                display rows = 100
            )
            permission
            (
                add = true
                edit = true
                delete = true
            )
        }

    }

}
