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