switch to set_block in index.tpl

This commit is contained in:
angles 2001-05-11 21:18:59 +00:00
parent a972fad6ea
commit 4dd22317a7
4 changed files with 19 additions and 14 deletions

View File

@ -17,23 +17,24 @@
$pref_tpl = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
$pref_tpl->set_file(array(
'T_icon_cell' => 'index_icon_cell.tpl',
'T_link_cell' => 'index_link_cell.tpl',
'index_out' => 'index.tpl',
'T_index_out' => 'index.tpl',
));
$pref_tpl->set_block('T_index_out','B_icon_cell','V_icon_cell');
$pref_tpl->set_block('T_index_out','B_link_cell','V_link_cell');
// This func called by the includes to dump a row header
function section_start($name='',$icon='')
{
global $phpgw,$phpgw_info, $loopnum, $pref_tpl;
$pref_tpl->set_var('icon_backcolor',$phpgw_info["theme"]["row_off"]);
$pref_tpl->set_var('link_backcolor',$phpgw_info["theme"]["row_off"]);
$pref_tpl->set_var('icon_backcolor',$phpgw_info['theme']['row_off']);
$pref_tpl->set_var('link_backcolor',$phpgw_info['theme']['row_off']);
$pref_tpl->set_var('app_name',lang($name));
$pref_tpl->set_var('app_icon',$icon);
if ($icon)
{
$pref_tpl->parse('V_icon_cell','T_icon_cell');
$pref_tpl->parse('V_icon_cell','B_icon_cell');
}
else
{
@ -58,14 +59,14 @@
$pref_tpl->set_var('pref_link',$pref_link);
$pref_tpl->set_var('pref_text',$pref_text);
$pref_tpl->parse('V_link_cell','T_link_cell',True);
$pref_tpl->parse('V_link_cell','B_link_cell',True);
$loopnum = $loopnum + 1;
}
function section_end()
{
global $phpgw,$phpgw_info, $pref_tpl;
$pref_tpl->pparse('out','index_out');
$pref_tpl->pparse('out','T_index_out');
$pref_tpl->set_var('V_icon_cell','');
$pref_tpl->set_var('V_link_cell','');
}

View File

@ -1,8 +1,11 @@
<!-- begin preferences index.tpl -->
<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5%" valign="middle" bgcolor="{icon_backcolor}">
{V_icon_cell}
<!-- BEGIN B_icon_cell -->
<img src="{app_icon}" alt="[ {app_name} ]">
<!-- END B_icon_cell -->
</td>
<td width="95%" valign="middle" bgcolor="{link_backcolor}">
<strong>&nbsp;&nbsp;{app_name}</strong>
@ -10,8 +13,11 @@
</tr>
<tr>
<td colspan="2" width="100%">
{V_link_cell}
<!-- BEGIN B_link_cell -->
{insert_br}&nbsp;&#8226;&nbsp;<a href="{pref_link}">{pref_text}</a>
<!-- END B_link_cell -->
</td>
</tr>
</table>
<!-- end preferences index.tpl -->

View File

@ -1 +0,0 @@
<img src="{app_icon}" alt="[ {app_name} ]">

View File

@ -1 +0,0 @@
{insert_br} &nbsp;&#8226;&nbsp; <a href="{pref_link}">{pref_text}</a>