From 2ca64493f5b26c6685fad42a5b3f10c1c83a2878 Mon Sep 17 00:00:00 2001
From: Nicolas Joyard <joyard.nicolas@gmail.com>
Date: Fri, 10 Jun 2016 19:03:45 +0200
Subject: [PATCH] Add active/inactive tests and update fixtures

---
 .../DossiersTest.test_dossier_detail/content  |    2 +-
 .../DossiersTest.test_dossier_list/content    |    4 +-
 .../GroupListTest.test_chambers/content       |    2 +-
 .../GroupListTest.test_committees/content     |    2 +-
 .../GroupListTest.test_country/content        |    2 +-
 .../GroupListTest.test_delegations/content    |    2 +-
 .../GroupListTest.test_parties/content        |    2 +-
 .../content                                   |   76 +-
 .../content                                   |  828 ++++++++++++
 .../content                                   |   32 +-
 .../content                                   |   76 +-
 .../content                                   | 1169 +++++++++++++++++
 .../content                                   |   76 +-
 .../content                                   |   76 +-
 memopol/tests/test_representatives_list.py    |   27 +-
 15 files changed, 2256 insertions(+), 120 deletions(-)
 rename memopol/tests/response_fixtures/{RepresentativeListTest.test_page1_paginateby12_displaylist => RepresentativeListTest.test_page1_paginateby12_active_displaylist}/content (94%)
 create mode 100644 memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_all_displaylist/content
 rename memopol/tests/response_fixtures/{RepresentativeListTest.test_page1_paginateby24_displaygrid => RepresentativeListTest.test_page1_paginateby24_active_displaygrid}/content (96%)
 create mode 100644 memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_all_displaygrid/content

diff --git a/memopol/tests/response_fixtures/DossiersTest.test_dossier_detail/content b/memopol/tests/response_fixtures/DossiersTest.test_dossier_detail/content
index f7cd1275..9d4162d5 100644
--- a/memopol/tests/response_fixtures/DossiersTest.test_dossier_detail/content
+++ b/memopol/tests/response_fixtures/DossiersTest.test_dossier_detail/content
@@ -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.6cb1be2fbcdd.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.c7d56d0a17c9.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>
     
diff --git a/memopol/tests/response_fixtures/DossiersTest.test_dossier_list/content b/memopol/tests/response_fixtures/DossiersTest.test_dossier_list/content
index cbfa7a40..c56ee920 100644
--- a/memopol/tests/response_fixtures/DossiersTest.test_dossier_list/content
+++ b/memopol/tests/response_fixtures/DossiersTest.test_dossier_list/content
@@ -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.6cb1be2fbcdd.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.c7d56d0a17c9.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>
     
@@ -119,6 +119,8 @@
   </nav>
   <div class='count'>
     Number of results : 1
+
+    
     <br />
     Number of displayed results :
     12
diff --git a/memopol/tests/response_fixtures/GroupListTest.test_chambers/content b/memopol/tests/response_fixtures/GroupListTest.test_chambers/content
index 0aca9579..79c88cae 100644
--- a/memopol/tests/response_fixtures/GroupListTest.test_chambers/content
+++ b/memopol/tests/response_fixtures/GroupListTest.test_chambers/content
@@ -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.6cb1be2fbcdd.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.c7d56d0a17c9.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>
     
diff --git a/memopol/tests/response_fixtures/GroupListTest.test_committees/content b/memopol/tests/response_fixtures/GroupListTest.test_committees/content
index a1a7a77a..3939576c 100644
--- a/memopol/tests/response_fixtures/GroupListTest.test_committees/content
+++ b/memopol/tests/response_fixtures/GroupListTest.test_committees/content
@@ -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.6cb1be2fbcdd.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.c7d56d0a17c9.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>
     
diff --git a/memopol/tests/response_fixtures/GroupListTest.test_country/content b/memopol/tests/response_fixtures/GroupListTest.test_country/content
index 83514c7c..b523f5e8 100644
--- a/memopol/tests/response_fixtures/GroupListTest.test_country/content
+++ b/memopol/tests/response_fixtures/GroupListTest.test_country/content
@@ -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.6cb1be2fbcdd.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.c7d56d0a17c9.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>
     
diff --git a/memopol/tests/response_fixtures/GroupListTest.test_delegations/content b/memopol/tests/response_fixtures/GroupListTest.test_delegations/content
index 579f2a2f..197c2285 100644
--- a/memopol/tests/response_fixtures/GroupListTest.test_delegations/content
+++ b/memopol/tests/response_fixtures/GroupListTest.test_delegations/content
@@ -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.6cb1be2fbcdd.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.c7d56d0a17c9.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>
     
diff --git a/memopol/tests/response_fixtures/GroupListTest.test_parties/content b/memopol/tests/response_fixtures/GroupListTest.test_parties/content
index 1e275073..4961cfe1 100644
--- a/memopol/tests/response_fixtures/GroupListTest.test_parties/content
+++ b/memopol/tests/response_fixtures/GroupListTest.test_parties/content
@@ -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.6cb1be2fbcdd.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.c7d56d0a17c9.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>
     
diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist/content b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_active_displaylist/content
similarity index 94%
rename from memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist/content
rename to memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_active_displaylist/content
index 762d96a7..61d44221 100644
--- a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist/content
+++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_active_displaylist/content
@@ -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.6cb1be2fbcdd.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.c7d56d0a17c9.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>
     
@@ -151,6 +151,19 @@
   </nav>
   <div class='count'>
     Number of results : 36
+
+    
+      <br />
+      Display :
+
+  current legislature only /
+  <a href='?active_only=0'>
+    all data
+  </a>
+
+
+
+    
     <br />
     Number of displayed results :
     12
@@ -225,8 +238,8 @@
         </th>
       </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/zigmantas-balcytis/'>
               <img src='http://www.europarl.europa.eu/mepphoto/96680.jpg' width='80' />
 
@@ -261,8 +274,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/vilija-blinkeviciute/'>
               <img src='http://www.europarl.europa.eu/mepphoto/96681.jpg' width='80' />
 
@@ -297,8 +310,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/elmar-brok/'>
               <img src='http://www.europarl.europa.eu/mepphoto/1263.jpg' width='80' />
 
@@ -333,8 +346,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/cristian-silviu-busoi/'>
               <img src='http://www.europarl.europa.eu/mepphoto/38420.jpg' width='80' />
 
@@ -369,8 +382,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/david-casa/'>
               <img src='http://www.europarl.europa.eu/mepphoto/28122.jpg' width='80' />
 
@@ -405,8 +418,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/jean-marie-cavada/'>
               <img src='http://www.europarl.europa.eu/mepphoto/28206.jpg' width='80' />
 
@@ -441,8 +454,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/nikolaos-chountis/'>
               <img src='http://www.europarl.europa.eu/mepphoto/26851.jpg' width='80' />
 
@@ -477,8 +490,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/michael-cramer/'>
               <img src='http://www.europarl.europa.eu/mepphoto/28238.jpg' width='80' />
 
@@ -513,8 +526,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/michel-dantin/'>
               <img src='http://www.europarl.europa.eu/mepphoto/97296.jpg' width='80' />
 
@@ -549,8 +562,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/tamas-deutsch/'>
               <img src='http://www.europarl.europa.eu/mepphoto/96826.jpg' width='80' />
 
@@ -585,8 +598,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/viorica-dancila/'>
               <img src='http://www.europarl.europa.eu/mepphoto/95281.jpg' width='80' />
 
@@ -621,8 +634,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/bas-eickhout/'>
               <img src='http://www.europarl.europa.eu/mepphoto/96725.jpg' width='80' />
 
@@ -716,6 +729,19 @@
   </nav>
   <div class='count'>
     Number of results : 36
+
+    
+      <br />
+      Display :
+
+  current legislature only /
+  <a href='?active_only=0'>
+    all data
+  </a>
+
+
+
+    
     <br />
     Number of displayed results :
     12
diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_all_displaylist/content b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_all_displaylist/content
new file mode 100644
index 00000000..1c99e4ea
--- /dev/null
+++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_all_displaylist/content
@@ -0,0 +1,828 @@
+<!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
+      - 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.c7d56d0a17c9.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='/votes/dossier/'>
+        Dossiers
+
+      </a>
+    </li>
+  </ul>
+</div>
+
+    <div class="container-fluid main-container">
+      
+
+  
+
+    <form action='' method='get'>
+      <label for='search'>
+        Search
+      </label>
+      <input id='search' type='text' name='search' />
+      <input type='submit' value='Go' />
+
+    </form>
+    <a href='?csv'>
+      Download data as CSV
+
+    </a>
+  
+
+  <div class='pagination-block'>
+
+  <nav>
+    <ul class='pagination pagination-sm'>
+      
+      
+        
+          
+            <li class='active'>
+              <a href=''>
+                1
+              </a>
+            </li>
+          
+        
+      
+        
+          
+            <li>
+              <a href='?&page=2'>
+                2
+
+              </a>
+            </li>
+          
+        
+      
+        
+          
+            <li>
+              <a href='?&page=3'>
+                3
+
+              </a>
+            </li>
+          
+        
+      
+      
+        <li>
+          <a aria-label='Next' href='?&page=2'>
+            <i aria-hidden="true" class="fa fa-chevron-right"></i>
+
+          </a>
+        </li>
+        <li>
+          <a aria-label='Last' href='?&page=3'>
+            <i aria-hidden="true" class="fa fa-chevron-circle-right"></i>
+
+          </a>
+        </li>
+      
+    </ul>
+  </nav>
+  <div class='count'>
+    Number of results : 36
+
+    
+      <br />
+      Display :
+
+  <a href='?active_only=1'>
+    current legislature only
+  </a>
+  / all data
+
+
+
+    
+    <br />
+    Number of displayed results :
+    12
+    (
+    
+      <a href='?paginate_by=12'>
+        12
+      </a>
+      
+        /
+      
+    
+      <a href='?paginate_by=24'>
+        24
+      </a>
+      
+        /
+      
+    
+      <a href='?paginate_by=48'>
+        48
+      </a>
+      
+        /
+      
+    
+      <a href='?paginate_by=96'>
+        96
+      </a>
+      
+    
+    )
+    
+      <span class='grid-list-selector'>
+  <a href='?display=grid'>
+    <i class="fa fa-th"></i>
+  </a>
+  <a href='?display=list'>
+    <i class="fa fa-th-list"></i>
+
+  </a>
+</span>
+
+
+    
+  </div>
+</div>
+
+
+  
+
+    <table class='table'>
+      <tr>
+        <th>
+          Photo
+        </th>
+        <th>
+          Name
+        </th>
+        <th>
+          Chamber
+        </th>
+        <th>
+          Country
+        </th>
+        <th>
+          Group
+        </th>
+        <th>
+          Score
+
+        </th>
+      </tr>
+      
+        <tr class='representative_item active'>
+          <td class='photo'>
+            <a href='/legislature/representative/zigmantas-balcytis/'>
+              <img src='http://www.europarl.europa.eu/mepphoto/96680.jpg' width='80' />
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/zigmantas-balcytis/'>
+              Zigmantas BALÄŒYTIS
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              European Parliament [EP]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/country/Lithuania/'>
+              Lithuania [LT]
+
+            </a>
+          </td>
+          <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 group-icon-sd"></span> SD
+            </a>
+          </td>
+          <td>
+            <span class="label label-success">15</span>
+
+          </td>
+        </tr>
+      
+        <tr class='representative_item active'>
+          <td class='photo'>
+            <a href='/legislature/representative/vilija-blinkeviciute/'>
+              <img src='http://www.europarl.europa.eu/mepphoto/96681.jpg' width='80' />
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/vilija-blinkeviciute/'>
+              Vilija BLINKEVIČIŪTĖ
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              European Parliament [EP]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/country/Lithuania/'>
+              Lithuania [LT]
+
+            </a>
+          </td>
+          <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 group-icon-sd"></span> SD
+            </a>
+          </td>
+          <td>
+            <span class="label label-success">15</span>
+
+          </td>
+        </tr>
+      
+        <tr class='representative_item active'>
+          <td class='photo'>
+            <a href='/legislature/representative/elmar-brok/'>
+              <img src='http://www.europarl.europa.eu/mepphoto/1263.jpg' width='80' />
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/elmar-brok/'>
+              Elmar BROK
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              European Parliament [EP]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/country/Germany/'>
+              Germany [DE]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
+              <span class="group-icon group-icon-epp"></span> EPP
+            </a>
+          </td>
+          <td>
+            <span class="label label-danger">-10</span>
+
+          </td>
+        </tr>
+      
+        <tr class='representative_item active'>
+          <td class='photo'>
+            <a href='/legislature/representative/cristian-silviu-busoi/'>
+              <img src='http://www.europarl.europa.eu/mepphoto/38420.jpg' width='80' />
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/cristian-silviu-busoi/'>
+              Cristian-Silviu BUÅžOI
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              European Parliament [EP]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/country/Romania/'>
+              Romania [RO]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
+              <span class="group-icon group-icon-epp"></span> EPP
+            </a>
+          </td>
+          <td>
+            <span class="label label-success">15</span>
+
+          </td>
+        </tr>
+      
+        <tr class='representative_item active'>
+          <td class='photo'>
+            <a href='/legislature/representative/david-casa/'>
+              <img src='http://www.europarl.europa.eu/mepphoto/28122.jpg' width='80' />
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/david-casa/'>
+              David CASA
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              European Parliament [EP]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/country/Malta/'>
+              Malta [MT]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
+              <span class="group-icon group-icon-epp"></span> EPP
+            </a>
+          </td>
+          <td>
+            <span class="label label-danger">-15</span>
+
+          </td>
+        </tr>
+      
+        <tr class='representative_item active'>
+          <td class='photo'>
+            <a href='/legislature/representative/jean-marie-cavada/'>
+              <img src='http://www.europarl.europa.eu/mepphoto/28206.jpg' width='80' />
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/jean-marie-cavada/'>
+              Jean-Marie CAVADA
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              European Parliament [EP]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/country/France/'>
+              France [FR]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Alliance%20of%20Liberals%20and%20Democrats%20for%20Europe/'>
+              <span class="group-icon group-icon-alde"></span> ALDE
+            </a>
+          </td>
+          <td>
+            <span class="label label-danger">-15</span>
+
+          </td>
+        </tr>
+      
+        <tr class='representative_item active'>
+          <td class='photo'>
+            <a href='/legislature/representative/nikolaos-chountis/'>
+              <img src='http://www.europarl.europa.eu/mepphoto/26851.jpg' width='80' />
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/nikolaos-chountis/'>
+              Nikolaos CHOUNTIS
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              European Parliament [EP]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/country/Greece/'>
+              Greece [GR]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/group/European%20Parliament/Confederal%20Group%20of%20the%20European%20United%20Left%20-%20Nordic%20Green%20Left/'>
+              <span class="group-icon group-icon-guengl"></span> GUE/NGL
+            </a>
+          </td>
+          <td>
+            <span class="label label-success">15</span>
+
+          </td>
+        </tr>
+      
+        <tr class='representative_item active'>
+          <td class='photo'>
+            <a href='/legislature/representative/michael-cramer/'>
+              <img src='http://www.europarl.europa.eu/mepphoto/28238.jpg' width='80' />
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/michael-cramer/'>
+              Michael CRAMER
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              European Parliament [EP]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/country/Germany/'>
+              Germany [DE]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Greens/European%20Free%20Alliance/'>
+              <span class="group-icon group-icon-greensefa"></span> Greens/EFA
+            </a>
+          </td>
+          <td>
+            <span class="label label-success">15</span>
+
+          </td>
+        </tr>
+      
+        <tr class='representative_item active'>
+          <td class='photo'>
+            <a href='/legislature/representative/michel-dantin/'>
+              <img src='http://www.europarl.europa.eu/mepphoto/97296.jpg' width='80' />
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/michel-dantin/'>
+              Michel DANTIN
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              European Parliament [EP]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/country/France/'>
+              France [FR]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
+              <span class="group-icon group-icon-epp"></span> EPP
+            </a>
+          </td>
+          <td>
+            <span class="label label-danger">-15</span>
+
+          </td>
+        </tr>
+      
+        <tr class='representative_item active'>
+          <td class='photo'>
+            <a href='/legislature/representative/tamas-deutsch/'>
+              <img src='http://www.europarl.europa.eu/mepphoto/96826.jpg' width='80' />
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/tamas-deutsch/'>
+              Tamás DEUTSCH
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              European Parliament [EP]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/country/Hungary/'>
+              Hungary [HU]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
+              <span class="group-icon group-icon-epp"></span> EPP
+            </a>
+          </td>
+          <td>
+            <span class="label label-danger">-15</span>
+
+          </td>
+        </tr>
+      
+        <tr class='representative_item active'>
+          <td class='photo'>
+            <a href='/legislature/representative/viorica-dancila/'>
+              <img src='http://www.europarl.europa.eu/mepphoto/95281.jpg' width='80' />
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/viorica-dancila/'>
+              Viorica DÄ‚NCILÄ‚
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              European Parliament [EP]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/country/Romania/'>
+              Romania [RO]
+
+            </a>
+          </td>
+          <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 group-icon-sd"></span> SD
+            </a>
+          </td>
+          <td>
+            <span class="label label-success">15</span>
+
+          </td>
+        </tr>
+      
+        <tr class='representative_item active'>
+          <td class='photo'>
+            <a href='/legislature/representative/bas-eickhout/'>
+              <img src='http://www.europarl.europa.eu/mepphoto/96725.jpg' width='80' />
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/bas-eickhout/'>
+              Bas EICKHOUT
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              European Parliament [EP]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/country/Netherlands/'>
+              Netherlands [NL]
+
+            </a>
+          </td>
+          <td>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Greens/European%20Free%20Alliance/'>
+              <span class="group-icon group-icon-greensefa"></span> Greens/EFA
+            </a>
+          </td>
+          <td>
+            <span class="label label-success">15</span>
+
+          </td>
+        </tr>
+      
+    </table>
+  
+
+  <div class='pagination-block'>
+
+  <nav>
+    <ul class='pagination pagination-sm'>
+      
+      
+        
+          
+            <li class='active'>
+              <a href=''>
+                1
+              </a>
+            </li>
+          
+        
+      
+        
+          
+            <li>
+              <a href='?&page=2'>
+                2
+
+              </a>
+            </li>
+          
+        
+      
+        
+          
+            <li>
+              <a href='?&page=3'>
+                3
+
+              </a>
+            </li>
+          
+        
+      
+      
+        <li>
+          <a aria-label='Next' href='?&page=2'>
+            <i aria-hidden="true" class="fa fa-chevron-right"></i>
+
+          </a>
+        </li>
+        <li>
+          <a aria-label='Last' href='?&page=3'>
+            <i aria-hidden="true" class="fa fa-chevron-circle-right"></i>
+
+          </a>
+        </li>
+      
+    </ul>
+  </nav>
+  <div class='count'>
+    Number of results : 36
+
+    
+      <br />
+      Display :
+
+  <a href='?active_only=1'>
+    current legislature only
+  </a>
+  / all data
+
+
+
+    
+    <br />
+    Number of displayed results :
+    12
+    (
+    
+      <a href='?paginate_by=12'>
+        12
+      </a>
+      
+        /
+      
+    
+      <a href='?paginate_by=24'>
+        24
+      </a>
+      
+        /
+      
+    
+      <a href='?paginate_by=48'>
+        48
+      </a>
+      
+        /
+      
+    
+      <a href='?paginate_by=96'>
+        96
+      </a>
+      
+    
+    )
+    
+      <span class='grid-list-selector'>
+  <a href='?display=grid'>
+    <i class="fa fa-th"></i>
+  </a>
+  <a href='?display=list'>
+    <i class="fa fa-th-list"></i>
+
+  </a>
+</span>
+
+
+    
+  </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>
diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist_searchjoly/content b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist_searchjoly/content
index 30366da8..09e3ad59 100644
--- a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist_searchjoly/content
+++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist_searchjoly/content
@@ -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.6cb1be2fbcdd.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.c7d56d0a17c9.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>
     
@@ -106,6 +106,19 @@
   </nav>
   <div class='count'>
     Number of results : 1
+
+    
+      <br />
+      Display :
+
+  current legislature only /
+  <a href='?active_only=0'>
+    all data
+  </a>
+
+
+
+    
     <br />
     Number of displayed results :
     12
@@ -180,8 +193,8 @@
         </th>
       </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/eva-joly/'>
               <img src='http://www.europarl.europa.eu/mepphoto/96883.jpg' width='80' />
 
@@ -230,6 +243,19 @@
   </nav>
   <div class='count'>
     Number of results : 1
+
+    
+      <br />
+      Display :
+
+  current legislature only /
+  <a href='?active_only=0'>
+    all data
+  </a>
+
+
+
+    
     <br />
     Number of displayed results :
     12
diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_displaygrid/content b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_active_displaygrid/content
similarity index 96%
rename from memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_displaygrid/content
rename to memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_active_displaygrid/content
index 7820fa65..290d214d 100644
--- a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_displaygrid/content
+++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_active_displaygrid/content
@@ -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.6cb1be2fbcdd.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.c7d56d0a17c9.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>
     
@@ -140,6 +140,19 @@
   </nav>
   <div class='count'>
     Number of results : 36
+
+    
+      <br />
+      Display :
+
+  current legislature only /
+  <a href='?active_only=0'>
+    all data
+  </a>
+
+
+
+    
     <br />
     Number of displayed results :
     24
@@ -193,7 +206,7 @@
 
   <div class='representative_grid'>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/zigmantas-balcytis/'>
             <img src='http://www.europarl.europa.eu/mepphoto/96680.jpg' width='80' />
@@ -227,7 +240,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/vilija-blinkeviciute/'>
             <img src='http://www.europarl.europa.eu/mepphoto/96681.jpg' width='80' />
@@ -261,7 +274,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/elmar-brok/'>
             <img src='http://www.europarl.europa.eu/mepphoto/1263.jpg' width='80' />
@@ -295,7 +308,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/cristian-silviu-busoi/'>
             <img src='http://www.europarl.europa.eu/mepphoto/38420.jpg' width='80' />
@@ -329,7 +342,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/david-casa/'>
             <img src='http://www.europarl.europa.eu/mepphoto/28122.jpg' width='80' />
@@ -363,7 +376,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/jean-marie-cavada/'>
             <img src='http://www.europarl.europa.eu/mepphoto/28206.jpg' width='80' />
@@ -397,7 +410,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/nikolaos-chountis/'>
             <img src='http://www.europarl.europa.eu/mepphoto/26851.jpg' width='80' />
@@ -431,7 +444,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/michael-cramer/'>
             <img src='http://www.europarl.europa.eu/mepphoto/28238.jpg' width='80' />
@@ -465,7 +478,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/michel-dantin/'>
             <img src='http://www.europarl.europa.eu/mepphoto/97296.jpg' width='80' />
@@ -499,7 +512,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/tamas-deutsch/'>
             <img src='http://www.europarl.europa.eu/mepphoto/96826.jpg' width='80' />
@@ -533,7 +546,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/viorica-dancila/'>
             <img src='http://www.europarl.europa.eu/mepphoto/95281.jpg' width='80' />
@@ -567,7 +580,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/bas-eickhout/'>
             <img src='http://www.europarl.europa.eu/mepphoto/96725.jpg' width='80' />
@@ -601,7 +614,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/ismail-ertug/'>
             <img src='http://www.europarl.europa.eu/mepphoto/96842.jpg' width='80' />
@@ -635,7 +648,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/jose-manuel-fernandes/'>
             <img src='http://www.europarl.europa.eu/mepphoto/96899.jpg' width='80' />
@@ -669,7 +682,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/monika-flasikova-benova/'>
             <img src='http://www.europarl.europa.eu/mepphoto/23868.jpg' width='80' />
@@ -703,7 +716,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/ashley-fox/'>
             <img src='http://www.europarl.europa.eu/mepphoto/96957.jpg' width='80' />
@@ -737,7 +750,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/eider-gardiazabal-rubial/'>
             <img src='http://www.europarl.europa.eu/mepphoto/96991.jpg' width='80' />
@@ -771,7 +784,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/kinga-gal/'>
             <img src='http://www.europarl.europa.eu/mepphoto/28150.jpg' width='80' />
@@ -805,7 +818,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/ildiko-gall-pelcz/'>
             <img src='http://www.europarl.europa.eu/mepphoto/102886.jpg' width='80' />
@@ -839,7 +852,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/marian-harkin/'>
             <img src='http://www.europarl.europa.eu/mepphoto/28116.jpg' width='80' />
@@ -873,7 +886,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/mary-honeyball/'>
             <img src='http://www.europarl.europa.eu/mepphoto/5846.jpg' width='80' />
@@ -907,7 +920,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/iliana-iotova/'>
             <img src='http://www.europarl.europa.eu/mepphoto/38605.jpg' width='80' />
@@ -941,7 +954,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/liisa-jaakonsaari/'>
             <img src='http://www.europarl.europa.eu/mepphoto/96684.jpg' width='80' />
@@ -975,7 +988,7 @@
         </ul>
       </div>
     
-      <div class='representative_item'>
+      <div class='representative_item active'>
         <p class='photo'>
           <a href='/legislature/representative/yannick-jadot/'>
             <img src='http://www.europarl.europa.eu/mepphoto/96740.jpg' width='80' />
@@ -1057,6 +1070,19 @@
   </nav>
   <div class='count'>
     Number of results : 36
+
+    
+      <br />
+      Display :
+
+  current legislature only /
+  <a href='?active_only=0'>
+    all data
+  </a>
+
+
+
+    
     <br />
     Number of displayed results :
     24
diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_all_displaygrid/content b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_all_displaygrid/content
new file mode 100644
index 00000000..aba16914
--- /dev/null
+++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_all_displaygrid/content
@@ -0,0 +1,1169 @@
+<!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
+      - 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.c7d56d0a17c9.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='/votes/dossier/'>
+        Dossiers
+
+      </a>
+    </li>
+  </ul>
+</div>
+
+    <div class="container-fluid main-container">
+      
+
+  
+
+    <form action='' method='get'>
+      <label for='search'>
+        Search
+      </label>
+      <input id='search' type='text' name='search' />
+      <input type='submit' value='Go' />
+
+    </form>
+    <a href='?csv'>
+      Download data as CSV
+
+    </a>
+  
+
+  <div class='pagination-block'>
+
+  <nav>
+    <ul class='pagination pagination-sm'>
+      
+      
+        
+          
+            <li class='active'>
+              <a href=''>
+                1
+              </a>
+            </li>
+          
+        
+      
+        
+          
+            <li>
+              <a href='?&page=2'>
+                2
+
+              </a>
+            </li>
+          
+        
+      
+      
+        <li>
+          <a aria-label='Next' href='?&page=2'>
+            <i aria-hidden="true" class="fa fa-chevron-right"></i>
+
+          </a>
+        </li>
+        <li>
+          <a aria-label='Last' href='?&page=2'>
+            <i aria-hidden="true" class="fa fa-chevron-circle-right"></i>
+
+          </a>
+        </li>
+      
+    </ul>
+  </nav>
+  <div class='count'>
+    Number of results : 36
+
+    
+      <br />
+      Display :
+
+  <a href='?active_only=1'>
+    current legislature only
+  </a>
+  / all data
+
+
+
+    
+    <br />
+    Number of displayed results :
+    24
+    (
+    
+      <a href='?paginate_by=12'>
+        12
+      </a>
+      
+        /
+      
+    
+      <a href='?paginate_by=24'>
+        24
+      </a>
+      
+        /
+      
+    
+      <a href='?paginate_by=48'>
+        48
+      </a>
+      
+        /
+      
+    
+      <a href='?paginate_by=96'>
+        96
+      </a>
+      
+    
+    )
+    
+      <span class='grid-list-selector'>
+  <a href='?display=grid'>
+    <i class="fa fa-th"></i>
+  </a>
+  <a href='?display=list'>
+    <i class="fa fa-th-list"></i>
+
+  </a>
+</span>
+
+
+    
+  </div>
+</div>
+
+
+  
+
+  <div class='representative_grid'>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/zigmantas-balcytis/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/96680.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/zigmantas-balcytis/'>
+              Zigmantas BALÄŒYTIS
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/Lithuania/'>
+              <span class="flag-icon flag-icon-lt"></span> Lithuania
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
+              <span class="group-icon group-icon-sd"></span> SD
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-success">15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/vilija-blinkeviciute/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/96681.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/vilija-blinkeviciute/'>
+              Vilija BLINKEVIČIŪTĖ
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/Lithuania/'>
+              <span class="flag-icon flag-icon-lt"></span> Lithuania
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
+              <span class="group-icon group-icon-sd"></span> SD
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-success">15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/elmar-brok/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/1263.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/elmar-brok/'>
+              Elmar BROK
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/Germany/'>
+              <span class="flag-icon flag-icon-de"></span> Germany
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
+              <span class="group-icon group-icon-epp"></span> EPP
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-danger">-10</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/cristian-silviu-busoi/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/38420.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/cristian-silviu-busoi/'>
+              Cristian-Silviu BUÅžOI
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/Romania/'>
+              <span class="flag-icon flag-icon-ro"></span> Romania
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
+              <span class="group-icon group-icon-epp"></span> EPP
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-success">15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/david-casa/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/28122.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/david-casa/'>
+              David CASA
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/Malta/'>
+              <span class="flag-icon flag-icon-mt"></span> Malta
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
+              <span class="group-icon group-icon-epp"></span> EPP
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-danger">-15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/jean-marie-cavada/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/28206.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/jean-marie-cavada/'>
+              Jean-Marie CAVADA
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/France/'>
+              <span class="flag-icon flag-icon-fr"></span> France
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Alliance%20of%20Liberals%20and%20Democrats%20for%20Europe/'>
+              <span class="group-icon group-icon-alde"></span> ALDE
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-danger">-15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/nikolaos-chountis/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/26851.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/nikolaos-chountis/'>
+              Nikolaos CHOUNTIS
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/Greece/'>
+              <span class="flag-icon flag-icon-gr"></span> Greece
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Confederal%20Group%20of%20the%20European%20United%20Left%20-%20Nordic%20Green%20Left/'>
+              <span class="group-icon group-icon-guengl"></span> GUE/NGL
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-success">15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/michael-cramer/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/28238.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/michael-cramer/'>
+              Michael CRAMER
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/Germany/'>
+              <span class="flag-icon flag-icon-de"></span> Germany
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Greens/European%20Free%20Alliance/'>
+              <span class="group-icon group-icon-greensefa"></span> Greens/EFA
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-success">15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/michel-dantin/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/97296.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/michel-dantin/'>
+              Michel DANTIN
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/France/'>
+              <span class="flag-icon flag-icon-fr"></span> France
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
+              <span class="group-icon group-icon-epp"></span> EPP
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-danger">-15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/tamas-deutsch/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/96826.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/tamas-deutsch/'>
+              Tamás DEUTSCH
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/Hungary/'>
+              <span class="flag-icon flag-icon-hu"></span> Hungary
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
+              <span class="group-icon group-icon-epp"></span> EPP
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-danger">-15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/viorica-dancila/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/95281.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/viorica-dancila/'>
+              Viorica DÄ‚NCILÄ‚
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/Romania/'>
+              <span class="flag-icon flag-icon-ro"></span> Romania
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
+              <span class="group-icon group-icon-sd"></span> SD
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-success">15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/bas-eickhout/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/96725.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/bas-eickhout/'>
+              Bas EICKHOUT
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/Netherlands/'>
+              <span class="flag-icon flag-icon-nl"></span> Netherlands
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Greens/European%20Free%20Alliance/'>
+              <span class="group-icon group-icon-greensefa"></span> Greens/EFA
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-success">15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/ismail-ertug/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/96842.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/ismail-ertug/'>
+              Ismail ERTUG
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/Germany/'>
+              <span class="flag-icon flag-icon-de"></span> Germany
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
+              <span class="group-icon group-icon-sd"></span> SD
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-success">10</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/jose-manuel-fernandes/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/96899.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/jose-manuel-fernandes/'>
+              José Manuel FERNANDES
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/Portugal/'>
+              <span class="flag-icon flag-icon-pt"></span> Portugal
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
+              <span class="group-icon group-icon-epp"></span> EPP
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-danger">-15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/monika-flasikova-benova/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/23868.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/monika-flasikova-benova/'>
+              Monika FLAŠÍKOVÁ BEŇOVÁ
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/Slovakia/'>
+              <span class="flag-icon flag-icon-sk"></span> Slovakia
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
+              <span class="group-icon group-icon-sd"></span> SD
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-success">15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/ashley-fox/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/96957.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/ashley-fox/'>
+              Ashley FOX
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/United%20Kingdom/'>
+              <span class="flag-icon flag-icon-gb"></span> United Kingdom
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/European%20Conservatives%20and%20Reformists%20Group/'>
+              <span class="group-icon group-icon-ecr"></span> ECR
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-danger">-15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/eider-gardiazabal-rubial/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/96991.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/eider-gardiazabal-rubial/'>
+              Eider GARDIAZABAL RUBIAL
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/Spain/'>
+              <span class="flag-icon flag-icon-es"></span> Spain
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
+              <span class="group-icon group-icon-sd"></span> SD
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-success">15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/kinga-gal/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/28150.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/kinga-gal/'>
+              Kinga GÁL
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/Hungary/'>
+              <span class="flag-icon flag-icon-hu"></span> Hungary
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
+              <span class="group-icon group-icon-epp"></span> EPP
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-danger">-15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/ildiko-gall-pelcz/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/102886.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/ildiko-gall-pelcz/'>
+              Ildikó GÁLL-PELCZ
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/Hungary/'>
+              <span class="flag-icon flag-icon-hu"></span> Hungary
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
+              <span class="group-icon group-icon-epp"></span> EPP
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-danger">-15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/marian-harkin/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/28116.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/marian-harkin/'>
+              Marian HARKIN
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/Ireland/'>
+              <span class="flag-icon flag-icon-ie"></span> Ireland
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Alliance%20of%20Liberals%20and%20Democrats%20for%20Europe/'>
+              <span class="group-icon group-icon-alde"></span> ALDE
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-success">15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/mary-honeyball/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/5846.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/mary-honeyball/'>
+              Mary HONEYBALL
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/United%20Kingdom/'>
+              <span class="flag-icon flag-icon-gb"></span> United Kingdom
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
+              <span class="group-icon group-icon-sd"></span> SD
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-danger">-7</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/iliana-iotova/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/38605.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/iliana-iotova/'>
+              Iliana IOTOVA
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/Bulgaria/'>
+              <span class="flag-icon flag-icon-bg"></span> Bulgaria
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
+              <span class="group-icon group-icon-sd"></span> SD
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-success">15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/liisa-jaakonsaari/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/96684.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/liisa-jaakonsaari/'>
+              Liisa JAAKONSAARI
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/Finland/'>
+              <span class="flag-icon flag-icon-fi"></span> Finland
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
+              <span class="group-icon group-icon-sd"></span> SD
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-success">15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+      <div class='representative_item active'>
+        <p class='photo'>
+          <a href='/legislature/representative/yannick-jadot/'>
+            <img src='http://www.europarl.europa.eu/mepphoto/96740.jpg' width='80' />
+          </a>
+        </p>
+        <ul>
+          <li class='name'>
+            <a href='/legislature/representative/yannick-jadot/'>
+              Yannick JADOT
+            </a>
+          </li>
+          <li class='chamber'>
+            <a href='/legislature/representative/chamber/European%20Parliament/'>
+              <span class="chamber-icon chamber-icon-ep"></span> European Parliament
+            </a>
+          </li>
+          <li class='country'>
+            <a href='/legislature/representative/country/France/'>
+              <span class="flag-icon flag-icon-fr"></span> France
+            </a>
+          </li>
+          <li class='mandate'>
+            <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Greens/European%20Free%20Alliance/'>
+              <span class="group-icon group-icon-greensefa"></span> Greens/EFA
+            </a>
+          </li>
+          <li class='score'>
+            <span class="label label-success">15</span>
+
+          </li>
+        </ul>
+      </div>
+    
+  </div>
+
+
+  <div class='pagination-block'>
+
+  <nav>
+    <ul class='pagination pagination-sm'>
+      
+      
+        
+          
+            <li class='active'>
+              <a href=''>
+                1
+              </a>
+            </li>
+          
+        
+      
+        
+          
+            <li>
+              <a href='?&page=2'>
+                2
+
+              </a>
+            </li>
+          
+        
+      
+      
+        <li>
+          <a aria-label='Next' href='?&page=2'>
+            <i aria-hidden="true" class="fa fa-chevron-right"></i>
+
+          </a>
+        </li>
+        <li>
+          <a aria-label='Last' href='?&page=2'>
+            <i aria-hidden="true" class="fa fa-chevron-circle-right"></i>
+
+          </a>
+        </li>
+      
+    </ul>
+  </nav>
+  <div class='count'>
+    Number of results : 36
+
+    
+      <br />
+      Display :
+
+  <a href='?active_only=1'>
+    current legislature only
+  </a>
+  / all data
+
+
+
+    
+    <br />
+    Number of displayed results :
+    24
+    (
+    
+      <a href='?paginate_by=12'>
+        12
+      </a>
+      
+        /
+      
+    
+      <a href='?paginate_by=24'>
+        24
+      </a>
+      
+        /
+      
+    
+      <a href='?paginate_by=48'>
+        48
+      </a>
+      
+        /
+      
+    
+      <a href='?paginate_by=96'>
+        96
+      </a>
+      
+    
+    )
+    
+      <span class='grid-list-selector'>
+  <a href='?display=grid'>
+    <i class="fa fa-th"></i>
+  </a>
+  <a href='?display=list'>
+    <i class="fa fa-th-list"></i>
+
+  </a>
+</span>
+
+
+    
+  </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>
diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby12_displaylist/content b/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby12_displaylist/content
index c4ba5cb8..3241af3d 100644
--- a/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby12_displaylist/content
+++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby12_displaylist/content
@@ -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.6cb1be2fbcdd.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.c7d56d0a17c9.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>
     
@@ -164,6 +164,19 @@
   </nav>
   <div class='count'>
     Number of results : 36
+
+    
+      <br />
+      Display :
+
+  current legislature only /
+  <a href='?active_only=0'>
+    all data
+  </a>
+
+
+
+    
     <br />
     Number of displayed results :
     12
@@ -238,8 +251,8 @@
         </th>
       </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/ismail-ertug/'>
               <img src='http://www.europarl.europa.eu/mepphoto/96842.jpg' width='80' />
 
@@ -274,8 +287,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/jose-manuel-fernandes/'>
               <img src='http://www.europarl.europa.eu/mepphoto/96899.jpg' width='80' />
 
@@ -310,8 +323,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/monika-flasikova-benova/'>
               <img src='http://www.europarl.europa.eu/mepphoto/23868.jpg' width='80' />
 
@@ -346,8 +359,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/ashley-fox/'>
               <img src='http://www.europarl.europa.eu/mepphoto/96957.jpg' width='80' />
 
@@ -382,8 +395,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/eider-gardiazabal-rubial/'>
               <img src='http://www.europarl.europa.eu/mepphoto/96991.jpg' width='80' />
 
@@ -418,8 +431,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/kinga-gal/'>
               <img src='http://www.europarl.europa.eu/mepphoto/28150.jpg' width='80' />
 
@@ -454,8 +467,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/ildiko-gall-pelcz/'>
               <img src='http://www.europarl.europa.eu/mepphoto/102886.jpg' width='80' />
 
@@ -490,8 +503,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/marian-harkin/'>
               <img src='http://www.europarl.europa.eu/mepphoto/28116.jpg' width='80' />
 
@@ -526,8 +539,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/mary-honeyball/'>
               <img src='http://www.europarl.europa.eu/mepphoto/5846.jpg' width='80' />
 
@@ -562,8 +575,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/iliana-iotova/'>
               <img src='http://www.europarl.europa.eu/mepphoto/38605.jpg' width='80' />
 
@@ -598,8 +611,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/liisa-jaakonsaari/'>
               <img src='http://www.europarl.europa.eu/mepphoto/96684.jpg' width='80' />
 
@@ -634,8 +647,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/yannick-jadot/'>
               <img src='http://www.europarl.europa.eu/mepphoto/96740.jpg' width='80' />
 
@@ -742,6 +755,19 @@
   </nav>
   <div class='count'>
     Number of results : 36
+
+    
+      <br />
+      Display :
+
+  current legislature only /
+  <a href='?active_only=0'>
+    all data
+  </a>
+
+
+
+    
     <br />
     Number of displayed results :
     12
diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby24_displaylist/content b/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby24_displaylist/content
index c85e7a6b..46dbdc6b 100644
--- a/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby24_displaylist/content
+++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby24_displaylist/content
@@ -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.6cb1be2fbcdd.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.c7d56d0a17c9.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>
     
@@ -140,6 +140,19 @@
   </nav>
   <div class='count'>
     Number of results : 36
+
+    
+      <br />
+      Display :
+
+  current legislature only /
+  <a href='?active_only=0'>
+    all data
+  </a>
+
+
+
+    
     <br />
     Number of displayed results :
     24
@@ -214,8 +227,8 @@
         </th>
       </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/eva-joly/'>
               <img src='http://www.europarl.europa.eu/mepphoto/96883.jpg' width='80' />
 
@@ -250,8 +263,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/jarosaw-kalinowski/'>
               <img src='http://www.europarl.europa.eu/mepphoto/96771.jpg' width='80' />
 
@@ -286,8 +299,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/andrey-kovatchev/'>
               <img src='http://www.europarl.europa.eu/mepphoto/97968.jpg' width='80' />
 
@@ -322,8 +335,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/olle-ludvigsson/'>
               <img src='http://www.europarl.europa.eu/mepphoto/96673.jpg' width='80' />
 
@@ -358,8 +371,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/sirpa-pietikainen/'>
               <img src='http://www.europarl.europa.eu/mepphoto/40599.jpg' width='80' />
 
@@ -394,8 +407,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/frederique-ries/'>
               <img src='http://www.europarl.europa.eu/mepphoto/4253.jpg' width='80' />
 
@@ -430,8 +443,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/birgit-sippel/'>
               <img src='http://www.europarl.europa.eu/mepphoto/96932.jpg' width='80' />
 
@@ -466,8 +479,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/charles-tannock/'>
               <img src='http://www.europarl.europa.eu/mepphoto/4521.jpg' width='80' />
 
@@ -502,8 +515,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/ramon-tremosa-i-balcells/'>
               <img src='http://www.europarl.europa.eu/mepphoto/97203.jpg' width='80' />
 
@@ -538,8 +551,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/vladimir-urutchev/'>
               <img src='http://www.europarl.europa.eu/mepphoto/38601.jpg' width='80' />
 
@@ -574,8 +587,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/ivo-vajgl/'>
               <img src='http://www.europarl.europa.eu/mepphoto/97019.jpg' width='80' />
 
@@ -610,8 +623,8 @@
           </td>
         </tr>
       
-        <tr>
-          <td>
+        <tr class='representative_item active'>
+          <td class='photo'>
             <a href='/legislature/representative/cecilia-wikstrom/'>
               <img src='http://www.europarl.europa.eu/mepphoto/96677.jpg' width='80' />
 
@@ -694,6 +707,19 @@
   </nav>
   <div class='count'>
     Number of results : 36
+
+    
+      <br />
+      Display :
+
+  current legislature only /
+  <a href='?active_only=0'>
+    all data
+  </a>
+
+
+
+    
     <br />
     Number of displayed results :
     24
diff --git a/memopol/tests/test_representatives_list.py b/memopol/tests/test_representatives_list.py
index 04f28f38..6bbe9ea7 100644
--- a/memopol/tests/test_representatives_list.py
+++ b/memopol/tests/test_representatives_list.py
@@ -31,12 +31,13 @@ class RepresentativeListTest(UrlGetTestMixin, TestCase):
             assert reps[1].country.code == 'FI'
             assert reps[1].main_mandate.pk == 5545
 
-    def functional_test(self, page, paginate_by, display, search=''):
+    def functional_test(self, page, paginate_by, active_only, display,
+                        search=''):
         url = '%s?page=%s&search=%s' % (self.url, page, search)
 
         # Cancel out one-time queries (session)
-        self.client.get('%s&paginate_by=%s&display=%s' %
-            (url, paginate_by, display))
+        self.client.get('%s&paginate_by=%s&display=%s&active_only=%s' %
+            (url, paginate_by, display, active_only))
 
         with self.assertNumQueries(3):
             """
@@ -49,17 +50,23 @@ class RepresentativeListTest(UrlGetTestMixin, TestCase):
         expected = Response.for_test(self)
         expected.assertNoDiff(self.response)
 
-    def test_page1_paginateby12_displaylist(self):
-        self.functional_test(1, 12, 'list')
+    def test_page1_paginateby12_active_displaylist(self):
+        self.functional_test(1, 12, 1, 'list')
 
-    def test_page1_paginateby24_displaygrid(self):
-        self.functional_test(1, 24, 'grid')
+    def test_page1_paginateby12_all_displaylist(self):
+        self.functional_test(1, 12, 0, 'list')
+
+    def test_page1_paginateby24_active_displaygrid(self):
+        self.functional_test(1, 24, 1, 'grid')
+
+    def test_page1_paginateby24_all_displaygrid(self):
+        self.functional_test(1, 24, 0, 'grid')
 
     def test_page2_paginateby24_displaylist(self):
-        self.functional_test(2, 24, 'list')
+        self.functional_test(2, 24, 1, 'list')
 
     def test_page1_paginateby12_displaylist_searchjoly(self):
-        self.functional_test(1, 12, 'list', 'joly')
+        self.functional_test(1, 12, 1, 'list', 'joly')
 
     def test_page2_paginateby12_displaylist(self):
-        self.functional_test(2, 12, 'list')
+        self.functional_test(2, 12, 1, 'list')
-- 
GitLab