[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] todo inc/class.botodo.inc.php inc/class.sotodo....
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] todo inc/class.botodo.inc.php inc/class.sotodo.... |
Date: |
Thu, 28 Dec 2006 10:39:46 +0000 |
CVSROOT: /cvsroot/phpgroupware
Module name: todo
Changes by: Dave Hall <skwashd> 06/12/28 10:39:46
Modified files:
inc : class.botodo.inc.php class.sotodo.inc.php
class.uitodo.inc.php
templates/base : form.tpl list.tpl
Log message:
lots of fixes - notices, globals, markup and stupid things - should now
work (most of the time)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/todo/inc/class.botodo.inc.php?cvsroot=phpgroupware&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/todo/inc/class.sotodo.inc.php?cvsroot=phpgroupware&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/todo/inc/class.uitodo.inc.php?cvsroot=phpgroupware&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/todo/templates/base/form.tpl?cvsroot=phpgroupware&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/todo/templates/base/list.tpl?cvsroot=phpgroupware&r1=1.1&r2=1.2
Patches:
Index: inc/class.botodo.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/todo/inc/class.botodo.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- inc/class.botodo.inc.php 10 Nov 2006 13:35:32 -0000 1.20
+++ inc/class.botodo.inc.php 28 Dec 2006 10:39:45 -0000 1.21
@@ -7,7 +7,7 @@
* @copyright Copyright (C) 2000-2003,2005 Free Software Foundation,
Inc. http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package todo
- * @version $Id: class.botodo.inc.php,v 1.20 2006/11/10 13:35:32
sigurdne Exp $
+ * @version $Id: class.botodo.inc.php,v 1.21 2006/12/28 10:39:45 skwashd
Exp $
*/
/**
@@ -46,7 +46,7 @@
function botodo($session=False)
{
$this->sotodo = CreateObject('todo.sotodo');
- $this->datetime =
CreateObject('phpgwapi.datetimefunctions');
+ $this->datetime =& $GLOBALS['phpgw']->datetime;
if ($session)
{
@@ -213,9 +213,10 @@
function list_assigned($assi = '')
{
+ $aout = '';
if (is_array($assi))
{
- while (list($null,$a) = each($assi))
+ foreach ( $assi as $a )
{
$adata = $this->cached_accounts($a);
@@ -309,6 +310,7 @@
function check_values($values)
{
+ $error = array();
if (!$values['title'])
{
$error[] = lang('Please enter a title');
@@ -340,10 +342,12 @@
}
}
+ /*
if ($values['edate'] < $values['sdate'] &&
$values['edate'] && $values['sdate'])
{
$error[] = lang('Ending date can not be before
start date');
}
+ */
if (($values['smonth'] || $values['sday'] ||
$values['syear']) && ($values['emonth'] || $values['eday'] || $values['eyear']))
{
@@ -353,7 +357,7 @@
}
}
- if (is_array($error))
+ if ( count($error) )
{
return $error;
}
@@ -370,7 +374,7 @@
$values['access'] = 'public';
}
- if ($values['seltoday'])
+ if ( isset($values['seltoday']) )
{
$values['sdate'] = time();
}
@@ -396,7 +400,7 @@
$values['edate'] =
mktime(0,0,0,date('m',$values['sdate']),
date('d',$values['sdate'])+$values['daysfromstart'],
date('Y',$values['sdate']));
}
- if ($values['id'] && intval($values['id']) > 0)
+ if ( isset($values['id']) && (int)$values['id'] > 0)
{
$this->sotodo->edit_todo($values);
$todo_id = $values['id'];
Index: inc/class.sotodo.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/todo/inc/class.sotodo.inc.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- inc/class.sotodo.inc.php 31 Oct 2006 10:38:57 -0000 1.19
+++ inc/class.sotodo.inc.php 28 Dec 2006 10:39:45 -0000 1.20
@@ -7,7 +7,7 @@
* @copyright Copyright (C) 2000-2003,2005 Free Software Foundation,
Inc. http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package todo
- * @version $Id: class.sotodo.inc.php,v 1.19 2006/10/31 10:38:57
sigurdne Exp $
+ * @version $Id: class.sotodo.inc.php,v 1.20 2006/12/28 10:39:45 skwashd
Exp $
*/
@@ -21,29 +21,35 @@
var $db;
var $grants;
var $historylog;
+ var $owner;
function sotodo()
{
- $this->db = $GLOBALS['phpgw']->db;
- $this->db2 = $this->db;
- $this->grants =
$GLOBALS['phpgw']->acl->get_grants('todo','.');
- $this->user_groups =
$GLOBALS['phpgw']->accounts->membership($this->account);
+ $this->db =& $GLOBALS['phpgw']->db;
+ $this->grants =
$GLOBALS['phpgw']->acl->get_grants('todo');
$this->account =
$GLOBALS['phpgw_info']['user']['account_id'];
+ $this->user_groups =
$GLOBALS['phpgw']->accounts->membership($this->account);
$this->historylog =
CreateObject('phpgwapi.historylog','todo');
// This is so our transactions follow across classes
- $this->historylog->db = $this->db;
+ $this->historylog->db =& $this->db;
+
+ $this->owner =
$GLOBALS['phpgw_info']['user']['account_id'];
}
function type($tree)
{
switch ($tree)
{
- case 'mains': $s = ' and todo_id_parent=0';
break;
- case 'subs': $s = ' and todo_id_parent != 0';
break;
- default: return False;
+ case 'mains':
+ return ' AND todo_id_parent = 0';
+ break;
+ case 'subs':
+ return ' AND todo_id_parent != 0';
+ break;
+ default:
}
- return $s;
+ return '';
}
function read_todos($start = 0, $limit = True, $query = '',
$filter = '', $order = '', $sort = '', $cat_id = '', $tree = '', $parent = '')
@@ -52,11 +58,13 @@
if($order)
{
- $ordermethod = 'order by ' . $order . ' ' .
$sort;
+ $order = $this->db->db_addslashes($order);
+ $sort = $this->db->db_addslashes($sort);
+ $ordermethod = "ORDER BY $order $sort";
}
else
{
- $ordermethod = 'order by todo_id_main,
todo_id_parent, todo_level, todo_datecreated asc';
+ $ordermethod = 'ORDER BY todo_id_main,
todo_id_parent, todo_level, todo_datecreated ASC';
}
$filter = strtolower($filter);
@@ -66,15 +74,16 @@
$filter = 'none';
}
- $filtermethod = '(( todo_owner=' . $this->account . "
OR todo_assigned like '%," . $this->account . ",%' OR todo_assigned='" .
$this->account . "'";
+ $filtermethod = "(( todo_owner = {$this->account} OR
todo_assigned = {$this->account}";
- if(is_array($this->user_groups))
+ if ( is_array($this->user_groups) &&
count($this->user_groups) )
{
- $groups = $this->user_groups;
- while (list($null,$group) = each($groups))
+ $filtermethod .= ' OR assigned_group IN(0';
+ foreach ( $this->user_groups as $group )
{
- $filtermethod .= " OR assigned_group
like '%," . $group['account_id'] . ",%' OR assigned_group='" .
$group['account_id'] . "'";
+ $filtermethod .= ', ' .
$group['account_id'];
}
+ $filtermethod .= ')';
}
$filtermethod .= ')';
@@ -89,7 +98,7 @@
$public_user_list[] = $user;
}
reset($public_user_list);
- $filtermethod .= " OR
(todo_access='public' AND todo_owner IN(" . implode(',',$public_user_list) .
'))';
+ $filtermethod .= " OR
(todo_access='public' AND todo_owner IN(" . implode(',', $public_user_list) .
'))';
}
}
@@ -97,28 +106,29 @@
if($filter == 'private')
{
- $filtermethod .= " AND todo_access='private'";
+ $filtermethod .= " AND todo_access =
'private'";
}
if($cat_id)
{
- $filtermethod .= ' AND todo_cat=' . $cat_id;
+ $filtermethod .= ' AND todo_cat = ' . (int)
$cat_id;
}
+ $querymethod = '';
if($query)
{
- $query = ereg_replace("'",'',$query);
- $query = ereg_replace('"','',$query);
+ $query = $this->db->db_addslashes($query);
$querymethod = " AND (todo_des LIKE '%$query%'
OR todo_title LIKE '%$query%')";
}
+ $parentmethod = '';
if($parent)
{
- $parentmethod = ' AND todo_id_parent=' .
$parent;
+ $parentmethod = ' AND todo_id_parent=' . (int)
$parent;
}
- $sql = "SELECT * FROM phpgw_todo WHERE $filtermethod
$querymethod $type $parentmethod";
+ $sql = "SELECT * FROM phpgw_todo WHERE $filtermethod
$querymethod $type $parentmethod ";
if($limit)
{
@@ -131,6 +141,7 @@
$this->total_records = $this->db->num_rows();
+ $todos = array();
while($this->db->next_record())
{
$todos[] = array
@@ -143,8 +154,8 @@
'owner_id' =>
$this->db->f('todo_owner'),
'access' =>
$this->db->f('todo_access'),
'cat' =>
(int)$this->db->f('todo_cat'),
- 'title' =>
$this->db->f('todo_title'),
- 'descr' =>
$this->db->f('todo_des'),
+ 'title' =>
$this->db->f('todo_title', true),
+ 'descr' =>
$this->db->f('todo_des', true),
'pri' =>
(int)$this->db->f('todo_pri'),
'status' =>
(int)$this->db->f('todo_status'),
'sdate' =>
$this->db->f('todo_startdate'),
@@ -161,8 +172,9 @@
function read_single_todo($todo_id)
{
- $this->db->query('select * from phpgw_todo where
todo_id=' . intval($todo_id),__LINE__,__FILE__);
+ $this->db->query('SELECT * FROM phpgw_todo WHERE
todo_id = ' . (int) $todo_id, __LINE__, __FILE__);
+ $todo = array();
if ($this->db->next_record())
{
$todo['id'] =
$this->db->f('todo_id');
@@ -186,24 +198,17 @@
function add_todo($values)
{
- if (floor(phpversion()) == 4)
- {
- ob_start();
- print_r($values);
- $contents = ob_get_contents();
- ob_end_clean();
- }
-
$GLOBALS['phpgw']->log->message(array
(
'text' => 'debug, so add_todo values: %1',
- 'p1' => $contents,
+ 'p1' => print_r($values, true),
+ 'severity' => 'D',
'line' => __LINE__,
'file' => __FILE__
));
$GLOBALS['phpgw']->log->commit();
- $values['parent'] = intval($values['parent']);
+ $values['parent'] = (int)$values['parent'];
if ($values['parent'] > 0)
{
$values['main'] =
$this->return_value($values['parent']);
@@ -212,21 +217,23 @@
$values['title'] =
$this->db->db_addslashes($values['title']);
$values['descr'] =
$this->db->db_addslashes($values['descr']);
+ $values['assigned'] =
$this->db->db_addslashes($values['assigned']);
+ $values['assigned_group'] =
$this->db->db_addslashes($values['assigned_group']);
$this->db->transaction_begin();
$this->db->query('insert into phpgw_todo
(todo_id_main,todo_id_parent,todo_level,todo_owner,todo_access,todo_cat,'
.
'todo_des,todo_title,todo_pri,todo_status,todo_datecreated,todo_startdate,todo_enddate,todo_assigned,assigned_group)
values ('
- . intval($values['main']) . ',' .
$values['parent'] . ',' . intval($values['level']) . ',' . $this->account .
",'" . $values['access']
- . "'," . intval($values['cat']) . ",'" .
$values['descr'] . "','" . $values['title'] . "'," . intval($values['pri']) .
",'"
- . $values['status'] . "'," . time() . ',' .
intval($values['sdate']) . ',' . intval($values['edate']) . ",'" .
$values['assigned']
- . "','" . $values['assigned_group'] .
"')",__LINE__,__FILE__);
+ . (int)$values['main'] . ',' .
(int)$values['parent'] . ',' . (int)$values['level'] . ',' . $this->account .
",'" . (int)!!$values['access']
+ . "'," . (int)$values['cat'] . ",'" .
$values['descr'] . "','" . $values['title'] . "'," . (int)$values['pri'] . ",'"
+ . (int)$values['status'] . "'," . time() . ','
. (int)$values['sdate'] . ',' . (int)$values['edate'] . ",'" .
$values['assigned']
+ . "','" . $values['assigned_group'] . "')",
__LINE__, __FILE__);
$todo_id =
$this->db->get_last_insert_id('phpgw_todo','todo_id');
if (!$values['parent'] || $values['parent'] == 0)
{
$this->db->query('update phpgw_todo set
todo_id_main=' . $todo_id . ' where todo_id=' . $todo_id,__LINE__,__FILE__);
}
- $this->historylog->add('A',$todo_id,'');
+ $this->historylog->add('A', $todo_id, '', '');
$this->db->transaction_commit();
return $todo_id;
}
@@ -264,6 +271,8 @@
{
$this->db->transaction_begin();
$sub_todos = $this->find_subs($todo_id);
+ $subdelete = '';
+ $parent = 0;
if ($sub_todos)
{
if($sub)
Index: inc/class.uitodo.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/todo/inc/class.uitodo.inc.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- inc/class.uitodo.inc.php 31 Oct 2006 10:38:57 -0000 1.25
+++ inc/class.uitodo.inc.php 28 Dec 2006 10:39:45 -0000 1.26
@@ -7,7 +7,7 @@
* @copyright Copyright (C) 2000-2003,2005 Free Software Foundation,
Inc. http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package todo
- * @version $Id: class.uitodo.inc.php,v 1.25 2006/10/31 10:38:57
sigurdne Exp $
+ * @version $Id: class.uitodo.inc.php,v 1.26 2006/12/28 10:39:45 skwashd
Exp $
*/
@@ -89,10 +89,6 @@
function set_app_langs()
{
-
$this->t->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
-
$this->t->set_var('row_on',$GLOBALS['phpgw_info']['theme']['row_on']);
-
$this->t->set_var('row_off',$GLOBALS['phpgw_info']['theme']['row_off']);
-
$this->t->set_var('lang_category',lang('Category'));
$this->t->set_var('lang_select',lang('Select'));
$this->t->set_var('lang_descr',lang('Description'));
@@ -109,23 +105,20 @@
$this->t->set_var('lang_submit',lang('Submit'));
$this->t->set_var('lang_save',lang('Save'));
$this->t->set_var('lang_done',lang('Done'));
- $this->t->set_var('lang_assigned',lang('Assigned to'));
+ $this->t->set_var('lang_assigned_group',lang('Assigned
to group'));
+ $this->t->set_var('lang_assigned_user',lang('Assigned
to user'));
$this->t->set_var('lang_owner',lang('Created by'));
}
function show_list()
{
- $GLOBALS['phpgw']->common->phpgw_header();
+ $GLOBALS['phpgw']->common->phpgw_header(true);
echo $this->show_list_body(True);
}
function show_list_body($show_page_header=True)
{
- $this->t->set_file(
- Array(
- 'todo_list_t' => 'list.tpl'
- )
- );
+ $this->t->set_file('todo_list_t', 'list.tpl');
$this->t->set_block('todo_list_t','page_header','page_header');
$this->t->set_block('todo_list_t','table_header','table_header');
$this->t->set_block('todo_list_t','todo_list','todo_list');
@@ -135,7 +128,7 @@
$body = '';
$this->set_app_langs();
- $this->t->set_var(lang_action,lang('todo list'));
+ $this->t->set_var('lang_action', lang('todo list'));
$this->t->set_var('lang_all',lang('All'));
if (!$this->start)
@@ -158,11 +151,11 @@
// ------------------------- end nextmatch template
--------------------------------------
-
$this->t->set_var('cat_action',$GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.show_list'));
+
$this->t->set_var('cat_action',$GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'todo.ui.show_list')));
$this->t->set_var('categories',$this->cats->formatted_list('select','all',$this->cat_id,'True'));
-
$this->t->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.show_list'));
+
$this->t->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'todo.ui.show_list')));
$this->t->set_var('filter_list',$this->nextmatchs->filter(1,array('yours' =>
1,'filter' => $this->filter)));
-
$this->t->set_var('search_action',$GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.show_list'));
+
$this->t->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'todo.ui.show_list')));
$this->t->set_var('search_list',$this->nextmatchs->search(array('search_obj' =>
1,'query' => $this->query)));
$body .= $this->t->fp('out','page_header');
@@ -185,9 +178,10 @@
// -------------- end header declaration
---------------------------------------
+ $tr_class = '';
for ($i=0;$i<count($todo_list);$i++)
{
-
$this->nextmatchs->template_alternate_row_color($this->t);
+ $this->t->set_var('tr_class',
$this->nextmatchs->alternate_row_class($tr_class));
$level = $todo_list[$i]['level'];
$title =
$GLOBALS['phpgw']->strip_html($todo_list[$i]['title']);
@@ -200,7 +194,7 @@
if ($level == 0)
{
- $title = '<font color="#0000EE"><b>' .
$title . '</b></font>';
+ $title = '<b>' . $title . '</b>';
}
else
{
@@ -262,12 +256,12 @@
'assigned' => $assigned
));
- $this->t->set_var('view','<a href="' .
$GLOBALS['phpgw']->link('/index.php','menuaction=todo.uitodo.view&todo_id=' .
$todo_list[$i]['id'])
+ $this->t->set_var('view','<a href="' .
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'todo.uitodo.view',
'todo_id' => $todo_list[$i]['id']) )
. '">' . lang('View') . '</a>');
if
($this->botodo->check_perms($this->grants[$todo_list[$i]['owner_id']],PHPGW_ACL_EDIT))
{
- $this->t->set_var('edit','<a href="' .
$GLOBALS['phpgw']->link('/index.php','menuaction=todo.uitodo.edit&todo_id=' .
$todo_list[$i]['id'])
+ $this->t->set_var('edit','<a href="' .
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'todo.uitodo.edit',
'todo_id' => $todo_list[$i]['id']) )
. '">' . lang('Edit') . '</a>');
}
else
@@ -277,7 +271,7 @@
if
($this->botodo->check_perms($this->grants[$todo_list[$i]['owner_id']],PHPGW_ACL_DELETE))
{
- $this->t->set_var('delete','<a href="'
. $GLOBALS['phpgw']->link('/index.php','menuaction=todo.uitodo.delete&todo_id='
. $todo_list[$i]['id'])
+ $this->t->set_var('delete','<a href="'
. $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'todo.uitodo.delete', 'todo_id' => $todo_list[$i]['id']) )
. '">' . lang('Delete') . '</a>');
}
else
@@ -287,8 +281,8 @@
if
($this->botodo->check_perms($this->grants[$todo_list[$i]['owner_id']],PHPGW_ACL_ADD))
{
- $this->t->set_var('subadd', '<a href="'
. $GLOBALS['phpgw']->link('/index.php','menuaction=todo.uitodo.add&parent=' .
$todo_list[$i]['id']
-
. '&cat_id=' . $this->cat_id) .
'">' . lang('Add Sub') . '</a>');
+ $this->t->set_var('subadd', '<a href="'
. $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'todo.uitodo.add', 'parent' => $todo_list[$i]['id'], 'cat_id' => $this->cat_id)
)
+
. '">' . lang('Add Sub') . '</a>');
}
else
{
@@ -306,21 +300,22 @@
if($show_page_header)
{
+ $cat = array();
if ($this->cat_id && $this->cat_id != 0)
{
$cat =
$this->cats->return_single($this->cat_id);
}
- if ($cat[0]['app_name'] == 'phpgw' ||
$cat[0]['owner'] == '-1' || !$this->cat_id)
+ if ( !count($cat) || $cat[0]['app_name'] ==
'phpgw' || $cat[0]['owner'] == '-1' || !$this->cat_id)
{
- $this->t->set_var('add','<form
method="POST" action="' .
$GLOBALS['phpgw']->link('/index.php','menuaction=todo.uitodo.add&cat_id=' .
$this->cat_id)
+ $this->t->set_var('add','<form
method="POST" action="' . $GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'todo.uitodo.add', 'cat_id' => $this->cat_id) )
. '"><input type="submit"
name="Add" value="' . lang('Add') .'"></form>');
}
else
{
if
($this->botodo->check_perms($this->grants[$cat[0]['owner']],PHPGW_ACL_ADD) ||
$cat[0]['owner'] == $GLOBALS['phpgw_info']['user']['account_id'])
{
- $this->t->set_var('add','<form
method="POST" action="' .
$GLOBALS['phpgw']->link('/index.php','menuaction=todo.uitodo.add&cat_id=' .
$this->cat_id)
+ $this->t->set_var('add','<form
method="POST" action="' . $GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'todo.uitodo.add', 'cat_id' => $this->cat_id) )
. '"><input
type="submit" name="Add" value="' . lang('Add') .'"></form>');
}
else
@@ -336,8 +331,8 @@
$year = date('Y');
$month = date('m');
-
$this->t->set_var('matrixview',$GLOBALS['phpgw']->common->check_owner($GLOBALS['phpgw_info']['user']['account_id'],'/index.php',
- lang('View matrix of actual
month'),'menuaction=todo.uitodo.matrix&month=' . $month . '&year=' . $year));
+ $this->t->set_var('matrixview', '<a href="' .
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'todo.uitodo.matrix', 'month' => $month, 'year' => $year) ) . '">'
+ . lang('View matrix of actual month') .
"</a>\n");
$body .= $this->t->fp('out','page_footer');
}
@@ -357,49 +352,42 @@
$selected = explode(',',$selected);
}
- $employees = $this->botodo->employee_list($type);
+ $user_list = '';
- while (list($null,$account) = each($employees))
+ $accounts = $this->botodo->employee_list($type);
+ foreach ( $accounts as $account )
{
$user_list .= '<option value="' .
$account['account_id'] . '"';
- if (in_array($account['account_id'],$selected))
+ if (in_array($account['account_id'], $selected))
{
$user_list .= ' selected';
}
- if ($account['account_type'] == 'u')
- {
- $user_list .= '>' .
$account['account_firstname'] . ' ' . $account['account_lastname']
-
. ' [' . $account['account_lid'] . ']';
- }
- else
- {
- $user_list .= '>' .
$account['account_firstname'] . ' ' . lang('Group');
- }
- $user_list .= '</option>' . "\n";
+ $user_list .= '>' .
$GLOBALS['phpgw']->accounts->id2name($account['account_id']) . "</option>\n";
}
return $user_list;
}
function formatted_todo($selected = '')
{
- $todos = $this->botodo->_list($start, False, $query,
$filter, $sort, $order, $cat_id, $tree);
+ $todos = $this->botodo->_list(0, False);
- for ($i=0;$i<count($todos);$i++)
+ $todo_select = '';
+ foreach ( $todos as $todo )
{
- $todo_select .= '<option value="' .
$todos[$i]['id'] . '"';
- if ($todos[$i]['id'] == $selected)
+ $todo_select .= '<option value="' . $todo['id']
. '"';
+ if ($todo['id'] == $selected)
{
$todo_select .= ' selected';
}
- if (! $todos[$i]['title'])
+ if (! $todo['title'])
{
- $words = split('
',$GLOBALS['phpgw']->strip_html($todos[$i]['descr']));
+ $words = split('
',$GLOBALS['phpgw']->strip_html($todo['descr']));
$title = "$words[0] $words[1] $words[2]
$words[3] ...";
- $todo_select .= '>' . $title;
+ $todo_select .= ">$title";
}
else
{
- $todo_select .= '>' .
$GLOBALS['phpgw']->strip_html($todos[$i]['title']);
+ $todo_select .= '>' .
$GLOBALS['phpgw']->strip_html($todo['title']);
}
$todo_select .= '</option>';
}
@@ -408,7 +396,14 @@
function add()
{
- global $cat_id, $new_cat, $values, $submit,
$new_parent, $parent, $assigned, $assigned_group;
+ $cat_id = isset($_POST['cat_id']) ? (int)
$_POST['cat_id'] : 0;
+ $new_cat = isset($_POST['new_cat']) ? (int)
$_POST['new_cat'] : 0;
+ $values = isset($_POST['values']) ? (array)
$_POST['values'] : array();
+ $submit = isset($_POST['submit']) ? !!$_POST['submit']
: false;
+ $new_parent = isset($_POST['new_parent']) ?
$_POST['new_parent'] : 0;
+ $parent = isset($_POST['parent']) ? (int)
$_POST['parent'] : 0;
+ $assigned = isset($_POST['assigned']) ?
$_POST['assigned'] : 0;
+ $assigned_group = isset($_POST['assigned_group']) ?
$_POST['assigned_group'] : 0;
if ($new_parent)
{
@@ -424,19 +419,26 @@
{
$values['cat'] = $cat_id;
$values['parent'] = $parent;
+ if ( !isset($values['main']) )
+ {
+ $values['main'] = $cat_id;
+ $values['level'] = 0;
+ }
- if (is_array($assigned))
+ $values['assigned'] = '';
+ if ( is_array($assigned) )
{
- $values['assigned'] =
implode(',',$assigned);
+ $values['assigned'] = implode(',',
$assigned);
if (count($assigned) > 1)
{
- $values['assigned'] = ',' .
$values['assigned'] . ',';
+ $values['assigned'] = ",
{$values['assigned']} ,";
}
}
- if (is_array($assigned_group))
+ $values['assigned_group'] = '';
+ if ( is_array($assigned_group) )
{
- $values['assigned_group'] =
implode(',',$assigned_group);
+ $values['assigned_group'] =
implode(',', $assigned_group);
if (count($assigned_group) > 1)
{
$values['assigned_group'] = ','
. $values['assigned_group'] . ',';
@@ -451,20 +453,19 @@
else
{
$this->botodo->save($values);
- Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php','menuaction=todo.uitodo.show_list&cat_id='
. $cat_id));
-
$GLOBALS['phpgw_info']['flags']['nodisplay'] = True;
+
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction' =>
'todo.uitodo.show_list', 'cat_id' => (int) $cat_id) );
exit;
}
}
- $GLOBALS['phpgw']->common->phpgw_header();
+ $GLOBALS['phpgw']->common->phpgw_header(true);
$this->t->set_file('todo_add','form.tpl');
$this->t->set_block('todo_add','add','addhandle');
$this->t->set_block('todo_add','edit','edithandle');
$this->set_app_langs();
-
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=todo.uitodo.add'));
+ $this->t->set_var('actionurl',
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'todo.uitodo.add')));
if ($parent)
{
@@ -475,59 +476,75 @@
$this->t->set_var('lang_todo_action',lang('Add
main project'));
}
-
$this->t->set_var('cat_list',$this->cats->formatted_list('select','all',$cat_id,'True'));
-
$this->t->set_var('todo_list',$this->formatted_todo($parent));
-
- $this->t->set_var('descr',$values['descr']);
-
-
$this->t->set_var('pri_list',$this->sbox->getPriority('values[pri]'));
-
$this->t->set_var('stat_list',$this->sbox->getPercentage('values[status]',0));
-
-
$this->t->set_var('user_list',$this->formatted_user($assigned,'accounts'));
-
-
$this->t->set_var('group_list',$this->formatted_user($assigned_group,'groups'));
+ if ( !isset($values['descr']) || !$values['descr'] )
+ {
+ $values['descr'] = '';
+ }
- if (!$values['smonth'])
+ if ( !isset($values['smonth']) || !$values['smonth'])
{
$values['smonth'] = date('m',time());
}
- if (!$values['sday'])
+ if ( !isset($values['sday']) || !$values['sday'] )
{
$values['sday'] = date('d',time());
}
- if (!$values['syear'])
+ if ( ! isset($values['syear']) || !$values['syear'] )
{
$values['syear'] = date('Y',time());
}
-
$this->t->set_var('start_select_date',$GLOBALS['phpgw']->common->dateformatorder($this->sbox->getYears('values[syear]',$values['syear']),
-
$this->sbox->getMonthText('values[smonth]',$values['smonth']),$this->sbox->getDays('values[sday]',$values['sday'])));
-
$this->t->set_var('end_select_date',$GLOBALS['phpgw']->common->dateformatorder($this->sbox->getYears('values[eyear]',$values['eyear']),
-
$this->sbox->getMonthText('values[emonth]',$values['emonth']),$this->sbox->getDays('values[eday]',$values['eday'])));
+ $plus1week = strtotime('+1 week');
+ if ( !isset($values['eday']) || !$values['eday'] )
+ {
+ $values['eday'] = date('d', $plus1week);
+ }
- $this->t->set_var('selfortoday','<input type="checkbox"
name="values[seltoday]" value="True">');
+ if ( !isset($values['emonth']) || !$values['emonth'])
+ {
+ $values['emonth'] = date('m', $plus1week);
+ }
- $this->t->set_var('daysfromstartdate','<input
type="text" name="values[daysfromstart]" size="3" maxlength="3">');
+ if ( !isset($values['eyear']) || !$values['eyear'] )
+ {
+ $values['eyear'] = date('Y', $plus1week);
+ }
+ unset($plus1week);
- $this->t->set_var('access_list', '<input
type="checkbox" name="values[access]" value="True"' . ($values['access'] ==
'private'?' checked':'') . '>');
+ $this->t->set_var($values + array
+ (
+ 'cat_list' =>
$this->cats->formatted_list('select','all',$cat_id,'True'),
+ 'todo_list' =>
$this->formatted_todo($parent),
+ 'pri_list' =>
$this->sbox->getPriority('values[pri]'),
+ 'stat_list' =>
$this->sbox->getPercentage('values[status]',0),
+ 'user_list' =>
$this->formatted_user($assigned,'accounts'),
+ 'group_list' =>
$this->formatted_user($assigned_group,'groups'),
+ 'lang_selfortoday' => lang('or: select for
today:'),
+ 'lang_daysfromstartdate' => lang('or: days from
startdate:'),
+ 'lang_submit' => lang('Submit'),
+ 'lang_reset' => lang('Clear form'),
+ 'edithandle' => '',
+ 'addhandle' => '',
+ 'start_select_date' =>
$GLOBALS['phpgw']->common->dateformatorder($this->sbox->getYears('values[syear]',$values['syear']),
+
$this->sbox->getMonthText('values[smonth]',$values['smonth']),$this->sbox->getDays('values[sday]',$values['sday'])),
+ 'end_select_date' =>
$GLOBALS['phpgw']->common->dateformatorder($this->sbox->getYears('values[eyear]',$values['eyear']),
+
$this->sbox->getMonthText('values[emonth]',$values['emonth']),$this->sbox->getDays('values[eday]',$values['eday'])),
+ 'selfortoday' => '<input
type="checkbox" name="values[seltoday]" value="True">',
+ 'daysfromstartdate' => '<input type="text"
name="values[daysfromstart]" size="3" maxlength="3">',
+ 'access_list' => '<input
type="checkbox" name="values[access]" value="True"' .
(!isset($values['access']) || $values['access'] == 'private' ? ' checked' : '')
. '>'
+ ));
- $this->t->set_var('lang_selfortoday',lang('or: select
for today:'));
- $this->t->set_var('lang_daysfromstartdate',lang('or:
days from startdate:'));
- $this->t->set_var('lang_submit',lang('Submit'));
- $this->t->set_var('lang_reset',lang('Clear form'));
- $this->t->set_var('edithandle','');
- $this->t->set_var('addhandle','');
$this->t->pfp('out','todo_add');
$this->t->pfp('addhandle','add');
}
function view()
{
- $GLOBALS['phpgw']->common->phpgw_header();
+ $GLOBALS['phpgw']->common->phpgw_header(true);
- $values = $this->botodo->read($GLOBALS['todo_id']);
+ $values = $this->botodo->read($_REQUEST['todo_id']);
$this->t->set_file('_view','view.tpl');
$this->set_app_langs();
@@ -547,7 +564,14 @@
}
$parent_values = $this->botodo->read($values['parent']);
+ if ( is_array($parent_values) && count($parent_values) )
+ {
$this->t->set_var('value_parent',$GLOBALS['phpgw']->strip_html($parent_values['title']));
+ }
+ else
+ {
+ $this->t->set_var('value_parent', '');
+ }
$this->t->set_var('value_completed',$values['status']);
@@ -562,9 +586,15 @@
switch ($values['pri'])
{
- case 1: $pri = lang('Low'); break;
- case 2: $pri = lang('normal'); break;
- case 3: $pri = '<font color="CC0000"><b>' .
lang('high') . '</b></font>'; break;
+ case 1:
+ $pri = lang('Low');
+ break;
+ case 2:
+ $pri = lang('normal');
+ break;
+ case 3:
+ $pri = '<font color="CC0000"><b>' .
lang('high') . '</b></font>';
+ break;
}
$this->t->set_var('value_urgency',$pri);
@@ -572,14 +602,22 @@
$this->t->set_var('lang_access',lang('Access'));
$this->t->set_var('access',lang($values['access']));
-
$this->t->set_var('history',$this->historylog->return_html(array(),'','',$GLOBALS['todo_id']));
-
$this->t->set_var('done_action',$GLOBALS['phpgw']->link('/index.php','menuaction=todo.uitodo.show_list'));
+
$this->t->set_var('history',$this->historylog->return_html(array(),'','',$_REQUEST['todo_id']));
+
$this->t->set_var('done_action',$GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'todo.uitodo.show_list') ) );
$this->t->pfp('out','_view');
}
function edit()
{
- global $cat_id, $new_cat, $values, $submit,
$new_parent, $parent, $todo_id, $assigned, $assigned_group;
+ $todo_id = isset($_REQUEST['todo_id']) ? (int)
$_REQUEST['todo_id'] : 0;
+ $cat_id = isset($_POST['cat_id']) ? (int)
$_POST['cat_id'] : 0;
+ $new_cat = isset($_POST['new_cat']) ? (int)
$_POST['new_cat'] : 0;
+ $values = isset($_POST['values']) ? (array)
$_POST['values'] : array();
+ $submit = isset($_POST['submit']) ? !!$_POST['submit']
: false;
+ $new_parent = isset($_POST['new_parent']) ?
$_POST['new_parent'] : 0;
+ $parent = isset($_POST['parent']) ? (int)
$_POST['parent'] : 0;
+ $assigned = isset($_POST['assigned']) ?
$_POST['assigned'] : 0;
+ $assigned_group = isset($_POST['assigned_group']) ?
$_POST['assigned_group'] : 0;
if ($new_parent)
{
@@ -623,20 +661,20 @@
else
{
$this->botodo->save($values,'edit');
- Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php','menuaction=todo.uitodo.show_list&cat_id='
. $cat_id));
+
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction' =>
'todo.uitodo.show_list', 'cat_id' => $cat_id) );
$GLOBALS['phpgw_info']['flags']['nodisplay'] = True;
exit;
}
}
- $GLOBALS['phpgw']->common->phpgw_header();
+ $GLOBALS['phpgw']->common->phpgw_header(true);
$this->t->set_file(array('todo_edit' => 'form.tpl'));
$this->t->set_block('todo_edit','add','addhandle');
$this->t->set_block('todo_edit','edit','edithandle');
$this->set_app_langs();
-
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=todo.uitodo.edit&todo_id='
. $todo_id));
+
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'todo.uitodo.edit', 'todo_id' => $todo_id) ) );
$values = $this->botodo->read($todo_id);
@@ -701,7 +739,7 @@
if
($this->botodo->check_perms($this->grants[$values['owner']],PHPGW_ACL_DELETE)
|| $values['owner'] == $GLOBALS['phpgw_info']['user']['account_id'])
{
- $this->t->set_var('delete','<form method="POST"
action="' .
$GLOBALS['phpgw']->link('/index.php','menuaction=todo.uitodo.delete&todo_id=' .
$values['id'])
+ $this->t->set_var('delete','<form method="POST"
action="' . $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'todo.uitodo.delete', 'todo_id' => $values['id']) )
. '"><input type="submit" value="' .
lang('Delete') .'"></form>');
}
else
@@ -718,24 +756,24 @@
function delete()
{
- global $confirm, $todo_id, $subs;
+ $todo_id = isset($_REQUEST['todo_id']) ?
(int)$_REQUEST['todo_id'] : 0;
- if ($confirm)
+ if ( isset($_POST['confirm']) && $_POST['confirm'] )
{
- if ($subs)
+ if ( isset($_POST['subs']) && $_POST['subs'] )
{
- $this->botodo->delete($todo_id,True);
+ $this->botodo->delete($todo_id, true);
}
else
{
$this->botodo->delete($todo_id);
}
- Header('Location: ' .
$GLOBALS['phpgw']->link('/index.php','menuaction=todo.uitodo.show_list'));
+ $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'todo.uitodo.show_list') );
}
- $GLOBALS['phpgw']->common->phpgw_header();
+ $GLOBALS['phpgw']->common->phpgw_header(true);
- $this->t->set_file(array('todo_delete' =>
'delete.tpl'));
-
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=todo.uitodo.delete&todo_id='
. $todo_id));
+ $this->t->set_file('todo_delete', 'delete.tpl');
+
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'todo.uitodo.delete', 'todo_id' => $todo_id) ) );
$exists = $this->botodo->exists($todo_id);
@@ -750,7 +788,7 @@
$this->t->set_var('subs', '');
}
-
$this->t->set_var('nolink',$GLOBALS['phpgw']->link('/index.php','menuaction=todo.ui.show_list'));
+
$this->t->set_var('nolink',$GLOBALS['phpgw']->link('/index.php',
array('menuaction' => 'todo.uitodo.show_list') ) );
$this->t->set_var('deleteheader',lang('Are you sure you
want to delete this entry'));
$this->t->set_var('lang_no',lang('No'));
$this->t->set_var('lang_yes',lang('Yes'));
@@ -760,47 +798,51 @@
function matrix()
{
- global $month, $year, $o;
+ $o = 0;
+ $month = isset($_REQUEST['month']) ? (int)
$_REQUEST['month'] : date('n');
+ $year = isset($_REQUEST['year']) ? (int)
$_REQUEST['year'] : date('Y');
- $GLOBALS['phpgw']->common->phpgw_header();
+ $GLOBALS['phpgw']->common->phpgw_header(true);
$colors = array
(
- '#CC0033',
+ '#cc0033',
'#006600',
- '#00CCFF',
- '#FF6600',
- '#0000FF'
+ '#00ccff',
+ '#ff6600',
+ '#0000ff'
);
- $this->matrix->matrixview($month,$year);
+ $this->matrix->matrixview($month, $year);
- $entries =
$this->botodo->_list($start,False,$query,$filter,$order,$sort,$cat_id,'mains');
+ $entries = $this->botodo->_list(0, 0, '', '', '', '',
'','mains');
- for ($i=0;$i<count($entries);$i++)
+ foreach ( $entries as $entry )
{
- $o++;
+ ++$o;
$ind = $o % count($colors);
- if ($entries[$i]['sdate_epoch'] > 0 &&
$entries[$i]['edate_epoch'] > 0)
+ if ($entry['sdate_epoch'] > 0 &&
$entry['edate_epoch'] > 0)
{
- $startd =
date('Y',$entries[$i]['sdate_epoch']) . date('m',$entries[$i]['sdate_epoch']) .
date('d',$entries[$i]['sdate_epoch']);
- $endd =
date('Y',$entries[$i]['edate_epoch']) . date('m',$entries[$i]['edate_epoch']) .
date('d',$entries[$i]['edate_epoch']);
-
$this->matrix->setPeriod($GLOBALS['phpgw']->strip_html($entries[$i]['title']),$startd,$endd,$colors[$ind]);
+ $title = '<a href="' .
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'todo.uitodo.view',
'todo_id' => $entry['id'])) . '">' .
$GLOBALS['phpgw']->strip_html($entry['title']) . '</a>';
+ $startd =
date('Y',$entry['sdate_epoch']) . date('m',$entry['sdate_epoch']) .
date('d',$entry['sdate_epoch']);
+ $endd = date('Y',$entry['edate_epoch'])
. date('m',$entry['edate_epoch']) . date('d',$entry['edate_epoch']);
+ $this->matrix->setPeriod($title,
$startd, $endd, $colors[$ind]);
- $subentries =
$this->botodo->_list($start,False,$query,$filter,$order,$sort,$cat_id,'subs',$entries[$i]['id']);
- for ($j=0;$j<count($subentries);$j++)
+ $subentries = $this->botodo->_list(0,
0, '', '', '', '', '', 'subs', $entry['id']);
+ foreach ( $subentries as $subentry )
{
- if
($subentries[$j]['sdate_epoch'] > 0 && $subentries[$j]['edate_epoch'] > 0)
+ if ($subentry['sdate_epoch'] >
0 && $subentry['edate_epoch'] > 0)
{
- $startd =
date('Y',$subentries[$j]['sdate_epoch']) .
date('m',$subentries[$j]['sdate_epoch']) .
date('d',$subentries[$j]['sdate_epoch']);
- $endd =
date('Y',$subentries[$j]['edate_epoch']) .
date('m',$subentries[$j]['edate_epoch']) .
date('d',$subentries[$j]['edate_epoch']);
-
$this->matrix->setPeriod($GLOBALS['phpgw']->strip_html($subentries[$j]['title']),$startd,$endd,$colors[$ind]);
+ $title = '<a href="' .
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 'todo.uitodo.view',
'todo_id' => $subentry['id'])) . '">' .
$GLOBALS['phpgw']->strip_html($subentry['title']) . '</a>';
+ $startd =
date('Y',$subentry['sdate_epoch']) . date('m',$subentry['sdate_epoch']) .
date('d',$subentry['sdate_epoch']);
+ $endd =
date('Y',$subentry['edate_epoch']) . date('m',$subentry['edate_epoch']) .
date('d',$subentry['edate_epoch']);
+
$this->matrix->setPeriod($GLOBALS['phpgw']->strip_html($subentry['title']),$startd,$endd,$colors[$ind]);
}
}
}
}
-
$this->matrix->out($GLOBALS['phpgw']->link('/index.php','menuaction=todo.uitodo.matrix'));
+
$this->matrix->out($GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'todo.uitodo.matrix') ) );
}
}
?>
Index: templates/base/form.tpl
===================================================================
RCS file: /cvsroot/phpgroupware/todo/templates/base/form.tpl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- templates/base/form.tpl 12 May 2005 17:44:12 -0000 1.1
+++ templates/base/form.tpl 28 Dec 2006 10:39:45 -0000 1.2
@@ -1,59 +1,43 @@
-<!-- $Id: form.tpl,v 1.1 2005/05/12 17:44:12 fipsfuchs Exp $ -->
-<p> <b>{lang_todo_action}</b><br>
-<hr noshade width="98%" align="center" size="1">
-<center>
+<!-- $Id: form.tpl,v 1.2 2006/12/28 10:39:45 skwashd Exp $ -->
+<h1>{lang_todo_action}</h1>
{error}
-<form method="POST" action="{actionurl}">
-<table width="90%" border="0" cellspacing="0" cellpadding="2">
- <tr>
- <td>{lang_title}:</td>
- <td colspan="3"><input type="text" name="values[title]"
value="{title}" size="50"></td>
- </tr>
- <tr>
- <td valign="top">{lang_descr}:</td>
- <td colspan="3"><textarea name="values[descr]" rows="4"
cols="50" wrap="VIRTUAL">{descr}</textarea></td>
- </tr>
- <tr>
- <td colspan="4"><hr size="1"></td>
- </tr>
- <tr>
- <td>{lang_parent}</td>
- <td><select name="new_parent"><option
value="">{lang_none}</option>{todo_list}</select></td>
- <td> </td>
- <td> </td>
- </tr>
- <tr>
- <td>{lang_start_date}:</td>
- <td>{start_select_date}</td>
- <td>{lang_selfortoday}</td>
- <td>{selfortoday}</td>
- </tr>
- <tr>
+<form method="post" action="{actionurl}">
+ <label for="values_title">{lang_title}:</label>
+ <input id="values_title" type="text" name="values[title]"
value="{title}" size="50"><br>
+
+ <label for="values_descr">{lang_descr}:</label>
+ <textarea name="values[descr]" rows="10"
cols="80">{descr}</textarea><br>
+
+
+ <label for="values_new_parent">{lang_parent}</label>
+ <select id="values_new_parent" name="new_parent"><option
value="">{lang_none}</option>{todo_list}</select><br>
+
+ <label for="values_start_date">{lang_start_date}:</label>
+ {start_select_date}
+ {selfortoday}
+ <label for="selfortoday">{lang_selfortoday}</label><br>
+
<td>{lang_end_date}:</td>
<td>{end_select_date}</td>
<td>{lang_daysfromstartdate}</td>
<td>{daysfromstartdate}</td>
- </tr>
- <tr>
- <td colspan="4"><hr size="1"></td>
- </tr>
- <tr>
- <td>{lang_completed}:</td>
- <td>{stat_list}</td>
- <td>{lang_category}</td>
- <td><select name="new_cat"><option
value="0">{lang_none}</option>{cat_list}</select></td>
- </tr>
- <tr>
+
+ <label for="">{lang_completed}:</td>
+ <td>{stat_list}</td><br>
+
+ <label for="new_cat">{lang_category}</label>
+ <select id="new_cat" name="new_cat"><option
value="0">{lang_none}</option>{cat_list}</select><br>
+
<td>{lang_urgency}:</td>
- <td>{pri_list}</td>
- <td valign="top">{lang_assigned}:</td>
- <td><select name="assigned[]" multiple><option
value="">{lang_nobody}</option>{user_list}</select></td>
- </tr>
- <tr>
+ <td>{pri_list}</td><br>
+ <label for="assinged_user">{lang_assigned_user}:</label>
+ <select id="assigned_user" name="assigned[]" multiple><option
value="">{lang_nobody}</option>{user_list}</select><br>
+
<td>{lang_access}:</td>
- <td>{access_list}</td>
- <td valign="top"> </td>
- <td><select name="assigned_group[]" multiple><option
value="">{lang_none}</option>{group_list}</select></td>
+ <td>{access_list}</td><br>
+
+ <label for="assigned_group">{lang_assigned_group}</label>
+ <select id="assigned_group" name="assigned_group[]"
multiple><option value="">{lang_none}</option>{group_list}</select><br>
</tr>
</table>
Index: templates/base/list.tpl
===================================================================
RCS file: /cvsroot/phpgroupware/todo/templates/base/list.tpl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- templates/base/list.tpl 12 May 2005 17:44:12 -0000 1.1
+++ templates/base/list.tpl 28 Dec 2006 10:39:45 -0000 1.2
@@ -1,7 +1,6 @@
-<!-- $Id: list.tpl,v 1.1 2005/05/12 17:44:12 fipsfuchs Exp $ -->
+<!-- $Id: list.tpl,v 1.2 2006/12/28 10:39:45 skwashd Exp $ -->
<!-- BEGIN page_header -->
-<p><b> {lang_action}</b><br>
-<hr noshade width="98%" align="center" size="1">
+<h1>{lang_action}</h1>
<center>
<table border="0" cellspacing="2" cellpadding="2" width="98%">
<tr>
@@ -32,54 +31,47 @@
<!-- END page_header -->
<!-- BEGIN table_header -->
- <table border="0" cellpadding="2" cellspacing="2" width="98%">
- <tr bgcolor="{th_bg}">
- <td width="5%" align="right"><font face="Arial, Helvetica,
sans-serif" size="2">{sort_status}</font></td>
- <td width="5%" align="center"><font face="Arial, Helvetica,
sans-serif" size="2">{sort_urgency}</font></td>
- <td><font face="Arial, Helvetica, sans-serif"
size="2">{sort_title}</font></td>
- <td width="9%" align="center"><font face="Arial, Helvetica,
sans-serif" size="2">{sort_sdate}</font></td>
- <td width="9%" align="center"><font face="Arial, Helvetica,
sans-serif" size="2">{sort_edate}</font></td>
- <td width="15%"><font face="Arial, Helvetica, sans-serif"
size="2">{sort_owner}</font></td>
- <td width="15%"><font face="Arial, Helvetica, sans-serif"
size="2">{sort_assigned}</font></td>
- <td width="9%" align="center"><font face="Arial, Helvetica,
sans-serif" size="2">{h_lang_sub}</font></td>
- <td width="5%" align="center"><font face="Arial, Helvetica,
sans-serif" size="2">{h_lang_view}</font></td>
- <td width="5%" align="center"><font face="Arial, Helvetica,
sans-serif" size="2">{h_lang_edit}</font></td>
+ <table id="todo_list">
+ <thead>
+ <tr>
+ <td width="5%" align="right">{sort_status}</td>
+ <td width="5%"
align="center">{sort_urgency}</td>
+ <td>{sort_title}</td>
+ <td width="9%" align="center">{sort_sdate}</td>
+ <td width="9%" align="center">{sort_edate}</td>
+ <td width="15%">{sort_owner}</td>
+ <td width="15%">{sort_assigned}</td>
+ <td width="9%" align="center">{h_lang_sub}</td>
+ <td width="5%" align="center">{h_lang_view}</td>
+ <td width="5%" align="center">{h_lang_edit}</td>
</tr>
+ </thead>
+ <tbody>
<!-- END table_header -->
<!-- BEGIN todo_list -->
- <tr bgcolor="{tr_color}">
- <td align="right"><font face="Arial, Helvetica, sans-serif"
size="2">{status}%</font></td>
- <td align="center"><font face="Arial, Helvetica, sans-serif"
size="2">{pri}</font></td>
- <td><font face="Arial, Helvetica, sans-serif"
size="2">{title}</font></td>
- <td align="center"><font face="Arial, Helvetica, sans-serif"
size="2">{datecreated}</font></td>
- <td align="center"><font face="Arial, Helvetica, sans-serif"
size="2">{datedue}</font></td>
- <td><font face="Arial, Helvetica, sans-serif"
size="2">{owner}</font></td>
- <td><font face="Arial, Helvetica, sans-serif"
size="2">{assigned}</font></td>
- <td align="center"><font face="Arial, Helvetica, sans-serif"
size="2">{subadd}</font></td>
- <td align="center"><font face="Arial, Helvetica, sans-serif"
size="2">{view}</font></td>
- <td align="center"><font face="Arial, Helvetica, sans-serif"
size="2">{edit}</font></td>
+ <tr class="{tr_class}">
+ <td align="right">{status}%</td>
+ <td align="center">{pri}</font></td>
+ <td>{title}</td>
+ <td align="center">{datecreated}</td>
+ <td align="center">{datedue}</td>
+ <td>{owner}</td>
+ <td>{assigned}</td>
+ <td align="center">{subadd}</td>
+ <td align="center">{view}</td>
+ <td align="center">{edit}</td>
</tr>
<!-- END todo_list -->
<!-- BEGIN table_footer -->
+ </tbody>
</table>
<!-- END table_footer -->
<!-- BEGIN page_footer -->
-<table width="95%" border="0" cellspacing="2" cellpadding="2">
- <tr>
- <td width="4%">
- <div align="right">
+<div class="button_group">
{add}
- </div>
- </td>
- <td width="72%"> </td>
- <td width="24%"> </td>
- </tr>
- <tr>
- <td colspan="3">{matrixview}</td>
- </tr>
-</table>
-</center>
+ {matrixview}
+</div>
<!-- END page_footer -->
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] todo inc/class.botodo.inc.php inc/class.sotodo....,
Dave Hall <=