-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #295 from sitedyno/bootstrap-html
Update HTML & code for bootstrap 4
- Loading branch information
Showing
10 changed files
with
50 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
<?php | ||
foreach ($tables as $table => $config) { | ||
?> | ||
<li><?= $this->Html->link($config['title'], [ | ||
'controller' => $config['controller'], | ||
'action' => $config['action'], | ||
]); ?></li> | ||
<?php | ||
|
||
use CrudView\Menu\MenuItem; | ||
|
||
foreach ($tables as $entry) { | ||
$menu = new MenuItem($entry['title'], ['controller' => $entry['controller'], 'action' => 'index']); | ||
echo $this->element('menu/item', ['item' => $menu, 'itemClass' => 'nav-link']); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<li class="divider"></li> | ||
<li class="dropdown-divider"></li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
<?php | ||
$itemClass = $itemClass ?? 'nav-link'; | ||
$options = array_merge($item->getOptions(), ['class' => 'nav-link']); | ||
?> | ||
<?php if ($itemClass === 'nav-link') : ?> | ||
<li class="nav-item"> | ||
<?php else : ?> | ||
<li> | ||
<?php endif; ?> | ||
<?php if ($item->getUrl() === null) : ?> | ||
<span class="nav-header"><?= $item->getTitle() ?></span> | ||
<span class="<?= $itemClass; ?> disabled"><?= $item->getTitle(); ?></span> | ||
<?php else : ?> | ||
<?= $this->Html->link($item->getTitle(), $item->getUrl(), $item->getOptions()); ?> | ||
<?= $this->Html->link($item->getTitle(), $item->getUrl(), $options); ?> | ||
<?php endif; ?> | ||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters