1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-01 10:50:37 +02:00

Improved Menu Plugin #11

This commit is contained in:
Awilum
2012-10-02 21:25:22 +03:00
parent b8ad9ba3d8
commit e3ae8cecc8
7 changed files with 181 additions and 52 deletions

View File

@@ -1,13 +1,36 @@
<h2><?php echo __('Menu', 'menu'); ?></h2>
<br />
<?php if ($menu->count() == 0) { ?>
<h3><?php echo __('Category', 'menu'); ?>: <?php echo 'default'; ?></h3>
<br />
<?php
echo (
Html::anchor(__('Create new item', 'menu'), 'index.php?id=menu&action=add', array('title' => __('Create new page', 'menu'), 'class' => 'btn btn-small'))
);
?>
<br /><br />
<?php } ?>
<?php
foreach ($categories as $category) {
$items = $menu->select('[category="'.$category.'"]', 'all', null, array('id', 'name', 'link', 'target', 'order', 'category'), 'order', 'ASC');
?>
<h3><?php echo __('Category', 'menu'); ?>: <?php echo ($category == '') ? 'default' : $category; ?></h3>
<br />
<?php
echo (
Html::anchor(__('Create new item', 'menu'), 'index.php?id=menu&action=add', array('title' => __('Create new page', 'menu'), 'class' => 'btn btn-small'))
);
?>
<br /><br />
<table class="table table-bordered">
<thead>
@@ -48,4 +71,6 @@
</tr>
<?php } ?>
</tbody>
</table>
</table>
<br />
<?php } ?>