Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
usability
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Apr 2008 at 20:21 UTC
Updated:
13 Jan 2011 at 11:46 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Gurpartap Singh commentedFeature additions like that can't make it to Drupal 6 anymore.
Comment #2
maartenvg commentedI really like the idea, but I dislike the proposed implementation. I also have some reservations whether this should go in core, I think a contributed module suits fine.
I would at least make it a setting on the content type forms (@ http://example.com/admin/content/types/content_type). But I would prefer an added checkbox for 'list on teaser' for each file, just as there are checkboxes for 'Delete' and 'List'. That way you can control which files are important enough to be shown on the teaser, and which are not. Of course, with a way to define the default setting on the content type forms.
Comment #3
maartenvg commentedI changed the implementation of this feature to the following. It adds:
Comment #4
Anonymous (not verified) commentedThe last submitted patch failed testing.
Comment #5
maartenvg commentedChasing head after file-objects-change. I t took surprisingly little effort :)
Comment #6
cburschka1. When building a form array, the occasional blank line between individual field arrays greatly improves readability. Instead of deleting the one that was there before, it might be better if you put one on each end of your new field declaration.
2.) You missed a space after the first comma in the db_add_field() call in upload_update_7000().
3.) For consistency, call it $num_files_teaser instead of $files_on_teaser (num because it's a counter like $num_files, drop the "on" because prepositions just unnecessarily bloat the variable name).
4.) Long boolean expressions are pretty daunting. I don't see any obvious way to improve this one (except maybe by dropping the superfluous parentheses around AND statements). The next best thing is an inline comment to explain what's happening.
Comment #7
maartenvg commentedThanks for your review. I agree with all of your remarks, and implemented them accordingly.
Still no functional change since #3, so the screen shot there is still valid.
Comment #8
cburschkaThis looks great!
However, I see a tiny problem when testing this. Steps to reproduce:
1.) Upload a file.
2.) Check teaser.
3.) Upload another.
Teaser checkbox gets unchecked...
Edit: I've looked through the ahah code a bit, but I don't see any obvious problem. Yet list and delete remember their values, and teaser does not.
Comment #9
maartenvg commentedI entered 'value' instead of 'values' in upload_js(), causing the checkbox to always fail. This shows that this needs tests.
Attached is with the fixed 's', but without tests.
Comment #10
maartenvg commentedNow with extra tests. Of course, this can't test the upload AHAH calls, so the bug that was fixed in #9 can't be tested for future breaking.
Comment #11
maartenvg commentedIt seems the retesting is broke. Lets try uploading it again.
Comment #12
catchMoving to usability queue - also, can we have a screenshot of the attachments + the UI for uploads?
Comment #13
maartenvg commentedYou mean like the screen shot in #3? http://cdn1.drupal.org/files/issues/247071_show_attachments_on_teaser.png
Or do you want a screen shot of the attachments in the teaser? Because that UI/layout is identical to the attachment listing in a full node.
Comment #14
catchWhoops, just like that one.
Comment #16
rafal_p_s commentedupload.admin_.inc_.patch queued for re-testing.
Comment #17
rafal_p_s commentedupload.module.patch queued for re-testing.