Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Anthony
memopol
Commits
54b19a1f
Commit
54b19a1f
authored
Jun 02, 2016
by
Nicolas Joyard
Browse files
Remove contact from position page and update test fixtures
parent
5cc5955f
Changes
9
Hide whitespace changes
Inline
Side-by-side
memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist/content
View file @
54b19a1f
...
...
@@ -10,7 +10,7 @@
- The Political Memory of
</title>
<link
rel=
"stylesheet"
href=
"/static/collected/libs/bootstrap/dist/css/bootstrap.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/libs/fontawesome/css/font-awesome.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/libs/flag-icon-css/css/flag-icon.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/CACHE/css/base.6
aeeaa87703d
.css"
type=
"text/css"
/>
<link
rel=
"stylesheet"
href=
"/static/collected/libs/bootstrap/dist/css/bootstrap.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/libs/fontawesome/css/font-awesome.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/libs/flag-icon-css/css/flag-icon.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/CACHE/css/base.6
6ec921b2740
.css"
type=
"text/css"
/>
<script
type=
"text/javascript"
src=
"/static/collected/libs/jquery/dist/jquery.js"
></script>
<script
type=
"text/javascript"
src=
"/static/collected/libs/bootstrap/dist/js/bootstrap.js"
></script>
...
...
memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist_searchjoly/content
View file @
54b19a1f
...
...
@@ -10,7 +10,7 @@
- The Political Memory of
</title>
<link
rel=
"stylesheet"
href=
"/static/collected/libs/bootstrap/dist/css/bootstrap.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/libs/fontawesome/css/font-awesome.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/libs/flag-icon-css/css/flag-icon.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/CACHE/css/base.6
aeeaa87703d
.css"
type=
"text/css"
/>
<link
rel=
"stylesheet"
href=
"/static/collected/libs/bootstrap/dist/css/bootstrap.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/libs/fontawesome/css/font-awesome.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/libs/flag-icon-css/css/flag-icon.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/CACHE/css/base.6
6ec921b2740
.css"
type=
"text/css"
/>
<script
type=
"text/javascript"
src=
"/static/collected/libs/jquery/dist/jquery.js"
></script>
<script
type=
"text/javascript"
src=
"/static/collected/libs/bootstrap/dist/js/bootstrap.js"
></script>
...
...
memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_displaygrid/content
View file @
54b19a1f
...
...
@@ -10,7 +10,7 @@
- The Political Memory of
</title>
<link
rel=
"stylesheet"
href=
"/static/collected/libs/bootstrap/dist/css/bootstrap.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/libs/fontawesome/css/font-awesome.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/libs/flag-icon-css/css/flag-icon.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/CACHE/css/base.6
aeeaa87703d
.css"
type=
"text/css"
/>
<link
rel=
"stylesheet"
href=
"/static/collected/libs/bootstrap/dist/css/bootstrap.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/libs/fontawesome/css/font-awesome.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/libs/flag-icon-css/css/flag-icon.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/CACHE/css/base.6
6ec921b2740
.css"
type=
"text/css"
/>
<script
type=
"text/javascript"
src=
"/static/collected/libs/jquery/dist/jquery.js"
></script>
<script
type=
"text/javascript"
src=
"/static/collected/libs/bootstrap/dist/js/bootstrap.js"
></script>
...
...
memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby12_displaylist/content
View file @
54b19a1f
...
...
@@ -10,7 +10,7 @@
- The Political Memory of
</title>
<link
rel=
"stylesheet"
href=
"/static/collected/libs/bootstrap/dist/css/bootstrap.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/libs/fontawesome/css/font-awesome.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/libs/flag-icon-css/css/flag-icon.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/CACHE/css/base.6
aeeaa87703d
.css"
type=
"text/css"
/>
<link
rel=
"stylesheet"
href=
"/static/collected/libs/bootstrap/dist/css/bootstrap.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/libs/fontawesome/css/font-awesome.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/libs/flag-icon-css/css/flag-icon.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/CACHE/css/base.6
6ec921b2740
.css"
type=
"text/css"
/>
<script
type=
"text/javascript"
src=
"/static/collected/libs/jquery/dist/jquery.js"
></script>
<script
type=
"text/javascript"
src=
"/static/collected/libs/bootstrap/dist/js/bootstrap.js"
></script>
...
...
memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby24_displaylist/content
View file @
54b19a1f
...
...
@@ -10,7 +10,7 @@
- The Political Memory of
</title>
<link
rel=
"stylesheet"
href=
"/static/collected/libs/bootstrap/dist/css/bootstrap.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/libs/fontawesome/css/font-awesome.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/libs/flag-icon-css/css/flag-icon.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/CACHE/css/base.6
aeeaa87703d
.css"
type=
"text/css"
/>
<link
rel=
"stylesheet"
href=
"/static/collected/libs/bootstrap/dist/css/bootstrap.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/libs/fontawesome/css/font-awesome.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/libs/flag-icon-css/css/flag-icon.min.css"
type=
"text/css"
/><link
rel=
"stylesheet"
href=
"/static/collected/CACHE/css/base.6
6ec921b2740
.css"
type=
"text/css"
/>
<script
type=
"text/javascript"
src=
"/static/collected/libs/jquery/dist/jquery.js"
></script>
<script
type=
"text/javascript"
src=
"/static/collected/libs/bootstrap/dist/js/bootstrap.js"
></script>
...
...
memopol/tests/test_representatives_detail.py
View file @
54b19a1f
...
...
@@ -12,9 +12,13 @@ class RepresentativeDetailTest(UrlGetTestMixin, TestCase):
# Ensure one-time cached queries occur before the actual test
self
.
client
.
get
(
self
.
url
)
with
self
.
assertNumQueries
(
5
):
with
self
.
assertNumQueries
(
10
):
"""
- One query for the rep details and foreign key (profile)
- One query for reverse relation on phones
- One query for reverse relation on addresses
- One query for reverse relation on emails
- Two queries for reverse relation on websites (social and other)
- One query for reverse relation on votes
- One query for reverse relation on mandates
- One query for reverse relation positions
...
...
templates/representatives/_representative_block.haml
View file @
54b19a1f
...
...
@@ -57,27 +57,3 @@
%td
-
for
site
in
representative
.
other_websites
=
site
.
url
|
website_link
.row
.col-md-12
%h2
Contact
information
%table
.table.table-condensed.detail-view
-
for
email
in
representative
.
email_set
.
all
%tr
%th
E-mail
%td
=
email
.
email
|
email_link
-
if
representative
.
phone_set
.
all
|
length
>
0
%tr
%th
Phone
numbers
%td
-
for
phone
in
representative
.
phone_set
.
all
.phone
{{
phone.number
}}
-
for
address
in
representative
.
address_set
.
all
%tr
%th
=
address
.
name
%td
-
include
'representatives/_address_block.html'
with
address
=
address
\ No newline at end of file
templates/representatives/_representative_contact.haml
0 → 100644
View file @
54b19a1f
-
load
memopol_tags
.row.representative-contact
.col-md-12
%h2
Contact information
%table
.table.table-condensed.detail-view
-
for
email
in
representative
.
email_set
.
all
%tr
%th
E-mail
%td
=
email
.
email
|
email_link
-
if
representative
.
phone_set
.
all
|
length
>
0
%tr
%th
Phone numbers
%td
-
for
phone
in
representative
.
phone_set
.
all
.phone
{{ phone.number }}
-
for
address
in
representative
.
address_set
.
all
%tr
%th
=
address
.
name
%td
-
include
'representatives/_address_block.html'
with
address
=
address
templates/representatives/representative_detail.haml
View file @
54b19a1f
...
...
@@ -12,6 +12,7 @@
.row
.col-md-6
-
include
'representatives/_representative_block.html'
with
representative
=
representative
-
include
'representatives/_representative_contact.html'
with
representative
=
representative
.col-md-6
%h2
#votes
Votes
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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