mirror of
https://github.com/filp/whoops.git
synced 2026-09-20 06:38:39 +00:00
Start moving some stuff over to the new template layout
This commit is contained in:
@@ -127,10 +127,21 @@ class PrettyPageHandler extends Handler
|
||||
// Add extra entries list of data tables:
|
||||
$v->tables = array_merge($extraTables, $v->tables);
|
||||
|
||||
// Temp:
|
||||
$vars["e"] = array($helper, "escape");
|
||||
$vars["slug"] = array($helper, "slug");
|
||||
$vars["v"] = $v;
|
||||
$vars = array(
|
||||
// Backwards-compatibility:
|
||||
"v" => $v,
|
||||
|
||||
"page_title" => $this->getPageTitle(),
|
||||
|
||||
// Todo: asset compiler
|
||||
"stylesheet" => file_get_contents($cssFile),
|
||||
|
||||
// Template paths:
|
||||
"frames_list" => $this->getResource("views/frames_list.php"),
|
||||
|
||||
"slug" => array($helper, "slug"),
|
||||
"e" => array($helper, "escape")
|
||||
);
|
||||
|
||||
$helper->render($templateFile, $vars);
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php /* List file names & line numbers for all stack frames;
|
||||
clicking these links/buttons will display the code view
|
||||
for that particular frame */ ?>
|
||||
<?php foreach($v->frames as $i => $frame): ?>
|
||||
<div class="frame <?php echo ($i == 0 ? 'active' : '') ?>" id="frame-line-<?php echo $i ?>">
|
||||
<div class="frame-method-info">
|
||||
<span class="frame-index"><?php echo (count($v->frames) - $i - 1) ?>.</span>
|
||||
<span class="frame-class"><?php echo $e($frame->getClass() ?: '') ?></span>
|
||||
<span class="frame-function"><?php echo $e($frame->getFunction() ?: '') ?></span>
|
||||
</div>
|
||||
|
||||
<span class="frame-file">
|
||||
<?php echo ($frame->getFile(true) ?: '<#unknown>') ?><!--
|
||||
--><span class="frame-line"><?php echo (int) $frame->getLine() ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
@@ -10,9 +10,9 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><?php echo $e($v->title) ?></title>
|
||||
<title><?php echo $tpl->escape($page_title) ?></title>
|
||||
|
||||
<style><?php echo $v->pageStyle ?></style>
|
||||
<style><?php echo $stylesheet ?></style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
@@ -20,27 +20,9 @@
|
||||
<div class="stack-container">
|
||||
|
||||
<div class="frames-container cf <?php echo (!$v->hasFrames ? 'empty' : '') ?>">
|
||||
|
||||
<?php /* List file names & line numbers for all stack frames;
|
||||
clicking these links/buttons will display the code view
|
||||
for that particular frame */ ?>
|
||||
<?php foreach($v->frames as $i => $frame): ?>
|
||||
<div class="frame <?php echo ($i == 0 ? 'active' : '') ?>" id="frame-line-<?php echo $i ?>">
|
||||
<div class="frame-method-info">
|
||||
<span class="frame-index"><?php echo (count($v->frames) - $i - 1) ?>.</span>
|
||||
<span class="frame-class"><?php echo $e($frame->getClass() ?: '') ?></span>
|
||||
<span class="frame-function"><?php echo $e($frame->getFunction() ?: '') ?></span>
|
||||
</div>
|
||||
|
||||
<span class="frame-file">
|
||||
<?php echo ($frame->getFile(true) ?: '<#unknown>') ?><!--
|
||||
--><span class="frame-line"><?php echo (int) $frame->getLine() ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
|
||||
<?php $tpl->render($frames_list, array( "v" => $v, "slug" => $slug, "e" => $e)) ?>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="details-container cf">
|
||||
|
||||
<header>
|
||||
|
||||
Reference in New Issue
Block a user