mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
using new html-class
This commit is contained in:
parent
2c0c0d2a40
commit
fcb828bc8d
@ -21,34 +21,26 @@
|
||||
);
|
||||
|
||||
include('../header.inc.php');
|
||||
$phpgw->infolog = CreateObject('infolog.infolog');
|
||||
$html = $phpgw->infolog->html;
|
||||
|
||||
$hidden_vars = array( 'sort' => $sort,'order' => $order,'query' => $query,'start' => $start,
|
||||
'filter' => $filter,'cat_id' => $cat_id );
|
||||
if (! $info_id) {
|
||||
Header('Location: ' . $phpgw->link('/infolog/index.php',"&sort=$sort&order=$order&query=$query&start=$start"
|
||||
. "&filter=$filter&cat_id=$cat_id"));
|
||||
Header('Location: ' . $html->link('/infolog/index.php',$hidden_vars));
|
||||
}
|
||||
|
||||
$phpgw->infolog = createobject('infolog.infolog');
|
||||
if (! $phpgw->infolog->check_access($info_id,PHPGW_ACL_DELETE)) {
|
||||
Header('Location: ' . $phpgw->link('/infolog/index.php',"&sort=$sort&order=$order&query=$query&start=$start"
|
||||
. "&filter=$filter&cat_id$cat_id"));
|
||||
Header('Location: ' . $html->link('/infolog/index.php',$hidden_vars));
|
||||
}
|
||||
|
||||
if ($confirm) {
|
||||
$phpgw->infolog->delete($info_id);
|
||||
|
||||
Header('Location: ' . $phpgw->link('/infolog/index.php',"cd=16&sort=$sort&order=$order&query=$query&start="
|
||||
. "$start&filter=$filter&cat_id=$cat_id"));
|
||||
Header('Location: ' . $html->link('/infolog/index.php',$hidden_vars + array( 'cd' => 16 )));
|
||||
} else {
|
||||
$phpgw->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$common_hidden_vars =
|
||||
"<input type=\"hidden\" name=\"sort\" value=\"$sort\">\n"
|
||||
. "<input type=\"hidden\" name=\"order\" value=\"$order\">\n"
|
||||
. "<input type=\"hidden\" name=\"query\" value=\"$query\">\n"
|
||||
. "<input type=\"hidden\" name=\"start\" value=\"$start\">\n"
|
||||
. "<input type=\"hidden\" name=\"filter\" value=\"$filter\">\n";
|
||||
|
||||
$t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$t->set_file(array( 'info_delete' => 'delete.tpl' ));
|
||||
$t->set_var( $phpgw->infolog->setStyleSheet( ));
|
||||
@ -57,23 +49,9 @@
|
||||
$t->set_var('lang_info_action',lang('Info Log - Delete'));
|
||||
|
||||
$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>';
|
||||
|
||||
$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>';
|
||||
|
||||
$t->set_var('yeslink',$yeslink);
|
||||
$t->set_var('delete_action',$yeslinkf);
|
||||
$t->set_var('lang_delete',lang('Yes - Delete'));
|
||||
|
||||
$t->set_var('no_button',$html->form_1button('no_button','No - Cancel','','/infolog/index.php',$hidden_vars));
|
||||
$t->set_var('yes_button',$html->form_1button('yes_button','Yes - Delete','','/infolog/delete.php',
|
||||
$hidden_vars + array('info_id' => $info_id,'confirm' => 'True')));
|
||||
$t->pfp('out','info_delete');
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
|
@ -21,13 +21,16 @@
|
||||
'enable_categories_class' => True
|
||||
);
|
||||
include('../header.inc.php');
|
||||
$phpgw->infolog = CreateObject('infolog.infolog');
|
||||
$html = $phpgw->infolog->html;
|
||||
|
||||
$hidden_vars = array( 'sort' => $sort,'order' => $order,'query' => $query,'start' => $start,'filter' => $filter,
|
||||
'cat_id' => $cat_id );
|
||||
|
||||
if ((!isset($info_id) || !$info_id) && !$action) {
|
||||
Header('Location: ' . $phpgw->link('/infolog/index.php',"sort=$sort&order=$order&query=$query&start=$start&".
|
||||
"filter=$filter&cat_id=$cat_id"));
|
||||
Header('Location: ' . $html->link('/infolog/index.php',$hidden_vars));
|
||||
}
|
||||
|
||||
$phpgw->infolog = createobject('infolog.infolog');
|
||||
|
||||
if ($save || $add) {
|
||||
if (strlen($des) >= 8000) {
|
||||
@ -41,7 +44,7 @@
|
||||
if ($selfortoday) {
|
||||
$startdate = time(); // startdate is today (checkbox is clicked)
|
||||
} else {
|
||||
if ($smonth || $sday || $syear) {
|
||||
if ($sday) {
|
||||
if ($sday && !$smonth) $smonth = date('m',time());
|
||||
if ($sday && !$syear) $syear = date('Y',time());
|
||||
if (! checkdate($smonth,$sday,$syear)) {
|
||||
@ -58,7 +61,7 @@
|
||||
if ($dur_days > 0) {
|
||||
$enddate = mktime(12,0,0,date('m',$startdate), date('d',$startdate)+$dur_days, date('Y',$startdate));
|
||||
} else
|
||||
if ($emonth || $eday || $eyear) {
|
||||
if ($eday) {
|
||||
if ($eday && !$emonth) $emonth = date('m',time());
|
||||
if ($eday && !$eyear) $eyear = date('Y',time());
|
||||
if (!checkdate($emonth,$eday,$eyear)) {
|
||||
@ -102,15 +105,14 @@
|
||||
));
|
||||
|
||||
if (!$query_addr && !$query_project) {
|
||||
Header('Location: ' . $phpgw->link('/infolog/index.php', "cd=15&sort=$sort&order=$order&query=$query&".
|
||||
"start=$start&filter=$filter&cat_id=$cat_id"));
|
||||
Header('Location: ' . $html->link('/infolog/index.php', $hidden_vars + array( 'cd' => 15 )));
|
||||
}
|
||||
}
|
||||
}
|
||||
$phpgw->infolog->read( $info_id );
|
||||
if ($info_id && $action == 'sp') { // new SubProject
|
||||
if (!$phpgw->infolog->check_access($info_id,PHPGW_ACL_ADD)) {
|
||||
Header('Location: ' . $phpgw->link('/infolog/index.php',"sort=$sort&order=$order&query=$query&start=$start&filter=$filter"));
|
||||
Header('Location: ' . $html->link('/infolog/index.php',$hidden_vars));
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
$parent = $phpgw->infolog->data;
|
||||
@ -127,26 +129,17 @@
|
||||
$phpgw->infolog->data['info_des'] = '';
|
||||
} else {
|
||||
if ($info_id && !$phpgw->infolog->check_access($info_id,PHPGW_ACL_EDIT)) {
|
||||
Header('Location: ' . $phpgw->link('/infolog/index.php',"sort=$sort&order=$order&query=$query&start=$start&filter=$filter"));
|
||||
Header('Location: ' . $html->link('/infolog/index.php',$hidden_vars));
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
}
|
||||
$common_hidden_vars =
|
||||
'<input type="hidden" name="sort" value="' . $sort . '">'
|
||||
. '<input type="hidden" name="order" value="' . $order. '">'
|
||||
. '<input type="hidden" name="query" value="' . $query . '">'
|
||||
. '<input type="hidden" name="start" value="' . $start . '">'
|
||||
. '<input type="hidden" name="filter" value="' . $filter . '">'
|
||||
. '<input type="hidden" name="info_id" value="' . $info_id. '">'
|
||||
. '<input type="hidden" name="id_parent" value="' . ($id_parent = $phpgw->infolog->data['info_id_parent']). '">'
|
||||
. '<input type="hidden" name="action" value="' . $action. '">';
|
||||
$id_parent = $phpgw->infolog->data['info_id_parent'];
|
||||
$common_hidden_vars = $html->input_hidden( $hidden_vars +
|
||||
array('info_id' => $info_id,'action' => $action,'id_parent' => $id_parent ));
|
||||
|
||||
$phpgw->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$phpgw->db->query("select * FROM phpgw_infolog where info_id='$info_id'");
|
||||
$phpgw->db->next_record();
|
||||
|
||||
$pri_selected[$phpgw->infolog->data['info_pri']] = ' selected';
|
||||
$status_selected[$phpgw->infolog->data['info_status']] = ' selected';
|
||||
|
||||
@ -168,7 +161,10 @@
|
||||
case 'sp':
|
||||
$info_action = 'Info Log - New Subproject'; break;
|
||||
case 'new':
|
||||
$info_action = 'Info Log - New'; break;
|
||||
$info_action = 'Info Log - New';
|
||||
if ($info_type && isset($phpgw->infolog->enums['type'][$info_type]))
|
||||
$phpgw->infolog->data['info_type'] = $info_type;
|
||||
break;
|
||||
default:
|
||||
$info_action = 'Info Log - Edit'; break;
|
||||
}
|
||||
@ -181,78 +177,56 @@
|
||||
$t->set_var('actionurl',$phpgw->link('/infolog/edit.php'));
|
||||
$t->set_var('common_hidden_vars',$common_hidden_vars);
|
||||
|
||||
$sb2 = CreateObject('phpgwapi.sbox2');
|
||||
// get an instance of select box class
|
||||
$sb = CreateObject('phpgwapi.sbox2');
|
||||
|
||||
$t->set_var('lang_owner',lang('Owner'));
|
||||
$t->set_var('owner_info',$sb2->accountInfo($phpgw->infolog->data['info_owner']));
|
||||
$t->set_var('owner_info',$sb->accountInfo($phpgw->infolog->data['info_owner']));
|
||||
$t->set_var('lang_type',lang('Type'));
|
||||
$t->set_var('type_list',$sb2->getArrayItem('type',$phpgw->infolog->data['info_type'],$phpgw->infolog->enums['type']));
|
||||
$t->set_var('type_list',$sb->getArrayItem('type',$phpgw->infolog->data['info_type'],$phpgw->infolog->enums['type']));
|
||||
|
||||
$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']));
|
||||
|
||||
$t->set_var($sb2->getProject('project',$phpgw->infolog->data['info_proj_id'],$query_project));
|
||||
$t->set_var($sb2->getAddress('addr',$phpgw->infolog->data['info_addr_id'],$query_addr));
|
||||
$t->set_var($sb->getProject('project',$phpgw->infolog->data['info_proj_id'],$query_project));
|
||||
$t->set_var($sb->getAddress('addr',$phpgw->infolog->data['info_addr_id'],$query_addr));
|
||||
|
||||
$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) {
|
||||
$sday = $smonth = $syear = 0;
|
||||
} else {
|
||||
$sday = date('d',$phpgw->infolog->data['info_startdate']);
|
||||
$smonth = date('m',$phpgw->infolog->data['info_startdate']);
|
||||
$syear = date('Y',$phpgw->infolog->data['info_startdate']);
|
||||
}
|
||||
|
||||
if ($phpgw->infolog->data['info_enddate'] == 0) {
|
||||
$eday = $emonth = $eyear = 0;
|
||||
} else {
|
||||
$eday = date('d',$phpgw->infolog->data['info_enddate']);
|
||||
$emonth = date('m',$phpgw->infolog->data['info_enddate']);
|
||||
$eyear = date('Y',$phpgw->infolog->data['info_enddate']);
|
||||
}
|
||||
|
||||
// get an instance of select box class
|
||||
$sm = CreateObject('phpgwapi.sbox');
|
||||
|
||||
$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)));
|
||||
$t->set_var('start_select_date',$sb->getDate('syear','smonth','sday',$phpgw->infolog->data['info_startdate']));
|
||||
$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)));
|
||||
$t->set_var('end_select_date',$sb->getDate('eyear','emonth','eday',$phpgw->infolog->data['info_enddate']));
|
||||
|
||||
$t->set_var('lang_selfortoday',lang('Today'));
|
||||
$t->set_var('selfortoday','<input type="checkbox" name="selfortoday" value="True"> ');
|
||||
$t->set_var('selfortoday',$html->checkbox('selfortoday',0));
|
||||
$t->set_var('lang_dur_days',lang('Duration'));
|
||||
$t->set_var('days',lang('days'));
|
||||
|
||||
$t->set_var('lang_status',lang('Status'));
|
||||
$t->set_var('status_list',$sb2->getArrayItem('status',$phpgw->infolog->data['info_status'],$phpgw->infolog->enums['status']));
|
||||
$t->set_var('status_list',$sb->getArrayItem('status',$phpgw->infolog->data['info_status'],$phpgw->infolog->enums['status']));
|
||||
|
||||
$t->set_var('lang_priority',lang('Priority'));
|
||||
$t->set_var('priority_list',$sb2->getArrayItem('pri',$phpgw->infolog->data['info_pri'],$phpgw->infolog->enums['priority']));
|
||||
$t->set_var('priority_list',$sb->getArrayItem('pri',$phpgw->infolog->data['info_pri'],$phpgw->infolog->enums['priority']));
|
||||
|
||||
$t->set_var('lang_confirm',lang('Confirm'));
|
||||
$t->set_var('confirm_list',$sb2->getArrayItem('confirm',$phpgw->infolog->data['info_confirm'],$phpgw->infolog->enums['confirm']));
|
||||
$t->set_var('confirm_list',$sb->getArrayItem('confirm',$phpgw->infolog->data['info_confirm'],$phpgw->infolog->enums['confirm']));
|
||||
|
||||
$t->set_var('lang_responsible',lang('Responsible'));
|
||||
$t->set_var('responsible_list',$sb2->getAccount('responsible',$phpgw->infolog->data['info_responsible']));
|
||||
$t->set_var('responsible_list',$sb->getAccount('responsible',$phpgw->infolog->data['info_responsible']));
|
||||
|
||||
$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':'') . '>');
|
||||
$t->set_var('access_list',$html->checkbox('access',$phpgw->infolog->data['info_access'] == 'private'));
|
||||
|
||||
$t->set_var('delete_action',$phpgw->link('/infolog/delete.php'));
|
||||
|
||||
$t->set_var('edit_button','<input type="submit" name="save" value="' . lang('Save') . '">');
|
||||
$t->set_var('edit_button',$html->submit_button('save','Save'));
|
||||
|
||||
if (!$action && $phpgw->infolog->check_access($info_id,PHPGW_ACL_DELETE)) {
|
||||
$t->set_var('delete_button','<input type="submit" name="delete" value="' . lang('Delete') . '">');
|
||||
$t->set_var('delete_button',$html->form_1button('delete','Delete',$hidden_vars,'/infolog/delete.php'));
|
||||
}
|
||||
$t->set_var('edithandle','');
|
||||
$t->set_var('addhandle','');
|
||||
@ -260,7 +234,5 @@
|
||||
$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.
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
echo parse_navbar_end();
|
||||
|
70
infolog/inc/class.html.inc.php
Normal file
70
infolog/inc/class.html.inc.php
Normal file
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - InfoLog *
|
||||
* http://www.phpgroupware.org *
|
||||
* Written by Ralf Becker <RalfBecker@outdoor-training.de> *
|
||||
* originaly based on todo written by Joseph Engo <jengo@phpgroupware.org> *
|
||||
* -------------------------------------------- *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms of the GNU General Public License as published by the *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
class html
|
||||
{
|
||||
function input_hidden($vars,$value='')
|
||||
{
|
||||
if (!is_array($vars))
|
||||
{
|
||||
$vars = array( $vars => $value );
|
||||
}
|
||||
while (list($name,$value) = each($vars))
|
||||
{
|
||||
if ($value != '') // dont need to send all the empty vars
|
||||
{
|
||||
$html .= "<input type=hidden name=\"$name\" value=\"$value\">\n";
|
||||
}
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
function submit_button($name,$lang)
|
||||
{
|
||||
return "<input type=\"submit\" name=\"$name\" value=\"".lang($lang)."\">\n";
|
||||
}
|
||||
|
||||
function link($url,$vars='')
|
||||
{
|
||||
global $phpgw;
|
||||
if (is_array( $vars ))
|
||||
{
|
||||
$v = array( );
|
||||
while(list($name,$value) = each($vars))
|
||||
{
|
||||
if ($value != '') // dont need to send all the empty vars
|
||||
{
|
||||
$v[] = "$name=$value";
|
||||
}
|
||||
}
|
||||
$vars = implode('&',$v);
|
||||
}
|
||||
return $phpgw->link($url,$vars);
|
||||
}
|
||||
|
||||
function checkbox($name,$value='')
|
||||
{
|
||||
return "<input type=\"checkbox\" name=\"$name\" value=\"True\"" .($value ? ' checked' : '') . ">\n";
|
||||
}
|
||||
|
||||
function form_1button($name,$lang,$hidden_vars,$url,$url_vars='',$method='POST')
|
||||
{
|
||||
$html = "<form method=\"$method\" action=\"".$this->link($url,$url_vars)."\">\n";
|
||||
$html .= $this->input_hidden($hidden_vars);
|
||||
$html .= $this->submit_button($name,$lang);
|
||||
$html .= "</form>\n";
|
||||
return $html;
|
||||
}
|
||||
}
|
@ -53,6 +53,8 @@
|
||||
$this->longnames = 0; // should go into preferences
|
||||
$this->listChilds = 1;
|
||||
|
||||
$this->html = CreateObject('infolog.html');
|
||||
|
||||
$this->read( $info_id);
|
||||
}
|
||||
|
||||
@ -151,13 +153,15 @@
|
||||
$subject = "<span class=$css_class>";
|
||||
|
||||
if ($p_id != ($proj_id = $info['info_proj_id']) && $proj = $this->readProj($proj_id)) {
|
||||
$subject .= '<b><a href="'.$phpgw->link('/infolog/index.php',"filter=$filter&action=proj&proj_id=$proj_id").
|
||||
$subject .= '<b><a href="'.$this->html->link('/infolog/index.php',
|
||||
array( 'filter' => $filter,'action' => 'proj','proj_id' => $proj_id )).
|
||||
'">'.$proj['title'].'</a></b>';
|
||||
}
|
||||
if ($a_id != ($addr_id = $info['info_addr_id']) && $addr = $this->readAddr($addr_id)) {
|
||||
if ($proj) $subject .= '<br>';
|
||||
$addr = $this->addr2name( $addr );
|
||||
$subject .= '<b><a href="'.$phpgw->link('/infolog/index.php',"filter=$filter&action=addr&addr_id=$addr_id").
|
||||
$subject .= '<b><a href="'.$this->html->link('/infolog/index.php',
|
||||
array( 'filter' => $filter,'action' => 'addr','addr_id' => $addr_id )).
|
||||
"\">$addr</a></b>";
|
||||
}
|
||||
if (($from = $info['info_from']) && (!$addr || !strstr($addr,$from))) {
|
||||
@ -171,7 +175,9 @@
|
||||
if ($proj || $addr || $from || $info['info_addr']) {
|
||||
$subject .= '<br>';
|
||||
}
|
||||
$subject .= '<b>'.$info['info_subject'].'</b></span>';
|
||||
$subject .= '<b>';
|
||||
$subject .= $info['info_subject'] ? $info['info_subject'] : substr($info['info_des'],0,60).' ...';
|
||||
$subject .= '</b></span>';
|
||||
|
||||
if (!$info['info_enddate']) {
|
||||
$enddate = ' ';
|
||||
|
@ -20,7 +20,8 @@
|
||||
);
|
||||
include('../header.inc.php');
|
||||
|
||||
$phpgw->infolog = createobject('infolog.infolog');
|
||||
$phpgw->infolog = CreateObject('infolog.infolog');
|
||||
$html = $phpgw->infolog->html;
|
||||
$db = $phpgw->db;
|
||||
$db2 = $phpgw->db;
|
||||
|
||||
@ -28,29 +29,27 @@
|
||||
$t->set_file(array( 'info_list_t' => 'list.tpl' ));
|
||||
$t->set_block('info_list_t','info_list','list');
|
||||
|
||||
$common_hidden_vars =
|
||||
'<input type="hidden" name="sort" value="' . $sort . '">'
|
||||
. '<input type="hidden" name="order" value="' . $order . '">'
|
||||
. '<input type="hidden" name="query" value="' . $query . '">'
|
||||
. '<input type="hidden" name="start" value="' . $start . '">'
|
||||
. '<input type="hidden" name="filter" value="' . $filter . '">'
|
||||
. '<input type="hidden" name="cat_id" value="' . $cat_id . '">';
|
||||
if ($cat_filter) $cat_id = $cat_filter;
|
||||
|
||||
$hidden_vars = array( 'sort' => $sort,'order' => $order,'query' => $query,'start' => $start,
|
||||
'filter' => $filter,'cat_id' => $cat_id );
|
||||
$common_hidden_vars = $html->input_hidden($hidden_vars);
|
||||
|
||||
if ($action)
|
||||
$common_hidden_vars .= '<input type="hidden" name="action" value="'.$action.'">';
|
||||
$common_hidden_vars .= $html->input_hidden('action',$action);
|
||||
|
||||
switch ($action) {
|
||||
case 'sp': // Sub-List
|
||||
$common_hidden_vars .= '<input type="hidden" name="info_id" value="' . $info_id . '">';
|
||||
$common_hidden_vars .= $html->input_hidden('info_id',$info_id);
|
||||
$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 . '">';
|
||||
$common_hidden_vars .= $html->input_hidden('proj_id',$proj_id);
|
||||
$proj = $phpgw->infolog->readProj($proj_id);
|
||||
$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 . '">';
|
||||
$common_hidden_vars .= $html->input_hidden('addr_id',$addr_id);
|
||||
$addr = $phpgw->infolog->readAddr($addr_id);
|
||||
$t->set_var(lang_info_action,lang('Info Log').' - '.$phpgw->infolog->addr2name($addr));
|
||||
break;
|
||||
@ -107,8 +106,9 @@
|
||||
|
||||
if ($total <= $start) $start = 0;
|
||||
|
||||
if ($total > $phpgw_info['user']['preferences']['common']['maxmatchs']) {
|
||||
$to = $start + $phpgw_info['user']['preferences']['common']['maxmatchs']; if ($to > $total) $to = $total;
|
||||
if ($total > ($maxmatchs = $phpgw_info['user']['preferences']['common']['maxmatchs'])) {
|
||||
$to = $start + $maxmatchs;
|
||||
if ($to > $total) $to = $total;
|
||||
$total_matchs = lang('showing x - x of x',($start + 1),$to,$total);
|
||||
} else {
|
||||
$total_matchs = lang('showing x',$total);
|
||||
@ -140,7 +140,10 @@
|
||||
$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']);
|
||||
$t->set_var(next_matchs,$next_matchs);
|
||||
$t->set_var('next_matchs',$next_matchs);
|
||||
if ($total > $maxmatchs)
|
||||
$t->set_var('next_matchs_end',$next_matchs);
|
||||
|
||||
// ---------- end nextmatch template --------------------
|
||||
|
||||
$limit = $db->limit($start);
|
||||
@ -165,9 +168,9 @@
|
||||
$t->set_var( $phpgw->infolog->formatInfo( $db->Record,$proj_id,$addr_id ));
|
||||
|
||||
if ($phpgw->infolog->check_access($db->f('info_id'),PHPGW_ACL_EDIT)) {
|
||||
$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>');
|
||||
$t->set_var('edit','<a href="' .
|
||||
$html->link('/infolog/edit.php',$hidden_vars+array( 'info_id' => $db->f('info_id'))).'">' .
|
||||
$phpgw->infolog->icon('action','edit') . '</a>');
|
||||
} else {
|
||||
$t->set_var('edit','');
|
||||
}
|
||||
@ -184,17 +187,20 @@
|
||||
$t->set_var('viewparent', '');
|
||||
|
||||
if ($subproact > 0) { // if subprojects exist, display VIEW SUB icon
|
||||
$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>');
|
||||
$t->set_var('viewsub', '<a href="' . $html->link('/infolog/index.php',
|
||||
array( '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)) {
|
||||
$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>');
|
||||
$t->set_var('subadd', '<a href="' . $html->link('/infolog/edit.php',
|
||||
array( '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') {
|
||||
$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>');
|
||||
$t->set_var('viewparent', '<a href="' . $html->link('/infolog/index.php',
|
||||
array( 'info_id' => $db->f('info_id_parent'),'filter' => $filter,'action' => 'sp')) . '">' .
|
||||
$phpgw->infolog->icon('action','parent') . '</a>');
|
||||
}
|
||||
|
||||
$t->parse('list','info_list',True);
|
||||
@ -206,8 +212,7 @@
|
||||
// =========================================================
|
||||
|
||||
if ($action) {
|
||||
$t->set_var('lang_back2projects', '<br><a href="' .
|
||||
$phpgw->link('/infolog/index.php',"filter=$filter").
|
||||
$t->set_var('lang_back2projects', '<br><a href="' . $html->link('/infolog/index.php',array( 'filter' => $filter)).
|
||||
'">'.lang('Back to Projectlist').'</a>');
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
<tr bgcolor="{th_bg}" valign="top">
|
||||
<td class=list>{type}</td>
|
||||
<td class=list>{status}</td>
|
||||
<td class=list>{subject}</td>
|
||||
<td class=list>{subject}<br>{des}</td>
|
||||
<td class=list>{startdate}</td>
|
||||
<td class=list>{enddate}</td>
|
||||
<td class=list>{owner}<br>{datecreated}</td>
|
||||
@ -30,21 +30,8 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<!-- {nolink} -->
|
||||
<form action="{cancel_action}" method="POST">
|
||||
{common_hidden_vars}
|
||||
<INPUT type="submit" value="{lang_cancel}">
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<!-- {yeslink} -->
|
||||
<form action="{delete_action}" method="POST">
|
||||
{common_hidden_vars}
|
||||
<INPUT type="submit" value="{lang_delete}">
|
||||
</form>
|
||||
|
||||
</td>
|
||||
<td>{no_button}</td>
|
||||
<td>{yes_button}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
@ -130,17 +130,8 @@
|
||||
|
||||
<table width="75%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr valign="bottom">
|
||||
<td height="62">
|
||||
{edit_button}
|
||||
|
||||
</form>
|
||||
</td>
|
||||
<td height="62">
|
||||
<form action="{delete_action}" method="POST">
|
||||
{common_hidden_vars}
|
||||
{delete_button}
|
||||
</form>
|
||||
</td>
|
||||
<td height="62">{edit_button} </form></td>
|
||||
<td height="62">{delete_button}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
@ -1,6 +1,6 @@
|
||||
p,td { font-face: "Arial, Helvetica, sans-serif"; }
|
||||
.list { font-size:11pt; }
|
||||
.action { font-size:18pt; margin-bottom:0px; }
|
||||
p,td { font-face: "Arial, Helvetica, sans-serif"; font-size:12pt; }
|
||||
.list { font-size:9pt; }
|
||||
.action { font-size:16pt; margin-bottom:0px; }
|
||||
.low,.pri_low_done { color:#606060; }
|
||||
.normal,.pri_normal_done { color:black }
|
||||
.high { color:#cc0000; } .high_done { color:#800000; }
|
||||
|
@ -1,5 +1,5 @@
|
||||
{info_css}
|
||||
<p class=action>{lang_info_action}</p>
|
||||
<span class=action>{lang_info_action}</span><br>
|
||||
<hr noshade width="98%" align="center" size="1">
|
||||
<center>
|
||||
<!-- BEGIN projdetails -->
|
||||
@ -17,8 +17,7 @@
|
||||
<td class=list>{type}</td>
|
||||
<td class=list>{status}</td>
|
||||
<td class=list>{subject}<br>{des}</td>
|
||||
<td class=list>{startdate}<br><!-- </td>
|
||||
<td class=list>-->{enddate}</td>
|
||||
<td class=list>{startdate}<br>{enddate}</td>
|
||||
<td class=list>{owner}<br>{datecreated}</td>
|
||||
<td class=list">{responsible}</td>
|
||||
</tr>
|
||||
@ -37,15 +36,14 @@
|
||||
</td><td>
|
||||
{total_matchs}
|
||||
</td></tr></table>
|
||||
|
||||
{next_matchs}
|
||||
|
||||
<table width=95% border=0 cellspacing=1 cellpadding=3>
|
||||
<tr bgcolor="{th_bg}">
|
||||
<td width="2%" class=list>{sort_type}</td>
|
||||
<td width="4%" class=list>{sort_status}</td>
|
||||
<td class=list>{sort_subject}</td>
|
||||
<td width="5%" class=list>{sort_startdate}<br> <!-- </td>
|
||||
<td width="5%" class=list>-->{sort_enddate}</td>
|
||||
<td width="5%" class=list>{sort_startdate}<br>{sort_enddate}</td>
|
||||
<td width="5%" class=list>{sort_owner}<br>{sort_datecreated}</td>
|
||||
<td width="7%" class=list>{sort_responsible}</td>
|
||||
<td width="3%" class=list>{h_lang_sub}</td>
|
||||
@ -57,10 +55,8 @@
|
||||
<tr bgcolor="{tr_color}" valign="top">
|
||||
<td class=list>{type}</td>
|
||||
<td class=list>{status}</td>
|
||||
<td class=list>{subject}<br>
|
||||
{des}</td>
|
||||
<td class=list>{startdate}<br> <!--</td>
|
||||
<td class=list>-->{enddate}</td>
|
||||
<td class=list>{subject}<br>{des}</td>
|
||||
<td class=list>{startdate}<br>{enddate}</td>
|
||||
<td class=list>{owner}<br>{datecreated}</td>
|
||||
<td class=list>{responsible}</td>
|
||||
<td class=list>{subadd}
|
||||
@ -71,14 +67,14 @@
|
||||
<!-- END info_list -->
|
||||
|
||||
</table>
|
||||
{next_matchs_end}
|
||||
|
||||
<form method="POST" action="{actionurl}">
|
||||
{common_hidden_vars}
|
||||
<table width="95%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="4%">
|
||||
<div align="right">
|
||||
<td width="4%" align="right">
|
||||
<input type="submit" name="Add" value="{lang_add}">
|
||||
</div>
|
||||
</td>
|
||||
<td width="72%"> </td>
|
||||
<td width="24%"> </td>
|
||||
|
Loading…
Reference in New Issue
Block a user