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:

  1. Plain MENU_LOCAL_TASKS - This is the standard Drupal system output for the tasks, usually rendered as tabs on the page.
  2. 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:

Pending issues with patches:

Also, not a published issue but sent up a patch to fix an XSS issue in Monster Menus (attributed in commit b39f78e).

CommentFileSizeAuthor
block_local_tasks_menu.png17.55 KBjay.dansand

Comments

umarzaffer’s picture

Status: Needs review » Needs work

Automated 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.

./block_local_tasks.info: ASCII English text, with CRLF line terminators
./README.txt: ASCII English text, with CRLF line terminators
block_local_tasks.info
block_local_tasks.module
README.txt

...
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.

jay.dansand’s picture

Status: Needs work » Needs review

Ugh, 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).

jay.dansand’s picture

Status: Needs review » Closed (duplicate)

Discovered 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!

avpaderno’s picture

Title: Block Local Tasks » [D7] Block Local Tasks
Status: Closed (duplicate) » Closed (won't fix)