1
0
mirror of https://github.com/flarum/core.git synced 2025-10-10 22:44:25 +02:00

Build very rough HTML-only content

And redirect to the "no JS" mode if the JS app crashes on boot.

ClientView/ClientAction is all a bit of a mess and will need to be
radically cleaned up at some point...
This commit is contained in:
Toby Zerner
2015-08-06 12:21:11 +09:30
parent 80e13ae289
commit fa5c7cb123
9 changed files with 128 additions and 42 deletions

View File

@@ -237,10 +237,19 @@ class ClientView implements Renderable
] + $this->variables;
$view->bootstrappers = $this->bootstrappers;
$noJs = array_get($this->request->getQueryParams(), 'nojs');
$view->title = ($this->title ? $this->title . ' - ' : '') . $forum->data->attributes->title;
$view->forum = $forum->data;
$view->layout = app('view')->file($this->layout, ['forum' => $forum->data]);
$view->content = $this->content;
$view->layout = app('view')->file($this->layout, [
'forum' => $forum->data,
'content' => app('view')->file(__DIR__.'/../../views/content.blade.php', [
'content' => $this->content,
'noJs' => $noJs,
'forum' => $forum->data
])
]);
$view->noJs = $noJs;
$view->styles = [$this->assets->getCssFile()];
$view->scripts = [$this->assets->getJsFile(), $this->locale->getFile()];