duplicatemail.views_default.inc 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?php
  2. /**
  3. * @file
  4. * Views export of duplicate mail user blocks.
  5. */
  6. /**
  7. * Implementation of hook_views_default_views().
  8. */
  9. function duplicatemail_views_default_views() {
  10. $view = new view();
  11. $view->name = 'duplicatesview';
  12. $view->description = '';
  13. $view->tag = 'default';
  14. $view->base_table = 'users';
  15. $view->human_name = 'Duplicate Mail';
  16. $view->core = 7;
  17. $view->api_version = '3.0';
  18. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  19. /* Display: Master */
  20. $handler = $view->new_display('default', 'Master', 'default');
  21. $handler->display->display_options['title'] = 'Duplicate Mail: Block from views, for individual accounts';
  22. $handler->display->display_options['use_more_always'] = FALSE;
  23. $handler->display->display_options['access']['type'] = 'perm';
  24. $handler->display->display_options['access']['perm'] = 'access user profiles';
  25. $handler->display->display_options['cache']['type'] = 'none';
  26. $handler->display->display_options['query']['type'] = 'views_query';
  27. $handler->display->display_options['exposed_form']['type'] = 'basic';
  28. $handler->display->display_options['pager']['type'] = 'some';
  29. $handler->display->display_options['pager']['options']['items_per_page'] = '10';
  30. $handler->display->display_options['style_plugin'] = 'table';
  31. $handler->display->display_options['style_options']['columns'] = array(
  32. 'mail' => 'mail',
  33. 'edit_node' => 'edit_node',
  34. 'name' => 'name',
  35. 'uid' => 'uid',
  36. );
  37. $handler->display->display_options['style_options']['default'] = '-1';
  38. $handler->display->display_options['style_options']['info'] = array(
  39. 'mail' => array(
  40. 'sortable' => 0,
  41. 'default_sort_order' => 'asc',
  42. 'align' => '',
  43. 'separator' => '',
  44. 'empty_column' => 0,
  45. ),
  46. 'edit_node' => array(
  47. 'align' => '',
  48. 'separator' => '',
  49. 'empty_column' => 0,
  50. ),
  51. 'name' => array(
  52. 'sortable' => 0,
  53. 'default_sort_order' => 'asc',
  54. 'align' => '',
  55. 'separator' => '',
  56. 'empty_column' => 0,
  57. ),
  58. 'uid' => array(
  59. 'sortable' => 0,
  60. 'default_sort_order' => 'asc',
  61. 'align' => '',
  62. 'separator' => '',
  63. 'empty_column' => 0,
  64. ),
  65. );
  66. /* Field: User: E-mail */
  67. $handler->display->display_options['fields']['mail']['id'] = 'mail';
  68. $handler->display->display_options['fields']['mail']['table'] = 'users';
  69. $handler->display->display_options['fields']['mail']['field'] = 'mail';
  70. /* Field: User: Edit link */
  71. $handler->display->display_options['fields']['edit_node']['id'] = 'edit_node';
  72. $handler->display->display_options['fields']['edit_node']['table'] = 'users';
  73. $handler->display->display_options['fields']['edit_node']['field'] = 'edit_node';
  74. /* Field: User: Name */
  75. $handler->display->display_options['fields']['name']['id'] = 'name';
  76. $handler->display->display_options['fields']['name']['table'] = 'users';
  77. $handler->display->display_options['fields']['name']['field'] = 'name';
  78. $handler->display->display_options['fields']['name']['alter']['word_boundary'] = FALSE;
  79. $handler->display->display_options['fields']['name']['alter']['ellipsis'] = FALSE;
  80. /* Field: User: Uid */
  81. $handler->display->display_options['fields']['uid']['id'] = 'uid';
  82. $handler->display->display_options['fields']['uid']['table'] = 'users';
  83. $handler->display->display_options['fields']['uid']['field'] = 'uid';
  84. /* Contextual filter: User: E-mail */
  85. $handler->display->display_options['arguments']['mail']['id'] = 'mail';
  86. $handler->display->display_options['arguments']['mail']['table'] = 'users';
  87. $handler->display->display_options['arguments']['mail']['field'] = 'mail';
  88. $handler->display->display_options['arguments']['mail']['default_action'] = 'default';
  89. $handler->display->display_options['arguments']['mail']['default_argument_type'] = 'php';
  90. $handler->display->display_options['arguments']['mail']['default_argument_options']['code'] = 'if ($account = menu_get_object(\'user\')) {
  91. return $account->mail;
  92. }
  93. ';
  94. $handler->display->display_options['arguments']['mail']['summary']['number_of_records'] = '0';
  95. $handler->display->display_options['arguments']['mail']['summary']['format'] = 'default_summary';
  96. $handler->display->display_options['arguments']['mail']['summary_options']['items_per_page'] = '25';
  97. $handler->display->display_options['arguments']['mail']['limit'] = '0';
  98. /* Display: Block */
  99. $handler = $view->new_display('block', 'Block', 'block');
  100. $views[$view->name] = $view;
  101. return $views;
  102. }