Files
pmgr/site/views/elements/sidemenu.ctp
abijah 11be0ff9cb Modified the menu to use the accordion widget, which is slick and allows it to match the current theme.
git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@745 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-08-23 18:30:17 +00:00

58 lines
1.4 KiB
PHP

<?php /* -*- mode:PHP -*- */
/* sidemenu.ctp */
/*
*
* @filesource
* @copyright Copyright 2009, Abijah Perkins
* @package pmgr
*/
// REVISIT <AP>: 20090823
// Add way to slide the entire menu off the page
echo('<DIV ID="sidemenu">' . "\n");
foreach ($menu AS $area) {
if (empty($area['subarea']))
continue;
foreach ($area['subarea'] AS $subarea) {
if (empty($subarea['priorities']))
continue;
echo('<H3 class="sidemenu-header">' . $subarea['name'] . "</H3>\n");
echo('<DIV class="sidemenu-content">' . "\n");
foreach ($subarea['priorities'] AS $priority) {
foreach ($priority AS $item) {
if (isset($item['url'])) {
echo('<DIV CLASS="sidemenu-item">'
. $html->link($item['name'], $item['url'],
isset($item['htmlAttributes']) ? $item['htmlAttributes'] : null,
isset($item['confirmMessage']) ? $item['confirmMessage'] : null,
isset($item['escapeTitle']) ? $item['escapeTitle'] : null)
. '</DIV>' . "\n");
}
}
}
echo('</DIV>' . "\n");
}
}
echo('</DIV>' . "\n");
?>
<script type="text/javascript"><!--
jQuery(document).ready(function(){
jQuery('#sidemenu').accordion
({ fillSpace : true,
event: 'mouseover',
<?php /* REVISIT <AP>: 20090823
* Prevent animation until we can figure out why we
* get animation width jitter */ ?>
animated : false,
});
});
--></script>