purplespider / silverstripe-file-listing

Basic Download Page functionality, based on an assets directory
BSD 3-Clause "New" or "Revised" License
5 stars 4 forks source link

SilverStripe 4.0 Support #10

Closed mlewis-everley closed 6 years ago

mlewis-everley commented 6 years ago

I have updated project settings and classes to SS4.

I also heavily simplified the templates and switched them to using font awesome icons.

Let me know what you think,

Cheers,

Mo

mlewis-everley commented 6 years ago

Not really sure how to fix this issue with Scrutinizer, we had this locally and had to re-install composer to make it clear...

purplespider commented 6 years ago

Wow, thanks for this. Looks good! Been meaning to get my modules updated for 4.

Font Awesome is a good idea too. It would be good to make use of their various "file-" icons such as fa-file-pdf-o, fa-file-word-o, fa-file-excel-o etc.

mlewis-everley commented 6 years ago

No probs, I noticed you merged this into master, it might be worth splitting the code across different branches as 3.0 and 4.0 have some big differences code for 4.0 is not backwards compatible?

RE font awesome, I think you would need to add an extension to file to easily return a more explicit file type (or possibly return the FA class name).

purplespider commented 6 years ago

Yeh, realised that as soon as I hit merge! Should be sorted now.

True, I thought you could get the file extension from a File object, but perhaps it'll require more than makes sense to include in this module.