Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visitor page pagination #3045

Conversation

patrickrb
Copy link
Contributor

@patrickrb patrickrb commented Apr 2, 2024

Closes #1720

  • Added pagination to visitors page only if the public search option is enabled
  • Happy to update this PR if you'd rather a different config option or any other feedback, but to me it felt like if search is enabled then pagination might make sense too. My biggest concern would be that people who have this feature enabled currently might not want the paginated results.

Enhancements to public search functionality:

  • application/controllers/Visitor.php: In the index function, added a condition to load and initialize the pagination library only if public search is enabled. The pagination configuration includes settings for the base URL, total rows, per page limit, number of links, and various HTML tags and attributes for styling the pagination links.
  • application/controllers/Visitor.php: Modified the data fetching logic in the index function to return paginated results when public search is enabled, otherwise it continues to return the last 18 records as before.
  • application/views/visitor/index.php: updated the condition and loop to use the new results variable instead of last_five_qsos. Also added a condition to display pagination links at the end of the table if public search is enabled.

Gif of feature working:

2024-04-02 09 57 35

@patrickrb patrickrb changed the title added pagination to visitor page only if the public search option is … Visitor page pagination - only enabled with option Apr 2, 2024
@magicbug
Copy link
Owner

magicbug commented Apr 4, 2024

Hi Patrick

I actually dont think it needs to be controlled just enabled by default, public search really should just allow searching the logbook and nothing else

so if you could change it to just have pagination on all the time its ready for merge!

@patrickrb
Copy link
Contributor Author

on it! Thanks @magicbug!

@patrickrb
Copy link
Contributor Author

Hi Patrick

I actually dont think it needs to be controlled just enabled by default, public search really should just allow searching the logbook and nothing else

so if you could change it to just have pagination on all the time its ready for merge!

Got it fixed up, thanks again!

@patrickrb patrickrb changed the title Visitor page pagination - only enabled with option Visitor page pagination Apr 4, 2024
@magicbug magicbug merged commit 36f05bd into magicbug:dev Apr 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants