-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* dev: #24 Added SelectMany View Type and stringList Data Type Example #24 Adding example for selectOne view type #24 textarea and readOnlyText samples added. #24 Minor JSON formatting #24 Table sample
- Loading branch information
Showing
6 changed files
with
245 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
grails-app/conf/example_models/viewReadonlyTextExample.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"dataModel": [ | ||
{ | ||
"dataType": "text", | ||
"description": "", | ||
"name": "notes", | ||
"defaultValue": "Default Value" | ||
} | ||
], | ||
"modelName": "Readonly View Type Example", | ||
"viewModel": [ | ||
{ | ||
"title": "Notes:", | ||
"source": "notes", | ||
"type": "readonlyText" | ||
} | ||
] | ||
} |
23 changes: 23 additions & 0 deletions
23
grails-app/conf/example_models/viewSelectManyDataStringListExample.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"dataModel": [ | ||
{ | ||
"dataType": "stringList", | ||
"name": "stringListField", | ||
"description": "Description for stringListField", | ||
"constraints": [ | ||
"value1", | ||
"value2", | ||
"value3" | ||
] | ||
} | ||
], | ||
"modelName": "SelectMany View Type and stringList Data Type Example", | ||
"viewModel": [ | ||
{ | ||
"preLabel": "Description for stringListField", | ||
"computed": null, | ||
"source": "stringListField", | ||
"type": "selectMany" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"dataModel": [ | ||
{ | ||
"name": "textFieldWithConstraints", | ||
"dataType": "text", | ||
"description": "Description for textFieldWithConstraints", | ||
"constraints": [ | ||
"value1", | ||
"value2", | ||
"value3" | ||
], | ||
"defaultValue": 1 | ||
} | ||
], | ||
"modelName": "SelectOne View Type Example", | ||
"viewModel": [ | ||
{ | ||
"source": "textFieldWithConstraints", | ||
"type": "selectOne", | ||
"preLabel": "selectOne control" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
{ | ||
"dataModel": [ | ||
{ | ||
"dataType": "list", | ||
"name": "adminActions", | ||
"columns": [ | ||
{ | ||
"dataType": "text", | ||
"noTotal": "true", | ||
"description": "The type of administration activity undertaken. Add more rows for different admin activities as required.", | ||
"name": "adminActionType", | ||
"constraints": [ | ||
"Assess EOI applications and EOI site visits", | ||
"Development / call for applications", | ||
"Data analysis", | ||
"Desktop information gathering", | ||
"Develop monitoring protocols", | ||
"Communications plan", | ||
"Establish contractor agreements", | ||
"Establish landholder agreements", | ||
"Financial audits", | ||
"Financial planning", | ||
"GIS / spatial data", | ||
"Meeting / meeting administration", | ||
"Modelling", | ||
"Order / purchase equipment, plants, seed, wire, posts etc", | ||
"Partnership building", | ||
"Prepare EOI process / criteria", | ||
"Record Keeping", | ||
"Site selection", | ||
"Steering group / working group established", | ||
"Submit project progress / annual / final report", | ||
"Technical support", | ||
"Update / submit Project MERI Plan", | ||
"Works approvals", | ||
"Other (specify in notes)" | ||
], | ||
"validate": "required" | ||
}, | ||
{ | ||
"dataType": "number", | ||
"description": "Number of people involved in the administration activity. An individual can be involved in more than one activity.", | ||
"name": "numberInvolved" | ||
}, | ||
{ | ||
"dataType": "number", | ||
"description": "The average number of hours per person spent on each administration activity", | ||
"name": "hoursPerPerson" | ||
}, | ||
{ | ||
"dataType": "number", | ||
"description": "The total estimated person hours spent on each administration activity.", | ||
"computed": { | ||
"operation": "times", | ||
"dependents": [ | ||
"numberInvolved", | ||
"hoursPerPerson" | ||
] | ||
}, | ||
"name": "hoursActionTotal" | ||
}, | ||
{ | ||
"dataType": "text", | ||
"description": "", | ||
"name": "activityNotes" | ||
} | ||
] | ||
}, | ||
{ | ||
"dataType": "number", | ||
"description": "Aggregate total of hours spent undertaking administration activities.", | ||
"primaryResult": "true", | ||
"computed": { | ||
"operation": "sum", | ||
"dependents": { | ||
"source": "hoursActionTotal", | ||
"fromList": "adminActions" | ||
} | ||
}, | ||
"name": "hoursAdminTotal" | ||
}, | ||
{ | ||
"dataType": "text", | ||
"description": "", | ||
"name": "notes" | ||
} | ||
], | ||
"modelName": "Table View Type Example", | ||
"viewModel": [ | ||
{ | ||
"items": [{ | ||
"source": "Please list the numbers of people involved in undertaking each relevant type of administration activity and the average time spent per person:", | ||
"computed": null, | ||
"type": "literal" | ||
}], | ||
"type": "row" | ||
}, | ||
{ | ||
"footer": | ||
{"rows": | ||
[{"columns": [ | ||
{ | ||
"colspan": 2, | ||
"source": "", | ||
"computed": null, | ||
"type": "literal" | ||
}, | ||
{ | ||
"source": "Total time spent undertaking project administration activities (Hrs)", | ||
"computed": null, | ||
"type": "literal" | ||
}, | ||
{ | ||
"source": "hoursAdminTotal", | ||
"computed": "{\"operation\":\"sum\",\"dependents\":{\"source\":\"hoursActionTotal\",\"fromList\":\"adminActions\"}}", | ||
"type": "number" | ||
} | ||
]}]}, | ||
"source": "adminActions", | ||
"columns": [ | ||
{ | ||
"title": "Type of administration activity:", | ||
"source": "adminActionType", | ||
"width": "25%", | ||
"computed": null, | ||
"type": "selectOne" | ||
}, | ||
{ | ||
"title": "No. of people:", | ||
"source": "numberInvolved", | ||
"width": "10%", | ||
"computed": null, | ||
"type": "number" | ||
}, | ||
{ | ||
"title": "Ave. time per person (Hrs):", | ||
"source": "hoursPerPerson", | ||
"width": "10%", | ||
"computed": null, | ||
"type": "number" | ||
}, | ||
{ | ||
"title": "Ave. total time spent (Hrs):", | ||
"source": "hoursActionTotal", | ||
"width": "10%", | ||
"computed": "{\"operation\":\"product\",\"dependents\":[\"numberInvolved\",\"hoursPerPerson\"]}", | ||
"type": "number" | ||
}, | ||
{ | ||
"title": "Notes:", | ||
"source": "activityNotes", | ||
"width": "40%", | ||
"computed": null, | ||
"type": "textarea" | ||
} | ||
], | ||
"userAddedRows": true, | ||
"class": "output-section", | ||
"type": "table" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"dataModel": [ | ||
{ | ||
"dataType": "text", | ||
"description": "", | ||
"name": "notes" | ||
} | ||
], | ||
"modelName": "Textarea View Type Example", | ||
"viewModel": [ | ||
{ | ||
"title": "Notes:", | ||
"source": "notes", | ||
"rows": "5", | ||
"cols": "100", | ||
"type": "textarea" | ||
}] | ||
} |