protected function parse()
{
parent::parse();
// parse datagrids
$this->tpl->assign('dgLabels', $this->dgLabels->getNumResults() != 0 ? $this->dgLabels->getContent() : false);
$this->tpl->assign('dgMessages', $this->dgMessages->getNumResults() != 0 ? $this->dgMessages->getContent() : false);
$this->tpl->assign('dgErrors', $this->dgErrors->getNumResults() != 0 ? $this->dgErrors->getContent() : false);
$this->tpl->assign('dgActions', $this->dgActions->getNumResults() != 0 ? $this->dgActions->getContent() : false);
// is filtered?
if ($this->getParameter('form', 'string', '') == 'filter') {
$this->tpl->assign('filter', true);
}
// parse filter as query
$this->tpl->assign('filter', $this->filterQuery);
// parse isGod
$this->tpl->assign('isGod', $this->isGod);
// parse noItems, if all the datagrids are empty
$this->tpl->assign('noItems', $this->dgLabels->getNumResults() == 0 && $this->dgMessages->getNumResults() == 0 && $this->dgErrors->getNumResults() == 0 && $this->dgActions->getNumResults() == 0);
$this->tpl->assign('hasSubmissions', $this->hasSubmissions);
// parse the add URL
$this->tpl->assign('addURL', BackendModel::createURLForAction('Add', null, null, null) . $this->filterQuery);
}