CRM-14949 - Move more stuff into dynamic js tpl
[civicrm-core.git] / templates / CRM / common / fatal.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 {* 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 </head>
37 <body>
38 <div id="crm-container" class="crm-container" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
39 {else}
40 <div id="crm-container" class="crm-container" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
41 <style type="text/css" media="screen">@import url({$config->resourceBase}css/civicrm.css);</style>
42 {/if}
43 <div class="messages status no-popup"> <div class="icon red-icon alert-icon"></div>
44 <span class="status-fatal">{ts}Sorry but we are not able to provide this at the moment.{/ts}</span>
45 <div class="crm-section crm-error-message">{$message}</div>
46 {if $error.message && $message != $error.message}
47 <hr style="solid 1px" />
48 <div class="crm-section crm-error-message">{$error.message}</div>
49 {/if}
50 {if ($code OR $mysql_code OR $errorDetails) AND $config->debug}
51 <div class="crm-accordion-wrapper collapsed crm-fatal-error-details-block" onclick="toggle(this);";>
52 <div class="crm-accordion-header">
53 {ts}Error Details{/ts}
54 </div><!-- /.crm-accordion-header -->
55 <div class="crm-accordion-body">
56 {if $code}
57 <div class="crm-section">{ts}Error Code:{/ts} {$code}</div>
58 {/if}
59 {if $mysql_code}
60 <div class="crm-section">{ts}Database Error Code:{/ts} {$mysql_code}</div>
61 {/if}
62 {if $errorDetails}
63 <div class="crm-section">{ts}Additional Details:{/ts} {$errorDetails}</div>
64 {/if}
65 </div><!-- /.crm-accordion-body -->
66 </div><!-- /.crm-accordion-wrapper -->
67 {/if}
68 <p><a href="{$config->userFrameworkBaseURL}" title="{ts}Main Menu{/ts}">{ts}Return to home page.{/ts}</a></p>
69 </div>
70 </div> {* end crm-container div *}
71 {literal}
72 <script language="JavaScript">
73 function toggle( element ) {
74 var className = element.className;
75 if ( className == 'crm-accordion-wrapper collapsed crm-fatal-error-details-block') {
76 element.className = 'crm-accordion-wrapper crm-fatal-error-details-block';
77 } else {
78 element.className = 'crm-accordion-wrapper collapsed crm-fatal-error-details-block';
79 }
80 }
81 </script>
82 {/literal}
83 {if $config->userFramework != 'Joomla' and $config->userFramework != 'WordPress'}
84 </body>
85 </html>
86 {/if}