* @param Cemetery $this->cemetery */ use Application\Models\Person; use Blossom\Classes\View; $addButton = ''; if (Person::isAllowed('sections', 'edit')) { $helper = $this->template->getHelper('buttonLink'); $addButton = $helper->buttonLink( BASE_URI.'/sections/update?cemetery_id='.$this->cemetery->getId(), $this->translate('add_section'), 'add' ); } $name = View::escape($this->cemetery->getName()); echo "

$name

{$this->translate(['section', 'sections', 2])} $addButton

"; foreach ($this->cemetery->getSections() as $section) { $editButton = ''; if (Person::isAllowed('sections', 'edit')) { $editButton = $helper->buttonLink( BASE_URI.'/sections/update?section_id='.$section->getId(), $this->translate('edit'), 'edit' ); } $code = View::escape($section->getCode()); $name = View::escape($section->getName()); echo " "; } echo "
{$this->translate('code')} {$this->translate('name')}
$editButton $code $name
"; include APPLICATION_HOME.'/blocks/html/serviceButtons.inc';