adding 2 more sidboxmenu-item-types:

- no_link: item without link ($item['link'] === False)
- raw: item without link and icon ($item['icon'] === False)
needed for the new calendar-navigation
This commit is contained in:
Ralf Becker 2004-05-06 12:24:36 +00:00
parent dd6528f2a1
commit a0aba2ae40
2 changed files with 22 additions and 3 deletions

View File

@ -24,6 +24,8 @@
$GLOBALS['idots_tpl']->set_block('navbar','navbar_header','navbar_header');
$GLOBALS['idots_tpl']->set_block('navbar','extra_blocks_header','extra_block_header');
$GLOBALS['idots_tpl']->set_block('navbar','extra_block_row','extra_block_row');
$GLOBALS['idots_tpl']->set_block('navbar','extra_block_row_raw','extra_block_row_raw');
$GLOBALS['idots_tpl']->set_block('navbar','extra_block_row_no_link','extra_block_row_no_link');
$GLOBALS['idots_tpl']->set_block('navbar','extra_block_spacer','extra_block_spacer');
$GLOBALS['idots_tpl']->set_block('navbar','extra_blocks_footer','extra_blocks_footer');
$GLOBALS['idots_tpl']->set_block('navbar','sidebox_hide_header','sidebox_hide_header');
@ -353,7 +355,7 @@ href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'"><img src="'.$GLOBAL
if(isset($item_link['icon']))
{
$app = isset($item_link['app']) ? $item_link['app'] : $GLOBALS['phpgw_info']['flags']['currentapp'];
$var['icon_or_star'] = '<img style="margin:0px 2px 0px 2px" src="'.$GLOBALS['phpgw']->common->image($app,$item_link['icon']).'"/>';
$var['icon_or_star'] = $item_link['icon'] ? '<img style="margin:0px 2px 0px 2px" src="'.$GLOBALS['phpgw']->common->image($app,$item_link['icon']).'"/>' : False;
}
$var['lang_item'] = isset($item_link['no_lang']) && $item_link['no_lang'] ? $item_link['text'] : lang($item_link['text']);
$var['item_link'] = $item_link['link'];
@ -368,7 +370,13 @@ href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'"><img src="'.$GLOBAL
$var['item_link'] = $item_link;
}
$GLOBALS['idots_tpl']->set_var($var);
$GLOBALS['idots_tpl']->pparse('out','extra_block_row');
$block = 'extra_block_row';
if ($var['item_link'] === False)
{
$block .= $var['icon_or_star'] === False ? '_raw' : '_no_link';
}
$GLOBALS['idots_tpl']->pparse('out',$block);
}
}

View File

@ -115,9 +115,20 @@
</tr>
<!-- END extra_block_row -->
<!-- BEGIN extra_block_row_raw -->
<tr class="divSideboxEntry">
<td colspan="2" class="textSidebox">{lang_item}</td>
</tr>
<!-- END extra_block_row_raw -->
<!-- BEGIN extra_block_row_no_link -->
<tr class="divSideboxEntry">
<td width="20" align="center" valign="middle" class="textSidebox">{icon_or_star}</td><td class="textSidebox">{lang_item}</td>
</tr>
<!-- END extra_block_row_no_link -->
<!-- BEGIN extra_block_spacer -->
<tr class="divSideboxEntry">
<tr class="divSideboxEntry">
<td colspan="2" height="8" class="textSidebox">&nbsp;</td>
</tr>
<!-- END extra_block_spacer -->