1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-01 10:50:37 +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
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'));
if (isset($errors['menu_item_name_empty'])) echo '<div class="error-message">'.$errors['menu_item_name_empty'].'</div>';
?>
</div>
<div class="form-group">
<?php
if (isset($errors['menu_item_name_empty'])) echo Html::nbsp(4).'<span style="color:red;">'.$errors['menu_item_name_empty'].'</span>';
echo (
Form::label('menu_item_link', __('Item link', 'menu')).
Form::input('menu_item_link', $menu_item_link, array('class' => 'form-control'))

View File

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