mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-03 11:47:51 +02:00
Frontend Improvements
This commit is contained in:
@@ -1,84 +1,103 @@
|
||||
<h2><?php echo __('New item', 'menu'); ?></h2>
|
||||
<br />
|
||||
<br>
|
||||
|
||||
<?php echo (Form::open()); ?>
|
||||
|
||||
<?php echo (Form::hidden('csrf', Security::token())); ?>
|
||||
|
||||
<?php if (isset($errors['menu_item_name_empty'])) $error_class = ' error'; else $error_class = ''; ?>
|
||||
|
||||
<a href="#select-page" style="text-decoration:none; color:#333; border-bottom:1px dashed #333;" data-toggle="modal" onclick="$('#selectPageModal').modal('show').width(270);" ><?php echo __('Select page', 'menu'); ?></a> /
|
||||
<a href="#select-category" style="text-decoration:none; color:#333; border-bottom:1px dashed #333;" data-toggle="modal" onclick="$('#selectCategoryModal').modal('show').width(270);" ><?php echo __('Select category', 'menu'); ?></a><br /><br />
|
||||
<a href="javascript:;" style="text-decoration:none; color:#333; border-bottom:1px dashed #333;" data-toggle="modal" data-toggle="modal" data-target="#selectPageModal"><?php echo __('Select page', 'menu'); ?></a> /
|
||||
<a href="javascript:;" style="text-decoration:none; color:#333; border-bottom:1px dashed #333;" data-toggle="modal" data-toggle="modal" data-target="#selectCategoryModal"><?php echo __('Select category', 'menu'); ?></a>
|
||||
|
||||
<?php
|
||||
<br><br>
|
||||
|
||||
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'])) ? 'input-xlarge error-field' : 'input-xlarge'));
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
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' => 'input-xlarge'))
|
||||
);
|
||||
|
||||
echo (
|
||||
Form::label('menu_item_category', __('Item category', 'menu')).
|
||||
Form::input('menu_item_category', $menu_item_category, array('class' => 'input-xlarge'))
|
||||
);
|
||||
?>
|
||||
|
||||
<?php
|
||||
echo (
|
||||
Html::br().
|
||||
Form::label('menu_item_target', __('Item target', 'menu')).
|
||||
Form::select('menu_item_target', $menu_item_target_array, $menu_item_target, array('class' => 'input-xlarge'))
|
||||
);
|
||||
|
||||
echo (
|
||||
Html::br().
|
||||
Form::label('menu_item_order', __('Item order', 'menu')).
|
||||
Form::select('menu_item_order', $menu_item_order_array, $menu_item_order, array('class' => 'input-xlarge'))
|
||||
);
|
||||
|
||||
echo (
|
||||
Html::br(2).
|
||||
Form::submit('menu_add_item', __('Save', 'menu'), array('class' => 'btn')).
|
||||
Form::close()
|
||||
);
|
||||
?>
|
||||
|
||||
<div class="modal hide" id="selectPageModal">
|
||||
<div class="modal-header">
|
||||
<a class="close" data-dismiss="modal">×</a>
|
||||
<h3><?php echo __('Select page', 'menu'); ?></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
<ul class="unstyled">
|
||||
<?php if (count($pages_list) > 0) foreach ($pages_list as $page) { ?>
|
||||
<li><?php echo (!empty($page['parent'])) ? Html::nbsp().Html::arrow('right').Html::nbsp(2) : '' ; ?><a href="javascript:;" onclick="$.monstra.menu.selectPage('<?php echo (empty($page['parent'])) ? $page['slug'] : $page['parent'].'/'.$page['slug'] ; ?>', '<?php echo $page['title']; ?>');"><?php echo $page['title']; ?></a></li>
|
||||
<?php } ?>
|
||||
<?php if (count($components_list) > 0) foreach ($components_list as $component) { ?>
|
||||
<li><a href="javascript:;" onclick="$.monstra.menu.selectPage('<?php echo $component; ?>', '<?php echo __(ucfirst($component), $component); ?>');"><?php echo __(ucfirst($component), $component); ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</p>
|
||||
<div class="form-group">
|
||||
<?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'));
|
||||
?>
|
||||
</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'))
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
echo (
|
||||
Form::label('menu_item_category', __('Item category', 'menu')).
|
||||
Form::input('menu_item_category', $menu_item_category, array('class' => 'form-control'))
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
echo (
|
||||
Form::label('menu_item_target', __('Item target', 'menu')).
|
||||
Form::select('menu_item_target', $menu_item_target_array, $menu_item_target, array('class' => 'form-control'))
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
echo (
|
||||
Form::label('menu_item_order', __('Item order', 'menu')).
|
||||
Form::select('menu_item_order', $menu_item_order_array, $menu_item_order, array('class' => 'form-control'))
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
echo (
|
||||
Form::submit('menu_add_item', __('Save', 'menu'), array('class' => 'btn btn-primary')).
|
||||
Form::close()
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal hide" id="selectCategoryModal">
|
||||
<div class="modal-header">
|
||||
<a class="close" data-dismiss="modal">×</a>
|
||||
<h3><?php echo __('Select category', 'menu'); ?></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
<ul class="unstyled">
|
||||
<?php if (count($categories) > 0) foreach ($categories as $category) { ?>
|
||||
<li><a href="javascript:;" onclick="$.monstra.menu.selectCategory('<?php echo $category; ?>');"><?php echo $category; ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</p>
|
||||
<div class="modal fade" id="selectPageModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<a class="close" data-dismiss="modal">×</a>
|
||||
<h4 class="modal-title"><?php echo __('Select page', 'menu'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ul class="list-unstyled">
|
||||
<?php if (count($pages_list) > 0) foreach ($pages_list as $page) { ?>
|
||||
<li><?php echo (!empty($page['parent'])) ? Html::nbsp().Html::arrow('right').Html::nbsp(2) : '' ; ?><a href="javascript:;" onclick="$.monstra.menu.selectPage('<?php echo (empty($page['parent'])) ? $page['slug'] : $page['parent'].'/'.$page['slug'] ; ?>', '<?php echo $page['title']; ?>');"><?php echo $page['title']; ?></a></li>
|
||||
<?php } ?>
|
||||
<?php if (count($components_list) > 0) foreach ($components_list as $component) { ?>
|
||||
<li><a href="javascript:;" onclick="$.monstra.menu.selectPage('<?php echo $component; ?>', '<?php echo __(ucfirst($component), $component); ?>');"><?php echo __(ucfirst($component), $component); ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="selectCategoryModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<a class="close" data-dismiss="modal">×</a>
|
||||
<h4 class="modal-title"><?php echo __('Select category', 'menu'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ul class="list-unstyled">
|
||||
<?php if (count($categories) > 0) foreach ($categories as $category) { ?>
|
||||
<li><a href="javascript:;" onclick="$.monstra.menu.selectCategory('<?php echo $category; ?>');"><?php echo $category; ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -1,84 +1,104 @@
|
||||
<h2><?php echo __('Edit item', 'menu'); ?></h2>
|
||||
<br />
|
||||
|
||||
<?php echo (Form::open()); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<?php echo (Form::hidden('csrf', Security::token())); ?>
|
||||
<?php echo (Form::open()); ?>
|
||||
|
||||
<?php if (isset($errors['menu_item_name_empty'])) $error_class = ' error'; else $error_class = ''; ?>
|
||||
<?php echo (Form::hidden('csrf', Security::token())); ?>
|
||||
|
||||
<a href="javascript:;" style="text-decoration:none; color:#333; border-bottom:1px dashed #333;" data-toggle="modal" onclick="$('#selectPageModal').modal('show').width(270);" ><?php echo __('Select page', 'menu'); ?></a> /
|
||||
<a href="javascript:;" style="text-decoration:none; color:#333; border-bottom:1px dashed #333;" data-toggle="modal" onclick="$('#selectCategoryModal').modal('show').width(270);" ><?php echo __('Select category', 'menu'); ?></a><br /><br />
|
||||
<?php if (isset($errors['menu_item_name_empty'])) $error_class = ' error'; else $error_class = ''; ?>
|
||||
|
||||
<?php
|
||||
<a href="javascript:;" style="text-decoration:none; color:#333; border-bottom:1px dashed #333;" data-toggle="modal" data-toggle="modal" data-target="#selectPageModal"><?php echo __('Select page', 'menu'); ?></a> /
|
||||
<a href="javascript:;" style="text-decoration:none; color:#333; border-bottom:1px dashed #333;" data-toggle="modal" data-toggle="modal" data-target="#selectCategoryModal"><?php echo __('Select category', 'menu'); ?></a>
|
||||
|
||||
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'])) ? 'input-xlarge error-field' : 'input-xlarge'));
|
||||
<br><br>
|
||||
|
||||
if (isset($errors['menu_item_name_empty'])) echo Html::nbsp(4).'<span style="color:red;">'.$errors['menu_item_name_empty'].'</span>';
|
||||
<div class="form-group">
|
||||
<?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'));
|
||||
?>
|
||||
</div>
|
||||
|
||||
echo (
|
||||
Form::label('menu_item_link', __('Item link', 'menu')).
|
||||
Form::input('menu_item_link', $menu_item_link, array('class' => 'input-xlarge'))
|
||||
);
|
||||
|
||||
echo (
|
||||
Form::label('menu_item_category', __('Item category', 'menu')).
|
||||
Form::input('menu_item_category', $menu_item_category, array('class' => 'input-xlarge'))
|
||||
);
|
||||
?>
|
||||
|
||||
<?php
|
||||
echo (
|
||||
Html::br().
|
||||
Form::label('menu_item_target', __('Item target', 'menu')).
|
||||
Form::select('menu_item_target', $menu_item_target_array, $menu_item_target, array('class' => 'input-xlarge'))
|
||||
);
|
||||
|
||||
echo (
|
||||
Html::br().
|
||||
Form::label('menu_item_order', __('Item order', 'menu')).
|
||||
Form::select('menu_item_order', $menu_item_order_array, $menu_item_order, array('class' => 'input-xlarge'))
|
||||
);
|
||||
|
||||
echo (
|
||||
Html::br(2).
|
||||
Form::submit('menu_add_item', __('Save', 'menu'), array('class' => 'btn')).
|
||||
Form::close()
|
||||
);
|
||||
?>
|
||||
|
||||
<div class="modal hide" id="selectPageModal">
|
||||
<div class="modal-header">
|
||||
<a class="close" data-dismiss="modal">×</a>
|
||||
<h3><?php echo __('Select page', 'menu'); ?></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
<ul class="unstyled">
|
||||
<?php if (count($pages_list) > 0) foreach ($pages_list as $page) { ?>
|
||||
<li><?php echo (!empty($page['parent'])) ? Html::nbsp().Html::arrow('right').Html::nbsp(2) : '' ; ?><a href="javascript:;" onclick="$.monstra.menu.selectPage('<?php echo (empty($page['parent'])) ? $page['slug'] : $page['parent'].'/'.$page['slug'] ; ?>', '<?php echo $page['title']; ?>');"><?php echo $page['title']; ?></a></li>
|
||||
<?php } ?>
|
||||
<?php if (count($components_list) > 0) foreach ($components_list as $component) { ?>
|
||||
<li><a href="javascript:;" onclick="$.monstra.menu.selectPage('<?php echo $component; ?>', '<?php echo __(ucfirst($component), $component); ?>');"><?php echo __(ucfirst($component), $component); ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</p>
|
||||
<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'))
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
echo (
|
||||
Form::label('menu_item_category', __('Item category', 'menu')).
|
||||
Form::input('menu_item_category', $menu_item_category, array('class' => 'form-control'))
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
echo (
|
||||
Form::label('menu_item_target', __('Item target', 'menu')).
|
||||
Form::select('menu_item_target', $menu_item_target_array, $menu_item_target, array('class' => 'form-control'))
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
echo (
|
||||
Form::label('menu_item_order', __('Item order', 'menu')).
|
||||
Form::select('menu_item_order', $menu_item_order_array, $menu_item_order, array('class' => 'form-control'))
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
echo (
|
||||
Form::submit('menu_add_item', __('Save', 'menu'), array('class' => 'btn btn-primary')).
|
||||
Form::close()
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal hide" id="selectCategoryModal">
|
||||
<div class="modal-header">
|
||||
<a class="close" data-dismiss="modal">×</a>
|
||||
<h3><?php echo __('Select category', 'menu'); ?></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
<ul class="unstyled">
|
||||
<?php if (count($categories) > 0) foreach ($categories as $category) { ?>
|
||||
<li><a href="javascript:;" onclick="$.monstra.menu.selectCategory('<?php echo $category; ?>');"><?php echo $category; ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</p>
|
||||
<div class="modal fade" id="selectPageModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<a class="close" data-dismiss="modal">×</a>
|
||||
<h4 class="modal-title"><?php echo __('Select page', 'menu'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ul class="list-unstyled">
|
||||
<?php if (count($pages_list) > 0) foreach ($pages_list as $page) { ?>
|
||||
<li><?php echo (!empty($page['parent'])) ? Html::nbsp().Html::arrow('right').Html::nbsp(2) : '' ; ?><a href="javascript:;" onclick="$.monstra.menu.selectPage('<?php echo (empty($page['parent'])) ? $page['slug'] : $page['parent'].'/'.$page['slug'] ; ?>', '<?php echo $page['title']; ?>');"><?php echo $page['title']; ?></a></li>
|
||||
<?php } ?>
|
||||
<?php if (count($components_list) > 0) foreach ($components_list as $component) { ?>
|
||||
<li><a href="javascript:;" onclick="$.monstra.menu.selectPage('<?php echo $component; ?>', '<?php echo __(ucfirst($component), $component); ?>');"><?php echo __(ucfirst($component), $component); ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="selectCategoryModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<a class="close" data-dismiss="modal">×</a>
|
||||
<h4 class="modal-title"><?php echo __('Select category', 'menu'); ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ul class="list-unstyled">
|
||||
<?php if (count($categories) > 0) foreach ($categories as $category) { ?>
|
||||
<li><a href="javascript:;" onclick="$.monstra.menu.selectCategory('<?php echo $category; ?>');"><?php echo $category; ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -6,10 +6,10 @@
|
||||
<br />
|
||||
<?php
|
||||
echo (
|
||||
Html::anchor(__('Create New Item', 'menu'), 'index.php?id=menu&action=add', array('title' => __('Create New Item', 'menu'), 'class' => 'btn btn-small'))
|
||||
Html::anchor(__('Create New Item', 'menu'), 'index.php?id=menu&action=add', array('title' => __('Create New Item', 'menu'), 'class' => 'btn btn-primary'))
|
||||
);
|
||||
?>
|
||||
<br /><br />
|
||||
<br><br>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
@@ -26,7 +26,7 @@
|
||||
<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-small'))
|
||||
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'))
|
||||
);
|
||||
?>
|
||||
<br /><br />
|
||||
@@ -62,10 +62,10 @@
|
||||
</td>
|
||||
<td>
|
||||
<div class="pull-right">
|
||||
<?php echo Html::anchor(__('Edit', 'menu'), 'index.php?id=menu&action=edit&item_id='.$item['id'], array('class' => 'btn btn-small')); ?>
|
||||
<?php echo Html::anchor(__('Edit', 'menu'), 'index.php?id=menu&action=edit&item_id='.$item['id'], array('class' => 'btn btn-primary')); ?>
|
||||
<?php echo Html::anchor(__('Delete', 'menu'),
|
||||
'index.php?id=menu&delete_item='.$item['id'],
|
||||
array('class' => 'btn btn-small', 'onclick' => "return confirmDelete('".__('Delete item :name', 'menu', array(':name' => $item['name']))."')"));
|
||||
array('class' => 'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete item :name', 'menu', array(':name' => $item['name']))."')"));
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
|
@@ -121,7 +121,7 @@
|
||||
?>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="pull-right"><?php echo __('Published on', 'pages'); ?>: <?php echo Form::input('page_date', $date, array('class' => 'input-large')); ?></div>
|
||||
<div class="pull-right"> <?php echo Form::input('page_date', $date, array('class' => 'form-control')); ?></div>
|
||||
<?php echo Form::close(); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -154,7 +154,7 @@
|
||||
?>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="pull-right"><?php echo __('Published on', 'pages'); ?>: <?php echo Form::input('page_date', $date, array('class' => 'input-large')); ?></div>
|
||||
<div class="pull-right"><?php echo Form::input('page_date', $date, array('class' => 'form-control')); ?></div>
|
||||
<?php echo Form::close(); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user