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
d199e0bd5d
commit
50efe0a850
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 "_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
|
# cl_chill_main.example.class: CL\Chill\MainBundle\Example
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
menu_composer:
|
||||||
|
class: CL\Chill\MainBundle\DependencyInjection\Services\MenuComposer
|
||||||
|
arguments:
|
||||||
|
- "@routing.loader"
|
||||||
# cl_chill_main.example:
|
# cl_chill_main.example:
|
||||||
# class: %cl_chill_main.example.class%
|
# class: %cl_chill_main.example.class%
|
||||||
# arguments: [@service_id, "plain_value", %parameter%]
|
# 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 { margin-top: 20px; }
|
||||||
div#flashMessages .flash-notice { margin-top: 10px; margin-bottom: 10px; }
|
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="">
|
<li id="search_element" class="">
|
||||||
<div id="search_form" class="">
|
<div id="search_form" class="">
|
||||||
<div class="field append">
|
<div class="field append">
|
||||||
|
<form method="GET" action="{{ path('chill_person_search') }}">
|
||||||
<input type="search" name="q"
|
<input type="search" name="q"
|
||||||
class="wide search input" placeholder="Rechercher">
|
class="wide search input" placeholder="Rechercher">
|
||||||
<button type="submit" class="medium primary btn">Go</button>
|
<button type="submit" class="medium primary btn">Go</button>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -100,19 +100,19 @@
|
|||||||
<div id="flashMessages" class="push_three six columns">
|
<div id="flashMessages" class="push_three six columns">
|
||||||
{% for flashMessage in app.session.flashbag.get('success') %}
|
{% for flashMessage in app.session.flashbag.get('success') %}
|
||||||
<div class="flash-notice success alert">
|
<div class="flash-notice success alert">
|
||||||
{{ flashMessage }}
|
{{ flashMessage|raw }}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% for flashMessage in app.session.flashbag.get('danger') %}
|
{% for flashMessage in app.session.flashbag.get('danger') %}
|
||||||
<div class="flash-notice danger alert">
|
<div class="flash-notice danger alert">
|
||||||
{{ flashMessage }}
|
{{ flashMessage|raw }}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% for flashMessage in app.session.flashbag.get('info') %}
|
{% for flashMessage in app.session.flashbag.get('info') %}
|
||||||
<div class="flash-notice info alert">
|
<div class="flash-notice info alert">
|
||||||
{{ flashMessage }}
|
{{ flashMessage|raw }}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
@ -124,7 +124,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div id="wrapper" style="min-height: 1500px;">
|
<div id="wrapper" style="min-height: 1500px;">
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user