#!/bin/sh 

_()
{
LANG=${in_language%%;*}.utf8 gettext "alterator-control" "$1"
}

#turn off auto expansion
set -f

. /usr/share/alterator/build/backend3.sh

on_message()
{
	case "$in_action" in
		#information for renderer
		template)
			echo '('
			if [ "$in__objects" = "/" ];then
			    echo ' template "form"'
			    echo ' url "control-list.html"'
			else
			    echo ' template "card-index"'
			    echo ' url "control-object.html"'
			    echo ' redirect "/control"'
			fi
			echo ')'
			;;
		*)
			echo '#f'
	esac
}

message_loop
