35cdc0cf3a
Styles, scripts and page titles are no longer set from controllers level. Changed because it was breaking MVC pattern and led to spaghetti code. Also, optimized JS/CSS inclusions a bit.
24 lines
804 B
PHTML
24 lines
804 B
PHTML
<?php
|
|
LayoutHelper::setSubTitle('logs (' . $name . ')');
|
|
?>
|
|
|
|
<?php if (empty($this->context->transport->lines)): ?>
|
|
<p class="alert alert-warning">This log is empty. <a href="<?php echo \Chibi\UrlHelper::route('log', 'list') ?>">Go back</a></p>
|
|
<?php else: ?>
|
|
<?php
|
|
LayoutHelper::addStylesheet('logs.css');
|
|
LayoutHelper::addScript('logs.js');
|
|
?>
|
|
|
|
<form action="<?php echo \Chibi\UrlHelper::route('log', 'view', ['name' => $this->context->transport->name]) ?>" method="get">
|
|
Keep only lines that contain:
|
|
|
|
<input type="text" name="query" value="<?php echo $this->context->transport->filter ?>" placeholder="any text…"/>
|
|
</form>
|
|
|
|
<div class="paginator-content">
|
|
<pre><?php echo $this->context->transport->lines ?></pre>
|
|
</div>
|
|
|
|
<?php $this->renderFile('paginator') ?>
|
|
<?php endif ?>
|