1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-05 04:37:51 +02:00

UI Improvements - Menu Plugin - Fixes #194

This commit is contained in:
Awilum
2014-01-09 00:58:45 +02:00
parent 7c0a4d7a50
commit e71bb980a5
2 changed files with 6 additions and 11 deletions

View File

@@ -17,11 +17,11 @@
<?php <?php
echo Form::label('menu_item_name', __('Item name', 'menu')); echo Form::label('menu_item_name', __('Item name', 'menu'));
echo Form::input('menu_item_name', $menu_item_name, array('class' => (isset($errors['menu_item_name_empty']) || isset($errors['menu_item_name_empty'])) ? 'form-control error-field' : 'form-control')); echo Form::input('menu_item_name', $menu_item_name, array('class' => (isset($errors['menu_item_name_empty']) || isset($errors['menu_item_name_empty'])) ? 'form-control error-field' : 'form-control'));
if (isset($errors['menu_item_name_empty'])) echo '<div class="error-message">'.$errors['menu_item_name_empty'].'</div>';
?> ?>
</div> </div>
<div class="form-group"> <div class="form-group">
<?php <?php
if (isset($errors['menu_item_name_empty'])) echo Html::nbsp(4).'<span style="color:red;">'.$errors['menu_item_name_empty'].'</span>';
echo ( echo (
Form::label('menu_item_link', __('Item link', 'menu')). Form::label('menu_item_link', __('Item link', 'menu')).
Form::input('menu_item_link', $menu_item_link, array('class' => 'form-control')) Form::input('menu_item_link', $menu_item_link, array('class' => 'form-control'))

View File

@@ -10,8 +10,8 @@
<br> <br>
<?php <?php
echo ( echo (
Html::anchor(__('Create New Item', 'menu'), 'index.php?id=menu&action=add', array('title' => __('Create New Item', 'menu'), 'class' => 'btn btn-primary')) Html::anchor(__('Create New Item', 'menu'), 'index.php?id=menu&action=add', array('title' => __('Create New Item', 'menu'), 'class' => 'btn btn-primary'))
); );
?> ?>
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
@@ -21,16 +21,11 @@
<?php } ?> <?php } ?>
<?php <?php
foreach ($categories as $category) { foreach ($categories as $category) {
$items = $menu->select('[category="'.$category.'"]', 'all', null, array('id', 'name', 'link', 'target', 'order', 'category'), 'order', 'ASC'); $items = $menu->select('[category="'.$category.'"]', 'all', null, array('id', 'name', 'link', 'target', 'order', 'category'), 'order', 'ASC');
$category_to_add = ($category == '') ? '' : '&category='.$category; $category_to_add = ($category == '') ? '' : '&category='.$category;
?> ?>
<div> <div>
<div class="pull-left"> <div class="pull-left">
<h3><?php echo __('Category', 'menu'); ?>: <?php echo ($category == '') ? 'default' : $category; ?></h3> <h3><?php echo __('Category', 'menu'); ?>: <?php echo ($category == '') ? 'default' : $category; ?></h3>
@@ -39,8 +34,8 @@
<br> <br>
<?php <?php
echo ( echo (
Html::anchor(__('Create New Item', 'menu'), 'index.php?id=menu&action=add'.$category_to_add , array('title' => __('Create New Item', 'menu'), 'class' => 'btn btn-primary')) Html::anchor(__('Create New Item', 'menu'), 'index.php?id=menu&action=add'.$category_to_add , array('title' => __('Create New Item', 'menu'), 'class' => 'btn btn-primary'))
); );
?> ?>
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
@@ -52,7 +47,7 @@
<thead> <thead>
<tr> <tr>
<th><?php echo __('Name', 'menu'); ?></th> <th><?php echo __('Name', 'menu'); ?></th>
<th class="span2"><?php echo __('Order', 'menu'); ?></th> <th><?php echo __('Order', 'menu'); ?></th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>