Skip to content

Commit

Permalink
Add Elements customizable
Browse files Browse the repository at this point in the history
  • Loading branch information
maiconpinto committed May 24, 2016
1 parent 66d0280 commit e7ff2eb
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 5 deletions.
16 changes: 13 additions & 3 deletions src/Template/Element/aside-main-sidebar.ctp
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
<?php
$file = ROOT . DS . 'src' . DS . 'Template' . DS . 'Element' . DS . 'aside-main-sidebar.ctp';

if (file_exists($file)) {
ob_start();
include_once $file;
echo ob_get_clean();
} else {
?>
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- Sidebar user panel -->
<?php echo $this->element('aside/user-panel'); ?>

<!-- search form -->
<?php echo $this->element('aside/form'); ?>
<!-- /.search form -->

<!-- sidebar menu: : style can be found in sidebar.less -->
<?php echo $this->element('aside/sidebar-menu'); ?>

</section>
<!-- /.sidebar -->
</aside>
</aside>
<?php } ?>
12 changes: 11 additions & 1 deletion src/Template/Element/aside/form.ctp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<?php
$file = ROOT . DS . 'src' . DS . 'Template' . DS . 'Element' . DS . 'aside' . DS . 'form.ctp';

if (file_exists($file)) {
ob_start();
include_once $file;
echo ob_get_clean();
} else {
?>
<form action="#" method="get" class="sidebar-form">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search...">
Expand All @@ -6,4 +15,5 @@
</button>
</span>
</div>
</form>
</form>
<?php } ?>
12 changes: 11 additions & 1 deletion src/Template/Element/aside/sidebar-menu.ctp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<?php
$file = ROOT . DS . 'src' . DS . 'Template' . DS . 'Element' . DS . 'aside' . DS . 'sidebar-menu.ctp';

if (file_exists($file)) {
ob_start();
include_once $file;
echo ob_get_clean();
} else {
?>
<ul class="sidebar-menu">
<li class="header">MAIN NAVIGATION</li>
<li class="treeview">
Expand Down Expand Up @@ -140,4 +149,5 @@
<li><a href="#"><i class="fa fa-circle-o text-red"></i> <span>Important</span></a></li>
<li><a href="#"><i class="fa fa-circle-o text-yellow"></i> <span>Warning</span></a></li>
<li><a href="#"><i class="fa fa-circle-o text-aqua"></i> <span>Information</span></a></li>
</ul>
</ul>
<?php } ?>

0 comments on commit e7ff2eb

Please sign in to comment.