mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 23:43:17 +01:00
not using $phpgw->template
This commit is contained in:
parent
e7184a2422
commit
7bb8aa8df4
@ -49,32 +49,32 @@
|
||||
. "<input type=\"hidden\" name=\"start\" value=\"$start\">\n"
|
||||
. "<input type=\"hidden\" name=\"filter\" value=\"$filter\">\n";
|
||||
|
||||
$phpgw->template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$phpgw->template->set_file(array( 'info_delete' => 'delete.tpl' ));
|
||||
$phpgw->template->set_var( $phpgw->infolog->setStyleSheet( ));
|
||||
$phpgw->template->set_var( $phpgw->infolog->infoHeaders( ));
|
||||
$phpgw->template->set_var( $phpgw->infolog->formatInfo( $info_id ));
|
||||
$phpgw->template->set_var('lang_info_action',lang('Info Log - Delete'));
|
||||
$t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$t->set_file(array( 'info_delete' => 'delete.tpl' ));
|
||||
$t->set_var( $phpgw->infolog->setStyleSheet( ));
|
||||
$t->set_var( $phpgw->infolog->infoHeaders( ));
|
||||
$t->set_var( $phpgw->infolog->formatInfo( $info_id ));
|
||||
$t->set_var('lang_info_action',lang('Info Log - Delete'));
|
||||
|
||||
$phpgw->template->set_var('deleteheader',lang('Are you sure you want to delete this entry'));
|
||||
$t->set_var('deleteheader',lang('Are you sure you want to delete this entry'));
|
||||
|
||||
$nolinkf = $phpgw->link('/infolog/index.php',"sort=$sort&order=$order&query=$query&start=$start&filter=$filter");
|
||||
$nolink = '<a href="' . $nolinkf . '">' . lang('No') .'</a>';
|
||||
|
||||
$phpgw->template->set_var('nolink',$nolink);
|
||||
$phpgw->template->set_var('cancel_action',$nolinkf);
|
||||
$phpgw->template->set_var('lang_cancel',lang('No - Cancel'));
|
||||
$t->set_var('nolink',$nolink);
|
||||
$t->set_var('cancel_action',$nolinkf);
|
||||
$t->set_var('lang_cancel',lang('No - Cancel'));
|
||||
|
||||
$yeslinkf = $phpgw->link('/infolog/delete.php',"info_id=$info_id&confirm=True&sort="
|
||||
. "$sort&order=$order&query=$query&start=$start&filter=$filter");
|
||||
|
||||
$yeslink = '<a href="' . $yeslinkf . '">' . lang('Yes') . '</a>';
|
||||
|
||||
$phpgw->template->set_var('yeslink',$yeslink);
|
||||
$phpgw->template->set_var('delete_action',$yeslinkf);
|
||||
$phpgw->template->set_var('lang_delete',lang('Yes - Delete'));
|
||||
$t->set_var('yeslink',$yeslink);
|
||||
$t->set_var('delete_action',$yeslinkf);
|
||||
$t->set_var('lang_delete',lang('Yes - Delete'));
|
||||
|
||||
$phpgw->template->pfp('out','info_delete');
|
||||
$t->pfp('out','info_delete');
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
echo parse_navbar_end();
|
||||
|
116
infolog/edit.php
116
infolog/edit.php
@ -150,19 +150,19 @@
|
||||
$pri_selected[$phpgw->infolog->data['info_pri']] = ' selected';
|
||||
$status_selected[$phpgw->infolog->data['info_status']] = ' selected';
|
||||
|
||||
$phpgw->template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$phpgw->template->set_file(array('info_edit' => 'form.tpl'));
|
||||
$t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$t->set_file(array('info_edit' => 'form.tpl'));
|
||||
|
||||
// ====================================================================
|
||||
// create two seperate blocks, addblock will be cut off from template
|
||||
// editblock contains the buttons and forms for edit
|
||||
// ====================================================================
|
||||
$phpgw->template->set_block('info_edit', 'add', 'addhandle');
|
||||
$phpgw->template->set_block('info_edit', 'edit', 'edithandle');
|
||||
$phpgw->template->set_block('info_edit', 'subpro', 'subprohandle');
|
||||
$t->set_block('info_edit', 'add', 'addhandle');
|
||||
$t->set_block('info_edit', 'edit', 'edithandle');
|
||||
$t->set_block('info_edit', 'subpro', 'subprohandle');
|
||||
|
||||
if (is_array($error)) {
|
||||
$phpgw->template->set_var('error_list',$phpgw->common->error_list($error));
|
||||
$t->set_var('error_list',$phpgw->common->error_list($error));
|
||||
}
|
||||
switch ($action) {
|
||||
case 'sp':
|
||||
@ -172,28 +172,28 @@
|
||||
default:
|
||||
$info_action = 'Info Log - Edit'; break;
|
||||
}
|
||||
$phpgw->template->set_var('lang_info_action',lang($info_action).($addrsearch?' - '.lang('Search for:')." '$addrsearch'":''));
|
||||
$phpgw->template->set_var($phpgw->infolog->setStyleSheet( ));
|
||||
$phpgw->template->set_var('lang_category',lang('Category'));
|
||||
$phpgw->template->set_var('lang_none',lang('None'));
|
||||
$phpgw->template->set_var('cat_list',$phpgw->categories->formated_list('select','all',$phpgw->infolog->data['info_cat'],'True'));
|
||||
$t->set_var('lang_info_action',lang($info_action).($addrsearch?' - '.lang('Search for:')." '$addrsearch'":''));
|
||||
$t->set_var($phpgw->infolog->setStyleSheet( ));
|
||||
$t->set_var('lang_category',lang('Category'));
|
||||
$t->set_var('lang_none',lang('None'));
|
||||
$t->set_var('cat_list',$phpgw->categories->formated_list('select','all',$phpgw->infolog->data['info_cat'],'True'));
|
||||
|
||||
$phpgw->template->set_var('actionurl',$phpgw->link('/infolog/edit.php'));
|
||||
$phpgw->template->set_var('common_hidden_vars',$common_hidden_vars);
|
||||
$t->set_var('actionurl',$phpgw->link('/infolog/edit.php'));
|
||||
$t->set_var('common_hidden_vars',$common_hidden_vars);
|
||||
|
||||
$phpgw->template->set_var('lang_owner',lang('Owner'));
|
||||
$phpgw->template->set_var('owner_info',$phpgw->infolog->accountInfo($phpgw->infolog->data['info_owner']));
|
||||
$phpgw->template->set_var('lang_type',lang('Type'));
|
||||
$phpgw->template->set_var('type_list',$phpgw->infolog->getEnum('type',$phpgw->infolog->data['info_type'],$phpgw->infolog->enums['type']));
|
||||
$t->set_var('lang_owner',lang('Owner'));
|
||||
$t->set_var('owner_info',$phpgw->infolog->accountInfo($phpgw->infolog->data['info_owner']));
|
||||
$t->set_var('lang_type',lang('Type'));
|
||||
$t->set_var('type_list',$phpgw->infolog->getEnum('type',$phpgw->infolog->data['info_type'],$phpgw->infolog->enums['type']));
|
||||
|
||||
$phpgw->template->set_var('lang_prfrom', lang('From'));
|
||||
$phpgw->template->set_var('fromval', $phpgw->strip_html($phpgw->infolog->data['info_from']));
|
||||
$phpgw->template->set_var('lang_praddr', lang('Phone/Email'));
|
||||
$phpgw->template->set_var('addrval', $phpgw->strip_html($phpgw->infolog->data['info_addr']));
|
||||
$t->set_var('lang_prfrom', lang('From'));
|
||||
$t->set_var('fromval', $phpgw->strip_html($phpgw->infolog->data['info_from']));
|
||||
$t->set_var('lang_praddr', lang('Phone/Email'));
|
||||
$t->set_var('addrval', $phpgw->strip_html($phpgw->infolog->data['info_addr']));
|
||||
|
||||
$phpgw->template->set_var('lang_search', lang('Search'));
|
||||
$phpgw->template->set_var('lang_prproject', lang('Project'));
|
||||
$phpgw->template->set_var('lang_proj_prompt', lang('Pattern for Search in Projects'));
|
||||
$t->set_var('lang_search', lang('Search'));
|
||||
$t->set_var('lang_prproject', lang('Project'));
|
||||
$t->set_var('lang_proj_prompt', lang('Pattern for Search in Projects'));
|
||||
|
||||
if (($proj_id = $phpgw->infolog->data['info_proj_id']) || $projectsearch) {
|
||||
$projects = createobject('projects.projects');
|
||||
@ -220,10 +220,10 @@
|
||||
}
|
||||
if (!$project)
|
||||
$project = '<span class=note>'.lang('not set, use Button to search for').'</span>';
|
||||
$phpgw->template->set_var('project', $project);
|
||||
$t->set_var('project', $project);
|
||||
|
||||
$phpgw->template->set_var('lang_praddrbook', lang('Addressbook'));
|
||||
$phpgw->template->set_var('lang_addr_prompt', lang('Pattern for Search in Addressbook'));
|
||||
$t->set_var('lang_praddrbook', lang('Addressbook'));
|
||||
$t->set_var('lang_addr_prompt', lang('Pattern for Search in Addressbook'));
|
||||
|
||||
if (($addr_id = $phpgw->infolog->data['info_addr_id']) || $addrsearch) {
|
||||
$contacts = createobject('phpgwapi.contacts');
|
||||
@ -250,12 +250,12 @@
|
||||
if (!$addrbook)
|
||||
$addrbook = '<span class=note>'.lang('not set, use Button to search for').'</span>';
|
||||
|
||||
$phpgw->template->set_var('addrbook', $addrbook);
|
||||
$t->set_var('addrbook', $addrbook);
|
||||
|
||||
$phpgw->template->set_var('lang_prsubject', lang('Subject'));
|
||||
$phpgw->template->set_var('subjectval', $phpgw->strip_html($phpgw->infolog->data['info_subject']));
|
||||
$phpgw->template->set_var('lang_prdesc', lang('Description'));
|
||||
$phpgw->template->set_var('descval', $phpgw->strip_html($phpgw->infolog->data['info_des']));
|
||||
$t->set_var('lang_prsubject', lang('Subject'));
|
||||
$t->set_var('subjectval', $phpgw->strip_html($phpgw->infolog->data['info_subject']));
|
||||
$t->set_var('lang_prdesc', lang('Description'));
|
||||
$t->set_var('descval', $phpgw->strip_html($phpgw->infolog->data['info_des']));
|
||||
|
||||
// get month/day/year fields for startdate and enddate
|
||||
if ($phpgw->infolog->data['info_startdate'] == 0) {
|
||||
@ -277,44 +277,44 @@
|
||||
// get an instance of select box class
|
||||
$sm = CreateObject('phpgwapi.sbox');
|
||||
|
||||
$phpgw->template->set_var('lang_start_date',lang('Start Date'));
|
||||
$phpgw->template->set_var('start_select_date',$phpgw->common->dateformatorder($sm->getYears('syear',$syear,$syear<date('Y')?$syear:date('Y')-2),
|
||||
$t->set_var('lang_start_date',lang('Start Date'));
|
||||
$t->set_var('start_select_date',$phpgw->common->dateformatorder($sm->getYears('syear',$syear,$syear<date('Y')?$syear:date('Y')-2),
|
||||
$sm->getMonthText('smonth', $smonth),$sm->getDays('sday', $sday)));
|
||||
$phpgw->template->set_var('lang_end_date',lang('End Date'));
|
||||
$phpgw->template->set_var('end_select_date',$phpgw->common->dateformatorder($sm->getYears('eyear', $eyear,$eyear<date('Y')?$eyear:date('Y')-2),
|
||||
$t->set_var('lang_end_date',lang('End Date'));
|
||||
$t->set_var('end_select_date',$phpgw->common->dateformatorder($sm->getYears('eyear', $eyear,$eyear<date('Y')?$eyear:date('Y')-2),
|
||||
$sm->getMonthText('emonth', $emonth),$sm->getDays('eday', $eday)));
|
||||
$phpgw->template->set_var('lang_selfortoday',lang('Today'));
|
||||
$phpgw->template->set_var('selfortoday','<input type="checkbox" name="selfortoday" value="True"> ');
|
||||
$phpgw->template->set_var('lang_dur_days',lang('Duration'));
|
||||
$phpgw->template->set_var('days',lang('days'));
|
||||
$t->set_var('lang_selfortoday',lang('Today'));
|
||||
$t->set_var('selfortoday','<input type="checkbox" name="selfortoday" value="True"> ');
|
||||
$t->set_var('lang_dur_days',lang('Duration'));
|
||||
$t->set_var('days',lang('days'));
|
||||
|
||||
$phpgw->template->set_var('lang_status',lang('Status'));
|
||||
$phpgw->template->set_var('status_list',$phpgw->infolog->getEnum('status',$phpgw->infolog->data['info_status'],$phpgw->infolog->enums['status']));
|
||||
$t->set_var('lang_status',lang('Status'));
|
||||
$t->set_var('status_list',$phpgw->infolog->getEnum('status',$phpgw->infolog->data['info_status'],$phpgw->infolog->enums['status']));
|
||||
|
||||
$phpgw->template->set_var('lang_priority',lang('Priority'));
|
||||
$phpgw->template->set_var('priority_list',$phpgw->infolog->getEnum('pri',$phpgw->infolog->data['info_pri'],$phpgw->infolog->enums['priority']));
|
||||
$t->set_var('lang_priority',lang('Priority'));
|
||||
$t->set_var('priority_list',$phpgw->infolog->getEnum('pri',$phpgw->infolog->data['info_pri'],$phpgw->infolog->enums['priority']));
|
||||
|
||||
$phpgw->template->set_var('lang_confirm',lang('Confirm'));
|
||||
$phpgw->template->set_var('confirm_list',$phpgw->infolog->getEnum('confirm',$phpgw->infolog->data['info_confirm'],$phpgw->infolog->enums['confirm']));
|
||||
$t->set_var('lang_confirm',lang('Confirm'));
|
||||
$t->set_var('confirm_list',$phpgw->infolog->getEnum('confirm',$phpgw->infolog->data['info_confirm'],$phpgw->infolog->enums['confirm']));
|
||||
|
||||
$phpgw->template->set_var('lang_responsible',lang('Responsible'));
|
||||
$phpgw->template->set_var('responsible_list',$phpgw->infolog->getAccount('responsible',$phpgw->infolog->data['info_responsible']));
|
||||
$t->set_var('lang_responsible',lang('Responsible'));
|
||||
$t->set_var('responsible_list',$phpgw->infolog->getAccount('responsible',$phpgw->infolog->data['info_responsible']));
|
||||
|
||||
$phpgw->template->set_var('lang_access_type',lang('Private'));
|
||||
$phpgw->template->set_var('access_list', '<input type="checkbox" name="access" value="True"' . ($phpgw->infolog->data['info_access'] == 'private'?' checked':'') . '>');
|
||||
$t->set_var('lang_access_type',lang('Private'));
|
||||
$t->set_var('access_list', '<input type="checkbox" name="access" value="True"' . ($phpgw->infolog->data['info_access'] == 'private'?' checked':'') . '>');
|
||||
|
||||
$phpgw->template->set_var('delete_action',$phpgw->link('/infolog/delete.php'));
|
||||
$t->set_var('delete_action',$phpgw->link('/infolog/delete.php'));
|
||||
|
||||
$phpgw->template->set_var('edit_button','<input type="submit" name="submit" value="' . lang('Save') . '">');
|
||||
$t->set_var('edit_button','<input type="submit" name="submit" value="' . lang('Save') . '">');
|
||||
|
||||
if (!$action && $phpgw->infolog->check_access($info_id,PHPGW_ACL_DELETE)) {
|
||||
$phpgw->template->set_var('delete_button','<input type="submit" name="delete" value="' . lang('Delete') . '">');
|
||||
$t->set_var('delete_button','<input type="submit" name="delete" value="' . lang('Delete') . '">');
|
||||
}
|
||||
$phpgw->template->set_var('edithandle','');
|
||||
$phpgw->template->set_var('addhandle','');
|
||||
$phpgw->template->set_var('subprohandle','');
|
||||
$phpgw->template->pfp('out','info_edit');
|
||||
$phpgw->template->pfp('edithandle','edit');
|
||||
$t->set_var('edithandle','');
|
||||
$t->set_var('addhandle','');
|
||||
$t->set_var('subprohandle','');
|
||||
$t->pfp('out','info_edit');
|
||||
$t->pfp('edithandle','edit');
|
||||
|
||||
// I would like to have it calculate the amount of days and drop it in days from now.
|
||||
|
||||
|
@ -24,9 +24,9 @@
|
||||
$db = $phpgw->db;
|
||||
$db2 = $phpgw->db;
|
||||
|
||||
$phpgw->template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$phpgw->template->set_file(array( 'info_list_t' => 'list.tpl' ));
|
||||
$phpgw->template->set_block('info_list_t','info_list','list');
|
||||
$t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$t->set_file(array( 'info_list_t' => 'list.tpl' ));
|
||||
$t->set_block('info_list_t','info_list','list');
|
||||
|
||||
$grants = $phpgw->acl->get_grants('infolog');
|
||||
|
||||
@ -44,37 +44,37 @@
|
||||
switch ($action) {
|
||||
case 'sp': // Sub-List
|
||||
$common_hidden_vars .= '<input type="hidden" name="info_id" value="' . $info_id . '">';
|
||||
$phpgw->template->set_var(lang_info_action,lang('Info Log - Subprojects from'));
|
||||
$t->set_var(lang_info_action,lang('Info Log - Subprojects from'));
|
||||
break;
|
||||
case 'proj':
|
||||
$common_hidden_vars .= '<input type="hidden" name="proj_id" value="' . $proj_id . '">';
|
||||
$proj = $phpgw->infolog->readProj($proj_id);
|
||||
$phpgw->template->set_var(lang_info_action,lang('Info Log').' - '.$proj['title']);
|
||||
$t->set_var(lang_info_action,lang('Info Log').' - '.$proj['title']);
|
||||
break;
|
||||
case 'addr':
|
||||
$common_hidden_vars .= '<input type="hidden" name="addr_id" value="' . $addr_id . '">';
|
||||
$addr = $phpgw->infolog->readAddr($addr_id);
|
||||
$phpgw->template->set_var(lang_info_action,lang('Info Log').' - '.$phpgw->infolog->addr2name($addr));
|
||||
$t->set_var(lang_info_action,lang('Info Log').' - '.$phpgw->infolog->addr2name($addr));
|
||||
break;
|
||||
default:
|
||||
$phpgw->template->set_var(lang_info_action,lang('Info Log'));
|
||||
$t->set_var(lang_info_action,lang('Info Log'));
|
||||
break;
|
||||
}
|
||||
$phpgw->template->set_var($phpgw->infolog->setStyleSheet( ));
|
||||
$phpgw->template->set_var(actionurl,$phpgw->link('/infolog/edit.php?action=new'));
|
||||
$phpgw->template->set_var('cat_form',$phpgw->link('/infolog/index.php'));
|
||||
$phpgw->template->set_var('lang_category',lang('Category'));
|
||||
$phpgw->template->set_var('lang_all',lang('All'));
|
||||
$phpgw->template->set_var('lang_select',lang('Select'));
|
||||
$phpgw->template->set_var('categories',$phpgw->categories->formated_list('select','all',$cat_id,'True'));
|
||||
$phpgw->template->set_var(common_hidden_vars,$common_hidden_vars);
|
||||
$t->set_var($phpgw->infolog->setStyleSheet( ));
|
||||
$t->set_var(actionurl,$phpgw->link('/infolog/edit.php?action=new'));
|
||||
$t->set_var('cat_form',$phpgw->link('/infolog/index.php'));
|
||||
$t->set_var('lang_category',lang('Category'));
|
||||
$t->set_var('lang_all',lang('All'));
|
||||
$t->set_var('lang_select',lang('Select'));
|
||||
$t->set_var('categories',$phpgw->categories->formated_list('select','all',$cat_id,'True'));
|
||||
$t->set_var(common_hidden_vars,$common_hidden_vars);
|
||||
|
||||
// ===========================================
|
||||
// list header variable template-declarations
|
||||
// ===========================================
|
||||
$phpgw->template->set_var( $phpgw->infolog->infoHeaders( 1,$sort,$order ));
|
||||
$phpgw->template->set_var(h_lang_sub,lang('Sub'));
|
||||
$phpgw->template->set_var(h_lang_action,lang('Action'));
|
||||
$t->set_var( $phpgw->infolog->infoHeaders( 1,$sort,$order ));
|
||||
$t->set_var(h_lang_sub,lang('Sub'));
|
||||
$t->set_var(h_lang_action,lang('Action'));
|
||||
// -------------- end header declaration -----------------
|
||||
|
||||
if (! $start) {
|
||||
@ -115,20 +115,20 @@
|
||||
} else {
|
||||
$total_matchs = lang('showing x',$total);
|
||||
}
|
||||
$phpgw->template->set_var('total_matchs',$total_matchs);
|
||||
$t->set_var('total_matchs',$total_matchs);
|
||||
|
||||
// ==========================================
|
||||
// project description if subprojectlist
|
||||
// ==========================================
|
||||
|
||||
|
||||
$phpgw->template->set_block('info_list_t','projdetails','projdetailshandle');
|
||||
$t->set_block('info_list_t','projdetails','projdetailshandle');
|
||||
|
||||
switch ($action) {
|
||||
case 'sp': // details of parent
|
||||
$phpgw->template->set_var( $phpgw->infolog->infoHeaders( ));
|
||||
$phpgw->template->set_var( $phpgw->infolog->formatInfo( $info_id ));
|
||||
$phpgw->template->parse('projdetailshandle','projdetails',True);
|
||||
$t->set_var( $phpgw->infolog->infoHeaders( ));
|
||||
$t->set_var( $phpgw->infolog->formatInfo( $info_id ));
|
||||
$t->parse('projdetailshandle','projdetails',True);
|
||||
break;
|
||||
case 'addr':
|
||||
break;
|
||||
@ -142,7 +142,7 @@
|
||||
$next_matchs = $phpgw->nextmatchs->show_tpl('/infolog/index.php',$start,$total,
|
||||
"&order=$order&filter=$filter&sort=$sort&query=$query&action=$action&info_id=$info_id&cat_id=$cat_id",
|
||||
'95%',$phpgw_info['theme']['th_bg']);
|
||||
$phpgw->template->set_var(next_matchs,$next_matchs);
|
||||
$t->set_var(next_matchs,$next_matchs);
|
||||
// ---------- end nextmatch template --------------------
|
||||
|
||||
$limit = $db->limit($start);
|
||||
@ -162,44 +162,44 @@
|
||||
}
|
||||
// -----------------------------------------
|
||||
|
||||
$phpgw->nextmatchs->template_alternate_row_color(&$phpgw->template);
|
||||
$phpgw->nextmatchs->template_alternate_row_color(&$t);
|
||||
|
||||
$phpgw->template->set_var( $phpgw->infolog->formatInfo( $db->Record,$proj_id,$addr_id ));
|
||||
$t->set_var( $phpgw->infolog->formatInfo( $db->Record,$proj_id,$addr_id ));
|
||||
|
||||
if ($phpgw->infolog->check_access($db->f('info_id'),PHPGW_ACL_EDIT)) {
|
||||
$phpgw->template->set_var('edit','<a href="' . $phpgw->link('/infolog/edit.php','info_id=' . $db->f('info_id')
|
||||
$t->set_var('edit','<a href="' . $phpgw->link('/infolog/edit.php','info_id=' . $db->f('info_id')
|
||||
. '&sort=' . $sort . '&order=' . $order . '&query=' . $query . '&start=' . $start . '&filter=' . $filter)
|
||||
. '">' . $phpgw->infolog->icon('action','edit') . '</a>');
|
||||
} else {
|
||||
$phpgw->template->set_var('edit','');
|
||||
$t->set_var('edit','');
|
||||
}
|
||||
|
||||
if ($phpgw->infolog->check_access($db->f('info_id'),PHPGW_ACL_DELETE)) {
|
||||
$phpgw->template->set_var('delete','<a href="' . $phpgw->link('/infolog/delete.php','info_id=' . $db->f('info_id')
|
||||
$t->set_var('delete','<a href="' . $phpgw->link('/infolog/delete.php','info_id=' . $db->f('info_id')
|
||||
. '&sort=' . $sort . '&order=' . $order . '&query=' . $query . '&start=' . $start . '&filter=' . $filter)
|
||||
. '">' . $phpgw->infolog->icon('action','delete') . '</a>');
|
||||
} else {
|
||||
$phpgw->template->set_var('delete','');
|
||||
$t->set_var('delete','');
|
||||
}
|
||||
$phpgw->template->set_var('subadd', ''); // defaults no icons
|
||||
$phpgw->template->set_var('viewsub', '');
|
||||
$phpgw->template->set_var('viewparent', '');
|
||||
$t->set_var('subadd', ''); // defaults no icons
|
||||
$t->set_var('viewsub', '');
|
||||
$t->set_var('viewparent', '');
|
||||
|
||||
if ($subproact > 0) { // if subprojects exist, display VIEW SUB icon
|
||||
$phpgw->template->set_var('viewsub', '<a href="' . $phpgw->link('/infolog/index.php','info_id=' . $db->f('info_id')
|
||||
$t->set_var('viewsub', '<a href="' . $phpgw->link('/infolog/index.php','info_id=' . $db->f('info_id')
|
||||
. "&filter=$filter&action=sp") . '">' . $phpgw->infolog->icon('action','view') . '</a>');
|
||||
} else { // else display ADD SUB-Icon
|
||||
if ($phpgw->infolog->check_access($db->f('info_id'),PHPGW_ACL_ADD)) {
|
||||
$phpgw->template->set_var('subadd', '<a href="' . $phpgw->link('/infolog/edit.php','info_id=' . $db->f('info_id') .
|
||||
$t->set_var('subadd', '<a href="' . $phpgw->link('/infolog/edit.php','info_id=' . $db->f('info_id') .
|
||||
'&filter=' . $filter . '&action=sp') . '">' . $phpgw->infolog->icon('action','new') . '</a>');
|
||||
}
|
||||
} // if parent --> display VIEW SUBS of Parent
|
||||
if ($db->f('info_id_parent') && $action != 'sp') {
|
||||
$phpgw->template->set_var('viewparent', '<a href="' . $phpgw->link('/infolog/index.php','info_id=' . $db->f('info_id_parent') .
|
||||
$t->set_var('viewparent', '<a href="' . $phpgw->link('/infolog/index.php','info_id=' . $db->f('info_id_parent') .
|
||||
"&filter=$filter&action=sp") . '">' . $phpgw->infolog->icon('action','parent') . '</a>');
|
||||
}
|
||||
|
||||
$phpgw->template->parse('list','info_list',True);
|
||||
$t->parse('list','info_list',True);
|
||||
// -------------- end record declaration ------------------------
|
||||
}
|
||||
|
||||
@ -208,7 +208,7 @@
|
||||
// =========================================================
|
||||
|
||||
if ($action) {
|
||||
$phpgw->template->set_var('lang_back2projects', '<br><a href="' .
|
||||
$t->set_var('lang_back2projects', '<br><a href="' .
|
||||
$phpgw->link('/infolog/index.php',"filter=$filter").
|
||||
'">'.lang('Back to Projectlist').'</a>');
|
||||
}
|
||||
@ -216,14 +216,14 @@
|
||||
// get actual date and year for matrixview arguments
|
||||
/* $year = date('Y');
|
||||
$month = date('m');
|
||||
$phpgw->template->set_var('lang_matrixviewhref', '<br><a href="' . $phpgw->link('/infolog/graphview.php',"month=$month&year=$year&filter=$filter").
|
||||
$t->set_var('lang_matrixviewhref', '<br><a href="' . $phpgw->link('/infolog/graphview.php',"month=$month&year=$year&filter=$filter").
|
||||
'">'.lang('View Matrix of actual Month').'</a>'); */
|
||||
// ============================================
|
||||
// template declaration for Add Form
|
||||
// ============================================
|
||||
|
||||
$phpgw->template->set_var(lang_add,lang('Add'));
|
||||
$phpgw->template->pfp('out','info_list_t',true);
|
||||
$t->set_var(lang_add,lang('Add'));
|
||||
$t->pfp('out','info_list_t',true);
|
||||
|
||||
// -------------- end Add form declaration ------------------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user