[development] View to list only nodes _without_ completed workflow state

Simon Lindsay simon at dirtbike.ws
Sat Feb 18 02:26:52 UTC 2006


Earl Miles wrote:
> Umm. Sounds like a bug. I will have to look into it; perhaps I 
> misunderstood the table when I wrote the workflow integration.

Thought this might help, but you wont have a "job" table..



   $view = new stdClass();
   $view->name = 'Open Jobs';
   $view->description = '';
   $view->access = array (
   0 => '4',
   1 => '5',
   2 => '3',
);
   $view->page = TRUE;
   $view->page_title = '';
   $view->page_header = '';
   $view->page_header_format = '1';
   $view->page_type = 'table';
   $view->url = 'job/open';
   $view->use_pager = TRUE;
   $view->nodes_per_page = '20';
   $view->menu = TRUE;
   $view->menu_title = 'open';
   $view->menu_tab = FALSE;
   $view->menu_tab_default = FALSE;
   $view->menu_weight = '';
   $view->sort = array (
   );
   $view->argument = array (
   );
   $view->field = array (
     array (
       'tablename' => 'job',
       'field' => 'job_id',
       'label' => '',
       'sortable' => '1',
     ),
     array (
       'tablename' => 'node',
       'field' => 'title',
       'label' => '',
       'handler' => 'views_handler_field_nodelink',
       'sortable' => '1',
     ),
     array (
       'tablename' => 'job',
       'field' => 'cid',
       'label' => '',
       'sortable' => '1',
     ),
     array (
       'tablename' => 'workflow_states',
       'field' => 'state',
       'label' => '',
       'sortable' => '1',
       'defaultsort' => 'DESC',
     ),
     array (
       'tablename' => 'job',
       'field' => 'job_next_workflow',
       'label' => '',
     ),
   );
   $view->filter = array (
     array (
       'tablename' => 'workflow_node',
       'field' => 'sid',
       'operator' => 'OR',
       'options' => '',
       'value' => array (
   0 => '12',
   1 => '14',
   2 => '13',
),
     ),
     array (
       'tablename' => 'node',
       'field' => 'distinct',
       'operator' => '=',
       'options' => '',
       'value' => '',
     ),
   );
   $view->requires = array(job, node, workflow_states, workflow_node);
   $views[$view->name] = $view;


More information about the development mailing list