Ver código fonte

Webpack essai

tags/0.1
Fab 3 anos atrás
pai
commit
4a053af06e
8 arquivos alterados com 82 adições e 185 exclusões
  1. +1
    -1
      Controller/Admin/AbstractCrudController.php
  2. +8
    -7
      Resources/assets/apps/backend-common/app.common.js
  3. +7
    -0
      Resources/assets/apps/backend-common/common.scss
  4. +1
    -1
      Resources/assets/apps/backend-common/utils/log.js
  5. +1
    -1
      Resources/assets/apps/form/app.form.js
  6. +2
    -2
      Resources/views/adminlte/block/menu.html.twig
  7. +57
    -0
      Resources/views/adminlte/block/navbar_header.html.twig
  8. +5
    -173
      Resources/views/adminlte/layout.html.twig

+ 1
- 1
Controller/Admin/AbstractCrudController.php Ver arquivo

@@ -34,7 +34,7 @@ abstract class AbstractCrudController extends EaAbstractCrudController
->overrideTemplates(
[
'layout' => '@LcSov/adminlte/layout.html.twig',
'main_menu' => '@LcSov/adminlte/menu.html.twig',
'main_menu' => '@LcSov/adminlte/block/menu.html.twig',
'crud/index' => '@LcSov/adminlte/crud/index.html.twig',
'crud/paginator' => '@LcSov/adminlte/crud/paginator.html.twig',
'crud/edit' => '@LcSov/adminlte/crud/edit.html.twig',

+ 8
- 7
Resources/assets/apps/backend-common/app.common.js Ver arquivo

@@ -1,16 +1,17 @@


const $ = require('jquery');
import 'jquery';
global.$ = global.jQuery = $;

require('adminlte-css') ;
require('adminlte-js') ;
require('fontawesome-css') ;
import 'adminltePlugin/bootstrap/js/bootstrap.min.js';
import './utils/log.js';
import './common.scss';
import 'adminlte-js' ;
import 'adminlte-plugin/bootstrap/js/bootstrap.min.js';
import log from './utils/log.js';

log('ncnnc');

$('#test22').modal('show');




//require('select2');

+ 7
- 0
Resources/assets/apps/backend-common/common.scss Ver arquivo

@@ -0,0 +1,7 @@

@import "adminlte-css";
@import "fontawesome-css";

body{
font-size: 0.9rem;
}

+ 1
- 1
Resources/assets/apps/backend-common/utils/log.js Ver arquivo

@@ -1,4 +1,4 @@
export function log(name) {
export default function log(name) {
try {
return console.log(name);
} catch (e) {

+ 1
- 1
Resources/assets/apps/form/app.form.js Ver arquivo

@@ -9,6 +9,6 @@

//import 'adminltePlugin/bootstrap/js/bootstrap.min.js';

$('#test22').modal('show');
//$('#test22').modal('show');

// start the Stimulus application

Resources/views/adminlte/menu.html.twig → Resources/views/adminlte/block/menu.html.twig Ver arquivo

@@ -6,7 +6,7 @@
{% endif %}
<span class="{{ item.cssClass }}">{{ item.label }}</span>
{% else %}
<a href="{{ item.linkUrl }}" class="nav-link {{ ea.mainMenu.isSelected(item) ? 'active' }} {{ item.cssClass }}"
<a href="{{ item.linkUrl }}" class="nav-link {{ ea.mainMenu.isSelected(item)? 'active' }} {{ ea.mainMenu.isExpanded(item) and is_sub_item == false ? 'active' }} {{ item.cssClass }}"
target="{{ item.linkTarget }}" rel="{{ item.linkRel }}" referrerpolicy="origin-when-cross-origin">
{% if item.icon is not empty %}
<i class="far fa-{{ item.icon }} nav-icon"></i>
@@ -43,6 +43,6 @@
{% endfor %}
{% endblock main_menu %}
</ul>
</div>
</nav>

{% block main_menu_after %}{% endblock %}

+ 57
- 0
Resources/views/adminlte/block/navbar_header.html.twig Ver arquivo

@@ -0,0 +1,57 @@
<nav class="main-header navbar navbar-expand navbar-white navbar-light">
<!-- Left navbar links -->
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
</li>
</ul>

<ul class="navbar-nav ml-auto">
<li class="nav-item">
{% block user_menu %}
<div class="btn-group">
<button class="btn btn-block dropdown-toggle" data-toggle="dropdown"
data-placement="bottom">
<i class="fa fa-user-alt"></i>
<span class="user-name">{{ ea.user is null ? 'user.anonymous'|trans(domain = 'EasyAdminBundle') : ea.userMenu.name }}</span>
{# <br /><small>
{% if is_granted('ROLE_SUPER_ADMIN') %}
<span class="mt-1 small text-muted">Superadmin</span>
{% elseif is_granted('ROLE_ADMIN') %}
<span class="mt-1 small text-muted">Admin</span>
{% else %}
<span class="mt-1 small text-muted">NC</span>
{% endif %}
</small> #}
</button>
{% if ea.userMenu.items|length > 0 %}
<div class="dropdown-menu">
{% for item in ea.userMenu.items %}
{% if item.isMenuSection %}
<div class="dropdown-divider"></div>
{% else %}
<a href="{{ item.linkUrl }}"
class="dropdown-item {{ item.cssClass }}"
target="{{ item.linkTarget }}" rel="{{ item.linkRel }}"
referrerpolicy="origin-when-cross-origin">
{% if item.icon is not empty %}
<i class="ta ta-{{ item.icon }}"></i>
{% endif %}
<span>{{ item.label }}</span>
</a>
{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
{% endblock user_menu %}
</li>
<!-- Messages Dropdown Menu -->
<li class="nav-item">
<a href="{{ path(homepage_route()) }}" class="btn btn-block btn-outline-success" target="_blank"
rel="noreferrer">
Afficher le site
</a>
</li>
</ul>
</nav>

+ 5
- 173
Resources/views/adminlte/layout.html.twig Ver arquivo

@@ -68,182 +68,14 @@

<div class="wrapper">
{% block wrapper %}

{# <header class="main-header">
{% block header %}
<nav class="navbar" role="navigation">
{% block header_navbar %}
<button id="navigation-toggler" type="button" aria-label="Toggle navigation">
<i class="fa fa-fw fa-bars"></i>
</button>
{% endblock header_navbar %}
</nav>

</header> #}


{#

<div>{{ ea.user is null ? 'user.anonymous'|trans(domain = 'EasyAdminBundle') : ea.userMenu.name }}</div>
{% if is_granted('ROLE_SUPER_ADMIN') %}
<div class="mt-1 small text-muted">Superadmin</div>
{% elseif is_granted('ROLE_ADMIN') %}
<div class="mt-1 small text-muted">Admin</div>
{% else %}
<div class="mt-1 small text-muted">NC</div>
{% endif %}
</div>
</a>
{% block user_menu %}
{% if ea.userMenu.items|length > 0 %}
<div class="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
{% for item in ea.userMenu.items %}
{% if item.isMenuSection %}
<hr class="m-0"/>
{% else %}
<a href="{{ item.linkUrl }}"
class="dropdown-item {{ item.cssClass }}"
target="{{ item.linkTarget }}" rel="{{ item.linkRel }}"
referrerpolicy="origin-when-cross-origin">
{% if item.icon is not empty %}
<i class="ta ta-{{ item.icon }}"></i>
{% endif %}
<span>{{ item.label }}</span>
</a>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% endblock user_menu %}

#}

<nav class="main-header navbar navbar-expand navbar-white navbar-light">
<!-- Left navbar links -->
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
</li>
<li class="nav-item d-none d-sm-inline-block">
<a href="index3.html" class="nav-link">Home</a>
</li>
<li class="nav-item d-none d-sm-inline-block">
<a href="#" class="nav-link">Contact</a>
</li>
</ul>

<!-- SEARCH FORM -->
<form class="form-inline ml-3">
<div class="input-group input-group-sm">
<input class="form-control form-control-navbar" type="search" placeholder="Search" aria-label="Search">
<div class="input-group-append">
<button class="btn btn-navbar" type="submit">
<i class="fas fa-search"></i>
</button>
</div>
</div>
</form>

<!-- Right navbar links -->
<ul class="navbar-nav ml-auto">
<!-- Messages Dropdown Menu -->
<li class="nav-item dropdown">
<a class="nav-link" data-toggle="dropdown" href="#">
<i class="far fa-comments"></i>
<span class="badge badge-danger navbar-badge">3</span>
</a>
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
<a href="#" class="dropdown-item">
<!-- Message Start -->
<div class="media">
<img src="dist/img/user1-128x128.jpg" alt="User Avatar" class="img-size-50 mr-3 img-circle">
<div class="media-body">
<h3 class="dropdown-item-title">
Brad Diesel
<span class="float-right text-sm text-danger"><i class="fas fa-star"></i></span>
</h3>
<p class="text-sm">Call me whenever you can...</p>
<p class="text-sm text-muted"><i class="far fa-clock mr-1"></i> 4 Hours Ago</p>
</div>
</div>
<!-- Message End -->
</a>
<div class="dropdown-divider"></div>
<a href="#" class="dropdown-item">
<!-- Message Start -->
<div class="media">
<img src="dist/img/user8-128x128.jpg" alt="User Avatar" class="img-size-50 img-circle mr-3">
<div class="media-body">
<h3 class="dropdown-item-title">
John Pierce
<span class="float-right text-sm text-muted"><i class="fas fa-star"></i></span>
</h3>
<p class="text-sm">I got your message bro</p>
<p class="text-sm text-muted"><i class="far fa-clock mr-1"></i> 4 Hours Ago</p>
</div>
</div>
<!-- Message End -->
</a>
<div class="dropdown-divider"></div>
<a href="#" class="dropdown-item">
<!-- Message Start -->
<div class="media">
<img src="dist/img/user3-128x128.jpg" alt="User Avatar" class="img-size-50 img-circle mr-3">
<div class="media-body">
<h3 class="dropdown-item-title">
Nora Silvester
<span class="float-right text-sm text-warning"><i class="fas fa-star"></i></span>
</h3>
<p class="text-sm">The subject goes here</p>
<p class="text-sm text-muted"><i class="far fa-clock mr-1"></i> 4 Hours Ago</p>
</div>
</div>
<!-- Message End -->
</a>
<div class="dropdown-divider"></div>
<a href="#" class="dropdown-item dropdown-footer">See All Messages</a>
</div>
</li>
<!-- Notifications Dropdown Menu -->
<li class="nav-item dropdown">
<a class="nav-link" data-toggle="dropdown" href="#">
<i class="far fa-bell"></i>
<span class="badge badge-warning navbar-badge">15</span>
</a>
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
<span class="dropdown-item dropdown-header">15 Notifications</span>
<div class="dropdown-divider"></div>
<a href="#" class="dropdown-item">
<i class="fas fa-envelope mr-2"></i> 4 new messages
<span class="float-right text-muted text-sm">3 mins</span>
</a>
<div class="dropdown-divider"></div>
<a href="#" class="dropdown-item">
<i class="fas fa-users mr-2"></i> 8 friend requests
<span class="float-right text-muted text-sm">12 hours</span>
</a>
<div class="dropdown-divider"></div>
<a href="#" class="dropdown-item">
<i class="fas fa-file mr-2"></i> 3 new reports
<span class="float-right text-muted text-sm">2 days</span>
</a>
<div class="dropdown-divider"></div>
<a href="#" class="dropdown-item dropdown-footer">See All Notifications</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" data-widget="control-sidebar" data-slide="true" href="#">
<i class="fas fa-th-large"></i>
</a>
</li>
</ul>
</nav>

{% block navbar_header %}
{{ include('@LcSov/adminlte/block/navbar_header.html.twig') }}
{% endblock %}

<aside class="main-sidebar sidebar-dark-primary elevation-4">
{% block sidebar %}
{% block header_logo %}
<a class="brand-link"
<a class="brand-link text-center"
title="{{ ea.dashboardTitle|striptags }}"
href="{{ path(ea.dashboardRouteName) }}">
{{ ea.dashboardTitle|raw }}
@@ -278,7 +110,7 @@
{{ ea.crud.helpMessage|e('html_attr') }}
</div>
{% endif %}
{% endblock %} #}
{% endblock %} #}
</div><!-- /.col -->
<div class="col-sm-6">
{% block page_actions_wrapper %}

Carregando…
Cancelar
Salvar