Closed josieg closed 5 years ago
@josieg this has to do with the work you did in https://github.com/BCcampus/opentextbooks/issues/152 and explains the inconsistencies with the icons being displayed.
The way the icon was being generated can be seen in the screenshot below:
So when you renamed "Digital PDF (.pdf)" and "Print PDF (.pdf)" it drops the .pdf which the icon generation logic was relying on... if that's the new logic, I can update this to search for "PDF" instead, and that should fix it for all uses cases. I'll let you know once it's done so you can verify.
Aww man. We removed .pdf .epub, .mobi .xml .html from file labels, so it's not just PDFs being affected. I didn't realize those labels were supporting that functionality.
@josieg Just caught those too, will update them as well... then you can verify that they still all work as expected.
And yea, really sucks this is the way it works lol, solution would be to add a field to equella with the correct filetypes, so that we could identify them that way.
Changes made via https://github.com/BCcampus/opentextbooks/commit/6c90b68479ac60fa3caff3bc5098ec0bbe99ea7d give it a whirl in a few minutes to ensure these still work as expected.
Thanks @alex-418 !
The only one that still has a problem is the XML file that we have labelled "Pressbooks file." (See editable files here.) If I edit that file so that it says "Pressbooks XML file" instead, will that fix the problem? Or i can edit to "Pressbooks file (.xml)." Whatever is easiest.
@josieg Sure, i've updated it via https://github.com/BCcampus/opentextbooks/commit/a5a6aa35036c6fc90efe5d01a7cca4ceb34424d1 so that it'll look for XML
(not case sensitive, xml will work too)... so as along as that is somewhere in there, it'll add the correct icon.
@josieg - is this all good?
I think so.
Describe the bug When looking at the list of files available under some book, the icons are all showing up as "Website" icons, even for PDF, Word, and EPUB files. The print icons are appearing as expected.
However, some books are fine. Such as Health Case Studies.
To Reproduce Steps to reproduce the behavior:
Expected behavior I expect that the icons should match the file type that they are associated with.
Screenshots
Desktop (please complete the following information):