From 57a91c966d0a2db8df7d871b11052454ca78e3db Mon Sep 17 00:00:00 2001 From: Toby Zerner <toby.zerner@gmail.com> Date: Fri, 29 Dec 2017 21:28:53 +1030 Subject: [PATCH] Fix view paths --- src/Forum/Controller/DiscussionController.php | 2 +- src/Forum/Controller/IndexController.php | 2 +- src/Forum/ForumServiceProvider.php | 2 +- src/Frontend/AbstractFrontend.php | 2 +- src/Frontend/FrontendView.php | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Forum/Controller/DiscussionController.php b/src/Forum/Controller/DiscussionController.php index 1c16d4669..d39ec77c7 100644 --- a/src/Forum/Controller/DiscussionController.php +++ b/src/Forum/Controller/DiscussionController.php @@ -87,7 +87,7 @@ class DiscussionController extends FrontendController $view->title = $document->data->attributes->title; $view->document = $document; - $view->content = app('view')->make('flarum.forum::content.discussion', compact('document', 'page', 'getResource', 'posts', 'url')); + $view->content = app('view')->make('flarum.forum::frontend.content.discussion', compact('document', 'page', 'getResource', 'posts', 'url')); return $view; } diff --git a/src/Forum/Controller/IndexController.php b/src/Forum/Controller/IndexController.php index 62701be96..028b716e7 100644 --- a/src/Forum/Controller/IndexController.php +++ b/src/Forum/Controller/IndexController.php @@ -68,7 +68,7 @@ class IndexController extends FrontendController $document = $this->getDocument($request->getAttribute('actor'), $params); $view->document = $document; - $view->content = app('view')->make('flarum.forum::content.index', compact('document', 'page', 'forum')); + $view->content = app('view')->make('flarum.forum::frontend.content.index', compact('document', 'page', 'forum')); return $view; } diff --git a/src/Forum/ForumServiceProvider.php b/src/Forum/ForumServiceProvider.php index f0a68d342..92f5578fc 100644 --- a/src/Forum/ForumServiceProvider.php +++ b/src/Forum/ForumServiceProvider.php @@ -77,7 +77,7 @@ class ForumServiceProvider extends AbstractServiceProvider { $this->populateRoutes($this->app->make('flarum.forum.routes')); - $this->loadViewsFrom(__DIR__.'/../../views/frontend', 'flarum.forum'); + $this->loadViewsFrom(__DIR__.'/../../views', 'flarum.forum'); $this->app->make('view')->share([ 'translator' => $this->app->make(TranslatorInterface::class), diff --git a/src/Frontend/AbstractFrontend.php b/src/Frontend/AbstractFrontend.php index 94c480a9c..b20eaf806 100644 --- a/src/Frontend/AbstractFrontend.php +++ b/src/Frontend/AbstractFrontend.php @@ -86,7 +86,7 @@ abstract class AbstractFrontend */ protected function getLayout() { - return 'flarum.forum::'.$this->getName(); + return 'flarum.forum::frontend.'.$this->getName(); } /** diff --git a/src/Frontend/FrontendView.php b/src/Frontend/FrontendView.php index 05bd9f3e9..587850f8e 100644 --- a/src/Frontend/FrontendView.php +++ b/src/Frontend/FrontendView.php @@ -287,7 +287,7 @@ class FrontendView $this->view->share('forum', array_get($forum, 'data')); $this->view->share('debug', $this->app->inDebugMode()); - $view = $this->view->make('flarum.forum::app'); + $view = $this->view->make('flarum.forum::frontend.app'); $view->title = $this->buildTitle(array_get($forum, 'data.attributes.title')); $view->description = $this->description ?: array_get($forum, 'data.attributes.description'); @@ -345,7 +345,7 @@ class FrontendView protected function buildContent() { - $view = $this->view->make('flarum.forum::content'); + $view = $this->view->make('flarum.forum::frontend.content'); $view->content = $this->content;