PageRenderTime 53ms CodeModel.GetById 27ms RepoModel.GetById 0ms app.codeStats 0ms

/cache/smarty/templates_c/%%24^248^248C46CA%%DetailView.tpl.php

https://github.com/joshbhamilton/sugar
PHP | 236 lines | 188 code | 14 blank | 34 comment | 47 complexity | bf9c708cffa896fcc6a2c04b3a1224ca MD5 | raw file
  1. <?php /* Smarty version 2.6.11, created on 2011-09-01 14:19:05
  2. compiled from include/DetailView/DetailView.tpl */ ?>
  3. <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
  4. smarty_core_load_plugins(array('plugins' => array(array('function', 'counter', 'include/DetailView/DetailView.tpl', 47, false),array('function', 'sugar_evalcolumn', 'include/DetailView/DetailView.tpl', 127, false),array('function', 'sugar_field', 'include/DetailView/DetailView.tpl', 132, false),array('modifier', 'count', 'include/DetailView/DetailView.tpl', 83, false),)), $this); ?>
  5. {*
  6. /*********************************************************************************
  7. * SugarCRM Community Edition is a customer relationship management program developed by
  8. * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
  9. *
  10. * This program is free software; you can redistribute it and/or modify it under
  11. * the terms of the GNU Affero General Public License version 3 as published by the
  12. * Free Software Foundation with the addition of the following permission added
  13. * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
  14. * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
  15. * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
  16. *
  17. * This program is distributed in the hope that it will be useful, but WITHOUT
  18. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  19. * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
  20. * details.
  21. *
  22. * You should have received a copy of the GNU Affero General Public License along with
  23. * this program; if not, see http://www.gnu.org/licenses or write to the Free
  24. * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  25. * 02110-1301 USA.
  26. *
  27. * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
  28. * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
  29. *
  30. * The interactive user interfaces in modified source and object code versions
  31. * of this program must display Appropriate Legal Notices, as required under
  32. * Section 5 of the GNU Affero General Public License version 3.
  33. *
  34. * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
  35. * these Appropriate Legal Notices must retain the display of the "Powered by
  36. * SugarCRM" logo. If the display of the logo is not reasonably feasible for
  37. * technical reasons, the Appropriate Legal Notices must display the words
  38. * "Powered by SugarCRM".
  39. ********************************************************************************/
  40. *}
  41. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  42. $this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['headerTpl'], 'smarty_include_vars' => array()));
  43. $this->_tpl_vars = $_smarty_tpl_vars;
  44. unset($_smarty_tpl_vars);
  45. ?>
  46. {sugar_include include=$includes}
  47. <div id="<?php echo $this->_tpl_vars['module']; ?>
  48. _detailview_tabs"
  49. <?php if ($this->_tpl_vars['useTabs']): ?>
  50. class="yui-navset detailview_tabs"
  51. <?php endif; ?>
  52. >
  53. <?php if ($this->_tpl_vars['useTabs']): ?>
  54. {* Generate the Tab headers *}
  55. <?php echo smarty_function_counter(array('name' => 'tabCount','start' => -1,'print' => false,'assign' => 'tabCount'), $this);?>
  56. <ul class="yui-nav">
  57. <?php $_from = $this->_tpl_vars['sectionPanels']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['section'] = array('total' => count($_from), 'iteration' => 0);
  58. if ($this->_foreach['section']['total'] > 0):
  59. foreach ($_from as $this->_tpl_vars['label'] => $this->_tpl_vars['panel']):
  60. $this->_foreach['section']['iteration']++;
  61. ?>
  62. <?php echo smarty_function_counter(array('name' => 'tabCount','print' => false), $this);?>
  63. <li><a id="tab<?php echo $this->_tpl_vars['tabCount']; ?>
  64. " href="#tab<?php echo $this->_tpl_vars['tabCount']; ?>
  65. "><em>{sugar_translate label='<?php echo $this->_tpl_vars['label']; ?>
  66. ' module='<?php echo $this->_tpl_vars['module']; ?>
  67. '}</em></a></li>
  68. <?php endforeach; endif; unset($_from); ?>
  69. </ul>
  70. <?php endif; ?>
  71. <div <?php if ($this->_tpl_vars['useTabs']): ?>class="yui-content"<?php endif; ?>>
  72. <?php echo smarty_function_counter(array('name' => 'panelCount','print' => false,'start' => 0,'assign' => 'panelCount'), $this);?>
  73. <?php $_from = $this->_tpl_vars['sectionPanels']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['section'] = array('total' => count($_from), 'iteration' => 0);
  74. if ($this->_foreach['section']['total'] > 0):
  75. foreach ($_from as $this->_tpl_vars['label'] => $this->_tpl_vars['panel']):
  76. $this->_foreach['section']['iteration']++;
  77. $this->assign('panel_id', $this->_tpl_vars['panelCount']); ?>
  78. <div id='<?php echo $this->_tpl_vars['label']; ?>
  79. ' class='detail view'>
  80. {counter name="panelFieldCount" start=0 print=false assign="panelFieldCount"}
  81. <?php if (! is_array ( $this->_tpl_vars['panel'] )): ?>
  82. {sugar_include type='php' file='<?php echo $this->_tpl_vars['panel']; ?>
  83. '}
  84. <?php else: ?>
  85. <?php if (! empty ( $this->_tpl_vars['label'] ) && ! is_int ( $this->_tpl_vars['label'] ) && $this->_tpl_vars['label'] != 'DEFAULT' && ! $this->_tpl_vars['useTabs']): ?>
  86. <h4>{sugar_translate label='<?php echo $this->_tpl_vars['label']; ?>
  87. ' module='<?php echo $this->_tpl_vars['module']; ?>
  88. '}</h4>
  89. <?php endif; ?>
  90. <table id='detailpanel_<?php echo $this->_foreach['section']['iteration']; ?>
  91. ' cellspacing='{$gridline}'>
  92. <?php $_from = $this->_tpl_vars['panel']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['rowIteration'] = array('total' => count($_from), 'iteration' => 0);
  93. if ($this->_foreach['rowIteration']['total'] > 0):
  94. foreach ($_from as $this->_tpl_vars['row'] => $this->_tpl_vars['rowData']):
  95. $this->_foreach['rowIteration']['iteration']++;
  96. ?>
  97. {counter name="fieldsUsed" start=0 print=false assign="fieldsUsed"}
  98. {counter name="fieldsHidden" start=0 print=false assign="fieldsHidden"}
  99. {capture name="tr" assign="tableRow"}
  100. <tr>
  101. <?php $this->assign('columnsInRow', count($this->_tpl_vars['rowData'])); ?>
  102. <?php $this->assign('columnsUsed', 0); ?>
  103. <?php $_from = $this->_tpl_vars['rowData']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['colIteration'] = array('total' => count($_from), 'iteration' => 0);
  104. if ($this->_foreach['colIteration']['total'] > 0):
  105. foreach ($_from as $this->_tpl_vars['col'] => $this->_tpl_vars['colData']):
  106. $this->_foreach['colIteration']['iteration']++;
  107. ?>
  108. <?php if (! empty ( $this->_tpl_vars['colData']['field']['hideIf'] )): ?>
  109. {if !(<?php echo $this->_tpl_vars['colData']['field']['hideIf']; ?>
  110. ) }
  111. <?php endif; ?>
  112. {counter name="fieldsUsed"}
  113. <td width='<?php echo $this->_tpl_vars['def']['templateMeta']['widths'][($this->_foreach['colIteration']['iteration']-1)]['label']; ?>
  114. %' scope="row">
  115. <?php if (! empty ( $this->_tpl_vars['colData']['field']['name'] )): ?>
  116. {if !$fields.<?php echo $this->_tpl_vars['colData']['field']['name']; ?>
  117. .hidden}
  118. <?php endif; ?>
  119. <?php if (isset ( $this->_tpl_vars['colData']['field']['customLabel'] )): ?>
  120. <?php echo $this->_tpl_vars['colData']['field']['customLabel']; ?>
  121. <?php elseif (isset ( $this->_tpl_vars['colData']['field']['label'] ) && strpos ( $this->_tpl_vars['colData']['field']['label'] , '$' )): ?>
  122. {capture name="label" assign="label"}<?php echo $this->_tpl_vars['colData']['field']['label']; ?>
  123. {/capture}
  124. {$label|strip_semicolon}:
  125. <?php elseif (isset ( $this->_tpl_vars['colData']['field']['label'] )): ?>
  126. {capture name="label" assign="label"}{sugar_translate label='<?php echo $this->_tpl_vars['colData']['field']['label']; ?>
  127. ' module='<?php echo $this->_tpl_vars['module']; ?>
  128. '}{/capture}
  129. {$label|strip_semicolon}:
  130. <?php elseif (isset ( $this->_tpl_vars['fields'][$this->_tpl_vars['colData']['field']['name']] )): ?>
  131. {capture name="label" assign="label"}{sugar_translate label='<?php echo $this->_tpl_vars['fields'][$this->_tpl_vars['colData']['field']['name']]['vname']; ?>
  132. ' module='<?php echo $this->_tpl_vars['module']; ?>
  133. '}{/capture}
  134. {$label|strip_semicolon}:
  135. <?php else: ?>
  136. &nbsp;
  137. <?php endif; ?>
  138. <?php if (isset ( $this->_tpl_vars['colData']['field']['popupHelp'] ) || isset ( $this->_tpl_vars['fields'][$this->_tpl_vars['colData']['field']['name']] ) && isset ( $this->_tpl_vars['fields'][$this->_tpl_vars['colData']['field']['name']]['popupHelp'] )): ?>
  139. <?php if (isset ( $this->_tpl_vars['colData']['field']['popupHelp'] )): ?>
  140. {capture name="popupText" assign="popupText"}{sugar_translate label="<?php echo $this->_tpl_vars['colData']['field']['popupHelp']; ?>
  141. " module='<?php echo $this->_tpl_vars['module']; ?>
  142. '}{/capture}
  143. <?php elseif (isset ( $this->_tpl_vars['fields'][$this->_tpl_vars['colData']['field']['name']]['popupHelp'] )): ?>
  144. {capture name="popupText" assign="popupText"}{sugar_translate label="<?php echo $this->_tpl_vars['fields'][$this->_tpl_vars['colData']['field']['name']]['popupHelp']; ?>
  145. " module='<?php echo $this->_tpl_vars['module']; ?>
  146. '}{/capture}
  147. <?php endif; ?>
  148. {overlib_includes}
  149. {sugar_help text=$popupText WIDTH=400}
  150. <?php endif; ?>
  151. <?php if (! empty ( $this->_tpl_vars['colData']['field']['name'] )): ?>
  152. {/if}
  153. <?php endif; ?>
  154. </td>
  155. <td width='<?php echo $this->_tpl_vars['def']['templateMeta']['widths'][($this->_foreach['colIteration']['iteration']-1)]['field']; ?>
  156. %' <?php if ($this->_tpl_vars['colData']['colspan']): ?>colspan='<?php echo $this->_tpl_vars['colData']['colspan']; ?>
  157. '<?php endif; ?> <?php if (isset ( $this->_tpl_vars['fields'][$this->_tpl_vars['colData']['field']['name']]['type'] ) && $this->_tpl_vars['fields'][$this->_tpl_vars['colData']['field']['name']]['type'] == 'phone'): ?>class="phone"<?php endif; ?>>
  158. <?php if (! empty ( $this->_tpl_vars['colData']['field']['name'] )): ?>
  159. {if !$fields.<?php echo $this->_tpl_vars['colData']['field']['name']; ?>
  160. .hidden}
  161. <?php endif; ?>
  162. <?php if ($this->_tpl_vars['colData']['field']['customCode'] || $this->_tpl_vars['colData']['field']['assign']): ?>
  163. {counter name="panelFieldCount"}
  164. <span id="<?php echo $this->_tpl_vars['colData']['field']['name']; ?>
  165. " class="sugar_field"><?php echo smarty_function_sugar_evalcolumn(array('var' => $this->_tpl_vars['colData']['field'],'colData' => $this->_tpl_vars['colData']), $this);?>
  166. </span>
  167. <?php elseif ($this->_tpl_vars['fields'][$this->_tpl_vars['colData']['field']['name']] && ! empty ( $this->_tpl_vars['colData']['field']['fields'] )): ?>
  168. <?php $_from = $this->_tpl_vars['colData']['field']['fields']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  169. foreach ($_from as $this->_tpl_vars['subField']):
  170. ?>
  171. <?php if ($this->_tpl_vars['fields'][$this->_tpl_vars['subField']]): ?>
  172. {counter name="panelFieldCount"}
  173. <?php echo smarty_function_sugar_field(array('parentFieldArray' => 'fields','tabindex' => $this->_tpl_vars['tabIndex'],'vardef' => $this->_tpl_vars['fields'][$this->_tpl_vars['subField']],'displayType' => 'DetailView'), $this);?>
  174. &nbsp;
  175. <?php else: ?>
  176. {counter name="panelFieldCount"}
  177. <?php echo $this->_tpl_vars['subField']; ?>
  178. <?php endif; ?>
  179. <?php endforeach; endif; unset($_from); ?>
  180. <?php elseif ($this->_tpl_vars['fields'][$this->_tpl_vars['colData']['field']['name']]): ?>
  181. {counter name="panelFieldCount"}
  182. <?php echo smarty_function_sugar_field(array('parentFieldArray' => 'fields','vardef' => $this->_tpl_vars['fields'][$this->_tpl_vars['colData']['field']['name']],'displayType' => 'DetailView','displayParams' => $this->_tpl_vars['colData']['field']['displayParams'],'typeOverride' => $this->_tpl_vars['colData']['field']['type']), $this);?>
  183. <?php endif; ?>
  184. <?php if (! empty ( $this->_tpl_vars['colData']['field']['name'] )): ?>
  185. {/if}
  186. <?php endif; ?>
  187. </td>
  188. <?php if (! empty ( $this->_tpl_vars['colData']['field']['hideIf'] )): ?>
  189. {else}
  190. <td scope="row">&nbsp;</td><td>&nbsp;</td>
  191. {/if}
  192. <?php endif; ?>
  193. <?php endforeach; endif; unset($_from); ?>
  194. </tr>
  195. {/capture}
  196. {if $fieldsUsed > 0 && $fieldsUsed != $fieldsHidden}
  197. {$tableRow}
  198. {/if}
  199. <?php endforeach; endif; unset($_from); ?>
  200. </table>
  201. <?php endif; ?>
  202. </div>
  203. {if $panelFieldCount == 0}
  204. <script>document.getElementById("<?php echo $this->_tpl_vars['label']; ?>
  205. ").style.display='none';</script>
  206. {/if}
  207. <?php endforeach; endif; unset($_from); ?>
  208. </div></div>
  209. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  210. $this->_smarty_include(array('smarty_include_tpl_file' => $this->_tpl_vars['footerTpl'], 'smarty_include_vars' => array()));
  211. $this->_tpl_vars = $_smarty_tpl_vars;
  212. unset($_smarty_tpl_vars);
  213. if ($this->_tpl_vars['useTabs']): ?>
  214. <script type="text/javascript" src="{sugar_getjspath file='include/javascript/sugar_grp_yui_widgets.js'}"></script>
  215. <script type="text/javascript">
  216. var <?php echo $this->_tpl_vars['module']; ?>
  217. _detailview_tabs = new YAHOO.widget.TabView("<?php echo $this->_tpl_vars['module']; ?>
  218. _detailview_tabs");
  219. <?php echo $this->_tpl_vars['module']; ?>
  220. _detailview_tabs.selectTab(0);
  221. </script>
  222. <?php endif; ?>