UI change: Add enable button to node-type form
| Project: | New Aggregator for Drupal core |
| Version: | 7.x-0.1-alpha1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
This patch adds an Feed aggregator box with an 'enable' button to node-type settings forms.
To activate a node as feed node type, a user has to click the "Enable" button. The form page reloads and a new tab "Feed aggregator" is available, the enable button changes to "Disable".
The advantage of this approach is that the "Feed aggregator" tab is not in the way on content types that are not feed-enabled. Also, the aggregator settings tab on content types does not contain the enable checkbox and is thus simpler and cleaner.
When users make a content type a feed content type, they should not need to visit the feed aggregator page - default settings should apply. This behavior is not yet implemented by this patch.
The problem with this patch is that when a user creates a new content type and uses the enable button, the form reloads and destroys entered data, and doesn't store useful information. Possible solution: When a content type is new, the enable button should be a checkbox.
I'm not entirely happy with the behavior yet:
* I chose to do an enable button rather than a checkbox, because a button reloads the form page and shows the settings tab immediately. Checkbox + submitting form with save sends user back to content type overview page, without showing them the new tab.
* The enable button won't work on a new content type.
* I needed to misuse a custom validate handler for the toggle.
Missing:
* special case for new content type
* create default values after activation
* Help text for user upon activation / deactivation
| Attachment | Size |
|---|---|
| feed_aggregator_toggle_on_node_type_form.patch | 6.39 KB |

#1
BTW, this patch also cleans up the use of 'administer news feeds' permission.