mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-29 10:05:03 +00:00
improve layout for admin
This commit is contained in:
49
src/Bundle/ChillMainBundle/Repository/UserJobRepository.php
Normal file
49
src/Bundle/ChillMainBundle/Repository/UserJobRepository.php
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Chill\MainBundle\Repository;
|
||||||
|
|
||||||
|
use Chill\MainBundle\Entity\UserJob;
|
||||||
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
|
use Doctrine\ORM\EntityRepository;
|
||||||
|
use Doctrine\Persistence\ObjectRepository;
|
||||||
|
|
||||||
|
class UserJobRepository implements ObjectRepository
|
||||||
|
{
|
||||||
|
private EntityRepository $repository;
|
||||||
|
|
||||||
|
public function __construct(EntityManagerInterface $em)
|
||||||
|
{
|
||||||
|
$this->repository = $em->getRepository(UserJob::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function find($id): ?UserJob
|
||||||
|
{
|
||||||
|
return $this->repository->find($id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array|UserJob[]
|
||||||
|
*/
|
||||||
|
public function findAll(): array
|
||||||
|
{
|
||||||
|
return $this->repository->findAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array|UserJob[]|object[]
|
||||||
|
*/
|
||||||
|
public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null)
|
||||||
|
{
|
||||||
|
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function findOneBy(array $criteria)
|
||||||
|
{
|
||||||
|
return $this->repository->findOneBy($criteria);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getClassName()
|
||||||
|
{
|
||||||
|
return UserJob::class;
|
||||||
|
}
|
||||||
|
}
|
@@ -1,26 +1,3 @@
|
|||||||
{#
|
|
||||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
|
||||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#}
|
|
||||||
|
|
||||||
{#
|
|
||||||
The layout of the admin section. All the page / template of the admin section must use this
|
|
||||||
layout.
|
|
||||||
#}
|
|
||||||
|
|
||||||
{% extends "@ChillMain/layout.html.twig" %}
|
{% extends "@ChillMain/layout.html.twig" %}
|
||||||
|
|
||||||
{% block navigation_search_bar %}{% endblock %}
|
{% block navigation_search_bar %}{% endblock %}
|
||||||
@@ -38,4 +15,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -1,20 +1,3 @@
|
|||||||
{#
|
|
||||||
* Copyright (C) 2014-2021, Champs Libres Cooperative SCRLFS,
|
|
||||||
* <info@champs-libres.coop> / <http://www.champs-libres.coop>
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#}
|
|
||||||
<header>
|
<header>
|
||||||
<nav class="navbar navbar-dark bg-primary navbar-expand-md">
|
<nav class="navbar navbar-dark bg-primary navbar-expand-md">
|
||||||
<div class="container-xxl">
|
<div class="container-xxl">
|
||||||
@@ -24,12 +7,12 @@
|
|||||||
{{ include('@ChillMain/Layout/_header-logo.html.twig') }}
|
{{ include('@ChillMain/Layout/_header-logo.html.twig') }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
|
|
||||||
<button class="navbar-toggler"
|
<button class="navbar-toggler"
|
||||||
type="button"
|
type="button"
|
||||||
data-bs-toggle="collapse"
|
data-bs-toggle="collapse"
|
||||||
data-bs-target="#navbarContent"
|
data-bs-target="#navbarContent"
|
||||||
aria-controls="navbarContent"
|
aria-controls="navbarContent"
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
@@ -43,8 +26,8 @@
|
|||||||
{% block navigation_search_bar %}
|
{% block navigation_search_bar %}
|
||||||
<li class="nav-item navigation-search">
|
<li class="nav-item navigation-search">
|
||||||
<form class="form-inline" action="{{ path('chill_main_search') }}" method="get">
|
<form class="form-inline" action="{{ path('chill_main_search') }}" method="get">
|
||||||
<input class="form-control"
|
<input class="form-control"
|
||||||
name="q" type="search" placeholder="{{ 'Search'|trans }}"
|
name="q" type="search" placeholder="{{ 'Search'|trans }}"
|
||||||
{% if _search_pattern is defined %}value="{{ _search_pattern }}"{% endif %}/>
|
{% if _search_pattern is defined %}value="{{ _search_pattern }}"{% endif %}/>
|
||||||
<button class="btn text-white-50" type="submit">
|
<button class="btn text-white-50" type="submit">
|
||||||
<i class="fa fa-lg fa-search fa-flip-horizontal"></i>
|
<i class="fa fa-lg fa-search fa-flip-horizontal"></i>
|
||||||
@@ -71,15 +54,15 @@
|
|||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li class="nav-item dropdown btn btn-primary nav-language">
|
<li class="nav-item dropdown btn btn-primary nav-language">
|
||||||
<a id="menu-languages"
|
<a id="menu-languages"
|
||||||
class="nav-link dropdown-toggle"
|
class="nav-link dropdown-toggle"
|
||||||
type="button"
|
type="button"
|
||||||
data-bs-toggle="dropdown"
|
data-bs-toggle="dropdown"
|
||||||
aria-haspopup="true"
|
aria-haspopup="true"
|
||||||
aria-expanded="false">
|
aria-expanded="false">
|
||||||
<a href="#" class="more">{{ app.request.locale | capitalize }}</a>
|
<a href="#" class="more">{{ app.request.locale | capitalize }}</a>
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-menu dropdown-menu-end"
|
<div class="dropdown-menu dropdown-menu-end"
|
||||||
aria-labelledby="menu-languages">
|
aria-labelledby="menu-languages">
|
||||||
{% for lang in available_languages %}
|
{% for lang in available_languages %}
|
||||||
<a class="dropdown-item list-group-item bg-dark text-white{% if lang == app.request.locale %} active{% endif %}"
|
<a class="dropdown-item list-group-item bg-dark text-white{% if lang == app.request.locale %} active{% endif %}"
|
||||||
@@ -93,7 +76,7 @@
|
|||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
@@ -1,25 +1,3 @@
|
|||||||
{#
|
|
||||||
* Copyright (C) 2014-2021, Champs Libres Cooperative SCRLFS,
|
|
||||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#}
|
|
||||||
|
|
||||||
{#
|
|
||||||
The basic layout of Chill. All the page / template of Chill must use this template.
|
|
||||||
#}
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
<head>
|
<head>
|
||||||
|
@@ -1,26 +1,3 @@
|
|||||||
{#
|
|
||||||
* Copyright (C) 2014-2021, Champs Libres Cooperative SCRLFS,
|
|
||||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#}
|
|
||||||
|
|
||||||
{#
|
|
||||||
Layout with a vertical menu and a conainer for the content (like admin, export)
|
|
||||||
( for the vertical menu you can extends Menu/veticalMenu.html.twig ).
|
|
||||||
#}
|
|
||||||
|
|
||||||
{% extends "@ChillMain/layout.html.twig" %}
|
{% extends "@ChillMain/layout.html.twig" %}
|
||||||
|
|
||||||
{% block sublayout_content %}
|
{% block sublayout_content %}
|
||||||
|
Reference in New Issue
Block a user