thegetty / cva10

"Corpus Vasorum Antiquorum, Fascicule 10", by Despoina Tsiafakis
1 stars 0 forks source link

Add filters for catalogue grid #33

Closed geealbers closed 5 years ago

geealbers commented 5 years ago

As we've done in the past with Terracottas and Ancient Lamps, and as illustrated in early version of the wireframes for the new Quire theme, we will be adding a simple filtering tool that can be used on grids of catalogue images. This filter feature will be used here in CVA and included in the core Quire Starter Theme.

screen shot 2019-02-26 at 9 54 52 pm

The filters will be variable from project to project, so users will need a direct way to choose what keys in the object data to filter on. I would suggest we follow the pattern established with object_display_order (used to populate the entry page tombstones), and establish a new object_filter array.

object_display_order:
  - plates
  - accession_number
object_filter:
  - attribution
  - subject
  - date
object_list:
  - id: 1
    plates: "518–20"
    plate_list: 518, 519, 520
    accession_number: 86.AE.205
    link: http://www.getty.edu/art/collection/objects/11968/
    bareiss_number: 342
    fabric: Athenian
    technique: Red-figure
    shape_name: Krater, Column-
    attribution: Myson
    date: -490 to -480
    subject: akontist, athlete, bridle, deer, dog, goat, *haltēres*, himation, horse, javelin, jumper, *kentron*, *paedotribēs*, palmette (*anthemion*), panther, pick, sponge, staff, stick, strigil, trainer

One special case to note is date. In the example above it's just given as a string, but I think we'd want to establish a better pattern using a start and end date of some kind.

Ask with this, we'd also want to establish a new param for config.yml to turn the feature on or off. Perhaps gridObjectFilters: true.

geealbers commented 5 years ago

duplicate of #22