PageRenderTime 49ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/modules/History/metadata/subpaneldefs.php

https://bitbucket.org/cviolette/sugarcrm
PHP | 341 lines | 295 code | 5 blank | 41 comment | 2 complexity | 339198dff618cadf1e87d5d963e31ce0 MD5 | raw file
Possible License(s): LGPL-2.1, MPL-2.0-no-copyleft-exception, BSD-3-Clause
  1. <?php
  2. if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
  3. /*********************************************************************************
  4. * SugarCRM Community Edition is a customer relationship management program developed by
  5. * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc.
  6. *
  7. * This program is free software; you can redistribute it and/or modify it under
  8. * the terms of the GNU Affero General Public License version 3 as published by the
  9. * Free Software Foundation with the addition of the following permission added
  10. * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
  11. * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
  12. * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
  13. *
  14. * This program is distributed in the hope that it will be useful, but WITHOUT
  15. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  16. * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
  17. * details.
  18. *
  19. * You should have received a copy of the GNU Affero General Public License along with
  20. * this program; if not, see http://www.gnu.org/licenses or write to the Free
  21. * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  22. * 02110-1301 USA.
  23. *
  24. * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
  25. * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
  26. *
  27. * The interactive user interfaces in modified source and object code versions
  28. * of this program must display Appropriate Legal Notices, as required under
  29. * Section 5 of the GNU Affero General Public License version 3.
  30. *
  31. * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
  32. * these Appropriate Legal Notices must retain the display of the "Powered by
  33. * SugarCRM" logo. If the display of the logo is not reasonably feasible for
  34. * technical reasons, the Appropriate Legal Notices must display the words
  35. * "Powered by SugarCRM".
  36. ********************************************************************************/
  37. $layout_defs['History'] = array(
  38. // default subpanel provided by this SugarBean
  39. 'default_subpanel_define' => array(
  40. 'subpanel_title' => 'LBL_DEFAULT_SUBPANEL_TITLE',
  41. 'top_buttons' => array(
  42. array('widget_class' => 'SubPanelTopCreateNoteButton'),
  43. array('widget_class' => 'SubPanelTopArchiveEmailButton'),
  44. array('widget_class' => 'SubPanelTopSummaryButton'),
  45. ),
  46. //TODO try and merge with the activities
  47. 'list_fields' => array(
  48. 'Meetings' => array(
  49. 'columns' => array(
  50. array(
  51. 'name' => 'nothing',
  52. 'widget_class' => 'SubPanelIcon',
  53. 'module' => 'Meetings',
  54. 'width' => '2%',
  55. ),
  56. array(
  57. 'name' => 'name',
  58. 'vname' => 'LBL_LIST_SUBJECT',
  59. 'widget_class' => 'SubPanelDetailViewLink',
  60. 'width' => '28%',
  61. ),
  62. array(
  63. 'name' => 'status',
  64. 'vname' => 'LBL_LIST_STATUS',
  65. 'width' => '10%',
  66. ),
  67. array(
  68. 'name' => 'contact_name',
  69. 'module' => 'Contacts',
  70. 'widget_class' => 'SubPanelDetailViewLink',
  71. 'target_record_key' => 'contact_id',
  72. 'target_module' => 'Contacts',
  73. 'vname' => 'LBL_LIST_CONTACT',
  74. 'width' => '20%',
  75. ),
  76. array(
  77. 'name' => 'parent_name',
  78. 'module' => 'Meetings',
  79. 'vname' => 'LBL_LIST_RELATED_TO',
  80. 'width' => '22%',
  81. ),
  82. array(
  83. 'name' => 'date_modified',
  84. //'db_alias_to' => 'the_date',
  85. 'vname' => 'LBL_LIST_LAST_MODIFIED',
  86. 'width' => '10%',
  87. ),
  88. array(
  89. 'name' => 'nothing',
  90. 'widget_class' => 'SubPanelEditButton',
  91. 'module' => 'Meetings',
  92. 'width' => '4%',
  93. ),
  94. array(
  95. 'name' => 'nothing',
  96. 'widget_class' => 'SubPanelRemoveButton',
  97. 'linked_field' => 'meetings',
  98. 'module' => 'Meetings',
  99. 'width' => '4%',
  100. ),
  101. ),
  102. 'where' => "(meetings.status='Held' OR meetings.status='Not Held')",
  103. 'order_by' => 'meetings.date_modified',
  104. ),
  105. 'Emails' => array(
  106. 'columns' => array(
  107. array(
  108. 'name' => 'nothing',
  109. 'widget_class' => 'SubPanelIcon',
  110. 'module' => 'Emails',
  111. 'width' => '2%',
  112. ),
  113. array(
  114. 'name' => 'name',
  115. 'vname' => 'LBL_LIST_SUBJECT',
  116. 'widget_class' => 'SubPanelDetailViewLink',
  117. 'width' => '28%',
  118. ),
  119. array(
  120. 'name' => 'status',
  121. 'vname' => 'LBL_LIST_STATUS',
  122. 'width' => '10%',
  123. ),
  124. array(
  125. 'name' => 'contact_name',
  126. 'module' => 'Contacts',
  127. 'widget_class' => 'SubPanelDetailViewLink',
  128. 'target_record_key' => 'contact_id',
  129. 'target_module' => 'Contacts',
  130. 'vname' => 'LBL_LIST_CONTACT',
  131. 'width' => '20%',
  132. ),
  133. array(
  134. 'name' => 'parent_name',
  135. 'module' => 'Emails',
  136. 'vname' => 'LBL_LIST_RELATED_TO',
  137. 'width' => '22%',
  138. ),
  139. array(
  140. 'name' => 'date_modified',
  141. //'db_alias_to' => 'the_date',
  142. 'vname' => 'LBL_LIST_LAST_MODIFIED',
  143. 'width' => '10%',
  144. ),
  145. array(
  146. 'name' => 'nothing',
  147. 'widget_class' => 'SubPanelEditButton',
  148. 'module' => 'Emails',
  149. 'width' => '4%',
  150. ),
  151. array(
  152. 'name' => 'nothing',
  153. 'widget_class' => 'SubPanelRemoveButton',
  154. 'linked_field' => 'emails',
  155. 'module' => 'Emails',
  156. 'width' => '4%',
  157. ),
  158. ),
  159. 'where' => "(emails.status='sent')",
  160. 'order_by' => 'emails.date_modified',
  161. ),
  162. 'Notes' => array(
  163. 'columns' => array(
  164. array(
  165. 'name' => 'nothing',
  166. 'widget_class' => 'SubPanelIcon',
  167. 'module' => 'Notes',
  168. 'width' => '2%',
  169. ),
  170. array(
  171. 'name' => 'name',
  172. 'vname' => 'LBL_LIST_SUBJECT',
  173. 'widget_class' => 'SubPanelDetailViewLink',
  174. 'width' => '28%',
  175. ),
  176. array( // this column does not exist on
  177. 'name' => 'status',
  178. 'vname' => 'LBL_LIST_STATUS',
  179. 'width' => '10%',
  180. ),
  181. array(
  182. 'name' => 'contact_name',
  183. 'module' => 'Contacts',
  184. 'widget_class' => 'SubPanelDetailViewLink',
  185. 'target_record_key' => 'contact_id',
  186. 'target_module' => 'Contacts',
  187. 'vname' => 'LBL_LIST_CONTACT',
  188. 'width' => '20%',
  189. ),
  190. array(
  191. 'name' => 'parent_name',
  192. 'module' => 'Notes',
  193. 'vname' => 'LBL_LIST_RELATED_TO',
  194. 'width' => '22%',
  195. ),
  196. array(
  197. 'name' => 'date_modified',
  198. //'db_alias_to' => 'the_date',
  199. 'vname' => 'LBL_LIST_LAST_MODIFIED',
  200. 'width' => '10%',
  201. ),
  202. array(
  203. 'name' => 'nothing',
  204. 'widget_class' => 'SubPanelEditButton',
  205. 'module' => 'Notes',
  206. 'width' => '4%',
  207. ),
  208. array(
  209. 'name' => 'nothing',
  210. 'widget_class' => 'SubPanelRemoveButton',
  211. 'linked_field' => 'notes',
  212. 'module' => 'Notes',
  213. 'width' => '4%',
  214. ),
  215. ),
  216. 'where' => '',
  217. 'order_by' => 'notes.date_modified',
  218. ),
  219. 'Tasks' => array(
  220. 'columns' => array(
  221. array(
  222. 'name' => 'nothing',
  223. 'widget_class' => 'SubPanelIcon',
  224. 'module' => 'Tasks',
  225. 'width' => '2%',
  226. ),
  227. array(
  228. 'name' => 'name',
  229. 'vname' => 'LBL_LIST_SUBJECT',
  230. 'widget_class' => 'SubPanelDetailViewLink',
  231. 'width' => '28%',
  232. ),
  233. array(
  234. 'name' => 'status',
  235. 'vname' => 'LBL_LIST_STATUS',
  236. 'width' => '10%',
  237. ),
  238. array(
  239. 'name' => 'contact_name',
  240. 'module' => 'Contacts',
  241. 'widget_class' => 'SubPanelDetailViewLink',
  242. 'target_record_key' => 'contact_id',
  243. 'target_module' => 'Contacts',
  244. 'vname' => 'LBL_LIST_CONTACT',
  245. 'width' => '20%',
  246. ),
  247. array(
  248. 'name' => 'parent_name',
  249. 'module' => 'Tasks',
  250. 'vname' => 'LBL_LIST_RELATED_TO',
  251. 'width' => '22%',
  252. ),
  253. array(
  254. 'name' => 'date_modified',
  255. //'db_alias_to' => 'the_date',
  256. 'vname' => 'LBL_LIST_LAST_MODIFIED',
  257. 'width' => '10%',
  258. ),
  259. array(
  260. 'name' => 'nothing',
  261. 'widget_class' => 'SubPanelEditButton',
  262. 'module' => 'Tasks',
  263. 'width' => '4%',
  264. ),
  265. array(
  266. 'name' => 'nothing',
  267. 'widget_class' => 'SubPanelRemoveButton',
  268. 'linked_field' => 'tasks',
  269. 'module' => 'Tasks',
  270. 'width' => '4%',
  271. ),
  272. ),
  273. 'where' => "(tasks.status='Completed' OR tasks.status='Deferred')",
  274. 'order_by' => 'tasks.date_start',
  275. ),
  276. 'Calls' => array(
  277. 'columns' => array(
  278. array(
  279. 'name' => 'nothing',
  280. 'widget_class' => 'SubPanelIcon',
  281. 'module' => 'Calls',
  282. 'width' => '2%',
  283. ),
  284. array(
  285. 'name' => 'name',
  286. 'vname' => 'LBL_LIST_SUBJECT',
  287. 'widget_class' => 'SubPanelDetailViewLink',
  288. 'width' => '28%',
  289. ),
  290. array(
  291. 'name' => 'status',
  292. 'vname' => 'LBL_LIST_STATUS',
  293. 'width' => '10%',
  294. ),
  295. array(
  296. 'name' => 'contact_name',
  297. 'module' => 'Contacts',
  298. 'widget_class' => 'SubPanelDetailViewLink',
  299. 'target_record_key' => 'contact_id',
  300. 'target_module' => 'Contacts',
  301. 'vname' => 'LBL_LIST_CONTACT',
  302. 'width' => '20%',
  303. ),
  304. array(
  305. 'name' => 'parent_name',
  306. 'module' => 'Meetings',
  307. 'vname' => 'LBL_LIST_RELATED_TO',
  308. 'width' => '22%',
  309. ),
  310. array(
  311. 'name' => 'date_modified',
  312. //'db_alias_to' => 'the_date',
  313. 'vname' => 'LBL_LIST_LAST_MODIFIED',
  314. 'width' => '10%',
  315. ),
  316. array(
  317. 'name' => 'nothing',
  318. 'widget_class' => 'SubPanelEditButton',
  319. 'module' => 'Calls',
  320. 'width' => '4%',
  321. ),
  322. array(
  323. 'name' => 'nothing',
  324. 'widget_class' => 'SubPanelRemoveButton',
  325. 'linked_field' => 'calls',
  326. 'module' => 'Calls',
  327. 'width' => '4%',
  328. ),
  329. ),
  330. 'where' => "(calls.status='Held' OR calls.status='Not Held')",
  331. 'order_by' => 'calls.date_modified',
  332. ),
  333. ),
  334. ),
  335. );
  336. ?>