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
Political Memory
memopol
Commits
d14f776c
Commit
d14f776c
authored
Aug 31, 2016
by
Nicolas Joyard
Browse files
Add position button when no positions
parent
c66f0682
Changes
4
Hide whitespace changes
Inline
Side-by-side
memopol/tests/response_fixtures/RepresentativePositionsTest.test_no_positions.content
0 → 100644
View file @
d14f776c
<p class="no-positions text-center">
No public position has been recorded yet.
<br/><br/>
<a aria-controls="add-position-form" aria-expanded="false" class="btn btn-primary hidden-print" data-target="#add-position-form" data-toggle="modal">
<span class="glyphicon glyphicon-bullhorn"></span>
Add a public position
</a>
</p>
\ No newline at end of file
memopol/tests/response_fixtures/RepresentativePositionsTest.test_no_positions.metadata
0 → 100644
View file @
d14f776c
{
"status_code": 200
}
\ No newline at end of file
memopol/tests/test_representative_positions.py
View file @
d14f776c
...
...
@@ -17,3 +17,7 @@ class RepresentativePositionsTest(RepresentativeBaseTest):
def
test_position_details
(
self
):
self
.
selector_test
(
'.position-details'
)
def
test_no_positions
(
self
):
url
=
'/legislature/representative/francois-asensi-1945-06-01/%s/'
self
.
selector_test
(
'.no-positions'
,
url
%
self
.
tab
)
templates/representatives/representative_detail_positions.html
View file @
d14f776c
{% extends 'representatives/representative_detail.html' %}
{% load i18n %}
{% load bootstrap3 %}
{% load humanize %}
{% load representatives_positions_tags %}
...
...
@@ -8,7 +9,14 @@
{% if not positions %}
{# TODO: link #}
<p>
No public position has been recorded. You can always
<a>
add a public position
</a>
.
</p>
<p
class=
"no-positions text-center"
>
{% trans "No public position has been recorded yet." %}
<br><br>
<a
class=
"btn btn-primary hidden-print"
data-toggle=
"modal"
data-target=
"#add-position-form"
aria-expanded=
"false"
aria-controls=
"add-position-form"
>
{% bootstrap_icon "bullhorn" %}
{% trans "Add a public position" %}
</a>
</p>
{% else %}
<table
class=
"table table-responsive custom-timeline text-center"
>
...
...
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