/[cvs]/nfo/php/libs/org.netfrag.app/YAA/JobList.php
ViewVC logotype

Annotation of /nfo/php/libs/org.netfrag.app/YAA/JobList.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Sat Feb 22 16:19:08 2003 UTC (21 years, 4 months ago) by joko
Branch: MAIN
YAA - Yet Another Admin
+ initial commit

1 joko 1.1 <?
2     /*
3     ## -------------------------------------------------------------------------
4     ## $Id: utils.php,v 1.2 2003/02/20 22:42:10 joko Exp $
5     ## -------------------------------------------------------------------------
6     ## $Log: utils.php,v $
7     ## -------------------------------------------------------------------------
8     */
9    
10    
11     // ----------------------------------------------------------
12     // View/List/Simple: job overview / selection area
13    
14     class YAA_JobList extends InfoTable {
15    
16     var $jobs;
17     var $backend;
18     var $lift;
19    
20     function YAA_JobList($filter) {
21     $this->backend = new TsBackend();
22     //$this->lift = new Data_Lift( array( metatype => 'job' ) );
23     $this->lift = mkObject('Data::Lift', undef, array( metatype => 'job' ) );
24     return $this->_do($filter);
25     }
26    
27     function _do($filter) {
28    
29     // frontend
30     $this->set_title('Job List');
31     $this->set_cellpadding(10);
32    
33     // fetch list of jobs (including some metadata) from backend
34     $this->jobs = $this->backend->getTaskList($filter);
35    
36    
37     if (is_array($this->jobs[target])) {
38    
39     // trace
40     //print Dumper($this->jobs);
41     //exit;
42    
43     foreach($this->jobs[target] as $key => $job) {
44    
45     //$task_data = task2metadata($value);
46     $this->lift->set($job);
47     $this->lift->to('html');
48     $this->lift->add(array( name => $key ) );
49    
50     $out = $this->lift->get();
51    
52     $controlbox = new VerticalCSSNavTable('Actions:');
53     $controlbox->add( httpQuery( array( action => 'status', job => $out[name] )), 'status' );
54     $controlbox->add( httpQuery( array( action => 'run', job => $out[name] )), 'run' );
55    
56     $this->add_row(
57     //rLink( array( action => 'run', job => $out[name] )),
58     //rAnchor("info", array( ap => 'pcontrol', job => $out[name], action => 'info' )),
59     $controlbox,
60     //substr($description, 0, 100) . "...",
61     //html_pre($description),
62     //substr(str_replace("\n", "<br/>", $description), 0, strlen($description) * 4/5) . " ...",
63     container(html_b($out[name]), html_br(), html_br(), html_b('description:'), html_br(), $out[description], html_br(), $out[steps])
64     //html_img("img/quest.gif", '', '', '', $out[description])
65     );
66     }
67    
68     } else {
69     $this->add("Diese Anfrage f&uuml;hrte zu keinem Ergebnis.<br/> Bitte w&auml;hlen Sie in der Liste links eine andere Job-Kategorie aus.<br/>");
70    
71     }
72    
73     }
74    
75     }
76    
77    
78     ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed