Browse Source

Intégration Tabler

master
Guillaume 3 years ago
parent
commit
9e1736164b
4 changed files with 16 additions and 9 deletions
  1. +7
    -6
      src/Controller/Admin/DashboardController.php
  2. +1
    -1
      src/Controller/Admin/PageCrudController.php
  3. +2
    -2
      templates/base.html.twig
  4. +6
    -0
      webpack.config.js

+ 7
- 6
src/Controller/Admin/DashboardController.php View File

@@ -114,14 +114,15 @@ class DashboardController extends LcDashboardController
public function configureMenuItems(): iterable
{
$submenuUser = [
MenuItem::linkToCrud('Utilisateurs', 'fas fa-user', User::class),
MenuItem::linkToCrud('Groupes d\'utilisateurs', 'fas fa-users', GroupUser::class),
MenuItem::linkToCrud('Utilisateurs', '', User::class),
MenuItem::linkToCrud('Groupes d\'utilisateurs', '', GroupUser::class),
];

yield MenuItem::linkToDashboard('Tableau de bord', 'fa fa-home');
yield MenuItem::subMenu('Utilisateurs', 'fas fa-users')->setSubItems($submenuUser);
yield MenuItem::linkToCrud('Pages', 'fa fa-tags', Page::class);
yield MenuItem::linkToCrud('TVA', 'fa fa-user', TaxRate::class);
yield MenuItem::linkToDashboard('Tableau de bord', 'home');
yield MenuItem::subMenu('Utilisateurs', 'users')->setSubItems($submenuUser);
yield MenuItem::linkToCrud('Pages', 'tags', Page::class);
yield MenuItem::linkToCrud('TVA', 'user', TaxRate::class);

/*
MenuItem::section('Blog'),
MenuItem::linkToCrud('Categories', 'fa fa-tags', Category::class),

+ 1
- 1
src/Controller/Admin/PageCrudController.php View File

@@ -35,7 +35,7 @@ class PageCrudController extends AbstractCrudController
TextField::new('devAlias'),
ChoiceField::new('status')
->setChoices(['En ligne' => 1, 'Hors ligne' => 0])
->setFormTypeOption('expanded', true)
->setFormTypeOption('expanded', false)
->setFormTypeOption('multiple', false)
->setCustomOption('widget', false)
];

+ 2
- 2
templates/base.html.twig View File

@@ -28,7 +28,7 @@
<link rel="icon" type="image/png" href="{{ asset('assets/img/favicon.png') }}"/>

{% block stylesheets %}
{{ encore_entry_link_tags('backend-common') }}
{{ encore_entry_link_tags('tabler') }}
{% endblock %}
</head>
<body>
@@ -52,7 +52,7 @@
{% endblock %}

{% block javascripts %}
{{ encore_entry_script_tags('backend-common') }}
{{ encore_entry_script_tags('tabler') }}
{% endblock %}
</body>
</html>

+ 6
- 0
webpack.config.js View File

@@ -6,6 +6,8 @@ if (!Encore.isRuntimeEnvironmentConfigured()) {
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}

const path = require('path');

Encore
// directory where compiled assets will be stored
.setOutputPath('public/build/')
@@ -14,6 +16,10 @@ Encore
// only needed for CDN's or sub-directory deploy
//.setManifestKeyPrefix('build/')
.enableSassLoader()
.addAliases({
'core-js': path.resolve(__dirname, './node_modules/core-js')
})

/*
* ENTRY CONFIG
*

Loading…
Cancel
Save