diff --git a/memopol/tests/RepresentativeListTest/test_page1_paginateby12_displaylist.html b/memopol/tests/RepresentativeListTest/test_page1_paginateby12_displaylist.html new file mode 100644 index 0000000000000000000000000000000000000000..062f06780bfdff03691278e64721fe92fed16202 --- /dev/null +++ b/memopol/tests/RepresentativeListTest/test_page1_paginateby12_displaylist.html @@ -0,0 +1,584 @@ + <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> + + + <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 /> + 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> + Country + </th> + <th> + Group + </th> + <th> + Score + + </th> + </tr> + + <tr> + <td> + <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> + Lithuania [LT] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + SD + </a> + </td> + <td> + <span class="label label-success">15</span> + + </td> + </tr> + + <tr> + <td> + <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> + Lithuania [LT] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + SD + </a> + </td> + <td> + <span class="label label-success">15</span> + + </td> + </tr> + + <tr> + <td> + <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> + Germany [DE] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + EPP + </a> + </td> + <td> + <span class="label label-danger">-10</span> + + </td> + </tr> + + <tr> + <td> + <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> + Romania [RO] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + EPP + </a> + </td> + <td> + <span class="label label-success">15</span> + + </td> + </tr> + + <tr> + <td> + <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> + Malta [MT] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + EPP + </a> + </td> + <td> + <span class="label label-danger">-15</span> + + </td> + </tr> + + <tr> + <td> + <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> + France [FR] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Alliance%20of%20Liberals%20and%20Democrats%20for%20Europe/'> + ALDE + </a> + </td> + <td> + <span class="label label-danger">-15</span> + + </td> + </tr> + + <tr> + <td> + <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> + Greece [GR] + + </td> + <td> + <a href='/legislature/representative/group/Confederal%20Group%20of%20the%20European%20United%20Left%20-%20Nordic%20Green%20Left/'> + GUE/NGL + </a> + </td> + <td> + <span class="label label-success">15</span> + + </td> + </tr> + + <tr> + <td> + <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> + Germany [DE] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Greens/European%20Free%20Alliance/'> + Greens/EFA + </a> + </td> + <td> + <span class="label label-success">15</span> + + </td> + </tr> + + <tr> + <td> + <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> + France [FR] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + EPP + </a> + </td> + <td> + <span class="label label-danger">-15</span> + + </td> + </tr> + + <tr> + <td> + <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> + Hungary [HU] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + EPP + </a> + </td> + <td> + <span class="label label-danger">-15</span> + + </td> + </tr> + + <tr> + <td> + <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> + Romania [RO] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + SD + </a> + </td> + <td> + <span class="label label-success">15</span> + + </td> + </tr> + + <tr> + <td> + <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> + Netherlands [NL] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Greens/European%20Free%20Alliance/'> + 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 /> + 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> diff --git a/memopol/tests/RepresentativeListTest/test_page1_paginateby12_displaylist_searchjoly.html b/memopol/tests/RepresentativeListTest/test_page1_paginateby12_displaylist_searchjoly.html new file mode 100644 index 0000000000000000000000000000000000000000..2bc1c5946a4b2fc1b1bd111b558dabaec3b4934a --- /dev/null +++ b/memopol/tests/RepresentativeListTest/test_page1_paginateby12_displaylist_searchjoly.html @@ -0,0 +1,188 @@ + <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> + + + <div class='pagination-block'> + + <nav> + <ul class='pagination pagination-sm'> + + + + </ul> + </nav> + <div class='count'> + Number of results : 1 + <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> + Country + </th> + <th> + Group + </th> + <th> + Score + + </th> + </tr> + + <tr> + <td> + <a href='/legislature/representative/eva-joly/'> + <img src='http://www.europarl.europa.eu/mepphoto/96883.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/eva-joly/'> + Eva JOLY + + </a> + </td> + <td> + France [FR] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Greens/European%20Free%20Alliance/'> + 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'> + + + + </ul> + </nav> + <div class='count'> + Number of results : 1 + <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> + + diff --git a/memopol/tests/RepresentativeListTest/test_page1_paginateby24_displaygrid.html b/memopol/tests/RepresentativeListTest/test_page1_paginateby24_displaygrid.html new file mode 100644 index 0000000000000000000000000000000000000000..084289225fd5dc7efca1850b2e0d2235c8ee6159 --- /dev/null +++ b/memopol/tests/RepresentativeListTest/test_page1_paginateby24_displaygrid.html @@ -0,0 +1,904 @@ + <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> + + + <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 /> + 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'> + <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='country'> + <a href='/legislature/representative/country/LT/'> + <span class="flag-icon flag-icon-lt"></span> Lithuania + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + SD + </a> + </li> + <li class='score'> + <span class="label label-success">15</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/LT/'> + <span class="flag-icon flag-icon-lt"></span> Lithuania + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + SD + </a> + </li> + <li class='score'> + <span class="label label-success">15</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/DE/'> + <span class="flag-icon flag-icon-de"></span> Germany + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + EPP + </a> + </li> + <li class='score'> + <span class="label label-danger">-10</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/RO/'> + <span class="flag-icon flag-icon-ro"></span> Romania + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + EPP + </a> + </li> + <li class='score'> + <span class="label label-success">15</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/MT/'> + <span class="flag-icon flag-icon-mt"></span> Malta + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + EPP + </a> + </li> + <li class='score'> + <span class="label label-danger">-15</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/FR/'> + <span class="flag-icon flag-icon-fr"></span> France + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20Alliance%20of%20Liberals%20and%20Democrats%20for%20Europe/'> + ALDE + </a> + </li> + <li class='score'> + <span class="label label-danger">-15</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/GR/'> + <span class="flag-icon flag-icon-gr"></span> Greece + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Confederal%20Group%20of%20the%20European%20United%20Left%20-%20Nordic%20Green%20Left/'> + GUE/NGL + </a> + </li> + <li class='score'> + <span class="label label-success">15</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/DE/'> + <span class="flag-icon flag-icon-de"></span> Germany + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20Greens/European%20Free%20Alliance/'> + Greens/EFA + </a> + </li> + <li class='score'> + <span class="label label-success">15</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/FR/'> + <span class="flag-icon flag-icon-fr"></span> France + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + EPP + </a> + </li> + <li class='score'> + <span class="label label-danger">-15</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/HU/'> + <span class="flag-icon flag-icon-hu"></span> Hungary + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + EPP + </a> + </li> + <li class='score'> + <span class="label label-danger">-15</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/RO/'> + <span class="flag-icon flag-icon-ro"></span> Romania + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + SD + </a> + </li> + <li class='score'> + <span class="label label-success">15</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/NL/'> + <span class="flag-icon flag-icon-nl"></span> Netherlands + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20Greens/European%20Free%20Alliance/'> + Greens/EFA + </a> + </li> + <li class='score'> + <span class="label label-success">15</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/DE/'> + <span class="flag-icon flag-icon-de"></span> Germany + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + SD + </a> + </li> + <li class='score'> + <span class="label label-success">10</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/PT/'> + <span class="flag-icon flag-icon-pt"></span> Portugal + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + EPP + </a> + </li> + <li class='score'> + <span class="label label-danger">-15</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/SK/'> + <span class="flag-icon flag-icon-sk"></span> Slovakia + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + SD + </a> + </li> + <li class='score'> + <span class="label label-success">15</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/GB/'> + <span class="flag-icon flag-icon-gb"></span> United Kingdom + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/European%20Conservatives%20and%20Reformists%20Group/'> + ECR + </a> + </li> + <li class='score'> + <span class="label label-danger">-15</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/ES/'> + <span class="flag-icon flag-icon-es"></span> Spain + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + SD + </a> + </li> + <li class='score'> + <span class="label label-success">15</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/HU/'> + <span class="flag-icon flag-icon-hu"></span> Hungary + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + EPP + </a> + </li> + <li class='score'> + <span class="label label-danger">-15</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/HU/'> + <span class="flag-icon flag-icon-hu"></span> Hungary + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + EPP + </a> + </li> + <li class='score'> + <span class="label label-danger">-15</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/IE/'> + <span class="flag-icon flag-icon-ie"></span> Ireland + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20Alliance%20of%20Liberals%20and%20Democrats%20for%20Europe/'> + ALDE + </a> + </li> + <li class='score'> + <span class="label label-success">15</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/GB/'> + <span class="flag-icon flag-icon-gb"></span> United Kingdom + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + SD + </a> + </li> + <li class='score'> + <span class="label label-danger">-7</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/BG/'> + <span class="flag-icon flag-icon-bg"></span> Bulgaria + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + SD + </a> + </li> + <li class='score'> + <span class="label label-success">15</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/FI/'> + <span class="flag-icon flag-icon-fi"></span> Finland + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + SD + </a> + </li> + <li class='score'> + <span class="label label-success">15</span> + + </li> + </ul> + </div> + + <div class='representative_item'> + <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='country'> + <a href='/legislature/representative/country/FR/'> + <span class="flag-icon flag-icon-fr"></span> France + </a> + </li> + <li class='mandate'> + <a href='/legislature/representative/group/Group%20of%20the%20Greens/European%20Free%20Alliance/'> + 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 /> + 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> diff --git a/memopol/tests/RepresentativeListTest/test_page2_paginateby12_displaylist.html b/memopol/tests/RepresentativeListTest/test_page2_paginateby12_displaylist.html new file mode 100644 index 0000000000000000000000000000000000000000..4f59ddf50a0f318be3e38ce771b15bf24ded933a --- /dev/null +++ b/memopol/tests/RepresentativeListTest/test_page2_paginateby12_displaylist.html @@ -0,0 +1,612 @@ + <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> + + + <div class='pagination-block'> + + <nav> + <ul class='pagination pagination-sm'> + + <li> + <a aria-label='First' href='?&page=1'> + <i aria-hidden="true" class="fa fa-chevron-circle-left"></i> + + </a> + </li> + <li> + <a aria-label='Previous' href='?&page=1'> + <i aria-hidden="true" class="fa fa-chevron-left"></i> + + </a> + </li> + + + + + <li> + <a href='?&page=1'> + 1 + + </a> + </li> + + + + + + <li class='active'> + <a href=''> + 2 + </a> + </li> + + + + + + <li> + <a href='?&page=3'> + 3 + + </a> + </li> + + + + + <li> + <a aria-label='Next' href='?&page=3'> + <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 /> + 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> + Country + </th> + <th> + Group + </th> + <th> + Score + + </th> + </tr> + + <tr> + <td> + <a href='/legislature/representative/ismail-ertug/'> + <img src='http://www.europarl.europa.eu/mepphoto/96842.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/ismail-ertug/'> + Ismail ERTUG + + </a> + </td> + <td> + Germany [DE] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + SD + </a> + </td> + <td> + <span class="label label-success">10</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/jose-manuel-fernandes/'> + <img src='http://www.europarl.europa.eu/mepphoto/96899.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/jose-manuel-fernandes/'> + José Manuel FERNANDES + + </a> + </td> + <td> + Portugal [PT] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + EPP + </a> + </td> + <td> + <span class="label label-danger">-15</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/monika-flasikova-benova/'> + <img src='http://www.europarl.europa.eu/mepphoto/23868.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/monika-flasikova-benova/'> + Monika FLAÅ ÃKOVà BEŇOVà + + </a> + </td> + <td> + Slovakia [SK] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + SD + </a> + </td> + <td> + <span class="label label-success">15</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/ashley-fox/'> + <img src='http://www.europarl.europa.eu/mepphoto/96957.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/ashley-fox/'> + Ashley FOX + + </a> + </td> + <td> + United Kingdom [GB] + + </td> + <td> + <a href='/legislature/representative/group/European%20Conservatives%20and%20Reformists%20Group/'> + ECR + </a> + </td> + <td> + <span class="label label-danger">-15</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/eider-gardiazabal-rubial/'> + <img src='http://www.europarl.europa.eu/mepphoto/96991.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/eider-gardiazabal-rubial/'> + Eider GARDIAZABAL RUBIAL + + </a> + </td> + <td> + Spain [ES] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + SD + </a> + </td> + <td> + <span class="label label-success">15</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/kinga-gal/'> + <img src='http://www.europarl.europa.eu/mepphoto/28150.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/kinga-gal/'> + Kinga GÃL + + </a> + </td> + <td> + Hungary [HU] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + EPP + </a> + </td> + <td> + <span class="label label-danger">-15</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/ildiko-gall-pelcz/'> + <img src='http://www.europarl.europa.eu/mepphoto/102886.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/ildiko-gall-pelcz/'> + Ildikó GÃLL-PELCZ + + </a> + </td> + <td> + Hungary [HU] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + EPP + </a> + </td> + <td> + <span class="label label-danger">-15</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/marian-harkin/'> + <img src='http://www.europarl.europa.eu/mepphoto/28116.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/marian-harkin/'> + Marian HARKIN + + </a> + </td> + <td> + Ireland [IE] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Alliance%20of%20Liberals%20and%20Democrats%20for%20Europe/'> + ALDE + </a> + </td> + <td> + <span class="label label-success">15</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/mary-honeyball/'> + <img src='http://www.europarl.europa.eu/mepphoto/5846.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/mary-honeyball/'> + Mary HONEYBALL + + </a> + </td> + <td> + United Kingdom [GB] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + SD + </a> + </td> + <td> + <span class="label label-danger">-7</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/iliana-iotova/'> + <img src='http://www.europarl.europa.eu/mepphoto/38605.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/iliana-iotova/'> + Iliana IOTOVA + + </a> + </td> + <td> + Bulgaria [BG] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + SD + </a> + </td> + <td> + <span class="label label-success">15</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/liisa-jaakonsaari/'> + <img src='http://www.europarl.europa.eu/mepphoto/96684.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/liisa-jaakonsaari/'> + Liisa JAAKONSAARI + + </a> + </td> + <td> + Finland [FI] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + SD + </a> + </td> + <td> + <span class="label label-success">15</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/yannick-jadot/'> + <img src='http://www.europarl.europa.eu/mepphoto/96740.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/yannick-jadot/'> + Yannick JADOT + + </a> + </td> + <td> + France [FR] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Greens/European%20Free%20Alliance/'> + 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> + <a aria-label='First' href='?&page=1'> + <i aria-hidden="true" class="fa fa-chevron-circle-left"></i> + + </a> + </li> + <li> + <a aria-label='Previous' href='?&page=1'> + <i aria-hidden="true" class="fa fa-chevron-left"></i> + + </a> + </li> + + + + + <li> + <a href='?&page=1'> + 1 + + </a> + </li> + + + + + + <li class='active'> + <a href=''> + 2 + </a> + </li> + + + + + + <li> + <a href='?&page=3'> + 3 + + </a> + </li> + + + + + <li> + <a aria-label='Next' href='?&page=3'> + <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 /> + 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> + + diff --git a/memopol/tests/RepresentativeListTest/test_page2_paginateby24_displaylist.html b/memopol/tests/RepresentativeListTest/test_page2_paginateby24_displaylist.html new file mode 100644 index 0000000000000000000000000000000000000000..b495b308d167664b0c04d2f72f433e574eee7d00 --- /dev/null +++ b/memopol/tests/RepresentativeListTest/test_page2_paginateby24_displaylist.html @@ -0,0 +1,562 @@ + <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> + + + <div class='pagination-block'> + + <nav> + <ul class='pagination pagination-sm'> + + <li> + <a aria-label='First' href='?&page=1'> + <i aria-hidden="true" class="fa fa-chevron-circle-left"></i> + + </a> + </li> + <li> + <a aria-label='Previous' href='?&page=1'> + <i aria-hidden="true" class="fa fa-chevron-left"></i> + + </a> + </li> + + + + + <li> + <a href='?&page=1'> + 1 + + </a> + </li> + + + + + + <li class='active'> + <a href=''> + 2 + </a> + </li> + + + + + </ul> + </nav> + <div class='count'> + Number of results : 36 + <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> + + + + + <table class='table'> + <tr> + <th> + Photo + </th> + <th> + Name + </th> + <th> + Country + </th> + <th> + Group + </th> + <th> + Score + + </th> + </tr> + + <tr> + <td> + <a href='/legislature/representative/eva-joly/'> + <img src='http://www.europarl.europa.eu/mepphoto/96883.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/eva-joly/'> + Eva JOLY + + </a> + </td> + <td> + France [FR] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Greens/European%20Free%20Alliance/'> + Greens/EFA + </a> + </td> + <td> + <span class="label label-success">15</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/jarosaw-kalinowski/'> + <img src='http://www.europarl.europa.eu/mepphoto/96771.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/jarosaw-kalinowski/'> + JarosÅ‚aw KALINOWSKI + + </a> + </td> + <td> + Poland [PL] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + EPP + </a> + </td> + <td> + <span class="label label-danger">-15</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/andrey-kovatchev/'> + <img src='http://www.europarl.europa.eu/mepphoto/97968.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/andrey-kovatchev/'> + Andrey KOVATCHEV + + </a> + </td> + <td> + Bulgaria [BG] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + EPP + </a> + </td> + <td> + <span class="label label-danger">-15</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/olle-ludvigsson/'> + <img src='http://www.europarl.europa.eu/mepphoto/96673.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/olle-ludvigsson/'> + Olle LUDVIGSSON + + </a> + </td> + <td> + Sweden [SE] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + SD + </a> + </td> + <td> + <span class="label label-success">15</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/sirpa-pietikainen/'> + <img src='http://www.europarl.europa.eu/mepphoto/40599.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/sirpa-pietikainen/'> + Sirpa PIETIKÄINEN + + </a> + </td> + <td> + Finland [FI] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + EPP + </a> + </td> + <td> + <span class="label label-success">5</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/frederique-ries/'> + <img src='http://www.europarl.europa.eu/mepphoto/4253.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/frederique-ries/'> + Frédérique RIES + + </a> + </td> + <td> + Belgium [BE] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Alliance%20of%20Liberals%20and%20Democrats%20for%20Europe/'> + ALDE + </a> + </td> + <td> + <span class="label label-success">3</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/birgit-sippel/'> + <img src='http://www.europarl.europa.eu/mepphoto/96932.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/birgit-sippel/'> + Birgit SIPPEL + + </a> + </td> + <td> + Germany [DE] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + SD + </a> + </td> + <td> + <span class="label label-success">15</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/charles-tannock/'> + <img src='http://www.europarl.europa.eu/mepphoto/4521.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/charles-tannock/'> + Charles TANNOCK + + </a> + </td> + <td> + United Kingdom [GB] + + </td> + <td> + <a href='/legislature/representative/group/European%20Conservatives%20and%20Reformists%20Group/'> + ECR + </a> + </td> + <td> + <span class="label label-danger">-15</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/ramon-tremosa-i-balcells/'> + <img src='http://www.europarl.europa.eu/mepphoto/97203.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/ramon-tremosa-i-balcells/'> + Ramon TREMOSA i BALCELLS + + </a> + </td> + <td> + Spain [ES] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Alliance%20of%20Liberals%20and%20Democrats%20for%20Europe/'> + ALDE + </a> + </td> + <td> + <span class="label label-success">15</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/vladimir-urutchev/'> + <img src='http://www.europarl.europa.eu/mepphoto/38601.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/vladimir-urutchev/'> + Vladimir URUTCHEV + + </a> + </td> + <td> + Bulgaria [BG] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + EPP + </a> + </td> + <td> + <span class="label label-danger">-15</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/ivo-vajgl/'> + <img src='http://www.europarl.europa.eu/mepphoto/97019.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/ivo-vajgl/'> + Ivo VAJGL + + </a> + </td> + <td> + Slovenia [SI] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Alliance%20of%20Liberals%20and%20Democrats%20for%20Europe/'> + ALDE + </a> + </td> + <td> + <span class="label label-success">15</span> + + </td> + </tr> + + <tr> + <td> + <a href='/legislature/representative/cecilia-wikstrom/'> + <img src='http://www.europarl.europa.eu/mepphoto/96677.jpg' width='80' /> + + </a> + </td> + <td> + <a href='/legislature/representative/cecilia-wikstrom/'> + Cecilia WIKSTRÖM + + </a> + </td> + <td> + Sweden [SE] + + </td> + <td> + <a href='/legislature/representative/group/Group%20of%20the%20Alliance%20of%20Liberals%20and%20Democrats%20for%20Europe/'> + ALDE + </a> + </td> + <td> + <span class="label label-danger">-7</span> + + </td> + </tr> + + </table> + + + <div class='pagination-block'> + + <nav> + <ul class='pagination pagination-sm'> + + <li> + <a aria-label='First' href='?&page=1'> + <i aria-hidden="true" class="fa fa-chevron-circle-left"></i> + + </a> + </li> + <li> + <a aria-label='Previous' href='?&page=1'> + <i aria-hidden="true" class="fa fa-chevron-left"></i> + + </a> + </li> + + + + + <li> + <a href='?&page=1'> + 1 + + </a> + </li> + + + + + + <li class='active'> + <a href=''> + 2 + </a> + </li> + + + + + </ul> + </nav> + <div class='count'> + Number of results : 36 + <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> diff --git a/memopol/tests/test_representatives_list.py b/memopol/tests/test_representatives_list.py index fb630539e3d336711a8e1404343ce85a5fe90c97..20938611e5a2796cffd4438537ac3bd947699cab 100644 --- a/memopol/tests/test_representatives_list.py +++ b/memopol/tests/test_representatives_list.py @@ -8,12 +8,34 @@ class RepresentativeListTest(UrlGetTestMixin, TestCase): fixtures = ['smaller_sample.json'] url = '/legislature/representative/' - def test_num_queries(self): + def functional_test(self, page, paginate_by, 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)) + with self.assertNumQueries(3): """ - - A query on the session (for grid/list + pagination) - A count for pagination - One query for representative + score - - One query for mandates (country + main_mandate) + - One query for mandates (including country + main_mandate) """ - self.client.get(self.url) + self.response = self.client.get(url) + + self.assertExpectedHtmlInResult() + + def test_page1_paginateby12_displaylist(self): + self.functional_test(1, 12, 'list') + + def test_page1_paginateby24_displaygrid(self): + self.functional_test(1, 24, 'grid') + + def test_page2_paginateby24_displaylist(self): + self.functional_test(2, 24, 'list') + + def test_page1_paginateby12_displaylist_searchjoly(self): + self.functional_test(1, 12, 'list', 'joly') + + def test_page2_paginateby12_displaylist(self): + self.functional_test(2, 12, 'list') diff --git a/templates/representatives/representative_list.haml b/templates/representatives/representative_list.haml index 427802a29034eec53c30141bbead32b08482c87d..7d73d499204e48e352583fc9a85464f4f896f7c7 100644 --- a/templates/representatives/representative_list.haml +++ b/templates/representatives/representative_list.haml @@ -48,6 +48,6 @@ %a{'href': "{{ representative.main_mandate.group.get_absolute_url }}"} = representative.main_mandate.group.abbreviation %td - = representative.get_score|score_label + = representative.score.score|score_label - include 'core/blocks/pagination.html'