If anyone wants to add or change the customize this page button, they'll need control.
Of course this is hard since the javascript will want to attach, but let's give people enough rope.

Patch forthcoming.

Comments

jonskulski’s picture

Status: Active » Needs review
StatusFileSize
new3.09 KB

Here you go.

jonskulski’s picture

Status: Needs review » Needs work

Actually, this patch is preventing changes to be saved via the IPE.http://drupal.org/node/887444.

We are seeing new content being added without the draghandles visible (though they are present in the markup).

Looking into this

jonskulski’s picture

looks as though cache_key isn't being set, which means the topParent isn't found. This is due to the parent not being rendered before we tried to access the cache_key. parent::render() sets the cache_key.

jonskulski’s picture

Status: Needs work » Needs review
StatusFileSize
new3.08 KB

Okay got it.

I was right, I was trying to get the cache_key before generating it thus the IPE was convinced it had nothing to do. Here is a working patch.

jonskulski’s picture

Status: Needs review » Needs work

We should conditionally render the controller. Only render it if the user can save and make the changes to that specific panel. Right now (and in 3.7, I believe) it is rendered for everyone.

jonskulski’s picture

jonskulski’s picture

StatusFileSize
new3.26 KB

Here is one that uses the 'use page manager' permission for now.

We obviously need a specific IPE permission since the idea is that a smaller subset of site editors would use the IPE and page manager would be necessarily more priveleged since they can change things like variants, selection rules, etc.

joshk’s picture

StatusFileSize
new3.27 KB

Here's a slight tweak. I think "use panels in place editing" is probably the better perm. This is what the IPE module uses as the permission on the renderer itself. :)

jonskulski’s picture

Status: Needs work » Needs review
StatusFileSize
new3.15 KB

Much better, thanks joshk

I removed a couple TODO comment relating to that permission.

merlinofchaos’s picture

Status: Needs review » Needs work

With the patch in #9 applied, the "Customize this page" button does not actually function.

Letharion’s picture

Status: Needs work » Closed (won't fix)

Closing issue due to lack of activity. Feel free to re-open if you have an update to the patch.