hosting_client.views_default.inc

Provide a default view listing clients.

Functions

Namesort descending Description
hosting_client_views_default_views Implements hook_views_default_views().

File

client/includes/views/hosting_client.views_default.inc
View source
  1. <?php
  2. /**
  3. * @file
  4. * Provide a default view listing clients.
  5. */
  6. /**
  7. * Implements hook_views_default_views().
  8. */
  9. function hosting_client_views_default_views() {
  10. $views = array();
  11. // Exported view: hosting_client_list
  12. $view = new view();
  13. $view->name = 'hosting_client_list';
  14. $view->description = 'Display a list of clients in Aegir.';
  15. $view->tag = 'hosting_client';
  16. $view->base_table = 'node';
  17. $view->human_name = 'Hosting Clients List';
  18. $view->core = 6;
  19. $view->api_version = '3.0';
  20. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  21. /* Display: Defaults */
  22. $handler = $view->new_display('default', 'Defaults', 'default');
  23. $handler->display->display_options['title'] = 'Clients';
  24. $handler->display->display_options['use_more_always'] = FALSE;
  25. $handler->display->display_options['access']['type'] = 'perm';
  26. $handler->display->display_options['access']['perm'] = 'view client';
  27. $handler->display->display_options['cache']['type'] = 'none';
  28. $handler->display->display_options['query']['type'] = 'views_query';
  29. $handler->display->display_options['exposed_form']['type'] = 'basic';
  30. $handler->display->display_options['pager']['type'] = 'none';
  31. $handler->display->display_options['pager']['options']['offset'] = '0';
  32. $handler->display->display_options['style_plugin'] = 'table';
  33. $handler->display->display_options['style_options']['columns'] = array(
  34. 'title' => 'title',
  35. 'uname' => 'uname',
  36. 'created' => 'created',
  37. );
  38. $handler->display->display_options['style_options']['default'] = 'title';
  39. $handler->display->display_options['style_options']['info'] = array(
  40. 'title' => array(
  41. 'sortable' => 1,
  42. 'default_sort_order' => 'asc',
  43. 'align' => '',
  44. 'separator' => '',
  45. ),
  46. 'uname' => array(
  47. 'sortable' => 1,
  48. 'default_sort_order' => 'asc',
  49. 'align' => '',
  50. 'separator' => '',
  51. ),
  52. 'created' => array(
  53. 'sortable' => 1,
  54. 'default_sort_order' => 'asc',
  55. 'align' => '',
  56. 'separator' => '',
  57. ),
  58. );
  59. /* Field: Content: Title */
  60. $handler->display->display_options['fields']['title']['id'] = 'title';
  61. $handler->display->display_options['fields']['title']['table'] = 'node';
  62. $handler->display->display_options['fields']['title']['field'] = 'title';
  63. $handler->display->display_options['fields']['title']['label'] = 'Client name';
  64. $handler->display->display_options['fields']['title']['element_label_colon'] = FALSE;
  65. /* Filter criterion: Content: Type */
  66. $handler->display->display_options['filters']['type']['id'] = 'type';
  67. $handler->display->display_options['filters']['type']['table'] = 'node';
  68. $handler->display->display_options['filters']['type']['field'] = 'type';
  69. $handler->display->display_options['filters']['type']['value'] = array(
  70. 'client' => 'client',
  71. );
  72. /* Display: Page */
  73. $handler = $view->new_display('page', 'Page', 'page_clients');
  74. $handler->display->display_options['path'] = 'hosting/clients';
  75. $handler->display->display_options['menu']['type'] = 'normal';
  76. $handler->display->display_options['menu']['title'] = 'Clients';
  77. $handler->display->display_options['menu']['description'] = 'List of clients';
  78. $handler->display->display_options['menu']['weight'] = '5';
  79. $handler->display->display_options['menu']['name'] = 'main-menu';
  80. $handler->display->display_options['menu']['context'] = 0;
  81. $handler->display->display_options['menu']['context_only_inline'] = 0;
  82. /* Display: Block */
  83. $handler = $view->new_display('block', 'Block', 'block_1');
  84. $handler->display->display_options['defaults']['footer'] = FALSE;
  85. /* Footer: Global: Text area */
  86. $handler->display->display_options['footer']['area']['id'] = 'area';
  87. $handler->display->display_options['footer']['area']['table'] = 'views';
  88. $handler->display->display_options['footer']['area']['field'] = 'area';
  89. $handler->display->display_options['footer']['area']['content'] = '<a href="/node/add/client" class="add-new-client">Add new client</a>';
  90. $handler->display->display_options['footer']['area']['format'] = '1';
  91. $handler->display->display_options['block_description'] = 'Clients block';
  92. $views[$view->name] = $view;
  93. return $views;
  94. }