summaryrefslogtreecommitdiff
path: root/system/views
diff options
context:
space:
mode:
Diffstat (limited to 'system/views')
-rw-r--r--system/views/kohana/template.php36
-rw-r--r--system/views/kohana_error_disabled.php17
-rw-r--r--system/views/kohana_error_page.php27
-rw-r--r--system/views/kohana_errors.css21
-rw-r--r--system/views/kohana_profiler.php37
-rw-r--r--system/views/kohana_profiler_table.css53
-rw-r--r--system/views/kohana_profiler_table.php25
7 files changed, 216 insertions, 0 deletions
diff --git a/system/views/kohana/template.php b/system/views/kohana/template.php
new file mode 100644
index 00000000..b090fd88
--- /dev/null
+++ b/system/views/kohana/template.php
@@ -0,0 +1,36 @@
+<?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title><?php echo html::specialchars($title) ?></title>
+
+ <style type="text/css">
+ html { background: #83c018 url(<?php echo url::base(FALSE) ?>kohana.png) 50% 0 no-repeat; }
+ body { width: 52em; margin: 200px auto 2em; font-size: 76%; font-family: Arial, sans-serif; color: #273907; line-height: 1.5; text-align: center; }
+ h1 { font-size: 3em; font-weight: normal; text-transform: uppercase; color: #fff; }
+ a { color: inherit; }
+ code { font-size: 1.3em; }
+ ul { list-style: none; padding: 2em 0; }
+ ul li { display: inline; padding-right: 1em; text-transform: uppercase; }
+ ul li a { padding: 0.5em 1em; background: #69ad0f; border: 1px solid #569f09; color: #fff; text-decoration: none; }
+ ul li a:hover { background: #569f09; }
+ .box { padding: 2em; background: #98cc2b; border: 1px solid #569f09; }
+ .copyright { font-size: 0.9em; text-transform: uppercase; color: #557d10; }
+ </style>
+
+</head>
+<body>
+
+ <h1><?php echo html::specialchars($title) ?></h1>
+ <?php echo $content ?>
+
+ <p class="copyright">
+ Rendered in {execution_time} seconds, using {memory_usage} of memory<br />
+ Copyright ©2007–2008 Kohana Team
+ </p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/system/views/kohana_error_disabled.php b/system/views/kohana_error_disabled.php
new file mode 100644
index 00000000..cd911328
--- /dev/null
+++ b/system/views/kohana_error_disabled.php
@@ -0,0 +1,17 @@
+<?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<style type="text/css">
+<?php include Kohana::find_file('views', 'kohana_errors', FALSE, 'css') ?>
+</style>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<title><?php echo $error ?></title>
+</head>
+<body>
+<div id="framework_error" style="width:24em;margin:50px auto;">
+<h3><?php echo html::specialchars($error) ?></h3>
+<p style="text-align:center"><?php echo $message ?></p>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/system/views/kohana_error_page.php b/system/views/kohana_error_page.php
new file mode 100644
index 00000000..944064cc
--- /dev/null
+++ b/system/views/kohana_error_page.php
@@ -0,0 +1,27 @@
+<?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<style type="text/css">
+<?php include Kohana::find_file('views', 'kohana_errors', FALSE, 'css') ?>
+</style>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<title><?php echo $error ?></title>
+<base href="http://php.net/" />
+</head>
+<body>
+<div id="framework_error" style="width:42em;margin:20px auto;">
+<h3><?php echo html::specialchars($error) ?></h3>
+<p><?php echo html::specialchars($description) ?></p>
+<?php if ( ! empty($line) AND ! empty($file)): ?>
+<p><?php echo Kohana::lang('core.error_file_line', $file, $line) ?></p>
+<?php endif ?>
+<p><code class="block"><?php echo $message ?></code></p>
+<?php if ( ! empty($trace)): ?>
+<h3><?php echo Kohana::lang('core.stack_trace') ?></h3>
+<?php echo $trace ?>
+<?php endif ?>
+<p class="stats"><?php echo Kohana::lang('core.stats_footer') ?></p>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/system/views/kohana_errors.css b/system/views/kohana_errors.css
new file mode 100644
index 00000000..1341f57d
--- /dev/null
+++ b/system/views/kohana_errors.css
@@ -0,0 +1,21 @@
+div#framework_error { background:#fff; border:solid 1px #ccc; font-family:sans-serif; color:#111; font-size:14px; line-height:130%; }
+div#framework_error h3 { color:#fff; font-size:16px; padding:8px 6px; margin:0 0 8px; background:#f15a00; text-align:center; }
+div#framework_error a { color:#228; text-decoration:none; }
+div#framework_error a:hover { text-decoration:underline; }
+div#framework_error strong { color:#900; }
+div#framework_error p { margin:0; padding:4px 6px 10px; }
+div#framework_error tt,
+div#framework_error pre,
+div#framework_error code { font-family:monospace; padding:2px 4px; font-size:12px; color:#333;
+ white-space:pre-wrap; /* CSS 2.1 */
+ white-space:-moz-pre-wrap; /* For Mozilla */
+ word-wrap:break-word; /* For IE5.5+ */
+}
+div#framework_error tt { font-style:italic; }
+div#framework_error tt:before { content:">"; color:#aaa; }
+div#framework_error code tt:before { content:""; }
+div#framework_error pre,
+div#framework_error code { background:#eaeee5; border:solid 0 #D6D8D1; border-width:0 1px 1px 0; }
+div#framework_error .block { display:block; text-align:left; }
+div#framework_error .stats { padding:4px; background: #eee; border-top:solid 1px #ccc; text-align:center; font-size:10px; color:#888; }
+div#framework_error .backtrace { margin:0; padding:0 6px; list-style:none; line-height:12px; } \ No newline at end of file
diff --git a/system/views/kohana_profiler.php b/system/views/kohana_profiler.php
new file mode 100644
index 00000000..da77a669
--- /dev/null
+++ b/system/views/kohana_profiler.php
@@ -0,0 +1,37 @@
+<?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
+<style type="text/css">
+#kohana-profiler
+{
+ font-family: Monaco, 'Courier New';
+ background-color: #F8FFF8;
+ margin-top: 20px;
+ clear: both;
+ padding: 10px 10px 0;
+ border: 1px solid #E5EFF8;
+ text-align: left;
+}
+#kohana-profiler pre
+{
+ margin: 0;
+ font: inherit;
+}
+#kohana-profiler .kp-meta
+{
+ margin: 0 0 10px;
+ padding: 4px;
+ background: #FFF;
+ border: 1px solid #E5EFF8;
+ color: #A6B0B8;
+ text-align: center;
+}
+<?php echo $styles ?>
+</style>
+<div id="kohana-profiler">
+<?php
+foreach ($profiles as $profile)
+{
+ echo $profile->render();
+}
+?>
+<p class="kp-meta">Profiler executed in <?php echo number_format($execution_time, 3) ?>s</p>
+</div> \ No newline at end of file
diff --git a/system/views/kohana_profiler_table.css b/system/views/kohana_profiler_table.css
new file mode 100644
index 00000000..6e7601c9
--- /dev/null
+++ b/system/views/kohana_profiler_table.css
@@ -0,0 +1,53 @@
+#kohana-profiler .kp-table
+{
+ font-size: 1.0em;
+ color: #4D6171;
+ width: 100%;
+ border-collapse: collapse;
+ border-top: 1px solid #E5EFF8;
+ border-right: 1px solid #E5EFF8;
+ border-left: 1px solid #E5EFF8;
+ margin-bottom: 10px;
+}
+#kohana-profiler .kp-table td
+{
+ background-color: #FFFFFF;
+ border-bottom: 1px solid #E5EFF8;
+ padding: 3px;
+ vertical-align: top;
+}
+#kohana-profiler .kp-table .kp-title td
+{
+ font-weight: bold;
+ background-color: inherit;
+}
+#kohana-profiler .kp-table .kp-altrow td
+{
+ background-color: #F7FBFF;
+}
+#kohana-profiler .kp-table .kp-totalrow td
+{
+ background-color: #FAFAFA;
+ border-top: 1px solid #D2DCE5;
+ font-weight: bold;
+}
+#kohana-profiler .kp-table .kp-column
+{
+ width: 100px;
+ border-left: 1px solid #E5EFF8;
+ text-align: center;
+}
+#kohana-profiler .kp-table .kp-data, #kohana-profiler .kp-table .kp-name
+{
+ background-color: #FAFAFB;
+ vertical-align: top;
+}
+#kohana-profiler .kp-table .kp-name
+{
+ width: 200px;
+ border-right: 1px solid #E5EFF8;
+}
+#kohana-profiler .kp-table .kp-altrow .kp-data, #kohana-profiler .kp-table .kp-altrow .kp-name
+{
+ background-color: #F6F8FB;
+} \ No newline at end of file
diff --git a/system/views/kohana_profiler_table.php b/system/views/kohana_profiler_table.php
new file mode 100644
index 00000000..b6b46530
--- /dev/null
+++ b/system/views/kohana_profiler_table.php
@@ -0,0 +1,25 @@
+<?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
+<table class="kp-table">
+<?php
+foreach ($rows as $row):
+
+$class = empty($row['class']) ? '' : ' class="'.$row['class'].'"';
+$style = empty($row['style']) ? '' : ' style="'.$row['style'].'"';
+?>
+ <tr<?php echo $class; echo $style; ?>>
+ <?php
+ foreach ($columns as $index => $column)
+ {
+ $class = empty($column['class']) ? '' : ' class="'.$column['class'].'"';
+ $style = empty($column['style']) ? '' : ' style="'.$column['style'].'"';
+ $value = $row['data'][$index];
+ $value = (is_array($value) OR is_object($value)) ? '<pre>'.html::specialchars(print_r($value, TRUE)).'</pre>' : html::specialchars($value);
+ echo '<td', $style, $class, '>', $value, '</td>';
+ }
+ ?>
+ </tr>
+<?php
+
+endforeach;
+?>
+</table> \ No newline at end of file