Merge pull request #192 from lcdservices/master
[civicrm-core.git] / templates / CRM / Contact / Page / DashBoardDashlet.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.3 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2013 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
8 | |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
12 | |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
25 *}
26 {include file="CRM/common/dashboard.tpl"}
27 {include file="CRM/common/openFlashChart.tpl"}
28 {* Alerts for critical configuration settings. *}
29 {if ! $fromEmailOK || ! $ownerOrgOK || ! $defaultMailboxOK}
30 <div class="help">
31 <div class="finalconf-intro">
32 {ts}There are a few things to setup before using your site ...{/ts}
33 </div>
34 {if ! $ownerOrgOK}
35 <div class="finalconf-button">
36 <a href="{$fixOrgUrl}" id="fixOrgUrl" class="button"><span><div class="icon settings-icon"></div>{ts}Go{/ts}</span></a>
37 </div>
38 <div class="finalconf-itemdesc">{ts}Please enter your organization's name and primary address.{/ts}</div>
39 <h4 class="finalconf-item"><div class="icon alert-icon"></div> &nbsp;{ts}Organization Name{/ts}</h4>
40 <div style="clear:both"></div>
41 {/if}
42 {if ! $fromEmailOK}
43 <div class="finalconf-button">
44 <a href="{$fixEmailUrl}" id="fixOrgUrl" class="button"><span><div class="icon settings-icon"></div>{ts}Go{/ts}</span></a>
45 </div>
46 <div class="finalconf-itemdesc">{ts}Please enter a default FROM Email Address (for system-generated emails).{/ts}</div>
47 <h4 class="finalconf-item"><div class="icon alert-icon"></div> &nbsp;{ts}From Email Address{/ts}</h4>
48 <div style="clear:both"></div>
49 {/if}
50 {if ! $defaultMailboxOK}
51 <div class="finalconf-button">
52 <a href="{$fixDefaultMailbox}" id="fixDefaultMailbox" class="button"><span><div class="icon settings-icon"></div>{ts}Go{/ts}</span></a>
53 </div>
54 <div class="finalconf-itemdesc">{ts}Please configure a default mailbox for CiviMail.{/ts} (<a href="http://en.flossmanuals.net/civicrm/ch042_system-configuration/" title="{ts}opens online user guide in a new window{/ts}" target="_blank">{ts}learn more{/ts}</a>)</div>
55 <h4 class="finalconf-item"><div class="icon alert-icon"></div> &nbsp;{ts}Default CiviMail Mailbox{/ts}</h4>
56 <div style="clear:both"></div>
57 {/if}
58 </div>
59 {/if}
60 <div class="crm-submit-buttons">
61 <a href="#" id="crm-dashboard-configure" class="button show-add">
62 <span><div class="icon settings-icon"></div>{ts}Configure Your Dashboard{/ts}</span></a>
63
64 <a style="display:none;" href="{crmURL p="civicrm/dashboard" q="reset=1"}" class="button show-done" style="margin-left: 6px;">
65 <span><div class="icon check-icon"></div>{ts}Done{/ts}</span></a>
66
67 <a style="float:right;" href="{crmURL p="civicrm/dashboard" q="reset=1&resetCache=1"}" class="button show-refresh" style="margin-left: 6px;">
68 <span> <div class="icon refresh-icon"></div>{ts}Refresh Dashboard Data{/ts}</span></a>
69
70 </div>
71 <div class="clear"></div>
72 <div class="crm-block crm-content-block">
73 {* Welcome message appears when there are no active dashlets for the current user. *}
74 <div id="empty-message" class='hiddenElement'>
75 <div class="status">
76 <div class="font-size12pt bold">{ts}Welcome to your Home Dashboard{/ts}</div>
77 <div class="display-block">
78 {ts}Your dashboard provides a one-screen view of the data that's most important to you. Graphical or tabular data is pulled from the reports you select, and is displayed in 'dashlets' (sections of the dashboard).{/ts} {help id="id-dash_welcome" file="CRM/Contact/Page/Dashboard.hlp"}
79 </div>
80 </div>
81 </div>
82
83 <div id="configure-dashlet" class='hiddenElement'></div>
84 <div id="civicrm-dashboard">
85 {* You can put anything you like here. jQuery.dashboard() will remove it. *}
86 <noscript>{ts}Javascript must be enabled in your browser in order to use the dashboard features.{/ts}</noscript>
87 </div>
88 <div class="clear"></div>
89 {literal}
90 <script type="text/javascript">
91 cj(function($) {
92 $('#crm-dashboard-configure').click(function() {
93 $.ajax({
94 url: CRM.url('civicrm/dashlet', 'reset=1&snippet=1'),
95 success: function( content ) {
96 $("#civicrm-dashboard, #crm-dashboard-configure, .show-refresh, #empty-message").hide();
97 $('.show-done').show();
98 $("#configure-dashlet").show().html(content);
99 }
100 });
101 return false;
102 });
103 });
104 cj().crmAccordions();
105 </script>
106 {/literal}
107 </div>