Plots2: Adjust pagination and remove map description from /maps page

Created on 11 Nov 2016  路  7Comments  路  Source: publiclab/plots2

Hi, this is a first-timers-only issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before. If you have contributed before, consider leaving this one for someone new, and looking through our general help wanted issues. Thanks!

The Problem

The /maps page shows a set of 4 maps on each row. Per page 30 maps are shown presently. So the last row contains just 2 maps. We can adjust two more there. Also it is better to remove the map description from the page as it is overlapping over another at some places.

Solution

By default 30 notes are displayed per page which is the default setting of the will_paginate gem. We just need to set the :per_page count to 32 to make the last row filled. You have to do it in the index action of map_controller. refer to this line https://github.com/publiclab/plots2/blob/master/app/controllers/map_controller.rb#L5. You can take help from the will_paginate documentation.

Also remove the map description. Here is the line that has the map description https://github.com/publiclab/plots2/blob/master/app/views/map/_maps.html.erb#L17

Steps to Fix

  • [x] claim this issue with a comment
  • [x] set up a repository locally and make sure that all tests pass
  • [x] start a pull request (see contributing to Public Lab software) but mark it as "in progress"
  • [x] fix the issue following the steps above
  • [x] try the manual test listed above
  • [x] make sure all tests pass with rake test
  • [ ] alert someone via either the developers list (see below) to have your pull request merged. This may take a few extra steps depending on when you do it, but we'll help you out!

Please email the developers list (see https://publiclab.org/developers) if you have questions!

first-timers-only help wanted

Most helpful comment

@ananyo2012 I have fixed the issue. And raised pull request as well. Please check and mark steps accordingly.

Thank you for the help till now.

All 7 comments

Hello,

I am first-timer and haven't contributed to open source before. I would like to contribute in this. Please allow me to fix this issue..

@abhishekzambre Sure go on with it. Tell if you face any problem. I have checked the first step. Move on with the next steps.

@ananyo2012 I have done setup on cloud9. After performing repository setup, I tried to run "rake test", and getting below message at the end. It is saying 0% passed. Is it expected?


69 tests, 200 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications

0% passed

0.81 tests/s, 2.36 assertions/s

@abhishekzambre Yes it is all right. Unless anything fails and it shows 0 errors or 0 failures all tests pass successfully.

@ananyo2012 I have fixed the issue. And raised pull request as well. Please check and mark steps accordingly.

Thank you for the help till now.

Thank you so much -- we'll review and offer next steps soon!

Closed, thank you!!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

first-timers[bot] picture first-timers[bot]  路  3Comments

keshavsethi picture keshavsethi  路  3Comments

jywarren picture jywarren  路  3Comments

shapironick picture shapironick  路  3Comments

RuthNjeri picture RuthNjeri  路  3Comments