NewListHandler.icl 607 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
implementation module NewListHandler

import StdEnv
import Http, Session
import JSON
import InternaliTasksCommon


:: NewWorkItem	= 	{ icon		:: String 	// An icon name. The actual icon image is defined in the css. 
					, label		:: String 	// A label of the workflow that is started
					}

derive JSONEncode NewWorkItem

15 16
handleNewListRequest :: !(LabeledTask a) !Int !HTTPRequest !Session *HSt -> (!HTTPResponse, !*HSt)
handleNewListRequest (label,task) mainuser request session hst	
17 18
	= ({http_emptyResponse & rsp_data = toJSON itemlist}, hst)
where
19
	itemlist =	[ {icon = "editTask", label = label}
20 21
				]