Fix view paths

This commit is contained in:
Toby Zerner 2017-12-29 21:28:53 +10:30
parent 0525f467c7
commit 57a91c966d
5 changed files with 6 additions and 6 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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),

View File

@ -86,7 +86,7 @@ abstract class AbstractFrontend
*/
protected function getLayout()
{
return 'flarum.forum::'.$this->getName();
return 'flarum.forum::frontend.'.$this->getName();
}
/**

View File

@ -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;