Now using single template file

This commit is contained in:
Miles Lott 2001-05-10 12:45:40 +00:00
parent ffba834163
commit c89c380f3f
2 changed files with 38 additions and 19 deletions

View File

@ -1,12 +1,35 @@
<!-- BEGIN view header -->
{header}
<!-- END view header -->
<!-- BEGIN view columns-->
<!-- BEGIN view_header -->
<p>&nbsp;<b>{lang_viewpref}</b><hr><p>
<table border="0" cellspacing="2" cellpadding="2" width="70%" align="center">
<!-- END view_header -->
<!-- BEGIN view_row -->
<tr bgcolor="{th_bg}">
<td align="right" width="30%"><b>{display_col}</b>:</td><td width="70%">{ref_data}</td>
</tr>
<!-- END view_row -->
{cols}
<!-- END view columns -->
{footer}
<!-- BEGIN view -->
<!-- BEGIN view_footer -->
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td><b>{lang_owner}</b></td>
<td>{owner}</td>
</tr>
<tr>
<td><b>{lang_access}</b></td>
<td>{access}</b>
</td>
</tr>
<tr>
<td><b>{lang_category}</b></td>
<td>{catname}</b></td>
</tr>
</td>
</td>
</table>
<!-- END view_footer -->
<!-- BEGIN view_buttons -->
<center>
<TABLE border="0" cellpadding="1" cellspacing="1">
<TR>
@ -48,4 +71,4 @@
</TR>
</TABLE>
</center>
<!-- END view -->
<!-- END view_buttons -->

View File

@ -46,12 +46,11 @@
}
$t = new Template(PHPGW_APP_TPL);
$t->set_file(array(
'view' => 'view.tpl',
'view_header' => 'view_header.tpl',
'view_row' => 'view_row.tpl',
'view_footer' => 'view_footer.tpl'
));
$t->set_file(array('view_t' => 'view.tpl'));
$t->set_block('view_t','view_header','view_header');
$t->set_block('view_t','view_row','view_row');
$t->set_block('view_t','view_footer','view_footer');
$t->set_block('view_t','view_buttons','view_buttons');
$customfields = array();
while (list($col,$descr) = @each($phpgw_info['user']['preferences']['addressbook']))
@ -266,9 +265,6 @@
$t->set_var('start',$start);
$t->set_var('cat_id',$cat_id);
$t->parse('header','view_header');
$t->parse('footer','view_footer');
$t->set_var('lang_ok',lang('ok'));
$t->set_var('lang_done',lang('done'));
$t->set_var('lang_copy',lang('copy'));
@ -279,7 +275,7 @@
$t->set_var('copy_link',$copylink);
$t->set_var('vcard_link',$vcardlink);
$t->pfp('out','view');
$t->pfp('out','view_t');
$phpgw->common->phpgw_footer();
?>