Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Commit

Permalink
#10 - init vertical menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Sharov authored and nizsheanez committed Aug 22, 2012
1 parent d2a0f81 commit 251671e
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 9 deletions.
12 changes: 4 additions & 8 deletions css/admin/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,13 @@ aside#sidebar {
margin: 0;
padding: 0;
}
/*
#sidebar li {
list-style: none;
margin: 0 0 0 12%;
padding: 0;
}

#sidebar li a {
color: #666666;
padding-left: 25px;
Expand All @@ -316,7 +316,7 @@ aside#sidebar {
text-shadow: 0 1px 0 #fff;
margin: 2px 0;
}

*/
#sidebar li a:hover {
color: #444444;
}
Expand Down Expand Up @@ -385,16 +385,12 @@ aside#sidebar {
text-shadow: 0 1px 0 #fff;
margin: 10px 0 0 0;
}

/*
#sidebar a {
color: #666666;
text-decoration: none;
}

#sidebar a:hover {
text-decoration: underline;
}

*/
#sidebar footer {
margin-top: 20%;
}
Expand Down
57 changes: 56 additions & 1 deletion protected/modules/main/portlets/views/AdminMenu.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,67 @@
<style type="text/css">
.acc-group{
margin: 0;
}
.accordion-head{
text-shadow: 1px 1px 0 #EFEFEF;
border-top: 1px solid #F0F0F0;
}
.accordion-head a{
padding: 8px 24px;
color: #333;
display: block;
background: #EEEEEE;
}
.accordion-head a:hover{
background: #CFCFCF;
text-decoration: none;
}
.accordion-body {
background: #FAFAFA;
border-top: 1px solid #CCC;
}
.accordion-body ul li{
margin: 0 2% 0 10%;
}
.accordion-body li a{
display: block;
padding: 4px;
color: #333;
}
.accordion-body li a:hover{
background: #E0E0E0;
text-decoration: none;
}
</style>
<div id="admin_menu">
<? foreach ($modules as $module): ?>
<?
if (!isset($module['admin_menu']) || !$module['admin_menu'])
{
continue;
}
// dump($modules);

// Yii::app()->controller->widget('Boot');
?>

<div class="acc-group">
<div class="accordion-head">
<a href="#" data-toggle="collapse" data-target="#menu_module_<?= $module['dir'] ?>"><?= $module['name'] ?></a>
</div>
<div id="menu_module_<?= $module['dir'] ?>" class="collapse accordion-body">
<ul>
<? foreach ($module['admin_menu'] as $title => $url): ?>
<li><?= CHtml::link($title, $url) ?></li>
<? endforeach ?>
</ul>
</div>
</div>
<? endforeach ?>
</div>

<?php return true; ?>

<h3><? echo t($module['name']); ?></h3>
<ul class="toggle">
<? foreach ($module['admin_menu'] as $title => $url): ?>
Expand Down Expand Up @@ -59,5 +114,5 @@
</li>
<? endforeach ?>
</ul>
<? endforeach ?>
<?// endforeach ?>
</div>

0 comments on commit 251671e

Please sign in to comment.