As per a discussion in IRC, it'd be nice if views provided more powerful control over the parent menu items that are generated when a view provides a menu tab, and is selected as the default menu tab at a given location. attached is a proposed screenshot of the views UI for these changes (to get initial feedback on that) while i work on the underlying code to make this possible.

Comments

merlinofchaos’s picture

The mockup looks good.

dww’s picture

Status: Active » Needs review
StatusFileSize
new8.01 KB

added a box to specify the weight of the parent item, if that's a tab. here's the code.

dww’s picture

StatusFileSize
new8.21 KB

here's a better version of views_update_15() that would work on pgsql. ;)

dww’s picture

Status: Needs review » Needs work

whoops, i didn't realize the export stuff had to be coded manually. so, the new fields aren't being exported now. i'll re-roll.

dww’s picture

Status: Needs work » Needs review
StatusFileSize
new9.16 KB

now with support for exporting. ;)

dww’s picture

StatusFileSize
new9.5 KB

based on feedback from webchick, a few changes to the UI:

  • the type of the parent menu item is now called "Parent Menu Item Type" (put 'type' in there). changed schema column and variable names to match.
  • fixed the description of that to clarify what "Already exists" is about a little bit... ;)
  • new description for the "Parent Menu Item Title" field

it's still a little confusing, i'll admit, but this is certainly better. ;) obviously, there are all sorts of cool JS things we could do to hide/show form elements that aren't relevant depending on higher-level choices, but that's clearly feature creep and beyond the scope of this issue...

merlinofchaos’s picture

Status: Needs review » Fixed

Applied to 5.x branch. Thanks!

dww’s picture

sweet, glad this made it in. ;) excellent news.

dww’s picture

Category: feature » bug
Status: Fixed » Needs review
StatusFileSize
new1.16 KB

oh crap, i just realized there's a bug in here. i forgot to fix the export code when i made the changes for #6, so the type for the parent item for the default tab isn't being exported properly. :( this causes all sorts of grief if you export or try to define a default view using this stuff. luckily, it's a trivial fix.

dww’s picture

Status: Needs review » Fixed

now fixed by the duplicate http://drupal.org/node/149829. *shrug*

Anonymous’s picture

Status: Fixed » Closed (fixed)