| @@ 364-381 (lines=18) @@ | ||
| 361 | } |
|
| 362 | } |
|
| 363 | ||
| 364 | if ($this->pagesConfiguration->getPossibleChildTypes( |
|
| 365 | $node->getRefEntityName() |
|
| 366 | ) |
|
| 367 | ) { |
|
| 368 | $menu->addChild( |
|
| 369 | 'action.addsubpage', |
|
| 370 | [ |
|
| 371 | 'linkAttributes' => [ |
|
| 372 | 'type' => 'button', |
|
| 373 | 'class' => 'btn btn-default btn--raise-on-hover', |
|
| 374 | 'data-toggle' => 'modal', |
|
| 375 | 'data-keyboard' => 'true', |
|
| 376 | 'data-target' => '#add-subpage-modal', |
|
| 377 | ], |
|
| 378 | 'extras' => ['renderType' => 'button'], |
|
| 379 | ] |
|
| 380 | ); |
|
| 381 | } |
|
| 382 | ||
| 383 | if (null !== $node->getParent() && $canEdit) { |
|
| 384 | $menu->addChild( |
|
| @@ 398-412 (lines=15) @@ | ||
| 395 | ] |
|
| 396 | ); |
|
| 397 | ||
| 398 | if ($this->showDuplicateWithChildren) { |
|
| 399 | $menu->addChild( |
|
| 400 | 'action.duplicate_with_children', |
|
| 401 | [ |
|
| 402 | 'linkAttributes' => [ |
|
| 403 | 'type' => 'button', |
|
| 404 | 'class' => 'btn btn-default btn--raise-on-hover', |
|
| 405 | 'data-toggle' => 'modal', |
|
| 406 | 'data-keyboard' => 'true', |
|
| 407 | 'data-target' => '#duplicate-with-children-page-modal', |
|
| 408 | ], |
|
| 409 | 'extras' => ['renderType' => 'button'], |
|
| 410 | ] |
|
| 411 | ); |
|
| 412 | } |
|
| 413 | } |
|
| 414 | ||
| 415 | if ((null !== $node->getParent() || $node->getChildren()->isEmpty()) |
|