Kaynağa Gözat

Intégration Tabler

master
Guillaume 3 yıl önce
ebeveyn
işleme
9e1736164b
4 değiştirilmiş dosya ile 16 ekleme ve 9 silme
  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 Dosyayı Görüntüle

public function configureMenuItems(): iterable public function configureMenuItems(): iterable
{ {
$submenuUser = [ $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::section('Blog'),
MenuItem::linkToCrud('Categories', 'fa fa-tags', Category::class), MenuItem::linkToCrud('Categories', 'fa fa-tags', Category::class),

+ 1
- 1
src/Controller/Admin/PageCrudController.php Dosyayı Görüntüle

TextField::new('devAlias'), TextField::new('devAlias'),
ChoiceField::new('status') ChoiceField::new('status')
->setChoices(['En ligne' => 1, 'Hors ligne' => 0]) ->setChoices(['En ligne' => 1, 'Hors ligne' => 0])
->setFormTypeOption('expanded', true)
->setFormTypeOption('expanded', false)
->setFormTypeOption('multiple', false) ->setFormTypeOption('multiple', false)
->setCustomOption('widget', false) ->setCustomOption('widget', false)
]; ];

+ 2
- 2
templates/base.html.twig Dosyayı Görüntüle

<link rel="icon" type="image/png" href="{{ asset('assets/img/favicon.png') }}"/> <link rel="icon" type="image/png" href="{{ asset('assets/img/favicon.png') }}"/>


{% block stylesheets %} {% block stylesheets %}
{{ encore_entry_link_tags('backend-common') }}
{{ encore_entry_link_tags('tabler') }}
{% endblock %} {% endblock %}
</head> </head>
<body> <body>
{% endblock %} {% endblock %}


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

+ 6
- 0
webpack.config.js Dosyayı Görüntüle

Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev'); Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
} }


const path = require('path');

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

/* /*
* ENTRY CONFIG * ENTRY CONFIG
* *

Yükleniyor…
İptal
Kaydet