Closed (fixed)
Project:
Signup
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
17 Nov 2008 at 21:09 UTC
Updated:
3 Dec 2008 at 07:16 UTC
Jump to comment: Most recent file
Comments
Comment #1
dwwHrm, yeah. Currently, the signup output is just hard-coded at weight 10 in the
$node->contentarray. It'd be better if there was a setting to specify the weight for situations like this.Not sure if it's possible to tie this into the CCK field UI so you could just specify the weight of the signup info there for each node type.
Also, it'd probably give maximum flexibility if you could specify the various parts of the signup info separately, so they could be re-ordered (e.g. the signup form or the user's current signup info, the list of attendees (for folks with the "view all signups" perm), etc).
Comment #2
dwwNot sure if I want to commit this to 6.x-1.x-dev or put it off for the 6.x-2.* series. I said I was going to be in feature freeze, and I shouldn't really be adding new features after it's already at RC. However, this is pretty slick, I was probably a bit hasty to call the current code "RC1", and it'd be a nice touch for 6.x-1.0. ;) Here's what the patch does:
- If content.module is enabled, we use the administer fields drag and drop UI to control the weight of the signup info by implementing hook_content_extra_fields().
- If content.module isn't enabled, we have a separate "Signup weight" setting when editing the node type.
- Moved the signup stuff on the node type form to its own fieldset, instead of overloading 'workflow'
- Moved the JS for date-related settings on the node type form to admin.content_types.date.inc so that the new JS to hide "Signup weight" could live in admin.content_types.inc (which is a more natural name for it).
- Since you now trigger JS actions on the signup default state setting without CCK, the divs to make that possible are now defined when we create those radio buttons, instead of adding them separately via date.inc.
Future work (probably for other issues/patches):
A) It'd be nice to specify weights separately for the signup form vs. the attendee list.
B) It'd be nice to make the "display on the node vs. a separate tab" setting per node-type, not site wide.
Comment #3
dwwSee #335749: Make "Location of signup form" setting per node-type, not site-wide for further discussion of 2.B.
Comment #4
gregglesIMO this doesn't belong in any one module. It should be a framework module that does this for all forms or people should do this custom for their site with theme functions.
Given that CCK starts to provide those features, that seems like a good way to provide this. I'd skip bullet item two from #2 (providing the separate control). But if you want to provide it for consistency I can understand that.
I like moving the signup stuff to its own fieldset. It's not really workflow.
I don't have a signup cck 6.x site just yet...so nowhere to test this :(
Comment #5
3duardo commentedThanks for looking into this - and the proposed 2B too.
I don't know much about such things...
but #4 sounds right to me - if it means keeping the same code from showing up in other modules.
Comment #6
dwwAfter a few discussions in IRC, I think I'm convinced that we don't need the fallback code. It makes the patch a lot bigger than it needs to be, for the benefit of a very small number of sites not using CCK. There are alternatives -- a site can implement hook_nodeapi('view') in a site-specific module and alter the weight of things in the
$node->contentarray, anyway. Plus, it costs me basically nothing to leave a variable_get() in there (with reasonable defaults) so sites without CCK could also specify the weight in their settings.php file if they wanted. Stay tuned for a (much smaller) re-roll.Comment #7
dwwYes, that's quite a bit smaller. ;) Sites using CCK -- still get D+D goodness. Otherwise -- stick stuff like this in settings.php:
Comment #8
dwwAlso, FYI: #336129: Move signup node type settings out of "workflow" into "Signup settings"
Comment #9
dwwFixed the spelling error in the PHPDoc comment (thanks Nedjo) and committed to HEAD. I also backported the variable_get to DRUPAL-5--2 for 5.x-2.7 if folks want to manually control the weight via settings.php there.
Comment #10
jrbeemanIt'd be nice to see this affect the node edit form, as well. When doing the drag and drop re-ordering on the fields management page, the other elements obey the ordering in the node edit form as well as the node view.
Comment #11
dwwWell, on the node form, it's something completely different from what you see on the node itself. On the node, you see the signup form or the user's current signup info, and the list of attendees. On the node form, you see a fieldset of stuff about confirmation/reminder emails, the signup limit, etc. I'm not sure it makes sense to tie both of these things together and re-order the node form like this... But, I'm willing to listen if there's more support for your proposal.