#!/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 '('
			echo ' help "control.html"'
			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 ')'
			;;
		info)
			echo '('
			printf ' title "%s"' "`_ "System objects"`"
			printf ' group "%s"' "`_ "System"`"
			printf ' description "%s\n%s"' \
			    "`_ "This  service is  intended  primarily for facilities that can potentially be dangerous to system security, to let"`" \
			    "`_ "you enable, disable, or configure the facility independently from package installation."`"
			echo ')'
			;;
		*)
			echo '#f'
	esac
}

message_loop
