Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It would sure be nice if we can have a count of the number of items that were sorted or filtered when listing assets! (Its hard to count 62 head of cattle by scrolling the page.)
Or the count could be at the beginning of the list, depending on how the code is set up.
Comments
Comment #2
m.stentaYea that would be nice. Not hard to add either... Views has a "View row counter" field that can be added as a column.
I'll add this to the beta16 plan. Next time I'm working on Views I can add this.
Should we add it to Views of logs as well? Or just assets?
Comment #3
m.stentaComment #4
BruceDawson CreditAttribution: BruceDawson commentedI dunno about views of logs. I don't think I have a need for that, but I
can think of some usage senarios that some might want it for; so
might as well add it there too.
Or you can add a "provide count" checkbox to the filtering. :-)
Comment #5
m.stentaYea there could be some use-cases. Ie: How many times did I harvest lettuce this year?
I don't know if there's an easy way to do that... but I think just adding the column would be fine. It won't take up much real estate.
Comment #6
m.stentaThis slipped between the cracks but I'm working on it now...
Comment #7
m.stentaChanging the title because it will also be added to log lists.
Comment #8
m.stentaOk, so after looking at this, I think I'm going to change my plan slightly, and instead take the alternative approach @BruceDawson proposed in the description:
Views has a "Result summary" that can be added to the View's Header or Footer, which adds the following: "Displaying @start - @end of @total"
If the goal is simply to have a count of the records returned by the current filter, then that seems to be the best way to accomplish it. Adding a new column with a row counter is also possible, but brings some other baggage/considerations with it (will it be confused with "Asset ID"? should it count up or down? how does it play into CSV export/import, if at all?). So I'm just going to take the simpler approach, and avoid those questions altogether.
I'm going to add it to the View Footer, so that it appears between the pager and the CSV download icon (I'll also center it, and the CSV icon, so it looks nice under the pager).
Comment #10
m.stentaDone!