The new 'modal' settings of the Legend block are not working nicely with the 'local' settings of the rendered Events/Entities. The Legend block is apparently designed for only 1 calendar page per site, whereas it is perfectly imaginable to have several calendars, each showing different types.

This is the use case:
- Create a Node type, Entity type, User
- Add the same taxonomy term field to all 3.
- Create a Calendar view (from template) for each.
- In each Views, set different legend colors for the Month display, e.g. red/blue/green, vs. yellow/orange/red.
(The Month-display is the 'default display'. This is the first/most-left display in the view, not counting the 'Master display', which you can enable/show under admin/structure/views/settings .)
- Enable the Calendar Legend Block and set the 'Legend View' in the Block settings.

Now, Open the calendar page for each calendar (This would show the Month display).
! Each page has the same colors in the legend block, but the rendered entities have the colors from their own 'default display'.

Now, Change from the 'Month' to the 'Week' display.
! On each Week-page, the Legend block still appears (which is OK), but the striping has disappeared (which is unexpected)
- Solution option 1: use the striping from the legend block, not from the week-display
- Solution option 2: force the user to set the striping colors for every display (this shouldn't be the goal)

Now, Open the View/display you selected in the Legend Block. Set the 'Legend color stripes' to 'None'.
Save the View and refresh the calendar pages.
! Although the user's intention was to only disable the striping for 'only this calendar', the Legend block has disappeared on all other pages, too!
! also, the following error appears:
Notice: Undefined index: calendar_colors_ in theme_calendar_stripe_legend() (line .. of theme.inc).

Now, try and set up a striping for node types in the view for 'Nodes'.
! The legend block will not show properly if it is choosen from a non-node Views, since the Legend type 'Based on content type' does not exist in the modal view/display.

Solutions??
- move the 'Stripe color settings' to the Legend block , not in the View
- Make the 'Legend view' in the 'Legend block settings' a display name, not a view::display name.
- Create a new 'Legend' display in each View, which only serves for containing the Legend options.
- In the Views/display settings, Split the 'Format/Format', and 'Format/Show' settings in 2 separate blocks. The 'Format/Show' settings may not be set for 'this page/this display' only.
- Save the Format/Show settings in the Master display, either by:
-- explicitly showing the master display (evt. overriding the standard Views option to hide it) and adding a warning that 'this settings are valid for ALL displays'
-- changing the submit-code , so the settings are saved/retrieved under the master display
-- adding a checkbox 'use master display for these settings', (including a link to that page??)
- See also http://api.drupal.org/api/views/help!display-default.html/7

PS1. Under the 'Row style options', some settings may be removed, in favour of the default settings under 'Fields' (some of which are introduced in the last year).
- Provide default field wrapper elements
- Hide empty fields

PS2. The 'Add new date link' already doesn't work when set on e.g. both Month and Day display: the node view-page only shows 1 link, not 2.

Comments

johnv’s picture

Issue summary: View changes

more details

johnv’s picture

Issue summary: View changes

more details.

Neslee Canil Pinto’s picture

Status: Active » Closed (cannot reproduce)