improve responsive design
This commit is contained in:
parent
a2d9926dbe
commit
0e29ac95ce
|
@ -14,6 +14,16 @@ $pagination-active-bg: #343a40;
|
|||
@import "~bootstrap/scss/bootstrap.scss";
|
||||
@import "~@fortawesome/fontawesome-free/css/all.css";
|
||||
|
||||
@for $i from 1 through 100 {
|
||||
.miw-#{$i*5} {
|
||||
min-width: $i * 5px;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
#logo {
|
||||
width: 30px;
|
||||
}
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
<table class="table" data-table-fixed>
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th class="col-10">{{ 'Username'|trans }}</th>
|
||||
<th class="col-2 text-right">{{ 'Actions'|trans }}</th>
|
||||
<th class="col-10 miw-200">{{ 'Username'|trans }}</th>
|
||||
<th class="col-2 miw-100 text-right">{{ 'Actions'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -36,14 +36,14 @@
|
|||
{% set show = path('admin_user_show', {entity: item.id}) %}
|
||||
|
||||
<tr data-dblclick="{{ edit }}">
|
||||
<td class="col-10">
|
||||
<td class="col-10 miw-200">
|
||||
<a href="{{ show }}" class="font-weight-bold text-body d-block">
|
||||
{{ item.displayName }}
|
||||
</a>
|
||||
|
||||
{{ item.email }}
|
||||
</td>
|
||||
<td class="col-2 text-right">
|
||||
<td class="col-2 miw-100 text-right">
|
||||
<a href="{{ edit }}" class="btn btn-sm btn-primary mr-1">
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
|
|
|
@ -22,58 +22,60 @@
|
|||
{{ knp_pagination_render(pager) }}
|
||||
</div>
|
||||
|
||||
<table class="table" data-table-fixed>
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th class="col-6">Titre</th>
|
||||
<th class="col-4">Articles</th>
|
||||
<th class="col-2 text-right">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in pager %}
|
||||
{% set edit = path('admin_blog_category_edit', {entity: item.id}) %}
|
||||
{% set show = path('admin_blog_category_show', {entity: item.id}) %}
|
||||
|
||||
<tr data-dblclick="{{ edit }}">
|
||||
<td class="col-6">
|
||||
<a href="{{ show }}" class="font-weight-bold text-body d-block">
|
||||
{{ item.title }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="col-4">
|
||||
<a href="" class="btn btn-sm btn-light">
|
||||
{% set postsCount = item.posts|length %}
|
||||
|
||||
<span class="font-weight-bold">{{ postsCount }}</span> {{ postsCount < 2 ? 'article' : 'articles' }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="col-2 text-right">
|
||||
<a href="{{ edit }}" class="btn btn-sm btn-primary mr-1">
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
<button type="submit" form="form-delete-{{ item.id }}" class="btn btn-sm btn-danger">
|
||||
<span class="fa fa-trash"></span>
|
||||
</button>
|
||||
|
||||
<form method="post" action="{{ path('admin_blog_category_delete', {entity: item.id}) }}" id="form-delete-{{ item.id }}" data-form-confirm>
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ item.id) }}">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<div class="table-responsive">
|
||||
<table class="table" data-table-fixed>
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<td class="col-12 text-center p-4 text-black-50">
|
||||
<div class="display-1">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<div class="display-5 mt-3">
|
||||
Aucun résultat
|
||||
</div>
|
||||
</td>
|
||||
<th class="col-6 miw-200">Titre</th>
|
||||
<th class="col-4 miw-150">Articles</th>
|
||||
<th class="col-2 miw-100 text-right">Actions</th>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in pager %}
|
||||
{% set edit = path('admin_blog_category_edit', {entity: item.id}) %}
|
||||
{% set show = path('admin_blog_category_show', {entity: item.id}) %}
|
||||
|
||||
<tr data-dblclick="{{ edit }}">
|
||||
<td class="col-6 miw-200">
|
||||
<a href="{{ show }}" class="font-weight-bold text-body d-block">
|
||||
{{ item.title }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="col-4 miw-150">
|
||||
<a href="" class="btn btn-sm btn-light">
|
||||
{% set postsCount = item.posts|length %}
|
||||
|
||||
<span class="font-weight-bold">{{ postsCount }}</span> {{ postsCount < 2 ? 'article' : 'articles' }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="col-2 miw-100 text-right">
|
||||
<a href="{{ edit }}" class="btn btn-sm btn-primary mr-1">
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
<button type="submit" form="form-delete-{{ item.id }}" class="btn btn-sm btn-danger">
|
||||
<span class="fa fa-trash"></span>
|
||||
</button>
|
||||
|
||||
<form method="post" action="{{ path('admin_blog_category_delete', {entity: item.id}) }}" id="form-delete-{{ item.id }}" data-form-confirm>
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ item.id) }}">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="col-12 text-center p-4 text-black-50">
|
||||
<div class="display-1">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<div class="display-5 mt-3">
|
||||
Aucun résultat
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -22,72 +22,74 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table" data-table-fixed>
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th class="col-6">Auteur</th>
|
||||
<th class="col-2">Date</th>
|
||||
<th class="col-1">Statut</th>
|
||||
<th class="col-3 text-right">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in pager %}
|
||||
{% set edit = path('admin_blog_comment_edit', {entity: item.id}) %}
|
||||
{% set show = path('admin_blog_comment_show', {entity: item.id}) %}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table" data-table-fixed>
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<td class="col-6">
|
||||
<a href="{{ show }}" class="font-weight-bold text-body d-block">
|
||||
{{ item.author }}
|
||||
</a>
|
||||
<th class="col-6 miw-300">Auteur</th>
|
||||
<th class="col-2 miw-200">Date</th>
|
||||
<th class="col-1 miw-100">Statut</th>
|
||||
<th class="col-3 miw-100 text-right">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in pager %}
|
||||
{% set edit = path('admin_blog_comment_edit', {entity: item.id}) %}
|
||||
{% set show = path('admin_blog_comment_show', {entity: item.id}) %}
|
||||
|
||||
Dans <a href="{{ path('admin_blog_post_show', {entity: item.post.id}) }}">{{ item.post.title }}</a>
|
||||
|
||||
{% if item.parentComment %}
|
||||
en réponse à
|
||||
<a href="{{ path('admin_blog_comment_show', {entity: item.parentComment.id}) }}">
|
||||
{{ item.parentComment }}
|
||||
<tr>
|
||||
<td class="col-6 miw-300">
|
||||
<a href="{{ show }}" class="font-weight-bold text-body d-block">
|
||||
{{ item.author }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="col-2">
|
||||
<span class="btn btn-sm btn-light">
|
||||
<span class="fa fa-calendar-alt text-black-50 mr-1"></span>
|
||||
{{ item.updatedAt|date('d/m/Y H:i') }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="col-1">
|
||||
<button class="btn btn-sm btn-{{ item.isActive ? 'success' : 'warning' }}">
|
||||
{{ item.isActive ? 'En ligne' : 'Hors ligne' }}
|
||||
</button>
|
||||
</td>
|
||||
<td class="col-3 text-right">
|
||||
<a href="{{ edit }}" class="btn btn-sm btn-primary mr-1">
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
<button type="submit" form="form-delete-{{ item.id }}" class="btn btn-sm btn-danger">
|
||||
<span class="fa fa-trash"></span>
|
||||
</button>
|
||||
|
||||
<form method="post" action="{{ path('admin_blog_comment_delete', {entity: item.id}) }}" id="form-delete-{{ item.id }}" data-form-confirm>
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ item.id) }}">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="col-12 text-center p-4 text-black-50">
|
||||
<div class="display-1">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<div class="display-5 mt-3">
|
||||
Aucun résultat
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
Dans <a href="{{ path('admin_blog_post_show', {entity: item.post.id}) }}">{{ item.post.title }}</a>
|
||||
|
||||
{% if item.parentComment %}
|
||||
en réponse à
|
||||
<a href="{{ path('admin_blog_comment_show', {entity: item.parentComment.id}) }}">
|
||||
{{ item.parentComment }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="col-2 miw-200">
|
||||
<span class="btn btn-sm btn-light">
|
||||
<span class="fa fa-calendar-alt text-black-50 mr-1"></span>
|
||||
{{ item.updatedAt|date('d/m/Y H:i') }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="col-1 miw-100">
|
||||
<button class="btn btn-sm btn-{{ item.isActive ? 'success' : 'warning' }}">
|
||||
{{ item.isActive ? 'En ligne' : 'Hors ligne' }}
|
||||
</button>
|
||||
</td>
|
||||
<td class="col-3 miw-100 text-right">
|
||||
<a href="{{ edit }}" class="btn btn-sm btn-primary mr-1">
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
<button type="submit" form="form-delete-{{ item.id }}" class="btn btn-sm btn-danger">
|
||||
<span class="fa fa-trash"></span>
|
||||
</button>
|
||||
|
||||
<form method="post" action="{{ path('admin_blog_comment_delete', {entity: item.id}) }}" id="form-delete-{{ item.id }}" data-form-confirm>
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ item.id) }}">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="col-12 text-center p-4 text-black-50">
|
||||
<div class="display-1">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<div class="display-5 mt-3">
|
||||
Aucun résultat
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -35,10 +35,10 @@
|
|||
<table class="table" data-table-fixed>
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th class="col-6">Titre</th>
|
||||
<th class="col-2">Mise à jour</th>
|
||||
<th class="col-1">Statut</th>
|
||||
<th class="col-3 text-right">Actions</th>
|
||||
<th class="col-6 miw-400">Titre</th>
|
||||
<th class="col-2 miw-200">Mise à jour</th>
|
||||
<th class="col-1 miw-100">Statut</th>
|
||||
<th class="col-3 miw-100 text-right">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -47,7 +47,7 @@
|
|||
{% set show = path('admin_blog_post_show', {entity: item.id}) %}
|
||||
|
||||
<tr>
|
||||
<td class="col-6">
|
||||
<td class="col-6 miw-400">
|
||||
{% if item.image %}
|
||||
{% set image = asset(item.image.pathname) %}
|
||||
{% else %}
|
||||
|
@ -69,13 +69,13 @@
|
|||
|
||||
Dans {{ categories|join(', ')|raw }}
|
||||
</td>
|
||||
<td class="col-2">
|
||||
<td class="col-2 miw-200">
|
||||
<span class="btn btn-sm btn-light">
|
||||
<span class="fa fa-calendar-alt text-black-50 mr-1"></span>
|
||||
{{ item.updatedAt|date('d/m/Y H:i') }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="col-1">
|
||||
<td class="col-1 miw-100">
|
||||
{% set map = {
|
||||
0: ['warning', 'Brouillon'],
|
||||
1: ['success', 'Publié'],
|
||||
|
@ -84,7 +84,7 @@
|
|||
{{ map[item.status].1 }}
|
||||
</button>
|
||||
</td>
|
||||
<td class="col-3 text-right">
|
||||
<td class="col-3 miw-100 text-right">
|
||||
<a href="{{ edit }}" class="btn btn-sm btn-primary mr-1">
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
|
|
Loading…
Reference in a new issue