1
0
mirror of https://gitnet.fr/deblan/gist.git synced 2021-08-14 08:30:49 +02:00

Merge branch 'dev-master'

This commit is contained in:
Simon Vieille 2017-04-23 16:31:11 +02:00
commit 61b071feb8
3 changed files with 20 additions and 1 deletions

View File

@ -44,6 +44,18 @@ class FilterGistForm extends AbstractForm
)
);
$this->builder->add(
'title',
'text',
array(
'required' => false,
'attr' => array(
'placeholder' => $this->translator->trans('form.title.placeholder'),
'class' => 'form-control',
)
)
);
$this->builder->setMethod('GET');
return $this->builder;

View File

@ -64,6 +64,10 @@ class User extends BaseUser implements UserInterface
$query->filterByType($options['type']);
}
if (!empty($options['title'])) {
$query->filterByTitle('%'.$options['title'].'%', Criteria::LIKE);
}
if (!empty($options['cipher']) && $options['cipher'] !== 'anyway') {
$bools = array(
'yes' => true,

View File

@ -45,7 +45,10 @@
{% set params = app.request.attributes.get('_route_params')|merge({page: 1}) %}
<form action="{{ path('my', params) }}" method="GET">
<form action="{{ path('my', params) }}" method="GET" class="form-inline">
<div class="form-group pull-left">
{{ form_widget(filterForm.title) }}
</div>
<div class="btn-toolbar">
<div class="btn-group" id="options">
<div class="btn-group">