BiologicalRecordsCentre / iRecord

Repository to store and track enhancements, issues and tasks regarding the iRecord website.
http://irecord.org.uk
2 stars 1 forks source link

Enable all pages records to be viewed from activity summary (+ download button) #1556

Open Sam-Amy opened 1 year ago

Sam-Amy commented 1 year ago

When viewing records on the 'Species' tab of the 'Activity summary' page, only the first page of records is visible; you can select up to 100 records to view, but there is no button to move on to the next page(s) https://irecord.org.uk/activities/summary?group_id=2397&implicit=t

It would also be good to have a download function here, though this should presumably only be for admins of the activity @kitenetter is that correct?

kitenetter commented 1 year ago

I think we could enable a download of the species list for anyone, not just admins, in the same way as we do on the standard Explore pages.

Sam-Amy commented 1 year ago

Ah yes, thanks @kitenetter, sorry I was conflating this with a list of full records.

johnvanbreda commented 1 year ago

I can enable a download - presumably as it's just for this one tab it's OK to provide the download progress circle and link to the file just under the species table?

The lack of next/previous buttons is a limitation in the system as we either support next/previous buttons OR sorting by count of records, not both. So we can easily so this only if we sort alphabetically. Having said that, I've just looked into this limitation and have found a way around it, which will take a few hours to implement so let me know if that's worthwhile.

For future reference, it is possible to add the following to the list of aggs:

        "count_bucket_sort": {
          "bucket_sort": {
            "sort": [
              { "_count": { "order": "desc" } } 
            ],
            "size": 3,
            "from": 0
          }
        }
kitenetter commented 3 months ago

Suggest enabling a download of the species list. This can be part of the NCEA work. Don't see a need for the next button as well (or at least not enough to be worth spending several hours on).

johnvanbreda commented 2 months ago

@kitenetter Please can you confirm who is able to do the download (this will apply to the existing activity summary and the species list on the new activity home page). Options are:

  1. Just activity admins
  2. Any activity member
  3. Anyone logged into iRecord
  4. Anyone (even if not logged in).
kitenetter commented 2 months ago

@johnvanbreda I think we can go with option 3, for any logged in user. This is in line with what can already be done on the main Explore - all page.

johnvanbreda commented 1 month ago

I've done the download in the code for the new activity landing pages.