]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - include/ListView/ListViewDCMenu.tpl
Release 6.5.0
[Github/sugarcrm.git] / include / ListView / ListViewDCMenu.tpl
1     {*
2
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
38
39
40
41 *}
42 <script type="text/javascript">
43 {literal}
44 function submitListViewDCMenu(submitElem) {
45 var callback = {
46 success: function(o) {
47 var contentElem = document.getElementById('dcSearch');
48 while ( typeof(contentElem) != 'undefined' && contentElem.className != 'dccontent' ) {
49 contentElem = contentElem.parentNode;
50 }
51 contentElem.innerHTML = o.responseText;
52 },
53 failure: function(o) {
54 // AJAX failed, we have probably timed out of our session, force a reload
55 window.history.go(0);
56 }
57 };
58
59 YAHOO.util.Connect.asyncRequest('POST', 'index.php', callback, "module=Meetings&action=listbytype&button=Search&name_basic="+document.getElementById('dcSearch').value);
60
61 }
62 {/literal}
63 </script>
64 <form id="dcSearchForm">
65 <table class='dcSearch' cellpadding='0' cellspacing='0'>
66                         <tr>
67                         <td>
68                         <input type='text' id='dcSearch' name='dcSearch' value="{$DCSEARCH}">
69                         </td>
70                         <td>
71                         <input type='submit' name='submit' class='dcSubmit' value='Search Meetings' onclick="submitListViewDCMenu(this); return false;">
72                         </td>
73                         </tr>
74                 </table>
75 </form>         
76                 <table width='500' class='dcListView' cellpadding='0' cellspacing='0'>
77 <tr height='20'>
78                 {if $prerow}
79                         <th scope='col' nowrap="nowrap" width='1%' class="selectCol">
80                                 <div>
81                                 <input type='checkbox'  title="{sugar_translate label='LBL_SELECT_ALL_TITLE'}"  class='checkbox' name='massall' id='massall' value='' onclick='sListView.check_all(document.MassUpdate, "mass[]", this.checked);' />
82                                 {$selectLink}
83                                 </div>
84                         </th>
85                 {/if}
86                 {if $favorites}
87                 <th scope='col'>
88                                 &nbsp;
89                 </th>
90                 {/if}
91                 {if !empty($quickViewLinks)}
92                 <th scope='col' width='1%' style="padding: 0px;">&nbsp;</th>
93                 {/if}
94                 {counter start=0 name="colCounter" print=false assign="colCounter"}
95                 {foreach from=$displayColumns key=colHeader item=params}
96                         <th scope='col' width='{$params.width}%'>
97                                 <div style='white-space: normal;'width='100%' align='{$params.align|default:'left'}'>
98                 {if false}
99                     {if $params.url_sort}
100                         <a href='{$pageData.urls.orderBy}{$params.orderBy|default:$colHeader|lower}' class='listViewThLinkS1' title="{$arrowAlt}">
101                     {else}
102                         {if $params.orderBy|default:$colHeader|lower == $pageData.ordering.orderBy}
103                             <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' title="{$arrowAlt}">
104                         {else}
105                             <a href='javascript:sListView.order_checks("ASC", "{$params.orderBy|default:$colHeader|lower}" , "{$pageData.bean.moduleDir}2_{$pageData.bean.objectName|upper}_ORDER_BY");' class='listViewThLinkS1' title="{$arrowAlt}">
106                         {/if}
107                     {/if}
108                     {sugar_translate label=$params.label module=$pageData.bean.moduleDir}
109                                         &nbsp;&nbsp;
110                                         {if $params.orderBy|default:$colHeader|lower == $pageData.ordering.orderBy}
111                                                 {if $pageData.ordering.sortOrder == 'ASC'}
112                                                         {capture assign="imageName"}arrow_down.{$arrowExt}{/capture}
113                             {capture assign="alt_sort"}{sugar_translate label='LBL_ALT_SORT_DESC'}{/capture}
114                                                         {sugar_getimage name="$imageName" width="$arrowWidth" height="$arrowHeight" attr='align="absmiddle" border="0" ' alt="$alt_sort"}
115                                                 {else}
116                                                         {capture assign="imageName"}arrow_up.{$arrowExt}{/capture}
117                             {capture assign="alt_sort"}{sugar_translate label='LBL_ALT_SORT_ASC'}{/capture}
118                                                         {sugar_getimage name="$imageName" width="$arrowWidth" height="$arrowHeight" attr='align="absmiddle" border="0" ' alt="$alt_sort"}
119                                                 {/if}
120                                         {else}
121                                                 {capture assign="imageName"}arrow.{$arrowExt}{/capture}
122                         {capture assign="alt_sort"}{sugar_translate label='LBL_ALT_SORT'}{/capture}
123                                                 {sugar_getimage name="$imageName" width="$arrowWidth" height="$arrowHeight" attr='align="absmiddle" border="0" ' alt="$alt_sort"}
124                                         {/if}
125                     </a>
126                                 {else}
127                     {if !isset($params.noHeader) || $params.noHeader == false} 
128                                           {sugar_translate label=$params.label module=$pageData.bean.moduleDir}
129                     {/if}
130                                 {/if}
131                                 </div>
132                         </th>
133                         {counter name="colCounter"}
134                 {/foreach}
135         </tr>
136         
137         
138         {counter start=$pageData.offsets.current print=false assign="offset" name="offset"}     
139         {foreach name=rowIteration from=$data key=id item=rowData}
140             {counter name="offset" print=false}
141
142                 {if $smarty.foreach.rowIteration.iteration is odd}
143                         {assign var='_rowColor' value=$rowColor[0]}
144                 {else}
145                         {assign var='_rowColor' value=$rowColor[1]}
146                 {/if}
147                 <tr height='20' class='{$_rowColor}S1'>
148                         {if $prerow}
149                         <td width='1%' class='nowrap'>
150                          {if !$is_admin && is_admin_for_user && $rowData.IS_ADMIN==1}
151                                         <input type='checkbox' disabled="disabled" class='checkbox' value='{$rowData.ID}'>
152                          {else}
153                     <input onclick='sListView.check_item(this, document.MassUpdate)' type='checkbox' class='checkbox' name='mass[]' value='{$rowData.ID}'>               
154                          {/if}
155                         </td>
156                         {/if}
157                         {if $favorites}
158                                 <td>{$rowData.star}</td>
159                         {/if}
160                         {if !empty($quickViewLinks)}
161
162                         <td width='2%' nowrap>{if $pageData.access.edit}<a title='{$editLinkString}' id="dashedit-{$rowData.ID}" href="index.php?action=EditView&module={if $params.dynamic_module}{$rowData[$params.dynamic_module]}{else}{$pageData.bean.moduleDir}{/if}&record={$rowData[$params.parent_id]|default:$rowData.ID}&offset={$pageData.offsets.current+$smarty.foreach.rowIteration.iteration}&stamp={$pageData.stamp}&return_module=Home&return_action=index" title="{sugar_translate label="LBL_EDIT_INLINE"}">{sugar_getimage name="edit_inline.gif" attr='border="0" '}</a>{/if}</td>
163
164                         {/if}
165                         {counter start=0 name="colCounter" print=false assign="colCounter"}
166                         {foreach from=$displayColumns key=col item=params}
167                             {strip}
168                                 <td scope='row' align='{$params.align|default:'left'}' valign="top" {if ($params.type == 'teamset')}class="nowrap"{/if}>
169                                         {if $col == 'NAME' || $params.bold}<b>{/if}
170                                     {if $params.link && !$params.customCode}
171                                                 <{$pageData.tag.$id[$params.ACLTag]|default:$pageData.tag.$id.MAIN} href='index.php?action={$params.action|default:'DetailView'}&module={if $params.dynamic_module}{$rowData[$params.dynamic_module]}{else}{$params.module|default:$pageData.bean.moduleDir}{/if}&record={$rowData[$params.id]|default:$rowData.ID}&offset={$pageData.offsets.current+$smarty.foreach.rowIteration.iteration}&stamp={$pageData.stamp}'>
172                                         {/if}
173                                         {if $params.customCode}
174                                                 {sugar_evalcolumn_old var=$params.customCode rowData=$rowData}
175                                         {else}
176                        {sugar_field parentFieldArray=$rowData vardef=$params displayType=ListView field=$col}
177                                         {/if}
178                                         {if empty($rowData.$col) && empty($params.customCode)}&nbsp;{/if}
179                                         {if $params.link && !$params.customCode}
180                                                 </{$pageData.tag.$id[$params.ACLTag]|default:$pageData.tag.$id.MAIN}>
181                     {/if}
182                     {if $col == 'NAME' || $params.bold}</b>{/if}
183                                 </td>
184                                 {/strip}
185                                 {counter name="colCounter"}
186                         {/foreach}
187                 </tr>
188         {foreachelse}
189         <tr height='20' class='{$rowColor[0]}S1'>
190             <td colspan="{$colCount}">
191                 <em>{$APP.LBL_NO_DATA}</em>
192             </td>
193         </tr> 
194         {/foreach}
195                 </table>