feedback.views_default.inc 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. <?php
  2. /**
  3. * @file
  4. * Contains default views on behalf of the feedback module.
  5. */
  6. /**
  7. * Implements hook_views_default_views().
  8. */
  9. function feedback_views_default_views() {
  10. $view = new view();
  11. $view->name = 'feedback_messages';
  12. $view->description = 'Override the default feedback messages report.';
  13. $view->tag = 'feedback';
  14. $view->base_table = 'feedback';
  15. $view->human_name = '';
  16. $view->core = 0;
  17. $view->api_version = '3.0';
  18. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  19. /* Display: Defaults */
  20. $handler = $view->new_display('default', 'Defaults', 'default');
  21. $handler->display->display_options['title'] = 'Feedback Messages';
  22. $handler->display->display_options['use_more_always'] = FALSE;
  23. $handler->display->display_options['access']['type'] = 'perm';
  24. $handler->display->display_options['access']['perm'] = 'view feedback messages';
  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'] = 'full';
  29. $handler->display->display_options['pager']['options']['items_per_page'] = 50;
  30. $handler->display->display_options['style_plugin'] = 'table';
  31. $handler->display->display_options['style_options']['columns'] = array(
  32. 'location' => 'location',
  33. 'timestamp' => 'timestamp',
  34. 'name' => 'name',
  35. 'message' => 'message',
  36. 'useragent' => 'message',
  37. 'view_entry' => 'message',
  38. 'view_entry_delete' => 'message',
  39. 'view_entry_edit' => 'message',
  40. );
  41. $handler->display->display_options['style_options']['default'] = '-1';
  42. $handler->display->display_options['style_options']['info'] = array(
  43. 'location' => array(
  44. 'sortable' => 1,
  45. 'default_sort_order' => 'asc',
  46. 'align' => '',
  47. 'separator' => '',
  48. 'empty_column' => 0,
  49. ),
  50. 'timestamp' => array(
  51. 'sortable' => 1,
  52. 'default_sort_order' => 'asc',
  53. 'align' => '',
  54. 'separator' => '',
  55. 'empty_column' => 0,
  56. ),
  57. 'name' => array(
  58. 'sortable' => 1,
  59. 'default_sort_order' => 'asc',
  60. 'align' => '',
  61. 'separator' => '',
  62. 'empty_column' => 0,
  63. ),
  64. 'message' => array(
  65. 'align' => '',
  66. 'separator' => ' ',
  67. 'empty_column' => 0,
  68. ),
  69. 'useragent' => array(
  70. 'sortable' => 0,
  71. 'default_sort_order' => 'asc',
  72. 'align' => '',
  73. 'separator' => '',
  74. 'empty_column' => 0,
  75. ),
  76. 'view_entry' => array(
  77. 'align' => '',
  78. 'separator' => '',
  79. 'empty_column' => 0,
  80. ),
  81. 'view_entry_delete' => array(
  82. 'align' => '',
  83. 'separator' => '',
  84. 'empty_column' => 0,
  85. ),
  86. 'view_entry_edit' => array(
  87. 'align' => '',
  88. 'separator' => '',
  89. 'empty_column' => 0,
  90. ),
  91. );
  92. /* Header: Global: Text area */
  93. $handler->display->display_options['header']['text']['id'] = 'text';
  94. $handler->display->display_options['header']['text']['table'] = 'views';
  95. $handler->display->display_options['header']['text']['field'] = 'area';
  96. $handler->display->display_options['header']['text']['content'] = 'Open Feedback Messages';
  97. $handler->display->display_options['header']['text']['format'] = 'full_html';
  98. /* No results behavior: Global: Text area */
  99. $handler->display->display_options['empty']['area']['id'] = 'area';
  100. $handler->display->display_options['empty']['area']['table'] = 'views';
  101. $handler->display->display_options['empty']['area']['field'] = 'area';
  102. $handler->display->display_options['empty']['area']['empty'] = TRUE;
  103. $handler->display->display_options['empty']['area']['content'] = 'There are no open feedback entries.';
  104. $handler->display->display_options['empty']['area']['format'] = 'filtered_html';
  105. /* Relationship: Feedback: User Id */
  106. $handler->display->display_options['relationships']['uid']['id'] = 'uid';
  107. $handler->display->display_options['relationships']['uid']['table'] = 'feedback';
  108. $handler->display->display_options['relationships']['uid']['field'] = 'uid';
  109. /* Field: Feedback: Location */
  110. $handler->display->display_options['fields']['location']['id'] = 'location';
  111. $handler->display->display_options['fields']['location']['table'] = 'feedback';
  112. $handler->display->display_options['fields']['location']['field'] = 'location';
  113. /* Field: Feedback: Timestamp */
  114. $handler->display->display_options['fields']['timestamp']['id'] = 'timestamp';
  115. $handler->display->display_options['fields']['timestamp']['table'] = 'feedback';
  116. $handler->display->display_options['fields']['timestamp']['field'] = 'timestamp';
  117. $handler->display->display_options['fields']['timestamp']['label'] = 'Date';
  118. $handler->display->display_options['fields']['timestamp']['date_format'] = 'short';
  119. /* Field: User: Name */
  120. $handler->display->display_options['fields']['name']['id'] = 'name';
  121. $handler->display->display_options['fields']['name']['table'] = 'users';
  122. $handler->display->display_options['fields']['name']['field'] = 'name';
  123. $handler->display->display_options['fields']['name']['relationship'] = 'uid';
  124. $handler->display->display_options['fields']['name']['label'] = 'User';
  125. /* Field: Feedback: Message */
  126. $handler->display->display_options['fields']['message']['id'] = 'message';
  127. $handler->display->display_options['fields']['message']['table'] = 'feedback';
  128. $handler->display->display_options['fields']['message']['field'] = 'message';
  129. $handler->display->display_options['fields']['message']['element_type'] = 'div';
  130. /* Field: Feedback: User agent */
  131. $handler->display->display_options['fields']['useragent']['id'] = 'useragent';
  132. $handler->display->display_options['fields']['useragent']['table'] = 'feedback';
  133. $handler->display->display_options['fields']['useragent']['field'] = 'useragent';
  134. $handler->display->display_options['fields']['useragent']['label'] = '';
  135. $handler->display->display_options['fields']['useragent']['element_type'] = 'div';
  136. /* Field: Feedback: Link */
  137. $handler->display->display_options['fields']['view_entry']['id'] = 'view_entry';
  138. $handler->display->display_options['fields']['view_entry']['table'] = 'feedback';
  139. $handler->display->display_options['fields']['view_entry']['field'] = 'view_entry';
  140. $handler->display->display_options['fields']['view_entry']['label'] = '';
  141. $handler->display->display_options['fields']['view_entry']['element_label_colon'] = FALSE;
  142. /* Field: Feedback: Edit entry */
  143. $handler->display->display_options['fields']['view_entry_edit']['id'] = 'view_entry_edit';
  144. $handler->display->display_options['fields']['view_entry_edit']['table'] = 'feedback';
  145. $handler->display->display_options['fields']['view_entry_edit']['field'] = 'view_entry_edit';
  146. $handler->display->display_options['fields']['view_entry_edit']['label'] = '';
  147. $handler->display->display_options['fields']['view_entry_edit']['element_label_colon'] = FALSE;
  148. /* Field: Feedback: Delete entry */
  149. $handler->display->display_options['fields']['view_entry_delete']['id'] = 'view_entry_delete';
  150. $handler->display->display_options['fields']['view_entry_delete']['table'] = 'feedback';
  151. $handler->display->display_options['fields']['view_entry_delete']['field'] = 'view_entry_delete';
  152. $handler->display->display_options['fields']['view_entry_delete']['label'] = '';
  153. $handler->display->display_options['fields']['view_entry_delete']['element_label_colon'] = FALSE;
  154. /* Sort criterion: Feedback: Timestamp */
  155. $handler->display->display_options['sorts']['timestamp']['id'] = 'timestamp';
  156. $handler->display->display_options['sorts']['timestamp']['table'] = 'feedback';
  157. $handler->display->display_options['sorts']['timestamp']['field'] = 'timestamp';
  158. /* Filter criterion: Feedback: Status */
  159. $handler->display->display_options['filters']['status']['id'] = 'status';
  160. $handler->display->display_options['filters']['status']['table'] = 'feedback';
  161. $handler->display->display_options['filters']['status']['field'] = 'status';
  162. $handler->display->display_options['filters']['status']['value'] = '0';
  163. $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
  164. /* Display: Open Entries */
  165. $handler = $view->new_display('page', 'Open Entries', 'page_1');
  166. $handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
  167. $handler->display->display_options['defaults']['header'] = FALSE;
  168. /* Header: Global: Text area */
  169. $handler->display->display_options['header']['text']['id'] = 'text';
  170. $handler->display->display_options['header']['text']['table'] = 'views';
  171. $handler->display->display_options['header']['text']['field'] = 'area';
  172. $handler->display->display_options['header']['text']['empty'] = TRUE;
  173. $handler->display->display_options['header']['text']['content'] = '<h3>Open Feedback Messages</h3>';
  174. $handler->display->display_options['header']['text']['format'] = 'full_html';
  175. $handler->display->display_options['path'] = 'admin/reports/feedback';
  176. $handler->display->display_options['menu']['type'] = 'normal';
  177. $handler->display->display_options['menu']['title'] = 'Feedback messages';
  178. $handler->display->display_options['menu']['description'] = 'View feedback messages.';
  179. $handler->display->display_options['menu']['weight'] = '0';
  180. $handler->display->display_options['menu']['name'] = 'management';
  181. /* Display: Processed Entries */
  182. $handler = $view->new_display('attachment', 'Processed Entries', 'attachment_1');
  183. $handler->display->display_options['defaults']['title'] = FALSE;
  184. $handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
  185. $handler->display->display_options['pager']['type'] = 'some';
  186. $handler->display->display_options['defaults']['header'] = FALSE;
  187. /* Header: Global: Text area */
  188. $handler->display->display_options['header']['text']['id'] = 'text';
  189. $handler->display->display_options['header']['text']['table'] = 'views';
  190. $handler->display->display_options['header']['text']['field'] = 'area';
  191. $handler->display->display_options['header']['text']['empty'] = TRUE;
  192. $handler->display->display_options['header']['text']['content'] = '<h3>Processed Feedback Messages</h3>';
  193. $handler->display->display_options['header']['text']['format'] = 'full_html';
  194. $handler->display->display_options['defaults']['empty'] = FALSE;
  195. /* No results behavior: Global: Text area */
  196. $handler->display->display_options['empty']['area']['id'] = 'area';
  197. $handler->display->display_options['empty']['area']['table'] = 'views';
  198. $handler->display->display_options['empty']['area']['field'] = 'area';
  199. $handler->display->display_options['empty']['area']['empty'] = TRUE;
  200. $handler->display->display_options['empty']['area']['content'] = 'There are no processed feedback entries.';
  201. $handler->display->display_options['empty']['area']['format'] = 'filtered_html';
  202. $handler->display->display_options['defaults']['filter_groups'] = FALSE;
  203. $handler->display->display_options['defaults']['filters'] = FALSE;
  204. /* Filter criterion: Feedback: Status */
  205. $handler->display->display_options['filters']['status']['id'] = 'status';
  206. $handler->display->display_options['filters']['status']['table'] = 'feedback';
  207. $handler->display->display_options['filters']['status']['field'] = 'status';
  208. $handler->display->display_options['filters']['status']['value'] = '1';
  209. $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
  210. $handler->display->display_options['displays'] = array(
  211. 'page_1' => 'page_1',
  212. 'default' => 0,
  213. );
  214. $handler->display->display_options['attachment_position'] = 'after';
  215. $handler->display->display_options['render_pager'] = TRUE;
  216. $translatables['feedback_messages'] = array(
  217. t('Defaults'),
  218. t('Feedback Messages'),
  219. t('more'),
  220. t('Apply'),
  221. t('Reset'),
  222. t('Sort by'),
  223. t('Asc'),
  224. t('Desc'),
  225. t('Items per page'),
  226. t('- All -'),
  227. t('Offset'),
  228. t('« first'),
  229. t('‹ previous'),
  230. t('next ›'),
  231. t('last »'),
  232. t('Open Feedback Messages'),
  233. t('There are no processed feedback entries.'),
  234. t('There are no open feedback entries.'),
  235. t('User'),
  236. t('Location'),
  237. t('Date'),
  238. t('Message'),
  239. t('Page'),
  240. t('Attachment'),
  241. t('Processed Feedback Messages'),
  242. );
  243. $views[$view->name] = $view;
  244. return $views;
  245. }