3 /*********************************************************************************
4 * SugarCRM Community Edition is a customer relationship management program developed by
5 * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
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.
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
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
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.
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.
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 ********************************************************************************/
43 <script type='text/javascript' src='{sugar_getjspath file='include/javascript/popup_helper.js'}'></script>
46 <script type='text/javascript' src='{sugar_getjspath file='include/javascript/sugar_grp_overlib.js'}'></script>
47 <div id='overDiv' style='position:absolute; visibility:hidden; z-index:1000;'></div>
52 <table cellpadding='0' cellspacing='0' width='100%' border='0' class='list view'>
53 {include file='include/ListView/ListViewPagination.tpl'}
56 <th scope='col' nowrap="nowrap" width='1%' class="selectCol">
58 <input type='checkbox' class='checkbox' name='massall' id='massall' value='' onclick='sListView.check_all(document.MassUpdate, "mass[]", this.checked);' />
63 {if !empty($quickViewLinks)}
64 <th scope='col' width='1%' style="padding: 0px;"> </th>
66 {counter start=0 name="colCounter" print=false assign="colCounter"}
67 {foreach from=$displayColumns key=colHeader item=params}
68 <th scope='col' width='{$params.width}%' nowrap="nowrap">
69 <div style='white-space: nowrap;'width='100%' align='{$params.align|default:'left'}'>
70 {if $params.sortable|default:true}
72 <a href='{$pageData.urls.orderBy}{$params.orderBy|default:$colHeader|lower}' class='listViewThLinkS1'>
74 {if $params.orderBy|default:$colHeader|lower == $pageData.ordering.orderBy}
75 <a href='javascript:sListView.order_checks("{$pageData.ordering.sortOrder|default:ASCerror}", "{$params.orderBy|default:$colHeader|lower}" , "{$pageData.bean.moduleDir}{"2_"}{$pageData.bean.objectName|upper}{"_ORDER_BY"}")' class='listViewThLinkS1'>
77 <a href='javascript:sListView.order_checks("ASC", "{$params.orderBy|default:$colHeader|lower}" , "{$pageData.bean.moduleDir}{"2_"}{$pageData.bean.objectName|upper}{"_ORDER_BY"}")' class='listViewThLinkS1'>
80 {sugar_translate label=$params.label module=$pageData.bean.moduleDir}
82 {if $params.orderBy|default:$colHeader|lower == $pageData.ordering.orderBy}
83 {if $pageData.ordering.sortOrder == 'ASC'}
84 {capture assign="imageName"}arrow_down.{$arrowExt}{/capture}
85 <img border='0' src='{sugar_getimagepath file=$imageName}' width='{$arrowWidth}' height='{$arrowHeight}' align='absmiddle' alt='{$arrowAlt}'>
87 {capture assign="imageName"}arrow_up.{$arrowExt}{/capture}
88 <img border='0' src='{sugar_getimagepath file=$imageName}' width='{$arrowWidth}' height='{$arrowHeight}' align='absmiddle' alt='{$arrowAlt}'>
91 {capture assign="imageName"}arrow.{$arrowExt}{/capture}
92 <img border='0' src='{sugar_getimagepath file=$imageName}' width='{$arrowWidth}' height='{$arrowHeight}' align='absmiddle' alt='{$arrowAlt}'>
95 {if !isset($params.noHeader) || $params.noHeader == false}
96 {sugar_translate label=$params.label module=$pageData.bean.moduleDir}
101 {counter name="colCounter"}
103 <th scope='col' nowrap="nowrap" width='1%'> </th>
106 {counter start=$pageData.offsets.current print=false assign="offset" name="offset"}
107 {foreach name=rowIteration from=$data key=id item=rowData}
108 {counter name="offset" print=false}
110 {if $smarty.foreach.rowIteration.iteration is odd}
111 {assign var='_rowColor' value=$rowColor[0]}
113 {assign var='_rowColor' value=$rowColor[1]}
115 <tr height='20' class='{$_rowColor}S1'>
117 <td width='1%' class='nowrap'>
118 {if !$is_admin && is_admin_for_user && $rowData.IS_ADMIN==1}
119 <input type='checkbox' disabled="disabled" class='checkbox' value='{$rowData.ID}'>
121 <input onclick='sListView.check_item(this, document.MassUpdate)' type='checkbox' class='checkbox' name='mass[]' value='{$rowData.ID}'>
125 {if !empty($quickViewLinks)}
126 <td width='2%' nowrap>{if $pageData.rowAccess[$id].edit}<a title='{$editLinkString}' href="#" onMouseOver="javascript:lvg_nav('{if $params.dynamic_module}{$rowData[$params.dynamic_module]}{else}{$pageData.bean.moduleDir}{/if}', '{$rowData.ID}', {if $act}'{$act}'{else}'e'{/if}, {$offset}, this)" onFocus="javascript:lvg_nav('{if $params.dynamic_module}{$rowData[$params.dynamic_module]}{else}{$pageData.bean.moduleDir}{/if}', '{$rowData.ID}', {if $act}'{$act}'{else}'e'{/if}, {$offset}, this)"><img border=0 src='{sugar_getimagepath file='edit_inline.gif'}'></a>{/if}</td>
128 {counter start=0 name="colCounter" print=false assign="colCounter"}
129 {foreach from=$displayColumns key=col item=params}
131 <td scope='row' align='{$params.align|default:'left'}' valign="top" class="{if ($params.type == 'teamset')}nowrap{/if}{if preg_match('/PHONE/', $col)} phone{/if}">
132 {if $col == 'NAME' || $params.bold}<b>{/if}
133 {if $params.link && !$params.customCode}
134 <{$pageData.tag.$id[$params.ACLTag]|default:$pageData.tag.$id.MAIN} href="#" onMouseOver="javascript:lvg_nav('{if $params.dynamic_module}{$rowData[$params.dynamic_module]}{else}{$params.module|default:$pageData.bean.moduleDir}{/if}', '{$rowData[$params.id]|default:$rowData.ID}', 'd', {$offset}, this)" onFocus="javascript:lvg_nav('{if $params.dynamic_module}{$rowData[$params.dynamic_module]}{else}{$params.module|default:$pageData.bean.moduleDir}{/if}', '{$rowData[$params.id]|default:$rowData.ID}', 'd', {$offset}, this)">
136 {if $params.customCode}
137 {sugar_evalcolumn_old var=$params.customCode rowData=$rowData}
139 {sugar_field parentFieldArray=$rowData vardef=$params displayType=ListView field=$col}
142 {if empty($rowData.$col) && empty($params.customCode)} {/if}
143 {if $params.link && !$params.customCode}
144 </{$pageData.tag.$id[$params.ACLTag]|default:$pageData.tag.$id.MAIN}>
146 {if $col == 'NAME' || $params.bold}</b>{/if}
149 {counter name="colCounter"}
151 <td align='right'>{$pageData.additionalDetails.$id}</td>
154 <tr height='20' class='{$rowColor[0]}S1'>
155 <td colspan="{$colCount}">
156 <em>{$APP.LBL_NO_DATA}</em>
160 {include file='include/ListView/ListViewPagination.tpl'}
163 <script type="text/javascript">
165 {literal}function lvg_nav(m,id,act,offset,t){if(t.href.search(/#/) < 0){return;}else{if(act=='pte'){act='ProjectTemplatesEditView';}else if(act=='d'){ act='DetailView';}else if( act =='ReportsWizard'){act = 'ReportsWizard';}else{ act='EditView';}{/literal}url = 'index.php?module='+m+'&offset=' + offset + '&stamp={$pageData.stamp}&return_module='+m+'&action='+act+'&record='+id;t.href=url;{literal}}}{/literal}
166 {literal}function lvg_dtails(id){{/literal}return SUGAR.util.getAdditionalDetails( '{$pageData.bean.moduleDir|default:$params.module}',id, 'adspan_'+id);{literal}}{/literal}