a7d7cbf8b2c085595e06f3f8ba12f748c818ab7b
[civicrm-core.git] / templates / CRM / Contact / Page / DashBoardDashlet.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
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://book.civicrm.org/user/advanced-configuration/email-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 {$communityMessages}
61 <div class="crm-submit-buttons">
62 <a href="#" id="crm-dashboard-configure" class="crm-hover-button show-add">
63 <span class="icon settings-icon"></span> {ts}Configure Your Dashboard{/ts}
64 </a>
65
66 <a style="display:none;" href="{crmURL p="civicrm/dashboard" q="reset=1"}" class="button show-done" style="margin-left: 6px;">
67 <span><div class="icon check-icon"></div> {ts}Done{/ts}</span>
68 </a>
69
70 <a style="float:right;" href="{crmURL p="civicrm/dashboard" q="reset=1&resetCache=1"}" class="crm-hover-button show-refresh" style="margin-left: 6px;">
71 <span class="icon refresh-icon"></span> {ts}Refresh Dashboard Data{/ts}
72 </a>
73
74 </div>
75 <div class="clear"></div>
76 <div class="crm-block crm-content-block">
77 {* Welcome message appears when there are no active dashlets for the current user. *}
78 <div id="empty-message" class='hiddenElement'>
79 <div class="status">
80 <div class="font-size12pt bold">{ts}Welcome to your Home Dashboard{/ts}</div>
81 <div class="display-block">
82 {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"}
83 </div>
84 </div>
85 </div>
86
87 <div id="configure-dashlet" class='hiddenElement'></div>
88 <div id="civicrm-dashboard">
89 {* You can put anything you like here. jQuery.dashboard() will remove it. *}
90 <noscript>{ts}Javascript must be enabled in your browser in order to use the dashboard features.{/ts}</noscript>
91 </div>
92 <div class="clear"></div>
93 {literal}
94 <script type="text/javascript">
95 CRM.$(function($) {
96 $('#crm-dashboard-configure').click(function() {
97 $.ajax({
98 url: CRM.url('civicrm/dashlet', 'reset=1&snippet=1'),
99 success: function( content ) {
100 $("#civicrm-dashboard, #crm-dashboard-configure, .show-refresh, #empty-message").hide();
101 $('.show-done').show();
102 $("#configure-dashlet").show().html(content).trigger('crmLoad');
103 }
104 });
105 return false;
106 });
107 });
108 cj().crmAccordions();
109 </script>
110 {/literal}
111 </div>