maillog.views_default.inc 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. <?php
  2. /**
  3. * @file
  4. * Creates the default view for the 'Log Mail' module
  5. */
  6. /**
  7. * Implementation of hook_views_default_views().
  8. */
  9. function maillog_views_default_views() {
  10. $view = new view;
  11. $view->name = 'Maillog';
  12. $view->description = 'Displays the list of e-mails logged by the \'Mail Log\' module.';
  13. $view->tag = '';
  14. $view->view_php = '';
  15. $view->base_table = 'maillog';
  16. $view->is_cacheable = FALSE;
  17. $view->api_version = 2;
  18. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  19. $handler = $view->new_display('default', 'Defaults', 'default');
  20. $handler->override_option('fields', array(
  21. 'idmaillog' => array(
  22. 'label' => 'Maillog_ID',
  23. 'alter' => array(
  24. 'alter_text' => 0,
  25. 'text' => '',
  26. 'make_link' => 0,
  27. 'path' => '',
  28. 'link_class' => '',
  29. 'alt' => '',
  30. 'prefix' => '',
  31. 'suffix' => '',
  32. 'target' => '',
  33. 'help' => '',
  34. 'trim' => 0,
  35. 'max_length' => '',
  36. 'word_boundary' => 1,
  37. 'ellipsis' => 1,
  38. 'html' => 0,
  39. 'strip_tags' => 0,
  40. ),
  41. 'empty' => '',
  42. 'hide_empty' => 0,
  43. 'empty_zero' => 0,
  44. 'exclude' => 1,
  45. 'id' => 'idmaillog',
  46. 'table' => 'maillog',
  47. 'field' => 'idmaillog',
  48. 'relationship' => 'none',
  49. ),
  50. 'sent_date' => array(
  51. 'label' => 'Date',
  52. 'alter' => array(
  53. 'alter_text' => 0,
  54. 'text' => '',
  55. 'make_link' => 0,
  56. 'path' => '',
  57. 'link_class' => '',
  58. 'alt' => '',
  59. 'prefix' => '',
  60. 'suffix' => '',
  61. 'target' => '',
  62. 'help' => '',
  63. 'trim' => 0,
  64. 'max_length' => '',
  65. 'word_boundary' => 1,
  66. 'ellipsis' => 1,
  67. 'html' => 0,
  68. 'strip_tags' => 0,
  69. ),
  70. 'empty' => '',
  71. 'hide_empty' => 0,
  72. 'empty_zero' => 0,
  73. 'exclude' => 0,
  74. 'id' => 'sent_date',
  75. 'table' => 'maillog',
  76. 'field' => 'sent_date',
  77. 'relationship' => 'none',
  78. ),
  79. 'header_message_id' => array(
  80. 'id' => 'header_message_id',
  81. 'table' => 'maillog',
  82. 'field' => 'header_message_id',
  83. ),
  84. 'subject' => array(
  85. 'label' => 'Subject',
  86. 'alter' => array(
  87. 'alter_text' => 0,
  88. 'text' => '',
  89. 'make_link' => 1,
  90. 'path' => 'maillog/details/[idmaillog]',
  91. 'link_class' => '',
  92. 'alt' => '',
  93. 'prefix' => '',
  94. 'suffix' => '',
  95. 'target' => '',
  96. 'help' => '',
  97. 'trim' => 0,
  98. 'max_length' => '',
  99. 'word_boundary' => 1,
  100. 'ellipsis' => 1,
  101. 'html' => 0,
  102. 'strip_tags' => 0,
  103. ),
  104. 'empty' => '',
  105. 'hide_empty' => 0,
  106. 'empty_zero' => 0,
  107. 'exclude' => 0,
  108. 'id' => 'subject',
  109. 'table' => 'maillog',
  110. 'field' => 'subject',
  111. 'relationship' => 'none',
  112. ),
  113. 'header_from' => array(
  114. 'label' => 'From',
  115. 'alter' => array(
  116. 'alter_text' => 0,
  117. 'text' => '',
  118. 'make_link' => 0,
  119. 'path' => '',
  120. 'link_class' => '',
  121. 'alt' => '',
  122. 'prefix' => '',
  123. 'suffix' => '',
  124. 'target' => '',
  125. 'help' => '',
  126. 'trim' => 0,
  127. 'max_length' => '',
  128. 'word_boundary' => 1,
  129. 'ellipsis' => 1,
  130. 'html' => 0,
  131. 'strip_tags' => 0,
  132. ),
  133. 'empty' => '',
  134. 'hide_empty' => 0,
  135. 'empty_zero' => 0,
  136. 'exclude' => 0,
  137. 'id' => 'header_from',
  138. 'table' => 'maillog',
  139. 'field' => 'header_from',
  140. 'relationship' => 'none',
  141. ),
  142. 'header_to' => array(
  143. 'label' => 'To',
  144. 'alter' => array(
  145. 'alter_text' => 0,
  146. 'text' => '',
  147. 'make_link' => 0,
  148. 'path' => '',
  149. 'link_class' => '',
  150. 'alt' => '',
  151. 'prefix' => '',
  152. 'suffix' => '',
  153. 'target' => '',
  154. 'help' => '',
  155. 'trim' => 0,
  156. 'max_length' => '',
  157. 'word_boundary' => 1,
  158. 'ellipsis' => 1,
  159. 'html' => 0,
  160. 'strip_tags' => 0,
  161. ),
  162. 'empty' => '',
  163. 'hide_empty' => 0,
  164. 'empty_zero' => 0,
  165. 'exclude' => 0,
  166. 'id' => 'header_to',
  167. 'table' => 'maillog',
  168. 'field' => 'header_to',
  169. 'relationship' => 'none',
  170. ),
  171. 'delete_maillog' => array(
  172. 'label' => 'Delete link',
  173. 'alter' => array(
  174. 'alter_text' => 0,
  175. 'text' => '',
  176. 'make_link' => 0,
  177. 'path' => '',
  178. 'link_class' => '',
  179. 'alt' => '',
  180. 'prefix' => '',
  181. 'suffix' => '',
  182. 'target' => '',
  183. 'help' => '',
  184. 'trim' => 0,
  185. 'max_length' => '',
  186. 'word_boundary' => 1,
  187. 'ellipsis' => 1,
  188. 'html' => 0,
  189. 'strip_tags' => 0,
  190. ),
  191. 'empty' => '',
  192. 'hide_empty' => 0,
  193. 'empty_zero' => 0,
  194. 'exclude' => 0,
  195. 'id' => 'delete_maillog',
  196. 'table' => 'maillog',
  197. 'field' => 'delete_maillog',
  198. 'relationship' => 'none',
  199. ),
  200. ));
  201. $handler->override_option('sorts', array(
  202. 'sent_date' => array(
  203. 'order' => 'DESC',
  204. 'id' => 'sent_date',
  205. 'table' => 'maillog',
  206. 'field' => 'sent_date',
  207. 'relationship' => 'none',
  208. ),
  209. ));
  210. $handler->override_option('access', array(
  211. 'type' => 'perm',
  212. 'perm' => 'view maillog',
  213. ));
  214. $handler->override_option('cache', array(
  215. 'type' => 'none',
  216. ));
  217. $handler->override_option('title', 'Maillog');
  218. $handler->override_option('empty', 'Maillog is currently empty. Send a mail!');
  219. $handler->override_option('empty_format', '1');
  220. $handler->override_option('use_pager', '1');
  221. $handler->override_option('style_plugin', 'table');
  222. $handler = $view->new_display('page', 'Page', 'page_1');
  223. $handler->override_option('path', 'admin/reports/maillog');
  224. $handler->override_option('menu', array(
  225. 'type' => 'normal',
  226. 'title' => 'Maillog',
  227. 'description' => 'Show the logged mails',
  228. 'weight' => '0',
  229. 'name' => 'management',
  230. ));
  231. $handler->override_option('tab_options', array(
  232. 'type' => 'none',
  233. 'title' => '',
  234. 'description' => '',
  235. 'weight' => 0,
  236. 'name' => 'navigation',
  237. ));
  238. $views[$view->name] = $view;
  239. return $views;
  240. }