]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Home/Home.tpl
Release 6.1.4
[Github/sugarcrm.git] / modules / Home / Home.tpl
1 {*
2
3 /*********************************************************************************
4  * SugarCRM 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
39
40
41 *}
42 {literal}
43 <style>
44 .menu{
45         z-index:100;
46 }
47
48 .subDmenu{
49         z-index:100;
50 }
51 </style>
52 {/literal}
53
54 <!-- begin includes for overlib -->
55 <div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000"></div>
56 <script type="text/javascript" src="{sugar_getjspath file='include/javascript/sugar_grp_overlib.js'}"></script>
57 <!-- end includes for overlib -->
58
59 <script type="text/javascript">
60 var numPages = {$numPages};
61 var theme = '{$theme}';
62 var loadedPages = new Array();
63 var activePage = {$activePage};
64 loadedPages[0] = '{$loadedPage}';
65 current_user_id = '{$current_user}';
66 jsChartsArray = new Array();
67 var moduleName = 'Home';
68 </script>
69
70 <script type="text/javascript" src="{sugar_getjspath file='include/javascript/sugar_grp_yui_widgets.js'}"></script>
71 <script type="text/javascript" src="{sugar_getjspath file='include/javascript/dashlets.js'}"></script>
72 <script type="text/javascript" src='{sugar_getjspath file='include/JSON.js'}'></script>
73 <script type='text/javascript' src='{sugar_getjspath file='include/MySugar/javascript/MySugar.js'}'></script>
74 <link rel='stylesheet' href='{sugar_getjspath file='include/javascript/yui/build/assets/skins/sam/skin.css'}'>
75
76 <script type="text/javascript" src="{sugar_getjspath file='include/javascript/swfobject.js'}"></script>
77
78
79 <div id="pageContainer">
80         <div id="pageNum_{$activePage}_div">
81 <table width="100%" cellspacing="0" cellpadding="0" border="0" class="subpanelTabForm" style="border-top: 0px none; margin-bottom: 4px;">
82         <tr>
83                 {if $numCols > 2}
84                 <td>
85                 &nbsp;
86                 </td>
87         
88                 <td rowspan="3">
89                                 <img src='{sugar_getimagepath file='blank.gif'}' width='15' height='1' border='0'>
90                 </td>
91                 {/if}
92                 {if $numCols > 1}
93                 <td>
94                 &nbsp;
95                 </td>
96                 <td rowspan="3">
97                                 <img src='{sugar_getimagepath file='blank.gif'}' width='15' height='1' border='0'>
98                 </td>
99                 {/if}   
100                 <td align='right'>
101                         <input id="add_dashlets" class="button" type="button" value="{$lblAddDashlets}" onclick="return SUGAR.mySugar.showDashletsTree();"/>
102                         <a href='index.php?module=Administration&action=SupportPortal&view=documentation&version={$sugarVersion}&edition={$sugarFlavor}&lang={$currentLanguage}&help_module=Home&help_action=index&key={$serverUniqueKey}' class='utilsLink' target='_blank'>
103                                 <img src='{sugar_getimagepath file="help.gif"}' width='13' height='13' alt='{$lblLnkHelp}' border='0' align='absmiddle'>
104             </a>
105             <a href='index.php?module=Administration&action=SupportPortal&view=documentation&version={$sugarVersion}&edition={$sugarFlavor}&lang={$currentLanguage}&help_module=Home&help_action=index&key={$serverUniqueKey}' class='utilsLink' target='_blank'>
106                                 {$lblLnkHelp}
107                         </a>
108                 </td>
109         </tr>
110         <tr>
111                 {counter assign=hiddenCounter start=0 print=false}
112                 {foreach from=$columns key=colNum item=data}
113                 <td valign='top' width='{$data.width}'>
114                         <ul class='noBullet' id='col_{$activePage}_{$colNum}'>
115                                 <li id='page_{$activePage}_hidden{$hiddenCounter}b' style='height: 5px' class='noBullet'>&nbsp;&nbsp;&nbsp;</li>
116                         {foreach from=$data.dashlets key=id item=dashlet}               
117                                 <li class='noBullet' id='dashlet_{$id}'>
118                                         <div id='dashlet_entire_{$id}'>
119                                                 {$dashlet.script}
120                                                 {$dashlet.display}
121                                         </div>
122                                 </li>
123                                 {/foreach}
124                                 <li id='page_{$activePage}_hidden{$hiddenCounter}' style='height: 5px' class='noBullet'>&nbsp;&nbsp;&nbsp;</li>
125                         </ul>
126                 </td>
127                 {counter}
128                 {/foreach}
129         </tr>
130 </table>
131         </div>
132         
133         {foreach from=$divPages key=divPageIndex item=divPageNum}
134         <div id="pageNum_{$divPageNum}_div" style="display:none;">
135         </div>
136         {/foreach}
137
138         <div id="addPageDialog" style="display:none;">
139                 <div class="hd">Add Page</div>
140                 <div class="bd">
141                         <form method="POST" action="index.php?module=Home&action=newTab&to_pdf=1">
142                                 <label for="pageName">Page Name: </label><input type="textbox" name="pageName" /><br /><br />
143                                 <label for="numColumns">Number of Columns:</label>
144                                 <table align="center">
145                                         <tr>
146                                                 <td><input type="radio" name="numColumns" value="1" />1</td>
147                                                 <td><input type="radio" name="numColumns" value="2" checked />2</td>
148                                                 <td><input type="radio" name="numColumns" value="3" />3</td>
149                                         </tr>
150                                 </table>
151                         </form>
152                 </div>
153         </div>                          
154
155         <div id="changeLayoutDialog" style="display:none;">
156                 <div class="hd">Change Layout</div>
157                 <div class="bd">
158                         <form method="POST" action="index.php?module=Home&action=changeLayout&to_pdf=1">
159                                 <label for="numColumns">Number of Columns:</label>
160                                 <table align="center">
161                                         <tr>
162                                                 <td><input type="radio" name="numColumns" value="1" />1</td>
163                                                 <td><input type="radio" name="numColumns" value="2" checked />2</td>
164                                                 <td><input type="radio" name="numColumns" value="3" />3</td>
165                                         </tr>
166                                 </table>
167                                 <input type="hidden" name="changeLayoutParams" value="1" />
168                         </form>
169                 </div>
170         </div>
171         
172         <div id="dashletsDialog">
173                 <div class="hd"></div>  
174                 <div class="bd">
175                         <form></form>
176                 </div>
177         </div>
178                                 
179         
180 </div>
181
182 {if !$lock_homepage}
183 {literal}
184 <script type="text/javascript">
185 SUGAR.mySugar.maxCount =        {/literal}{$maxCount}{literal};
186 SUGAR.mySugar.homepage_dd = new Array();
187 SUGAR.mySugar.init = function () {
188         j = 0;
189         {/literal}
190         dashletIds = {$dashletIds};
191         {literal}
192         for(i in dashletIds) {
193                 SUGAR.mySugar.homepage_dd[j] = new ygDDList('dashlet_' + dashletIds[i]);
194                 SUGAR.mySugar.homepage_dd[j].setHandleElId('dashlet_header_' + dashletIds[i]);
195                 SUGAR.mySugar.homepage_dd[j].onMouseDown = SUGAR.mySugar.onDrag;  
196                 SUGAR.mySugar.homepage_dd[j].afterEndDrag = SUGAR.mySugar.onDrop;
197                 j++;
198         }
199         for(var wp = 0; wp <= {/literal}{$hiddenCounter}{literal}; wp++) {
200             SUGAR.mySugar.homepage_dd[j++] = new ygDDListBoundary('page_'+activePage+'_hidden' + wp);
201         }
202
203         YAHOO.util.DDM.mode = 1;
204
205         SUGAR.mySugar.renderAddPageDialog();
206         SUGAR.mySugar.renderDashletsTree();
207         SUGAR.mySugar.renderChangeLayoutDialog();
208 }
209
210 YAHOO.util.Event.addListener(window, 'load', SUGAR.mySugar.init);  
211
212 </script>
213 {/literal}
214 {/if}