Commit 5bc7f370 authored by Sylvain Boissel's avatar Sylvain Boissel

Separate representative details into subpages

parent 7e33ec23
[![Build Status](https://travis-ci.org/political-memory/political_memory.svg?branch=master)](https://travis-ci.org/political-memory/political_memory)
[![codecov.io](https://codecov.io/github/political-memory/political_memory/coverage.svg?branch=master)](https://codecov.io/github/political-memory/political_memory?branch=master)
[Manual](http://memopol.readthedocs.io/en/master/index.html)
[Manual](http://memopol.readthedocs.io/en/master/index.html)
\ No newline at end of file
<div class='positions'>
<h2>Public positions</h2>
<table class='table table-condensed'>
<tr class='position'>
<td>24/11/2010</td>
<td>
<a href='/positions/position/2/'>
first-validated
</a>
</td>
<td>
<a href='http://example.com/first-validated'>
http://example.com/first-validated
</a>
</td>
</tr>
<tr class='position'>
<td>24/11/2010</td>
<td>
<a href='/positions/position/3/'>
other-validated
</a>
</td>
<td>
<a href='http://example.com/second-validated'>
http://example.com/second-validated
</a>
</td>
</tr>
<h2 id='votes'>Votes</h2>
<table class='table table-condensed votes'>
<tr>
<th>Title</th>
<th>Date</th>
<th class='icon-cell'>
Memopol recommendation
</th>
<th class='icon-cell'>
Representative vote
</th>
<th class='icon-cell'>
Score
</th>
</tr>
<tr>
<td>Stop acta !</td>
<td class='date-cell'>Nov.24,2010</td>
<td class='icon-cell'>
<i aria-label="for" class="fa fa-thumbs-up vote_positive" title="for" ></i>
</td>
<td class='icon-cell'>
<i aria-label="against" class="fa fa-thumbs-down vote_negative" title="against" ></i>
</td>
<td class='icon-cell'>
<span class="label label-danger">-6</span>
</td>
</tr>
<tr>
<td>Stop acta !</td>
<td class='date-cell'>Nov.24,2010</td>
<td class='icon-cell'>
<i aria-label="for" class="fa fa-thumbs-up vote_positive" title="for" ></i>
</td>
<td class='icon-cell'>
<i aria-label="against" class="fa fa-thumbs-down vote_negative" title="against" ></i>
</td>
<td class='icon-cell'>
<span class="label label-danger">-5</span>
</td>
</tr>
<tr>
<td>Stop acta !</td>
<td class='date-cell'>Nov.24,2010</td>
<td class='icon-cell'>
<i aria-label="for" class="fa fa-thumbs-up vote_positive" title="for" ></i>
</td>
<td class='icon-cell'>
<i aria-label="for" class="fa fa-thumbs-up vote_positive" title="for" ></i>
</td>
<td class='icon-cell'>
<span class="label label-success">4</span>
</td>
</tr>
</table>
......@@ -42,6 +42,7 @@ class UrlGetTestMixin(object):
class ResponseDiffMixin(object):
def responsediff_test(self, url, numQueries):
self.client.cookies['csrftoken'] = 'csrftoken'
with self.assertNumQueries(numQueries):
response = self.client.get(url)
......
<!DOCTYPE html>
<html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/png" href="/static/collected/img/favicon.ico" />
<!-- Set the viewport width to device width for mobile -->
<meta name="viewport" content="width=device-width" />
<title>Home - Political Memory</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.586b8f5e9bff.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>
<link href="/static/collected/css/datetimepicker.css" type="text/css" media="all" rel="stylesheet" />
<script type="text/javascript" src="/static/collected/js/bootstrap-datetimepicker.js"></script>
</head>
<body >
<!-- -load memopol_tags cache -->
<div id='header' class='container-fluid'>
<a id='logo' href='/'>
<img src='/static/collected/images/logo.png' />
</a>
<h1>
<a id='header_banner' href='/'>
Political Memory
</a>
</h1>
<p class='organization'>
</p>
</div>
<div id='nav' class='container-fluid'>
<ul class='nav'>
<li>
<a href='/legislature/representative/'>
Representatives
</a>
</li>
<li>
<a href='/legislature/group/country/'>
Countries
</a>
</li>
<li>
<a href='/legislature/group/chamber/'>
Chambers
</a>
</li>
<li>
<a href='/legislature/group/group/'>
Parties
</a>
</li>
<li>
<a href='/legislature/group/delegation/'>
Delegations
</a>
</li>
<li>
<a href='/legislature/group/committee/'>
Committees
</a>
</li>
<li>
<a href='/theme/'>
Themes
</a>
</li>
<li>
<a href='/votes/dossier/'>
Dossiers
</a>
</li>
</ul>
</div>
<div class="container-fluid main-container">
<div class='row'>
<div class='representative active'>
<h1 class='name'>Mary HONEYBALL</h1>
<div class='row'>
<div class='col-md-4'>
<p class='photo'><img src='http://www.europarl.europa.eu/mepphoto/5846.jpg' /></p>
</div>
<div class='col-md-8'>
<table class='table table-condensed detail-view'>
<tr class='score'>
<th>Score</th>
<td>
<span class="label label-danger">-7</span>
</td>
</tr>
<tr>
<th>Chamber</th>
<td><a href='/legislature/representative/chamber/European%20Parliament/'>
<span class="chamber-icon" style="background-image: url(/static/collected/images/chamber-ep.png)"></span> European Parliament
</a></td>
</tr>
<tr>
<th>Country</th>
<td><a href='/legislature/representative/country/United%20Kingdom/'>
<span class="flag-icon flag-icon-gb"></span> United Kingdom
</a></td>
</tr>
<tr>
<th>Party</th>
<td><a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
<span class="group-icon" style="background-image: url(/static/collected/images/group-ep-sd.png)"></span> Member of Group of the Progressive Alliance of Socialists and Democrats in the European Parliament
</a></td>
</tr>
<tr>
<th>Biography</th>
<td>Born in Weymouth the
12/11/1952
(F)</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class='row'>
<ul class='nav nav-pills'>
<li>
<a href='/legislature/representative/mary-honeyball-1952-11-12/'>
Contact details
</a>
</li>
<li>
<a href='/legislature/representative/mary-honeyball-1952-11-12/votes/'>
Votes
</a>
</li>
<li>
<a href='/legislature/representative/mary-honeyball-1952-11-12/mandates/'>
Mandates
</a>
</li>
<li>
<a href='/legislature/representative/mary-honeyball-1952-11-12/positions/'>
Public positions
</a>
</li>
</ul>
<div class='col-md-6'>
<div class='positions'>
<h2>Public positions</h2>
<table class='table table-condensed'>
<tr class='position'>
<td>24/11/2010</td>
<td>
<a href='/positions/position/2/'>
first-validated
</a>
</td>
<td>
<a href='http://example.com/first-validated'>
http://example.com/first-validated
</a>
</td>
</tr>
<tr class='position'>
<td>24/11/2010</td>
<td>
<a href='/positions/position/3/'>
other-validated
</a>
</td>
<td>
<a href='http://example.com/second-validated'>
http://example.com/second-validated
</a>
</td>
</tr>
</table>
<form action='/positions/position/create/' method='post'>
<input type='hidden' name='csrfmiddlewaretoken' value='csrftoken' />
<div class="form-group"><label class="control-label" for="yourdatetimeid">Datetime</label>
<div id="yourdatetimeid" class="input-group date">
<input class="form-control" id="yourdatetimeid" name="datetime" placeholder="Datetime" required="required" title="" type="text" />
<span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
</div>
<script type="text/javascript">
$("#yourdatetimeid").datetimepicker({minView: 2,
autoclose: true,
language: 'en',
startView: 2,
format: 'yyyy-mm-dd'}).find('input').addClass("form-control");
</script>
</div>
<div class="form-group"><label class="control-label" for="id_text">Text</label><textarea class="form-control" cols="40" id="id_text" name="text" placeholder="Text" required="required" rows="10" title="">
</textarea></div>
<div class="form-group"><label class="control-label" for="id_link">Link</label><input class="form-control" id="id_link" maxlength="500" name="link" placeholder="Link" required="required" title="" type="url" /></div>
<input id="id_representative" name="representative" type="hidden" value="160" />
<div class="form-group">
<button class='btn btn-primary' type='submit'>
<span class="glyphicon glyphicon-star"></span> Submit
</button>
</div>
</form>
</div>
</div>
</div>
</div>
<div id='footer' class='container-fluid'>
<div class='license-links'>
Memopol is
<a href='https://github.com/political-memory/political_memory'>free software</a>
released under the terms of the
<a href='http://www.gnu.org/licenses/agpl.html'>GNU aGPLV3+</a>
</div>
<div class='footer-link'>
<a href='https://github.com/political-memory/political_memory/issues/new'>Report a bug</a>
</div>
<div class='footer-link'>
<a href='http://www.memopol.org/'>Blog</a>
</div>
<div class='footer-link'>
<a href='http://memopol.readthedocs.io/en/master/'>Documentation</a>
</div>
<div class='footer-separator'></div>
<div class='footer-link'>
Developed by
<a href='http://www.laquadrature.net/'>La Quadrature du Net</a>
</div>
<div class='footer-link'>
EP data provided by
<a href='http://parltrack.euwiki.org/'>Parltrack</a>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/png" href="/static/collected/img/favicon.ico" />
<!-- Set the viewport width to device width for mobile -->
<meta name="viewport" content="width=device-width" />
<title>Home - Political Memory</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.586b8f5e9bff.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>
</head>
<body >
<!-- -load memopol_tags cache -->
<div id='header' class='container-fluid'>
<a id='logo' href='/'>
<img src='/static/collected/images/logo.png' />
</a>
<h1>
<a id='header_banner' href='/'>
Political Memory
</a>
</h1>
<p class='organization'>
</p>
</div>
<div id='nav' class='container-fluid'>
<ul class='nav'>
<li>
<a href='/legislature/representative/'>
Representatives
</a>
</li>
<li>
<a href='/legislature/group/country/'>
Countries
</a>
</li>
<li>
<a href='/legislature/group/chamber/'>
Chambers
</a>
</li>
<li>
<a href='/legislature/group/group/'>
Parties
</a>
</li>
<li>
<a href='/legislature/group/delegation/'>
Delegations
</a>
</li>
<li>
<a href='/legislature/group/committee/'>
Committees
</a>
</li>
<li>
<a href='/theme/'>
Themes
</a>
</li>
<li>
<a href='/votes/dossier/'>
Dossiers
</a>
</li>
</ul>
</div>
<div class="container-fluid main-container">
<div class='row'>
<div class='representative active'>
<h1 class='name'>Mary HONEYBALL</h1>
<div class='row'>
<div class='col-md-4'>
<p class='photo'><img src='http://www.europarl.europa.eu/mepphoto/5846.jpg' /></p>
</div>
<div class='col-md-8'>
<table class='table table-condensed detail-view'>
<tr class='score'>
<th>Score</th>
<td>
<span class="label label-danger">-7</span>
</td>
</tr>
<tr>
<th>Chamber</th>
<td><a href='/legislature/representative/chamber/European%20Parliament/'>
<span class="chamber-icon" style="background-image: url(/static/collected/images/chamber-ep.png)"></span> European Parliament
</a></td>
</tr>
<tr>
<th>Country</th>
<td><a href='/legislature/representative/country/United%20Kingdom/'>
<span class="flag-icon flag-icon-gb"></span> United Kingdom
</a></td>
</tr>
<tr>
<th>Party</th>
<td><a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
<span class="group-icon" style="background-image: url(/static/collected/images/group-ep-sd.png)"></span> Member of Group of the Progressive Alliance of Socialists and Democrats in the European Parliament
</a></td>
</tr>
<tr>
<th>Biography</th>
<td>Born in Weymouth the
12/11/1952
(F)</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class='row'>
<ul class='nav nav-pills'>
<li>
<a href='/legislature/representative/mary-honeyball-1952-11-12/'>
Contact details
</a>
</li>
<li>
<a href='/legislature/representative/mary-honeyball-1952-11-12/votes/'>
Votes
</a>
</li>
<li>
<a href='/legislature/representative/mary-honeyball-1952-11-12/mandates/'>
Mandates
</a>
</li>
<li>
<a href='/legislature/representative/mary-honeyball-1952-11-12/positions/'>
Public positions
</a>
</li>
</ul>
<div class='col-md-6'>
<h2 id='votes'>Votes</h2>
<table class='table table-condensed votes'>
<tr>
<th>Title</th>
<th>Date</th>
<th class='icon-cell'>
Memopol recommendation
</th>
<th class='icon-cell'>
Representative vote
</th>
<th class='icon-cell'>
Score
</th>
</tr>
<tr>
<td>Stop acta !</td>
<td class='date-cell'>
Nov. 24, 2010
</td>
<td class='icon-cell'>
<i aria-label="for" class="fa fa-thumbs-up vote_positive" title="for" ></i>
</td>
<td class='icon-cell'>
<i aria-label="against" class="fa fa-thumbs-down vote_negative" title="against" ></i>
</td>
<td class='icon-cell'>
<span class="label label-danger">-6</span>
</td>
</tr>