//- UNCLASSIFIED
//-

extends site
append site_help
	p Provides a view for all engines, or a specfic engine &name of type &engine
append site_parms
	- view = "Min"
	- dock = "left"
	- dims = "1000,800"
append site_body

	if query.engine
		#form.engine(
			path="/engines.db?Engine=#{query.engine}&Name=#{query.name}",
			cols="Name,Engine,Enabled.c,Program(Code.x,Vars.x.Context)")

			:markdown
				**Select** to retrieve and lock your engine for editing.  **Update**, **Insert**, **Delete** or **Select** will unlock (for possible recompile) your engine.  Use
				**Execute** to test your **enabled** engine or to recover 
				your **disabled** engine from the **#{title}** initial (as shipped) store.  See the **#{title}**
				[API](/api.view?goto=Engines) and [skinning guide](/skinguide.view) for more information on engines.

	else
		#grid.engines(
			path="/engines.db",
			page=25,kiss,
			cols="Classif,Name,Engine,Enabled.c,Period.n,Code.x,Vars.x.Context,Description.t")

		#grid.stats(
			path="/simstats.db",
			page=25,nowrap,
			cols="t.date,name,step.n,events,tokens,state,delay")

		#grid.options(
			path="/simoptions.db",
			page=25,
			cols="name,steps.n,t.n,delta.n,delaybins.n,delaymax.n,snappath,snapperiod.n")

		#form.engine(
			path="/engines.db?engine=${xs('engines').Engine}&name=${x.Name}",nowrap,
			cols="Name,Engine,Enabled.c,Program(Description,Code.x,Context.x)")

			:markdown
				**Select** to retrieve and lock your engine for editing.  **Update**, **Insert**, **Delete** or **Select**
				will unlock (for possible recompile) your engine.  Use **Execute** to test your **enabled** engine or to recover 
				your **disabled** engine from the **#{title}** initial (as shipped) store.  See the **#{title}**
				[API](/api.view?goto=Engines) and [skinning guide](/skinguide.view) for more information on engines.

//- UNCLASSIFIED
