Merge pull request #2033 from JoeMurray/master
[civicrm-core.git] / templates / CRM / common / fatal.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.4 |
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 {* error.tpl: Display page for fatal errors. Provides complete HTML doc.*}
27 {if $config->userFramework != 'Joomla' and $config->userFramework != 'WordPress'}
28 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
29 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
30
31 <head>
32 <title>{$pageTitle}</title>
33 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
34 <base href="{$config->resourceBase}" />
35 <style type="text/css" media="screen">@import url({$config->resourceBase}css/civicrm.css);</style>
36 <style type="text/css" media="screen">@import url({$config->resourceBase}css/extras.css);</style>
37 </head>
38 <body>
39 <div id="crm-container" class="crm-container" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
40 {else}
41 <div id="crm-container" class="crm-container" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
42 <style type="text/css" media="screen">@import url({$config->resourceBase}css/civicrm.css);</style>
43 <style type="text/css" media="screen">@import url({$config->resourceBase}css/extras.css);</style>
44 {/if}
45 <div class="messages status no-popup"> <div class="icon red-icon alert-icon"></div>
46 <span class="status-fatal">{ts}Sorry but we are not able to provide this at the moment.{/ts}</span>
47 <div class="crm-section crm-error-message">{$message}</div>
48 {if $error.message && $message != $error.message}
49 <hr style="solid 1px" />
50 <div class="crm-section crm-error-message">{$error.message}</div>
51 {/if}
52 {if ($code OR $mysql_code OR $errorDetails) AND $config->debug}
53 <div class="crm-accordion-wrapper collapsed crm-fatal-error-details-block" onclick="toggle(this);";>
54 <div class="crm-accordion-header">
55 {ts}Error Details{/ts}
56 </div><!-- /.crm-accordion-header -->
57 <div class="crm-accordion-body">
58 {if $code}
59 <div class="crm-section">{ts}Error Code:{/ts} {$code}</div>
60 {/if}
61 {if $mysql_code}
62 <div class="crm-section">{ts}Database Error Code:{/ts} {$mysql_code}</div>
63 {/if}
64 {if $errorDetails}
65 <div class="crm-section">{ts}Additional Details:{/ts} {$errorDetails}</div>
66 {/if}
67 </div><!-- /.crm-accordion-body -->
68 </div><!-- /.crm-accordion-wrapper -->
69 {/if}
70 <p><a href="{$config->userFrameworkBaseURL}" title="{ts}Main Menu{/ts}">{ts}Return to home page.{/ts}</a></p>
71 </div>
72 </div> {* end crm-container div *}
73 {literal}
74 <script language="JavaScript">
75 function toggle( element ) {
76 var className = element.className;
77 if ( className == 'crm-accordion-wrapper collapsed crm-fatal-error-details-block') {
78 element.className = 'crm-accordion-wrapper crm-fatal-error-details-block';
79 } else {
80 element.className = 'crm-accordion-wrapper collapsed crm-fatal-error-details-block';
81 }
82 }
83 </script>
84 {/literal}
85 {if $config->userFramework != 'Joomla' and $config->userFramework != 'WordPress'}
86 </body>
87 </html>
88 {/if}