Skip to content

Commit 195c5f1

Browse files
committed
Add Views exposed filters to the Task queue page
1 parent 76d4e0c commit 195c5f1

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

task/includes/views/hosting_task.views_default.inc

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,14 @@ function hosting_task_views_default_views() {
154154
$handler->display->display_options['filters']['type']['value'] = array(
155155
'task' => 'task',
156156
);
157+
$handler->display->display_options['filters']['type']['group'] = 1;
157158
$handler->display->display_options['filters']['type']['expose']['operator'] = FALSE;
158159
/* Filter criterion: Content: Published */
159160
$handler->display->display_options['filters']['status']['id'] = 'status';
160161
$handler->display->display_options['filters']['status']['table'] = 'node';
161162
$handler->display->display_options['filters']['status']['field'] = 'status';
162163
$handler->display->display_options['filters']['status']['value'] = '1';
164+
$handler->display->display_options['filters']['status']['group'] = 1;
163165
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
164166

165167
/* Display: Block */
@@ -293,6 +295,62 @@ function hosting_task_views_default_views() {
293295
$handler->display->display_options['fields']['nid']['alter']['path'] = 'hosting/task/[nid]';
294296
$handler->display->display_options['fields']['nid']['alter']['link_class'] = 'hosting-button-enabled hosting-button-log hosting-button-dialog';
295297
$handler->display->display_options['fields']['nid']['element_class'] = 'hosting-actions';
298+
$handler->display->display_options['defaults']['filter_groups'] = FALSE;
299+
$handler->display->display_options['defaults']['filters'] = FALSE;
300+
/* Filter criterion: Content: Type */
301+
$handler->display->display_options['filters']['type']['id'] = 'type';
302+
$handler->display->display_options['filters']['type']['table'] = 'node';
303+
$handler->display->display_options['filters']['type']['field'] = 'type';
304+
$handler->display->display_options['filters']['type']['value'] = array(
305+
'task' => 'task',
306+
);
307+
$handler->display->display_options['filters']['type']['expose']['operator'] = FALSE;
308+
/* Filter criterion: Content: Published */
309+
$handler->display->display_options['filters']['status']['id'] = 'status';
310+
$handler->display->display_options['filters']['status']['table'] = 'node';
311+
$handler->display->display_options['filters']['status']['field'] = 'status';
312+
$handler->display->display_options['filters']['status']['value'] = '1';
313+
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
314+
/* Filter criterion: Hosting Task: Status */
315+
$handler->display->display_options['filters']['task_status']['id'] = 'task_status';
316+
$handler->display->display_options['filters']['task_status']['table'] = 'hosting_task';
317+
$handler->display->display_options['filters']['task_status']['field'] = 'task_status';
318+
$handler->display->display_options['filters']['task_status']['exposed'] = TRUE;
319+
$handler->display->display_options['filters']['task_status']['expose']['operator_id'] = 'task_status_op';
320+
$handler->display->display_options['filters']['task_status']['expose']['label'] = 'Status';
321+
$handler->display->display_options['filters']['task_status']['expose']['operator'] = 'task_status_op';
322+
$handler->display->display_options['filters']['task_status']['expose']['identifier'] = 'task_status';
323+
$handler->display->display_options['filters']['task_status']['expose']['remember_roles'] = array(
324+
2 => '2',
325+
1 => 0,
326+
3 => 0,
327+
8 => 0,
328+
4 => 0,
329+
6 => 0,
330+
7 => 0,
331+
5 => 0,
332+
9 => 0,
333+
);
334+
/* Filter criterion: Hosting Task: Type */
335+
$handler->display->display_options['filters']['task_type']['id'] = 'task_type';
336+
$handler->display->display_options['filters']['task_type']['table'] = 'hosting_task';
337+
$handler->display->display_options['filters']['task_type']['field'] = 'task_type';
338+
$handler->display->display_options['filters']['task_type']['exposed'] = TRUE;
339+
$handler->display->display_options['filters']['task_type']['expose']['operator_id'] = 'task_type_op';
340+
$handler->display->display_options['filters']['task_type']['expose']['label'] = 'Type';
341+
$handler->display->display_options['filters']['task_type']['expose']['operator'] = 'task_type_op';
342+
$handler->display->display_options['filters']['task_type']['expose']['identifier'] = 'task_type';
343+
$handler->display->display_options['filters']['task_type']['expose']['remember_roles'] = array(
344+
2 => '2',
345+
1 => 0,
346+
3 => 0,
347+
8 => 0,
348+
4 => 0,
349+
6 => 0,
350+
7 => 0,
351+
5 => 0,
352+
9 => 0,
353+
);
296354
$handler->display->display_options['path'] = 'hosting/tasks';
297355
$handler->display->display_options['menu']['type'] = 'normal';
298356
$handler->display->display_options['menu']['title'] = 'Tasks';

0 commit comments

Comments
 (0)