acadsamplesdb / acad_samples

ACAD samples database
0 stars 0 forks source link

Image thumbnails [ACAD # 3] #6

Closed craigpatten closed 8 years ago

Li-ReDBox commented 8 years ago

@sgoodswen: is this enhancement id 3?

sgoodswen commented 8 years ago

This is enhancement ID 3. Please refer to attached png for the type of display required

thumbnails

Li-ReDBox commented 8 years ago

Put ID 3's description here: Display filetype image/thumbnail for attached photos and files

Li-ReDBox commented 8 years ago

@sgoodswen where can I get these icon files? Do you know what types of file will have thumbnails? I see sql, txt and png (screen_out). I assume there should be one for excel.

sgoodswen commented 8 years ago

Sorry, I do not know all the type of files that will need thumbnails, but we will need them for at least pdf. jpg, png, text, MS Word,Excel (but not SQL).

I am not sure where you can get the icons but maybe from a Django package such as http://easy-thumbnails.readthedocs.org/en/latest/index.html

Li-ReDBox commented 8 years ago

That one looks like generating a thumbnail from an image: The primary function of easy-thumbnails is to dynamically create thumbnails based on a source image. I think it resizes or reprocesses an image to be a thumbnail. I can be wrong.

I think the easiest way to get this over is to have a set of static images with correct size and other proper properties.

What do you think?

sgoodswen commented 8 years ago

Sorry, I have no expertise with coding thumbnails. I guess if you can find icons for pdf, jpg, png, text, MS Word, and MS Excel then maybe using static images will be the easiest solution.

Li-ReDBox commented 8 years ago

I have found http://fontawesome.io/icons/#file-type which has icons for normal types. If a file has an extension as one of these: 'pdf', 'jpg', 'zip', 'txt', 'gz', 'xlsx', 'png', 'docx', a proper icon is displayed. Otherwise, file icon is displayed. A demo can be seen in samples 2 and 12.

sgoodswen commented 8 years ago

I am getting the opinion of several users as to whether they like these icons

sgoodswen commented 8 years ago

All icons except the picture files e.g. jpg are acceptable.

Can we please have true thumb nails for all picture files

Li-ReDBox commented 8 years ago

@sgoodswen, I just test a not so good solution for displaying true thumbnails of picture. If you go to sample/2/ of dev server, you can see a rough example.

sgoodswen commented 8 years ago

I am getting the opinion of other users and will let you know later what they think

Li-ReDBox commented 8 years ago

@sgoodswen I made a bit cosmetic change and hope users will like it

sgoodswen commented 8 years ago

The thumbnails look good ... is it still possible to have the filename above or below the picture please?

Li-ReDBox commented 8 years ago

Name can still be displayed. How about size? Also you have to be aware that this solution is not perfect which I consider as a temporary solution.

sgoodswen commented 8 years ago

The size is good. I think your solution (with the name displayed above or below) the image is good enough to deploy to production.

Li-ReDBox commented 8 years ago

There is one more problem to be solved before can be deployed: only has image link for images.

Li-ReDBox commented 8 years ago

Now it should be OK to close. If any one can check and happy with the result, we can close this issue.

jsoubrier commented 8 years ago

Yes, it looks good to me (although the car crash photo is a bit dramatic for an extinct bison sample ;-) Thanks Li!

Li-ReDBox commented 8 years ago

Good. I have deployed changes to the production server. It should display thumbnail for jpg, jpeg and png files. I have checked the production database, it only has jpg and jpeg so we are covered.