Changeset 56 for trunk/www/view/task.php
- Timestamp:
- Aug 4, 2009, 9:53:52 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/view/task.php
r55 r56 3 3 class TaskView extends Module 4 4 { 5 var $ItemListFormClass = array( 6 'Title' => 'Seznam úloh', 7 'Table' => 'Task', 8 'DefaultOrderColumn' => 'TimeCreate', 9 'DefaultOrderDirection' => 1, 10 'Items' => array( 11 'TimeCreate' => array('Type' => 'DateTime', 'Caption' => 'Čas vytvoření', 'Default' => ''), 12 'Title' => array('Type' => 'String', 'Caption' => 'Akce', 'Default' => ''), 13 'State' => array('Type' => 'TaskState', 'Caption' => 'Stav', 'Default' => ''), 14 'Duration' => array('Type' => 'String', 'Caption' => 'Trvání', 'Default' => ''), 15 ), 16 ); 17 5 18 function ShowListOnRow($Row) 6 19 { … … 16 29 { 17 30 $Output = '<h4>Fronta úloh</h4>'; 18 $Table = new Table( 'TaskList');31 $Table = new Table($this->ItemListFormClass); 19 32 $Table->OnRow = array($this, 'ShowListOnRow'); 20 33 $Table->Definition['Table'] = '(SELECT (COALESCE(UNIX_TIMESTAMP(TimeEnd), UNIX_TIMESTAMP(NOW())) - UNIX_TIMESTAMP(TimeStart)) AS Duration, TimeCreate, Title, State FROM Task WHERE User='.$this->System->Modules['User']->User['Id'].' ORDER BY Id DESC)'; … … 22 35 $Output .= $Table->Show(); 23 36 $Output .= '<br /><div style="text-align: center;"><a href="?Action=TaskList">Obnovit pohled</a></dev>'; 24 } else $Output .= USER_BAD_ROLE;37 } else $Output = USER_BAD_ROLE; 25 38 return($Output); 26 39 }
Note:
See TracChangeset
for help on using the changeset viewer.