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:
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');
|
||||
|
||||
return $this->builder;
|
||||
|
@ -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,
|
||||
|
@ -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">
|
||||
|
Loading…
Reference in New Issue
Block a user