/modules/Emails/metadata/subpaneldefs.php

https://github.com/jacknicole/sugarcrm_dev · PHP · 175 lines · 127 code · 7 blank · 41 comment · 2 complexity · 7139213a451fc2386a7a815294091079 MD5 · raw file

  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-2011 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. /*********************************************************************************
  38. * Description:
  39. * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights
  40. * Reserved. Contributor(s): ______________________________________..
  41. *********************************************************************************/
  42. $layout_defs['Emails'] = array(
  43. // list of what Subpanels to show in the DetailView
  44. 'subpanel_setup' => array(
  45. 'notes' => array(
  46. 'order' => 5,
  47. 'sort_order' => 'asc',
  48. 'sort_by' => 'name',
  49. 'subpanel_name' => 'default',
  50. 'get_subpanel_data' => 'notes',
  51. 'title_key' => 'LBL_NOTES_SUBPANEL_TITLE',
  52. 'module' => 'Notes',
  53. 'top_buttons' => array(),
  54. ),
  55. 'accounts' => array(
  56. 'order' => 10,
  57. 'module' => 'Accounts',
  58. 'sort_order' => 'asc',
  59. 'sort_by' => 'name',
  60. 'subpanel_name' => 'ForEmails',
  61. 'get_subpanel_data' => 'accounts',
  62. 'add_subpanel_data' => 'account_id',
  63. 'title_key' => 'LBL_ACCOUNTS_SUBPANEL_TITLE',
  64. 'top_buttons' => array(
  65. array('widget_class' => 'SubPanelTopCreateButton'),
  66. array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
  67. ),
  68. ),
  69. 'contacts' => array(
  70. 'order' => 20,
  71. 'module' => 'Contacts',
  72. 'sort_order' => 'asc',
  73. 'sort_by' => 'last_name, first_name',
  74. 'subpanel_name' => 'ForEmails',
  75. 'get_subpanel_data' => 'contacts',
  76. 'add_subpanel_data' => 'contact_id',
  77. 'title_key' => 'LBL_CONTACTS_SUBPANEL_TITLE',
  78. 'top_buttons' => array(
  79. array('widget_class' => 'SubPanelTopCreateButton'),
  80. array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
  81. ),
  82. ),
  83. 'opportunities' => array(
  84. 'order' => 25,
  85. 'module' => 'Opportunities',
  86. 'sort_order' => 'asc',
  87. 'sort_by' => 'name',
  88. 'subpanel_name' => 'ForEmails',
  89. 'get_subpanel_data' => 'opportunities',
  90. 'add_subpanel_data' => 'opportunity_id',
  91. 'title_key' => 'LBL_OPPORTUNITY_SUBPANEL_TITLE',
  92. 'top_buttons' => array(
  93. array('widget_class' => 'SubPanelTopCreateButton'),
  94. array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
  95. ),
  96. ),
  97. 'leads' => array(
  98. 'order' => 30,
  99. 'module' => 'Leads',
  100. 'sort_order' => 'asc',
  101. 'sort_by' => 'last_name, first_name',
  102. 'subpanel_name' => 'ForEmails',
  103. 'get_subpanel_data' => 'leads',
  104. 'add_subpanel_data' => 'lead_id',
  105. 'title_key' => 'LBL_LEADS_SUBPANEL_TITLE',
  106. 'top_buttons' => array(
  107. array('widget_class' => 'SubPanelTopCreateButton'),
  108. array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
  109. ),
  110. ),
  111. 'cases' => array(
  112. 'order' => 40,
  113. 'module' => 'Cases',
  114. 'sort_order' => 'desc',
  115. 'sort_by' => 'case_number',
  116. 'subpanel_name' => 'ForEmails',
  117. 'get_subpanel_data' => 'cases',
  118. 'add_subpanel_data' => 'case_id',
  119. 'title_key' => 'LBL_CASES_SUBPANEL_TITLE',
  120. 'top_buttons' => array(
  121. array('widget_class' => 'SubPanelTopCreateButton'),
  122. array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
  123. ),
  124. ),
  125. 'users' => array(
  126. 'order' => 50,
  127. 'module' => 'Users',
  128. 'sort_order' => 'asc',
  129. 'sort_by' => 'name',
  130. 'subpanel_name' => 'ForEmails',
  131. 'get_subpanel_data' => 'users',
  132. 'add_subpanel_data' => 'user_id',
  133. 'title_key' => 'LBL_USERS_SUBPANEL_TITLE',
  134. 'top_buttons' => array(
  135. array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
  136. ),
  137. ),
  138. 'bugs' => array(
  139. 'order' => 60,
  140. 'module' => 'Bugs',
  141. 'sort_order' => 'desc',
  142. 'sort_by' => 'bug_number',
  143. 'subpanel_name' => 'ForEmails',
  144. 'get_subpanel_data' => 'bugs',
  145. 'add_subpanel_data' => 'bug_id',
  146. 'title_key' => 'LBL_BUGS_SUBPANEL_TITLE',
  147. 'top_buttons' => array(
  148. array('widget_class' => 'SubPanelTopCreateButton'),
  149. array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
  150. ),
  151. ),
  152. 'project' => array(
  153. 'order' => 80,
  154. 'module' => 'Project',
  155. 'sort_order' => 'asc',
  156. 'sort_by' => 'name',
  157. 'subpanel_name' => 'ForEmails',
  158. 'get_subpanel_data' => 'project',
  159. 'add_subpanel_data' => 'project_id',
  160. 'title_key' => 'LBL_PROJECT_SUBPANEL_TITLE',
  161. 'top_buttons' => array(
  162. array('widget_class' => 'SubPanelTopCreateButton'),
  163. array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
  164. ),
  165. ),
  166. ),
  167. );