Description, Rationale
The purpose of this module is to turn the standard MENU_LOCAL_TASKS output into a block that can be repositioned or interacted with at the theme layer. It provides 2 blocks, each representing a different presentation of the tasks list:
- Plain MENU_LOCAL_TASKS - This is the standard Drupal system output for the tasks, usually rendered as tabs on the page.
- Menu MENU_LOCAL_TASKS - This block renders through theme_menu_links and theme_menu_tree, and provides a nice tree of links similar to Drupal core's menu system output. It also allows MENU_LOCAL_TASKS to be integrated with other administration modules such as the Admin module. See attached screenshot for an example (also shown on the project page).
I created this module in order to a) be able to re-position and accordion-ify the local tasks tabs (to hide some of the Drupal UI until it was actually needed by the user), and b) integrate it with the Admin module (as mentioned above). This module is used on our upcoming production site, so it will be maintained actively. Any bugs found need to be squashed quickly.
Project Info
Drupal version: 7.x
Project page: http://drupal.org/sandbox/dansandj/1778256
Git repository: http://drupalcode.org/sandbox/dansandj/1778256.git
Author's Drupal Work
Tips for ensuring a smooth review recommends giving some examples of my Drupal experience, so here's a short list:
Accepted issues with patches:
- CKEditor: #1728318: [D7] Text format filters are not properly given $format; cannot look up their per-format settings
- Pathologic: #1672932: Character double-encoding/erroneous rawurlencode()
- Pathologic: #1670078: Add a setting for Pathologic to output protocol-relative URLs
Pending issues with patches:
- Panels: #1613402: IPE Cache Management Errors Cause AJAX "Access Denied" Failures and Possible Layout Regression
- LESS CSS Preprocessor: #1543276: Support passing/defining LESS variables/functions via drupal_add_css() and theme.info
Also, not a published issue but sent up a patch to fix an XSS issue in Monster Menus (attributed in commit b39f78e).
| Comment | File | Size | Author |
|---|---|---|---|
| block_local_tasks_menu.png | 17.55 KB | jay.dansand |
Comments
Comment #1
umarzaffer commentedAutomated review of this module shows lot of issues you need to address.
Pareview report
----------------------
1. Remove "version" from the info file, it will be added by drupal.org packaging automatically.
2. Bad line endings were found, always use unix style terminators.
...
To view complete review report visit Pareview report
UI review
-------------
1. With accordion enabled on a block, the show/hide link is given as gear icon.
Gear icon can only be used if you are providing some sort of configuration link.
For show/hide purpose of the block content, you should rather use arrow representation
or some sort of +/- representation.
2. Activating accordion on block puts it by default into "collapsed" state. There should an option
to set default accordion state i.e. after enabling accordion on block should it be collapsed/not-collapsed
by default.
Comment #2
jay.dansand commentedUgh, dirty IDE's. Some files had proper *nix line endings, others had CRLFs. That's fixed, and the tabs have been replaced with two spaces in the CSS/JS files as well. Thanks for the note!
A new Pareview report returns no errors or warnings.
I replaced the icon with a new collapsed/expanded arrow, and I've added a configuration option for default state (expanded/collapsed) that preserves a user's choice unless overridden by a more specific option (i.e., if the default state is collapsed but the user is switching between primary tasks and the "don't collapse when switching" option is enabled).
Comment #3
jay.dansand commentedDiscovered that this was a dupe of Local tasks blocks, which hadn't shown up in my initial module search (maybe I limited to full 7.x releases and didn't realize it?)
Closing this module issue; I've been added as a maintainer of http://drupal.org/project/local_tasks_blocks so I'll just push the code in there. Thanks for your time, sorry if I wasted it!
Comment #4
avpaderno