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