This repository has been archived on 2025-02-26. You can view files and clone it, but cannot push or open issues or pull requests.
szurubooru/src/Views/log-view.phtml
Marcin Kurczewski 35cdc0cf3a Refactored scripts and stylesheets
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.
2014-02-01 11:24:03 +01:00

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&hellip;"/>
</form>
<div class="paginator-content">
<pre><?php echo $this->context->transport->lines ?></pre>
</div>
<?php $this->renderFile('paginator') ?>
<?php endif ?>