mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
adapt layout for person search + standard rendering
This commit is contained in:
parent
0c91b395ca
commit
7d9eeaf15d
41
DependencyInjection/Services/MenuComposer.php
Normal file
41
DependencyInjection/Services/MenuComposer.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace CL\Chill\MainBundle\DependencyInjection\Services;
|
||||
|
||||
use Symfony\Component\Routing\RouterInterface;
|
||||
|
||||
/**
|
||||
* This class permit to build menu from the routing information
|
||||
* stored in each bundle.
|
||||
*
|
||||
* how to must come here FIXME
|
||||
*
|
||||
* @author julien
|
||||
*/
|
||||
class MenuComposer {
|
||||
|
||||
/**
|
||||
*
|
||||
* @var \Symfony\Component\Routing\RouteCollection;
|
||||
*/
|
||||
private $routeCollection;
|
||||
|
||||
|
||||
public function __construct(RouterInterface $router) {
|
||||
$this->routeCollection = $router->getRouteCollection();
|
||||
}
|
||||
|
||||
public function getRoutesFor($menuId, array $parameters = array()) {
|
||||
$routes = array();
|
||||
|
||||
foreach ($this->routeCollection->all() as $key => $route) {
|
||||
if ($route['options']['menu'] === $menuId) {
|
||||
$routes[$route['options']['order']] = $route;
|
||||
}
|
||||
}
|
||||
|
||||
return $routes;
|
||||
|
||||
}
|
||||
|
||||
}
|
9
Resources/assets/gumpy/sass/_commons.scss
Normal file
9
Resources/assets/gumpy/sass/_commons.scss
Normal file
@ -0,0 +1,9 @@
|
||||
.personName {
|
||||
font-variant: small-caps;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.personName {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
@ -2,4 +2,6 @@
|
||||
|
||||
@import "_searchbox.scss";
|
||||
|
||||
@import "_flashMessages.scss"
|
||||
@import "_flashMessages.scss";
|
||||
|
||||
@import "_commons.scss";
|
||||
|
@ -2,6 +2,10 @@ parameters:
|
||||
# cl_chill_main.example.class: CL\Chill\MainBundle\Example
|
||||
|
||||
services:
|
||||
menu_composer:
|
||||
class: CL\Chill\MainBundle\DependencyInjection\Services\MenuComposer
|
||||
arguments:
|
||||
- "@routing.loader"
|
||||
# cl_chill_main.example:
|
||||
# class: %cl_chill_main.example.class%
|
||||
# arguments: [@service_id, "plain_value", %parameter%]
|
||||
|
@ -12,3 +12,7 @@ div#usefulbar li#search_element div#search_form button { color: white; border: n
|
||||
|
||||
div#flashMessages { margin-top: 20px; }
|
||||
div#flashMessages .flash-notice { margin-top: 10px; margin-bottom: 10px; }
|
||||
|
||||
.personName { font-variant: small-caps; text-transform: capitalize; }
|
||||
|
||||
.personName { text-transform: capitalize; }
|
||||
|
@ -63,11 +63,11 @@
|
||||
<li id="search_element" class="">
|
||||
<div id="search_form" class="">
|
||||
<div class="field append">
|
||||
|
||||
<form method="GET" action="{{ path('chill_person_search') }}">
|
||||
<input type="search" name="q"
|
||||
class="wide search input" placeholder="Rechercher">
|
||||
<button type="submit" class="medium primary btn">Go</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -100,19 +100,19 @@
|
||||
<div id="flashMessages" class="push_three six columns">
|
||||
{% for flashMessage in app.session.flashbag.get('success') %}
|
||||
<div class="flash-notice success alert">
|
||||
{{ flashMessage }}
|
||||
{{ flashMessage|raw }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% for flashMessage in app.session.flashbag.get('danger') %}
|
||||
<div class="flash-notice danger alert">
|
||||
{{ flashMessage }}
|
||||
{{ flashMessage|raw }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% for flashMessage in app.session.flashbag.get('info') %}
|
||||
<div class="flash-notice info alert">
|
||||
{{ flashMessage }}
|
||||
{{ flashMessage|raw }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user