Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TAlone
memopol
Commits
7da6745b
Commit
7da6745b
authored
Jun 16, 2016
by
Nicolas Joyard
Browse files
Separate filter form & integrate csv button
parent
2c1afc9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
templates/representatives/_filter_form.haml
0 → 100644
View file @
7da6745b
-
load
bootstrap3
%form
.filter-form
{
'action'
:
'
{{
action
}}
', '
method
': '
get
'
}
-
bootstrap_form
form
=
form
bound_css_class
=
'filter-form-group'
-
buttons
%button
{
'type'
:
'submit'
,
'class'
:
'btn btn-primary'
}
{% bootstrap_icon "filter" %} Filter
-
endbuttons
-
buttons
%a
{
'href'
:
'
?{{
qs
}}
&
csv
', '
class
': '
btn
btn
-
primary
'
}
{% bootstrap_icon "download-alt" %} Download as CSV
-
endbuttons
templates/representatives/representative_list.haml
View file @
7da6745b
...
...
@@ -4,18 +4,16 @@
-
load
memopol_tags
-
load
representatives_recommendations_tags
-
block
content
-
block
head
-
block
search
{{ filter.form.media }}
{{ filter.form.media }}
-
block
content
%form
.filter-form
{
action
:''
,
method
:'get'
}
{{ filter.form.as_p }}
%input
{
type
:"submit"
,
value
:"Go"
}
-
block
search
%a
{
href
:"?{% if request.GET.search %}search={{ request.GET.search }}&{% endif %}csv"
}
-
trans
'Download data as CSV'
{% url 'representative-list' as action_url %
}
-
include
'representatives/_filter_form.html'
with
action
=
action_url
form
=
filter
.
form
qs
=
request
.
GET
.
urlencode
-
include
'core/blocks/pagination.html'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment