/[drupal]/contributions/modules/biblio/biblio.views_default.inc
ViewVC logotype

Contents of /contributions/modules/biblio/biblio.views_default.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download) (as text)
Thu Oct 1 01:45:42 2009 UTC (8 weeks, 3 days ago) by rjerome
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-7--1
Changes since 1.2: +2 -2 lines
File MIME type: text/x-php
merged changes from 6--1 to HEAD
1 <?php
2 // $Id: biblio.views_default.inc,v 1.1.2.2 2009/09/29 01:22:38 rjerome Exp $
3 /**
4 * @file
5 * Contains default views on behalf of the biblio module.
6 */
7
8 /**
9 * Implementation of hook_default_view_views().
10 */
11 function biblio_views_default_views() {
12 $view = new view;
13 $view->name = 'biblio_views';
14 $view->description = '';
15 $view->tag = '';
16 $view->view_php = '';
17 $view->base_table = 'node';
18 $view->is_cacheable = FALSE;
19 $view->api_version = 2;
20 $view->disabled = TRUE; /* Edit this to true to make a default view disabled initially */
21 $handler = $view->new_display('default', 'Defaults', 'default');
22 $handler->override_option('fields', array(
23 'citation' => array(
24 'label' => '',
25 'alter' => array(
26 'alter_text' => 0,
27 'text' => '',
28 'make_link' => 0,
29 'path' => '',
30 'link_class' => '',
31 'alt' => '',
32 'prefix' => '',
33 'suffix' => '',
34 'help' => '',
35 'trim' => 0,
36 'max_length' => '',
37 'word_boundary' => 1,
38 'ellipsis' => 1,
39 'strip_tags' => 0,
40 'html' => 0,
41 ),
42 'style_name' => 'vancouver',
43 'exclude' => 0,
44 'id' => 'citation',
45 'table' => 'biblio',
46 'field' => 'citation',
47 'relationship' => 'none',
48 ),
49 ));
50 $handler->override_option('sorts', array(
51 'biblio_year' => array(
52 'order' => 'DESC',
53 'id' => 'biblio_year',
54 'table' => 'biblio',
55 'field' => 'biblio_year',
56 'relationship' => 'none',
57 ),
58 'name' => array(
59 'id' => 'name',
60 'table' => 'biblio_types',
61 'field' => 'name',
62 ),
63 ));
64 $handler->override_option('arguments', array(
65 'biblio_year' => array(
66 'id' => 'biblio_year',
67 'table' => 'biblio',
68 'field' => 'biblio_year',
69 ),
70 ));
71 $handler->override_option('filters', array(
72 'status' => array(
73 'operator' => '=',
74 'value' => '1',
75 'group' => '0',
76 'exposed' => FALSE,
77 'expose' => array(
78 'operator' => FALSE,
79 'label' => '',
80 ),
81 'id' => 'status',
82 'table' => 'node',
83 'field' => 'status',
84 'relationship' => 'none',
85 ),
86 'type' => array(
87 'operator' => 'in',
88 'value' => array(
89 'biblio' => 'biblio',
90 ),
91 'group' => '0',
92 'exposed' => FALSE,
93 'expose' => array(
94 'operator' => FALSE,
95 'label' => '',
96 ),
97 'id' => 'type',
98 'table' => 'node',
99 'field' => 'type',
100 'relationship' => 'none',
101 ),
102 ));
103 $handler->override_option('access', array(
104 'type' => 'none',
105 ));
106 $handler->override_option('cache', array(
107 'type' => 'none',
108 ));
109 $handler->override_option('header_format', '1');
110 $handler->override_option('header_empty', 0);
111 $handler->override_option('empty', 'Nothing found');
112 $handler->override_option('empty_format', '1');
113 $handler->override_option('use_pager', '1');
114 $handler->override_option('style_options', array(
115 'grouping' => 'name',
116 ));
117 $handler->override_option('row_options', array(
118 'inline' => array(),
119 'separator' => '',
120 ));
121 $handler = $view->new_display('page', 'Group by Year', 'page_1');
122 $handler->override_option('fields', array(
123 'citation' => array(
124 'label' => '',
125 'alter' => array(
126 'alter_text' => 0,
127 'text' => '',
128 'make_link' => 0,
129 'path' => '',
130 'link_class' => '',
131 'alt' => '',
132 'prefix' => '',
133 'suffix' => '',
134 'help' => '',
135 'trim' => 0,
136 'max_length' => '',
137 'word_boundary' => 1,
138 'ellipsis' => 1,
139 'strip_tags' => 0,
140 'html' => 0,
141 ),
142 'style_name' => 'vancouver',
143 'exclude' => 0,
144 'id' => 'citation',
145 'table' => 'biblio',
146 'field' => 'citation',
147 'relationship' => 'none',
148 ),
149 'biblio_year' => array(
150 'label' => '',
151 'alter' => array(
152 'alter_text' => 0,
153 'text' => '',
154 'make_link' => 0,
155 'path' => '',
156 'link_class' => '',
157 'alt' => '',
158 'prefix' => '',
159 'suffix' => '',
160 'help' => '',
161 'trim' => 0,
162 'max_length' => '',
163 'word_boundary' => 1,
164 'ellipsis' => 1,
165 'strip_tags' => 0,
166 'html' => 0,
167 ),
168 'biblio_label' => 0,
169 'exclude' => 1,
170 'id' => 'biblio_year',
171 'table' => 'biblio',
172 'field' => 'biblio_year',
173 'override' => array(
174 'button' => 'Override',
175 ),
176 'relationship' => 'none',
177 ),
178 ));
179 $handler->override_option('arguments', array(
180 'biblio_year' => array(
181 'default_action' => 'ignore',
182 'style_plugin' => 'default_summary',
183 'style_options' => array(),
184 'wildcard' => 'all',
185 'wildcard_substitution' => 'All',
186 'title' => '',
187 'breadcrumb' => '',
188 'default_argument_type' => 'fixed',
189 'default_argument' => '',
190 'validate_type' => 'none',
191 'validate_fail' => 'not found',
192 'glossary' => 0,
193 'limit' => '0',
194 'case' => 'none',
195 'path_case' => 'none',
196 'transform_dash' => 0,
197 'id' => 'biblio_year',
198 'table' => 'biblio',
199 'field' => 'biblio_year',
200 'validate_user_argument_type' => 'uid',
201 'validate_user_roles' => array(
202 '2' => 0,
203 ),
204 'override' => array(
205 'button' => 'Use default',
206 ),
207 'relationship' => 'none',
208 'default_options_div_prefix' => '',
209 'default_argument_user' => 0,
210 'default_argument_fixed' => '',
211 'default_argument_php' => '',
212 'validate_argument_node_type' => array(
213 'image' => 0,
214 'biblio' => 0,
215 'book' => 0,
216 'feed' => 0,
217 'page' => 0,
218 'story' => 0,
219 'test' => 0,
220 ),
221 'validate_argument_node_access' => 0,
222 'validate_argument_nid_type' => 'nid',
223 'validate_argument_vocabulary' => array(
224 '2' => 0,
225 '3' => 0,
226 '4' => 0,
227 ),
228 'validate_argument_type' => 'tid',
229 'validate_argument_transform' => 0,
230 'validate_user_restrict_roles' => 0,
231 'image_size' => array(
232 '_original' => '_original',
233 'thumbnail' => 'thumbnail',
234 'preview' => 'preview',
235 ),
236 'validate_argument_php' => '',
237 ),
238 ));
239 $handler->override_option('style_options', array(
240 'grouping' => 'biblio_year',
241 ));
242 $handler->override_option('path', 'biblio/year');
243 $handler->override_option('menu', array(
244 'type' => 'none',
245 'title' => '',
246 'description' => '',
247 'weight' => 0,
248 'name' => 'navigation',
249 ));
250 $handler->override_option('tab_options', array(
251 'type' => 'none',
252 'title' => '',
253 'description' => '',
254 'weight' => 0,
255 ));
256 $handler = $view->new_display('page', 'Group by Type', 'page_2');
257 $handler->override_option('fields', array(
258 'citation' => array(
259 'label' => '',
260 'alter' => array(
261 'alter_text' => 0,
262 'text' => '',
263 'make_link' => 0,
264 'path' => '',
265 'link_class' => '',
266 'alt' => '',
267 'prefix' => '',
268 'suffix' => '',
269 'help' => '',
270 'trim' => 0,
271 'max_length' => '',
272 'word_boundary' => 1,
273 'ellipsis' => 1,
274 'strip_tags' => 0,
275 'html' => 0,
276 ),
277 'style_name' => 'vancouver',
278 'exclude' => 0,
279 'id' => 'citation',
280 'table' => 'biblio',
281 'field' => 'citation',
282 'relationship' => 'none',
283 ),
284 'name' => array(
285 'label' => '',
286 'alter' => array(
287 'alter_text' => 0,
288 'text' => '',
289 'make_link' => 0,
290 'path' => '',
291 'link_class' => '',
292 'alt' => '',
293 'prefix' => '',
294 'suffix' => '',
295 'help' => '',
296 'trim' => 0,
297 'max_length' => '',
298 'word_boundary' => 1,
299 'ellipsis' => 1,
300 'strip_tags' => 0,
301 'html' => 0,
302 ),
303 'exclude' => 1,
304 'id' => 'name',
305 'table' => 'biblio_types',
306 'field' => 'name',
307 'relationship' => 'none',
308 ),
309 ));
310 $handler->override_option('sorts', array(
311 'name' => array(
312 'order' => 'ASC',
313 'id' => 'name',
314 'table' => 'biblio_types',
315 'field' => 'name',
316 'override' => array(
317 'button' => 'Use default',
318 ),
319 'relationship' => 'none',
320 ),
321 'biblio_year' => array(
322 'order' => 'DESC',
323 'id' => 'biblio_year',
324 'table' => 'biblio',
325 'field' => 'biblio_year',
326 'relationship' => 'none',
327 ),
328 ));
329 $handler->override_option('path', 'biblio/type');
330 $handler->override_option('menu', array(
331 'type' => 'none',
332 'title' => '',
333 'description' => '',
334 'weight' => 0,
335 'name' => 'navigation',
336 ));
337 $handler->override_option('tab_options', array(
338 'type' => 'none',
339 'title' => '',
340 'description' => '',
341 'weight' => 0,
342 ));
343 $handler = $view->new_display('page', 'Group by Title', 'page_3');
344 $handler->override_option('fields', array(
345 'citation' => array(
346 'label' => '',
347 'alter' => array(
348 'alter_text' => 0,
349 'text' => '',
350 'make_link' => 0,
351 'path' => '',
352 'link_class' => '',
353 'alt' => '',
354 'prefix' => '',
355 'suffix' => '',
356 'help' => '',
357 'trim' => 0,
358 'max_length' => '',
359 'word_boundary' => 1,
360 'ellipsis' => 1,
361 'strip_tags' => 0,
362 'html' => 0,
363 ),
364 'style_name' => 'vancouver',
365 'exclude' => 0,
366 'id' => 'citation',
367 'table' => 'biblio',
368 'field' => 'citation',
369 'relationship' => 'none',
370 ),
371 'biblio_year' => array(
372 'label' => 'Year of Publication',
373 'alter' => array(
374 'alter_text' => 0,
375 'text' => '',
376 'make_link' => 0,
377 'path' => '',
378 'link_class' => '',
379 'alt' => '',
380 'prefix' => '',
381 'suffix' => '',
382 'help' => '',
383 'trim' => 0,
384 'max_length' => '',
385 'word_boundary' => 1,
386 'ellipsis' => 1,
387 'strip_tags' => 0,
388 'html' => 0,
389 ),
390 'biblio_label' => 1,
391 'exclude' => 1,
392 'id' => 'biblio_year',
393 'table' => 'biblio',
394 'field' => 'biblio_year',
395 'override' => array(
396 'button' => 'Use default',
397 ),
398 'relationship' => 'none',
399 ),
400 ));
401 $handler->override_option('sorts', array(
402 'biblio_year' => array(
403 'order' => 'DESC',
404 'id' => 'biblio_year',
405 'table' => 'biblio',
406 'field' => 'biblio_year',
407 'relationship' => 'none',
408 ),
409 'title' => array(
410 'order' => 'ASC',
411 'id' => 'title',
412 'table' => 'node',
413 'field' => 'title',
414 'override' => array(
415 'button' => 'Use default',
416 ),
417 'relationship' => 'none',
418 ),
419 ));
420 $handler->override_option('style_options', array(
421 'grouping' => 'biblio_year',
422 ));
423 $handler->override_option('path', 'biblio/title');
424 $handler->override_option('menu', array(
425 'type' => 'none',
426 'title' => '',
427 'description' => '',
428 'weight' => 0,
429 'name' => 'navigation',
430 ));
431 $handler->override_option('tab_options', array(
432 'type' => 'none',
433 'title' => '',
434 'description' => '',
435 'weight' => 0,
436 ));
437 $handler = $view->new_display('page', 'Filter by Keyword ID', 'page_4');
438 $handler->override_option('arguments', array(
439 'kid' => array(
440 'default_action' => 'ignore',
441 'style_plugin' => 'default_summary',
442 'style_options' => array(),
443 'wildcard' => 'all',
444 'wildcard_substitution' => 'All',
445 'title' => 'Contains the keyword %1',
446 'breadcrumb' => '',
447 'default_argument_type' => 'fixed',
448 'default_argument' => '',
449 'validate_type' => 'none',
450 'validate_fail' => 'not found',
451 'break_phrase' => 1,
452 'add_table' => 0,
453 'require_value' => 0,
454 'reduce_duplicates' => 0,
455 'id' => 'kid',
456 'table' => 'biblio_keyword',
457 'field' => 'kid',
458 'validate_user_argument_type' => 'uid',
459 'validate_user_roles' => array(
460 '2' => 0,
461 ),
462 'override' => array(
463 'button' => 'Use default',
464 ),
465 'relationship' => 'none',
466 'default_options_div_prefix' => '',
467 'default_argument_user' => 0,
468 'default_argument_fixed' => '',
469 'default_argument_php' => '',
470 'validate_argument_node_type' => array(
471 'image' => 0,
472 'biblio' => 0,
473 'book' => 0,
474 'feed' => 0,
475 'page' => 0,
476 'story' => 0,
477 'test' => 0,
478 ),
479 'validate_argument_node_access' => 0,
480 'validate_argument_nid_type' => 'nid',
481 'validate_argument_vocabulary' => array(
482 '2' => 0,
483 '3' => 0,
484 '4' => 0,
485 ),
486 'validate_argument_type' => 'tid',
487 'validate_argument_transform' => 0,
488 'validate_user_restrict_roles' => 0,
489 'image_size' => array(
490 '_original' => '_original',
491 'thumbnail' => 'thumbnail',
492 'preview' => 'preview',
493 ),
494 'validate_argument_php' => '',
495 ),
496 ));
497 $handler->override_option('path', 'biblio/keyword');
498 $handler->override_option('menu', array(
499 'type' => 'none',
500 'title' => '',
501 'description' => '',
502 'weight' => 0,
503 'name' => 'navigation',
504 ));
505 $handler->override_option('tab_options', array(
506 'type' => 'none',
507 'title' => '',
508 'description' => '',
509 'weight' => 0,
510 ));
511 $handler = $view->new_display('page', 'Filter by Author ID', 'page_5');
512 $handler->override_option('arguments', array(
513 'cid' => array(
514 'default_action' => 'ignore',
515 'style_plugin' => 'default_summary',
516 'style_options' => array(),
517 'wildcard' => 'all',
518 'wildcard_substitution' => 'All',
519 'title' => '',
520 'breadcrumb' => '',
521 'default_argument_type' => 'fixed',
522 'default_argument' => '',
523 'validate_type' => 'none',
524 'validate_fail' => 'not found',
525 'break_phrase' => 1,
526 'add_table' => 0,
527 'require_value' => 0,
528 'reduce_duplicates' => 0,
529 'id' => 'cid',
530 'table' => 'biblio_contributor',
531 'field' => 'cid',
532 'validate_user_argument_type' => 'uid',
533 'validate_user_roles' => array(
534 '2' => 0,
535 ),
536 'override' => array(
537 'button' => 'Use default',
538 ),
539 'relationship' => 'none',
540 'default_options_div_prefix' => '',
541 'default_argument_user' => 0,
542 'default_argument_fixed' => '',
543 'default_argument_php' => '',
544 'validate_argument_node_type' => array(
545 'image' => 0,
546 'biblio' => 0,
547 'book' => 0,
548 'feed' => 0,
549 'page' => 0,
550 'story' => 0,
551 'test' => 0,
552 ),
553 'validate_argument_node_access' => 0,
554 'validate_argument_nid_type' => 'nid',
555 'validate_argument_vocabulary' => array(
556 '2' => 0,
557 '3' => 0,
558 '4' => 0,
559 ),
560 'validate_argument_type' => 'tid',
561 'validate_argument_transform' => 0,
562 'validate_user_restrict_roles' => 0,
563 'image_size' => array(
564 '_original' => '_original',
565 'thumbnail' => 'thumbnail',
566 'preview' => 'preview',
567 ),
568 'validate_argument_php' => '',
569 ),
570 ));
571 $handler->override_option('path', 'biblio/author');
572 $handler->override_option('menu', array(
573 'type' => 'none',
574 'title' => '',
575 'description' => '',
576 'weight' => 0,
577 'name' => 'navigation',
578 ));
579 $handler->override_option('tab_options', array(
580 'type' => 'none',
581 'title' => '',
582 'description' => '',
583 'weight' => 0,
584 ));
585 $handler = $view->new_display('page', 'Browse by Year', 'page_6');
586 $handler->override_option('fields', array(
587 'biblio_year' => array(
588 'label' => '',
589 'alter' => array(
590 'alter_text' => 0,
591 'text' => '',
592 'make_link' => 0,
593 'path' => '',
594 'link_class' => '',
595 'alt' => '',
596 'prefix' => '',
597 'suffix' => '',
598 'help' => '',
599 'trim' => 0,
600 'max_length' => '',
601 'word_boundary' => 1,
602 'ellipsis' => 1,
603 'strip_tags' => 0,
604 'html' => 0,
605 ),
606 'biblio_label' => 0,
607 'exclude' => 0,
608 'id' => 'biblio_year',
609 'table' => 'biblio',
610 'field' => 'biblio_year',
611 'override' => array(
612 'button' => 'Use default',
613 ),
614 'relationship' => 'none',
615 ),
616 ));
617 $handler->override_option('sorts', array());
618 $handler->override_option('arguments', array());
619 $handler->override_option('distinct', 0);
620 $handler->override_option('style_plugin', 'grid');
621 $handler->override_option('style_options', array(
622 'grouping' => '',
623 'columns' => '4',
624 'alignment' => 'horizontal',
625 ));
626 $handler->override_option('path', 'biblio/years');
627 $handler->override_option('menu', array(
628 'type' => 'none',
629 'title' => '',
630 'description' => '',
631 'weight' => 0,
632 'name' => 'navigation',
633 ));
634 $handler->override_option('tab_options', array(
635 'type' => 'none',
636 'title' => '',
637 'description' => '',
638 'weight' => 0,
639 ));
640
641 $views[$view->name] = $view;
642 return $views;
643 }

  ViewVC Help
Powered by ViewVC 1.1.2