source: sipes/modules_contrib/views_bulk_operations/views_bulk_operations.views_default.inc @ 6e81fb4

stableversion-3.0
Last change on this file since 6e81fb4 was 177a560, checked in by José Gregorio Puentes <jpuentes@…>, 8 años ago

se agrego el directorio de modulos contribuidos de drupal

  • Propiedad mode establecida a 100755
File size: 17.8 KB
Línea 
1<?php
2
3function views_bulk_operations_views_default_views() {
4  // Admin content.
5  $view = new view;
6  $view->name = 'admin_content';
7  $view->description = 'Emulates the Drupal content administration page.';
8  $view->tag = '';
9  $view->base_table = 'node';
10  $view->core = 0;
11  $view->api_version = '2';
12  $view->disabled = TRUE;
13  $handler = $view->new_display('default', 'Default', 'default');
14  $handler->override_option('fields', array(
15    'title' => array(
16      'label' => 'Title',
17      'link_to_node' => 1,
18      'exclude' => 0,
19      'id' => 'title',
20      'table' => 'node',
21      'field' => 'title',
22      'relationship' => 'none',
23      'override' => array(
24        'button' => 'Override',
25      ),
26    ),
27    'timestamp' => array(
28      'label' => 'New?',
29      'link_to_node' => 0,
30      'comments' => 0,
31      'exclude' => 0,
32      'id' => 'timestamp',
33      'table' => 'history_user',
34      'field' => 'timestamp',
35      'override' => array(
36        'button' => 'Override',
37      ),
38      'relationship' => 'none',
39    ),
40    'type' => array(
41      'label' => 'Type',
42      'link_to_node' => 0,
43      'exclude' => 0,
44      'id' => 'type',
45      'table' => 'node',
46      'field' => 'type',
47      'override' => array(
48        'button' => 'Override',
49      ),
50      'relationship' => 'none',
51    ),
52    'name' => array(
53      'label' => 'Author',
54      'link_to_user' => 1,
55      'exclude' => 0,
56      'id' => 'name',
57      'table' => 'users',
58      'field' => 'name',
59      'override' => array(
60        'button' => 'Override',
61      ),
62      'relationship' => 'none',
63    ),
64    'status' => array(
65      'label' => 'Published',
66      'type' => 'yes-no',
67      'not' => 0,
68      'exclude' => 0,
69      'id' => 'status',
70      'table' => 'node',
71      'field' => 'status',
72      'override' => array(
73        'button' => 'Override',
74      ),
75      'relationship' => 'none',
76    ),
77    'edit_node' => array(
78      'label' => 'Edit',
79      'text' => '',
80      'exclude' => 0,
81      'id' => 'edit_node',
82      'table' => 'node',
83      'field' => 'edit_node',
84      'override' => array(
85        'button' => 'Override',
86      ),
87      'relationship' => 'none',
88    ),
89  ));
90  $handler->override_option('sorts', array(
91    'changed' => array(
92      'order' => 'DESC',
93      'granularity' => 'second',
94      'id' => 'changed',
95      'table' => 'node',
96      'field' => 'changed',
97      'override' => array(
98        'button' => 'Override',
99      ),
100      'relationship' => 'none',
101    ),
102  ));
103  $handler->override_option('filters', array(
104    'title' => array(
105      'operator' => 'contains',
106      'value' => '',
107      'group' => '0',
108      'exposed' => TRUE,
109      'expose' => array(
110        'use_operator' => 0,
111        'operator' => 'title_op',
112        'identifier' => 'title',
113        'label' => 'Title contains',
114        'optional' => 1,
115        'remember' => 0,
116      ),
117      'case' => 0,
118      'id' => 'title',
119      'table' => 'node',
120      'field' => 'title',
121      'override' => array(
122        'button' => 'Override',
123      ),
124      'relationship' => 'none',
125    ),
126    'type' => array(
127      'operator' => 'in',
128      'value' => array(),
129      'group' => '0',
130      'exposed' => TRUE,
131      'expose' => array(
132        'use_operator' => 0,
133        'operator' => 'type_op',
134        'identifier' => 'type',
135        'label' => 'Type',
136        'optional' => 1,
137        'single' => 1,
138        'remember' => 0,
139        'reduce' => 0,
140      ),
141      'id' => 'type',
142      'table' => 'node',
143      'field' => 'type',
144      'override' => array(
145        'button' => 'Override',
146      ),
147      'relationship' => 'none',
148    ),
149    'promote' => array(
150      'operator' => '=',
151      'value' => 'All',
152      'group' => '0',
153      'exposed' => TRUE,
154      'expose' => array(
155        'operator' => '',
156        'identifier' => 'promote',
157        'label' => 'Promoted',
158        'optional' => 1,
159        'remember' => 0,
160      ),
161      'id' => 'promote',
162      'table' => 'node',
163      'field' => 'promote',
164      'override' => array(
165        'button' => 'Override',
166      ),
167      'relationship' => 'none',
168    ),
169    'status' => array(
170      'operator' => '=',
171      'value' => 'All',
172      'group' => '0',
173      'exposed' => TRUE,
174      'expose' => array(
175        'operator' => '',
176        'identifier' => 'status',
177        'label' => 'Published',
178        'optional' => 1,
179        'remember' => 0,
180      ),
181      'id' => 'status',
182      'table' => 'node',
183      'field' => 'status',
184      'override' => array(
185        'button' => 'Override',
186      ),
187      'relationship' => 'none',
188    ),
189    'sticky' => array(
190      'operator' => '=',
191      'value' => 'All',
192      'group' => '0',
193      'exposed' => TRUE,
194      'expose' => array(
195        'operator' => '',
196        'identifier' => 'sticky',
197        'label' => 'Sticky',
198        'optional' => 1,
199        'remember' => 0,
200      ),
201      'id' => 'sticky',
202      'table' => 'node',
203      'field' => 'sticky',
204      'override' => array(
205        'button' => 'Override',
206      ),
207      'relationship' => 'none',
208    ),
209  ));
210  $handler->override_option('access', array(
211    'type' => 'perm',
212    'perm' => 'administer nodes',
213  ));
214  $handler->override_option('cache', array(
215    'type' => 'none',
216  ));
217  $handler->override_option('title', 'Content');
218  $handler->override_option('empty', 'There are no objects satisfying the filter settings. Try changing them to get some results.');
219  $handler->override_option('empty_format', '1');
220  $handler->override_option('items_per_page', 20);
221  $handler->override_option('use_pager', '1');
222  $handler->override_option('style_plugin', 'bulk');
223  $handler->override_option('style_options', array(
224    'grouping' => '',
225    'override' => 1,
226    'sticky' => 0,
227    'order' => 'asc',
228    'columns' => array(
229      'title' => 'title',
230      'timestamp' => 'title',
231      'type' => 'type',
232      'name' => 'name',
233      'status' => 'status',
234      'edit_node' => 'edit_node',
235    ),
236    'info' => array(
237      'title' => array(
238        'sortable' => 1,
239        'separator' => '&nbsp;',
240      ),
241      'timestamp' => array(
242        'separator' => '',
243      ),
244      'type' => array(
245        'sortable' => 1,
246        'separator' => '',
247      ),
248      'name' => array(
249        'sortable' => 1,
250        'separator' => '',
251      ),
252      'status' => array(
253        'sortable' => 0,
254        'separator' => '',
255      ),
256      'edit_node' => array(
257        'separator' => '',
258      ),
259    ),
260    'default' => '-1',
261    'execution_type' => '1',
262    'display_type' => '0',
263    'hide_select_all' => 0,
264    'display_result' => 1,
265    'merge_single_action' => 0,
266    'operations' => array(
267      'node_assign_owner_action' => array(
268        'selected' => TRUE,
269        'label' => NULL,
270        'settings' => NULL,
271        'skip_confirmation' => 0,
272      ),
273      'views_bulk_operations_delete_node_action' => array(
274        'selected' => TRUE,
275        'label' => NULL,
276        'settings' => NULL,
277        'skip_confirmation' => 0,
278      ),
279      'views_bulk_operations_script_action' => array(
280        'selected' => TRUE,
281        'label' => NULL,
282        'settings' => NULL,
283        'skip_confirmation' => 0,
284      ),
285      'node_make_sticky_action' => array(
286        'selected' => TRUE,
287        'label' => NULL,
288        'settings' => NULL,
289        'skip_confirmation' => 0,
290      ),
291      'node_make_unsticky_action' => array(
292        'selected' => TRUE,
293        'label' => NULL,
294        'settings' => NULL,
295        'skip_confirmation' => 0,
296      ),
297      'views_bulk_operations_fields_action' => array(
298        'selected' => TRUE,
299        'label' => NULL,
300        'settings' => NULL,
301        'skip_confirmation' => 0,
302      ),
303      'views_bulk_operations_taxonomy_action' => array(
304        'selected' => TRUE,
305        'label' => NULL,
306        'settings' => NULL,
307        'skip_confirmation' => 0,
308      ),
309      'node_promote_action' => array(
310        'selected' => TRUE,
311        'label' => NULL,
312        'settings' => NULL,
313        'skip_confirmation' => 0,
314      ),
315      'node_publish_action' => array(
316        'selected' => TRUE,
317        'label' => NULL,
318        'settings' => NULL,
319        'skip_confirmation' => 0,
320      ),
321      'node_unpromote_action' => array(
322        'selected' => TRUE,
323        'label' => NULL,
324        'settings' => NULL,
325        'skip_confirmation' => 0,
326      ),
327      'node_unpublish_action' => array(
328        'selected' => TRUE,
329        'label' => NULL,
330        'settings' => NULL,
331        'skip_confirmation' => 0,
332      ),
333    ),
334  ));
335  $handler = $view->new_display('page', 'Page', 'page');
336  $handler->override_option('path', 'admin/content/node2');
337  $handler->override_option('menu', array(
338    'type' => 'none',
339    'title' => '',
340    'description' => '',
341    'weight' => 0,
342    'name' => 'navigation',
343  ));
344  $handler->override_option('tab_options', array(
345    'type' => 'none',
346    'title' => '',
347    'description' => '',
348    'weight' => 0,
349    'name' => 'navigation',
350  ));
351  $views[$view->name] = $view;
352
353  // Admin users.
354  $view = new view;
355  $view->name = 'admin_users';
356  $view->description = 'Emulates the Drupal user administration page.';
357  $view->tag = '';
358  $view->base_table = 'users';
359  $view->core = 0;
360  $view->api_version = '2';
361  $view->disabled = TRUE;
362  $handler = $view->new_display('default', 'Default', 'default');
363  $handler->override_option('fields', array(
364    'name' => array(
365      'label' => 'Username',
366      'alter' => array(
367        'alter_text' => 0,
368        'text' => '',
369        'make_link' => 0,
370        'path' => '',
371        'link_class' => '',
372        'alt' => '',
373        'prefix' => '',
374        'suffix' => '',
375        'target' => '',
376        'help' => '',
377        'trim' => 0,
378        'max_length' => '',
379        'word_boundary' => 1,
380        'ellipsis' => 1,
381        'strip_tags' => 0,
382        'html' => 0,
383      ),
384      'empty' => '',
385      'hide_empty' => 0,
386      'empty_zero' => 0,
387      'link_to_user' => 1,
388      'overwrite_anonymous' => 0,
389      'anonymous_text' => '',
390      'exclude' => 0,
391      'id' => 'name',
392      'table' => 'users',
393      'field' => 'name',
394      'relationship' => 'none',
395    ),
396    'status' => array(
397      'label' => 'Active',
398      'alter' => array(
399        'alter_text' => 0,
400        'text' => '',
401        'make_link' => 0,
402        'path' => '',
403        'link_class' => '',
404        'alt' => '',
405        'prefix' => '',
406        'suffix' => '',
407        'target' => '',
408        'help' => '',
409        'trim' => 0,
410        'max_length' => '',
411        'word_boundary' => 1,
412        'ellipsis' => 1,
413        'strip_tags' => 0,
414        'html' => 0,
415      ),
416      'empty' => '',
417      'hide_empty' => 0,
418      'empty_zero' => 0,
419      'type' => 'yes-no',
420      'not' => 0,
421      'exclude' => 0,
422      'id' => 'status',
423      'table' => 'users',
424      'field' => 'status',
425      'relationship' => 'none',
426    ),
427    'rid' => array(
428      'label' => 'Roles',
429      'alter' => array(
430        'alter_text' => 0,
431        'text' => '',
432        'make_link' => 0,
433        'path' => '',
434        'link_class' => '',
435        'alt' => '',
436        'prefix' => '',
437        'suffix' => '',
438        'target' => '',
439        'help' => '',
440        'trim' => 0,
441        'max_length' => '',
442        'word_boundary' => 1,
443        'ellipsis' => 1,
444        'strip_tags' => 0,
445        'html' => 0,
446      ),
447      'empty' => '',
448      'hide_empty' => 0,
449      'empty_zero' => 0,
450      'type' => 'ul',
451      'separator' => ', ',
452      'exclude' => 0,
453      'id' => 'rid',
454      'table' => 'users_roles',
455      'field' => 'rid',
456      'relationship' => 'none',
457    ),
458    'created' => array(
459      'label' => 'Member for',
460      'alter' => array(
461        'alter_text' => 0,
462        'text' => '',
463        'make_link' => 0,
464        'path' => '',
465        'link_class' => '',
466        'alt' => '',
467        'prefix' => '',
468        'suffix' => '',
469        'target' => '',
470        'help' => '',
471        'trim' => 0,
472        'max_length' => '',
473        'word_boundary' => 1,
474        'ellipsis' => 1,
475        'strip_tags' => 0,
476        'html' => 0,
477      ),
478      'empty' => '',
479      'hide_empty' => 0,
480      'empty_zero' => 0,
481      'date_format' => 'raw time span',
482      'custom_date_format' => '',
483      'exclude' => 0,
484      'id' => 'created',
485      'table' => 'users',
486      'field' => 'created',
487      'relationship' => 'none',
488    ),
489    'access' => array(
490      'label' => 'Last access',
491      'alter' => array(
492        'alter_text' => 0,
493        'text' => '',
494        'make_link' => 0,
495        'path' => '',
496        'link_class' => '',
497        'alt' => '',
498        'prefix' => '',
499        'suffix' => '',
500        'target' => '',
501        'help' => '',
502        'trim' => 0,
503        'max_length' => '',
504        'word_boundary' => 1,
505        'ellipsis' => 1,
506        'strip_tags' => 0,
507        'html' => 0,
508      ),
509      'empty' => '',
510      'hide_empty' => 0,
511      'empty_zero' => 0,
512      'date_format' => 'time ago',
513      'custom_date_format' => '',
514      'exclude' => 0,
515      'id' => 'access',
516      'table' => 'users',
517      'field' => 'access',
518      'relationship' => 'none',
519    ),
520    'edit_node' => array(
521      'label' => 'Operations',
522      'alter' => array(
523        'alter_text' => 0,
524        'text' => '',
525        'make_link' => 0,
526        'path' => '',
527        'link_class' => '',
528        'alt' => '',
529        'prefix' => '',
530        'suffix' => '',
531        'target' => '',
532        'help' => '',
533        'trim' => 0,
534        'max_length' => '',
535        'word_boundary' => 1,
536        'ellipsis' => 1,
537        'strip_tags' => 0,
538        'html' => 0,
539      ),
540      'empty' => '',
541      'hide_empty' => 0,
542      'empty_zero' => 0,
543      'text' => '',
544      'exclude' => 0,
545      'id' => 'edit_node',
546      'table' => 'users',
547      'field' => 'edit_node',
548      'relationship' => 'none',
549    ),
550  ));
551  $handler->override_option('filters', array(
552    'uid' => array(
553      'operator' => 'not in',
554      'value' => array(
555        0 => 0,
556      ),
557      'group' => '0',
558      'exposed' => FALSE,
559      'expose' => array(
560        'operator' => FALSE,
561        'label' => '',
562      ),
563      'id' => 'uid',
564      'table' => 'users',
565      'field' => 'uid',
566      'relationship' => 'none',
567    ),
568    'rid' => array(
569      'operator' => 'or',
570      'value' => array(),
571      'group' => '0',
572      'exposed' => TRUE,
573      'expose' => array(
574        'use_operator' => 0,
575        'operator' => 'rid_op',
576        'identifier' => 'rid',
577        'label' => 'Role',
578        'optional' => 1,
579        'single' => 1,
580        'remember' => 0,
581        'reduce' => 0,
582      ),
583      'id' => 'rid',
584      'table' => 'users_roles',
585      'field' => 'rid',
586      'override' => array(
587        'button' => 'Override',
588      ),
589      'relationship' => 'none',
590      'reduce_duplicates' => 0,
591    ),
592    'status' => array(
593      'operator' => '=',
594      'value' => 'All',
595      'group' => '0',
596      'exposed' => TRUE,
597      'expose' => array(
598        'operator' => '',
599        'identifier' => 'status',
600        'label' => 'Active',
601        'optional' => 1,
602        'remember' => 0,
603      ),
604      'id' => 'status',
605      'table' => 'users',
606      'field' => 'status',
607      'override' => array(
608        'button' => 'Override',
609      ),
610      'relationship' => 'none',
611    ),
612  ));
613  $handler->override_option('access', array(
614    'type' => 'perm',
615    'perm' => 'administer users',
616  ));
617  $handler->override_option('cache', array(
618    'type' => 'none',
619  ));
620  $handler->override_option('items_per_page', 20);
621  $handler->override_option('use_pager', '1');
622  $handler->override_option('style_plugin', 'bulk');
623  $handler->override_option('style_options', array(
624    'grouping' => '',
625    'override' => 1,
626    'sticky' => 0,
627    'order' => 'desc',
628    'columns' => array(
629      'name' => 'name',
630      'status' => 'status',
631      'rid' => 'rid',
632      'created' => 'created',
633      'access' => 'access',
634      'edit_node' => 'edit_node',
635    ),
636    'info' => array(
637      'name' => array(
638        'sortable' => 1,
639        'separator' => '',
640      ),
641      'status' => array(
642        'sortable' => 1,
643        'separator' => '',
644      ),
645      'rid' => array(
646        'separator' => '',
647      ),
648      'created' => array(
649        'sortable' => 1,
650        'separator' => '',
651      ),
652      'access' => array(
653        'sortable' => 1,
654        'separator' => '',
655      ),
656      'edit_node' => array(
657        'separator' => '',
658      ),
659    ),
660    'default' => 'created',
661    'execution_type' => '1',
662    'display_type' => '0',
663    'hide_select_all' => 0,
664    'display_result' => 1,
665    'merge_single_action' => 1,
666    'operations' => array(
667      'user_user_operations_block' => array(
668        'selected' => TRUE,
669        'label' => NULL,
670        'settings' => NULL,
671        'skip_confirmation' => 0,
672      ),
673      'views_bulk_operations_delete_user_action' => array(
674        'selected' => TRUE,
675        'label' => NULL,
676        'settings' => NULL,
677        'skip_confirmation' => 0,
678      ),
679      'views_bulk_operations_script_action' => array(
680        'selected' => TRUE,
681        'label' => NULL,
682        'settings' => NULL,
683        'skip_confirmation' => 0,
684      ),
685      'views_bulk_operations_user_roles_action' => array(
686        'selected' => TRUE,
687        'label' => NULL,
688        'settings' => NULL,
689        'skip_confirmation' => 0,
690      ),
691      'system_send_email_action' => array(
692        'selected' => TRUE,
693        'label' => NULL,
694        'settings' => NULL,
695        'skip_confirmation' => 0,
696      ),
697      'user_user_operations_unblock' => array(
698        'selected' => TRUE,
699        'label' => NULL,
700        'settings' => NULL,
701        'skip_confirmation' => 0,
702      ),
703    ),
704  ));
705  $handler = $view->new_display('page', 'Page', 'page_1');
706  $handler->override_option('path', 'admin/user/user2');
707  $handler->override_option('menu', array(
708    'type' => 'none',
709    'title' => '',
710    'description' => '',
711    'weight' => 0,
712    'name' => 'navigation',
713  ));
714  $handler->override_option('tab_options', array(
715    'type' => 'none',
716    'title' => '',
717    'description' => '',
718    'weight' => 0,
719    'name' => 'navigation',
720  ));
721  $views[$view->name] = $view;
722
723  return $views;
724}
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.