Template population menu fixes

pull/909/head
Iglocska 2016-02-03 10:16:03 +01:00
parent d69065450c
commit 6353de1e58
3 changed files with 8 additions and 3 deletions

View File

@ -262,7 +262,7 @@ class TemplatesController extends AppController {
'recursive' => -1,
'fields' => array('id', 'orgc_id', 'distribution'),
));
$this->set('event', $event);
if (empty($event)) throw new MethodNotAllowedException('Event not found or you are not authorised to edit it.');
if (empty($template)) throw new MethodNotAllowedException('Template not found or you are not authorised to edit it.');
if (!$this->_isSiteAdmin()) {

View File

@ -13,7 +13,12 @@
$mayModify = true;
if ($isAclPublish) $mayPublish = true;
}
?>
if (($menuItem === 'template_populate_results')):
?>
<li id='litemplate_populate_results'><a href="<?php echo $baseurl;?>/templates/index">Populate From Template</a></li>
<?php
endif;
?>
<?php if ($menuItem === 'freetextResults'): ?>
<li id='lifreetextResults'><a href="#">Freetext Import Results</a></li>
<li class="divider"></li>

View File

@ -76,5 +76,5 @@ endforeach;?>
</div>
<?php
echo $this->element('side_menu', array('menuList' => 'regexp', 'menuItem' => 'index'));
echo $this->element('side_menu', array('menuList' => 'event', 'menuItem' => 'template_populate_results'));
?>