Browse Source

AdminLte intégration

tags/0.1
Fab 3 years ago
parent
commit
0e849432d2
4 changed files with 30 additions and 25 deletions
  1. +2
    -3
      Controller/Admin/AbstractCrudController.php
  2. +10
    -8
      Resources/assets/app/adminlte/common/scss/form/_footer.scss
  3. +1
    -0
      Resources/views/adminlte/crud/_form.html.twig
  4. +17
    -14
      Resources/views/adminlte/layout.html.twig

+ 2
- 3
Controller/Admin/AbstractCrudController.php View File

'label' => false, 'label' => false,
], ],
Action::DELETE => [ Action::DELETE => [
'class' => 'btn btn-sm btn-default',
'class' => 'btn btn-sm btn-default action-delete',
'icon' => 'trash', 'icon' => 'trash',
'label' => false, 'label' => false,
], ],
], ],
Action::DELETE => [ Action::DELETE => [
'icon' => 'trash', 'icon' => 'trash',
'class' => 'btn btn-link text-danger',
'class' => 'btn btn-outline-danger action-delete',
], ],
Action::SAVE_AND_RETURN => $actionSaveAndReturn, Action::SAVE_AND_RETURN => $actionSaveAndReturn,
Action::INDEX=>$actionIndex Action::INDEX=>$actionIndex
$actions->add(Crud::PAGE_EDIT, Action::INDEX); $actions->add(Crud::PAGE_EDIT, Action::INDEX);
$actions->add(Crud::PAGE_EDIT, Action::DELETE); $actions->add(Crud::PAGE_EDIT, Action::DELETE);
$actions->add(Crud::PAGE_NEW, Action::INDEX); $actions->add(Crud::PAGE_NEW, Action::INDEX);
$actions->add(Crud::PAGE_NEW, Action::DELETE);


$actions->reorder(Crud::PAGE_EDIT, [Action::INDEX, Action::SAVE_AND_RETURN, Action::SAVE_AND_CONTINUE]); $actions->reorder(Crud::PAGE_EDIT, [Action::INDEX, Action::SAVE_AND_RETURN, Action::SAVE_AND_CONTINUE]);
$actions->reorder(Crud::PAGE_NEW, [Action::INDEX, Action::SAVE_AND_RETURN, Action::SAVE_AND_ADD_ANOTHER]); $actions->reorder(Crud::PAGE_NEW, [Action::INDEX, Action::SAVE_AND_RETURN, Action::SAVE_AND_ADD_ANOTHER]);

+ 10
- 8
Resources/assets/app/adminlte/common/scss/form/_footer.scss View File



section.content{position: relative;}
.content-wrapper > section.content {
position: relative;
padding-bottom: 20px;
}


body.sidebar-collapse:not(.sidebar-mini-xs):not(.sidebar-mini-md):not(.sidebar-mini) { body.sidebar-collapse:not(.sidebar-mini-xs):not(.sidebar-mini-md):not(.sidebar-mini) {
.form-footer { .form-footer {
} }




body:not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav), .sidebar-mini-md, .sidebar-mini-xs {
body:not(.sidebar-mini-md):not(.sidebar-mini-xs):not(.layout-top-nav), .sidebar-mini-md, .sidebar-mini-xs {
.form-footer { .form-footer {
@include media-breakpoint-up(md) { @include media-breakpoint-up(md) {
@include transition(margin-left $transition-speed $transition-fn); @include transition(margin-left $transition-speed $transition-fn);
} }


// Sidebar Mini Breakpoints // Sidebar Mini Breakpoints
.sidebar-mini, .sidebar-mini-md, .sidebar-mini-xs{
.sidebar-mini, .sidebar-mini-md, .sidebar-mini-xs {
// When the sidebar is collapsed... // When the sidebar is collapsed...
&.sidebar-collapse { &.sidebar-collapse {
// Apply the new margins to the main content and footer // Apply the new margins to the main content and footer
.form-footer
{
.form-footer {
margin-left: $sidebar-mini-width !important; margin-left: $sidebar-mini-width !important;
} }
} }
background-color: #fff; background-color: #fff;
border-top: 1px solid #dee2e6; border-top: 1px solid #dee2e6;
color: #869099; color: #869099;
padding: 1rem;
padding: 10px;


.btn-list{
.float-right, .float-sm-right{
.btn-list {
.float-right, .float-sm-right {
margin-left: 10px; margin-left: 10px;
} }
} }

+ 1
- 0
Resources/views/adminlte/crud/_form.html.twig View File

{% endblock form %} {% endblock form %}
</div> </div>
</div> </div>
<div class="clearfix"></div>
</div> </div>


{% block form_footer %} {% block form_footer %}

+ 17
- 14
Resources/views/adminlte/layout.html.twig View File

<link rel="stylesheet" href="{{ asset('bundles/easyadmin/app.css') }}"> <link rel="stylesheet" href="{{ asset('bundles/easyadmin/app.css') }}">
{% endblock %} #} {% endblock %} #}


<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&amp;display=fallback">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&amp;display=fallback">


{% block configured_stylesheets %} {% block configured_stylesheets %}
{% for css_asset in ea.assets.cssFiles ?? [] %} {% for css_asset in ea.assets.cssFiles ?? [] %}
</div> </div>
</section> </section>


{% block content_footer_wrapper %}
{% set content_footer = block('content_footer') is defined ? block('content_footer') : '' %}
{% if content_footer is not empty %}
<footer class="footer footer-transparent d-print-none">
<div class="container">
<div class="row text-center align-items-center flex-row-reverse">
{{ content_footer }}

</div>
</div>
</footer>
{% endif %}
{% endblock %}


{% endblock %} {% endblock %}
</div> </div>

{% block footer %}
{% set content_footer = block('content_footer') is defined ? block('content_footer') : '' %}

<footer class="main-footer">
<div class="float-right d-none d-sm-block">
<b>SovBundle Version</b> 1.0
</div>
<strong>Copyright © {{ 'now'|date('Y') }} <a href="http://laclic.fr">La Clic</a>.</strong> All
rights
reserved.
</footer>
{% endblock %}


{% endblock wrapper %} {% endblock wrapper %}
</div> </div>
{% endblock wrapper_wrapper %} {% endblock wrapper_wrapper %}

Loading…
Cancel
Save