curationexperts / trove

Digital Image Library based on Tufts repository models
0 stars 2 forks source link

Featured items should use thumbnail image of first non-folder #163

Closed mark-dce closed 10 years ago

mark-dce commented 10 years ago

ISSUE When I display a collection with nested collections as one of the Featured PIDs, I would like the first actual image to display rather than a subfolder icon.

See current Homepage and Hawaiian Flora collection: Homepage: http://tdil.curationexperts.com/ Hawaiian Flora: http://tdil.curationexperts.com/course_collections/tufts.uc:8

NOTE: This behavior seems to work for the first tier child, but doesn't extend to grandchildren collections - e.g. see the difference between "Hawaiian Flora" and "Building Details"

The homepage should display the image for changeme:47 (the first actual image in the collection tree)

Hawaiian Flora
|
|---Flowers from Hawai
|   |
|   |---Yellowish Flowers
|   |   |---changeme:47
|   |   +---changeme:50
|   |   
|   +---Reddish Flowers
|         +---etc.
|
+---Plants
    |---changeme:49
    |---changeme:48
    +---etc.

CURRENT BEHAVIOR: featured pids - current - 163

DESIRED BEHAVIOR: featured pids - desired - 163

jcoyne commented 10 years ago

Expands on https://github.com/curationexperts/tufts-image-library/issues/55

mark-dce commented 10 years ago

1) If there is only one image in the descendant tree, use that image 2) If there are no images in the descendant tree, show a folder 3) If there are multiple images in the descendant tree, implement a deterministic algorithm to select an image (I was kind of thinking the first image that would show up in the collection exports)