Skip to content

Commit

Permalink
Render VO Root population link only once under Main Menu
Browse files Browse the repository at this point in the history
  • Loading branch information
ioigoume committed Nov 16, 2021
1 parent e0898d6 commit 4662ed2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [3.3.7-rciam] - 2021-11-16

### Fixed

- Grant CO Person view permisions for Identifiers Model to self
- Render root VO Population link only once under Main Menu

## [3.3.6-rciam] - 2021-11-15

### Fixed
Expand Down
22 changes: 12 additions & 10 deletions app/View/Elements/menuMain.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,19 @@
// print parent cou if any
if(!empty($permissions['menu']['admincous_root'])) {
foreach ($permissions['menu']['admincous_root'] as $couid => $couname) {
print '<li class="mdl-js-ripple-effect">';
$args = array();
$args['plugin'] = null;
$args['controller'] = 'co_people';
$args['action'] = 'index';
$args['co'] = $menuCoId;
$args['Search.couid'] = $couid;
if(!isset($permissions['menu']['admincous'][$couid])) {
print '<li class="mdl-js-ripple-effect">';
$args = array();
$args['plugin'] = null;
$args['controller'] = 'co_people';
$args['action'] = 'index';
$args['co'] = $menuCoId;
$args['Search.couid'] = $couid;

print $this->Html->link(_txt('me.population.cou', array($couname)), $args, array('class' => 'spin'));
print '<span class="mdl-ripple"></span>';
print "</li>";
print $this->Html->link(_txt('me.population.cou', array($couname)), $args, array('class' => 'spin'));
print '<span class="mdl-ripple"></span>';
print "</li>";
}
}
}
foreach ($permissions['menu']['admincous'] as $couid => $couname) {
Expand Down

0 comments on commit 4662ed2

Please sign in to comment.