Changeset bc0d8703ab5d823c85e70620818f9c0f6283cd19
- Timestamp:
- 12/25/11 09:38:19 (5 months ago)
- Author:
- Xemle <xemle@phtagr.org>
- Children:
- b84664bd42dafd95bb77208140cf9ae30090db7c
- Parents:
- a6025fb6f69a092dc7111e7bf56fdebaae8de109
- git-committer:
- Xemle <xemle@phtagr.org> / 2011-12-25T09:38:19Z+0100
- Message:
-
Fix autogenerated menu
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r37b7f7f
|
rbc0d870
|
|
| 76 | 76 | $parentItem =& $this->getItem($parentId); |
| 77 | 77 | foreach ($this->controller->subMenu as $action => $title) { |
| 78 | | $defaults = array('parent' => $parentId, 'active' => false, 'controller' => $name, 'action' => false, 'admin' => false, 'url' => false); |
| | 78 | $defaults = array('parent' => $parentId, 'active' => false, 'controller' => $name, 'action' => false, 'admin' => false); |
| 79 | 79 | if (is_numeric($action)) { |
| 80 | 80 | $item = am($defaults, $title); |
-
|
r4eeed6a
|
rbc0d870
|
|
| 173 | 173 | $linkOptions['class'] = 'active'; |
| 174 | 174 | } |
| 175 | | if (!isset($item['url'])) { |
| 176 | | $item['url'] = array('controller' => $item['controller'], 'action' => $item['action'], 'admin' => $item['admin']); |
| 177 | | } |
| 178 | | if ($item['url'] === false) { |
| | 175 | if (isset($item['url']) && $item['url'] === false) { |
| 179 | 176 | $item = $item['title']; |
| 180 | 177 | } else { |
| | 178 | if (!isset($item['url'])) { |
| | 179 | $item['url'] = array('controller' => $item['controller'], 'action' => $item['action'], 'admin' => $item['admin']); |
| | 180 | } |
| 181 | 181 | $item = $this->Html->link($item['title'], $item['url'], $linkOptions); |
| 182 | 182 | } |
| 183 | | Logger::debug($item); |
| 184 | 183 | $items[] = $this->Html->tag('li', $item . $submenu, $attrs); |
| 185 | 184 | } |