Commit 384e365c authored by Nicolas Widart's avatar Nicolas Widart

Merge commit '8f1eb55f'

* commit '8f1eb55f':
  Squashed 'Modules/Dashboard/' changes from 32a9233..464aa5e
parents e14ceda8 8f1eb55f
<?php namespace Modules\Dashboard\Composers; <?php namespace Modules\Dashboard\Composers;
use Illuminate\View\View;
class SidebarViewComposer class SidebarViewComposer
{ {
public function compose($view) public function compose(View $view)
{ {
$view->items->put('dashboard', [ $view->items->put('dashboard', [
'weight' => 0, 'weight' => 0,
...@@ -12,4 +14,4 @@ class SidebarViewComposer ...@@ -12,4 +14,4 @@ class SidebarViewComposer
'title' => 'Dashboard', 'title' => 'Dashboard',
]); ]);
} }
} }
\ No newline at end of file
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
return [ return [
]; ];
\ No newline at end of file
...@@ -3,4 +3,4 @@ return [ ...@@ -3,4 +3,4 @@ return [
'dashboard' => [ 'dashboard' => [
'index' 'index'
] ]
]; ];
\ No newline at end of file
...@@ -13,8 +13,8 @@ class DashboardDatabaseSeeder extends Seeder { ...@@ -13,8 +13,8 @@ class DashboardDatabaseSeeder extends Seeder {
public function run() public function run()
{ {
Model::unguard(); Model::unguard();
// $this->call("OthersTableSeeder"); // $this->call("OthersTableSeeder");
} }
} }
\ No newline at end of file
...@@ -9,4 +9,4 @@ class DashboardController extends AdminBaseController ...@@ -9,4 +9,4 @@ class DashboardController extends AdminBaseController
{ {
return View::make('dashboard::admin.dashboard'); return View::make('dashboard::admin.dashboard');
} }
} }
\ No newline at end of file
...@@ -6,4 +6,3 @@ $router->group(['prefix' => LaravelLocalization::setLocale(), 'before' => 'Larav ...@@ -6,4 +6,3 @@ $router->group(['prefix' => LaravelLocalization::setLocale(), 'before' => 'Larav
$router->get('/', ['as' => 'dashboard.index', 'uses' => 'Admin\DashboardController@index']); $router->get('/', ['as' => 'dashboard.index', 'uses' => 'Admin\DashboardController@index']);
}); });
}); });
...@@ -45,4 +45,3 @@ class RouteServiceProvider extends ServiceProvider ...@@ -45,4 +45,3 @@ class RouteServiceProvider extends ServiceProvider
} }
} }
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
return [ return [
'welcome-message' => 'Welcome on your admin dashboard' 'welcome-message' => 'Welcome on your admin dashboard'
]; ];
\ No newline at end of file
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
return [ return [
'welcome-message' => 'Bienvenue sur votre dashboard' 'welcome-message' => 'Bienvenue sur votre dashboard'
]; ];
\ No newline at end of file
...@@ -16,4 +16,4 @@ ...@@ -16,4 +16,4 @@
<p>{{ trans('dashboard::dashboard.welcome-message') }}</p> <p>{{ trans('dashboard::dashboard.welcome-message') }}</p>
</div> </div>
</div> </div>
@stop @stop
\ No newline at end of file
<?php <?php namespace Modules\Dashboard\Tests;
use Cartalyst\Sentinel\Laravel\Facades\Sentinel; use Cartalyst\Sentinel\Laravel\Facades\Sentinel;
use Modules\Core\Tests\BaseTestCase;
class UrlTest extends TestCase class UrlTest extends BaseTestCase
{ {
/** @test */ /** @test */
public function testDashboardAccessible() public function testDashboardAccessible()
...@@ -10,10 +11,6 @@ class UrlTest extends TestCase ...@@ -10,10 +11,6 @@ class UrlTest extends TestCase
$user = Sentinel::findById(4); $user = Sentinel::findById(4);
Sentinel::login($user); Sentinel::login($user);
$crawler = $this->client->request('GET', '/' . Config::get('core::core.admin-prefix')); $this->checkResponseIsOkAndContains(['GET', '/' . Config::get('core::core.admin-prefix')], 'h1:contains("Dashboard")');
$this->assertTrue($this->client->getResponse()->isOk());
$this->assertCount(1, $crawler->filter('h1:contains("Dashboard")'));
} }
} }
<?php <?php
View::composer('core::partials.sidebar-nav', 'Modules\Dashboard\Composers\SidebarViewComposer'); View::composer('core::partials.sidebar-nav', 'Modules\Dashboard\Composers\SidebarViewComposer');
\ No newline at end of file
# Dashboard Module # Dashboard Module
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/3616f9d8-1e5c-46c6-9058-13e916851254/mini.png)](https://insight.sensiolabs.com/projects/3616f9d8-1e5c-46c6-9058-13e916851254) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/3616f9d8-1e5c-46c6-9058-13e916851254/mini.png)](https://insight.sensiolabs.com/projects/3616f9d8-1e5c-46c6-9058-13e916851254)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nWidart-Modules/Dashboard/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/nWidart-Modules/Dashboard/?branch=master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nWidart-Modules/Dashboard/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/nWidart-Modules/Dashboard/?branch=master)
\ No newline at end of file
...@@ -17,4 +17,4 @@ Lang::addNamespace('dashboard', __DIR__ . '/Resources/lang/'); ...@@ -17,4 +17,4 @@ Lang::addNamespace('dashboard', __DIR__ . '/Resources/lang/');
Config::addNamespace('dashboard', __DIR__ . '/Config/'); Config::addNamespace('dashboard', __DIR__ . '/Config/');
require __DIR__ . '/composers.php'; require __DIR__ . '/composers.php';
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment