Merge branch 'dev-master'
This commit is contained in:
commit
61b071feb8
|
@ -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');
|
$this->builder->setMethod('GET');
|
||||||
|
|
||||||
return $this->builder;
|
return $this->builder;
|
||||||
|
|
|
@ -64,6 +64,10 @@ class User extends BaseUser implements UserInterface
|
||||||
$query->filterByType($options['type']);
|
$query->filterByType($options['type']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($options['title'])) {
|
||||||
|
$query->filterByTitle('%'.$options['title'].'%', Criteria::LIKE);
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($options['cipher']) && $options['cipher'] !== 'anyway') {
|
if (!empty($options['cipher']) && $options['cipher'] !== 'anyway') {
|
||||||
$bools = array(
|
$bools = array(
|
||||||
'yes' => true,
|
'yes' => true,
|
||||||
|
|
|
@ -45,7 +45,10 @@
|
||||||
|
|
||||||
{% set params = app.request.attributes.get('_route_params')|merge({page: 1}) %}
|
{% 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-toolbar">
|
||||||
<div class="btn-group" id="options">
|
<div class="btn-group" id="options">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
|
|
Loading…
Reference in a new issue