Free feature! Patch attached.

Right now there's nothing to tell ctools about the scheduler form element - meaning that (for example) if you have a custom node edit page layout using Page Manager, the scheduler form element doesn't appear as an available content type, forcing you to choose between your custom layout and Scheduler.

Not any more! This adds a pretty standard ctools plugin following the same method as for the other node form elements such as menu settings, etc.

As a free bonus it also fixes a missing apostrophe on one of the admin pages.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jonathan1055’s picture

Sounds interesting. Not tried any custom node edit pages. If anyone else has used this, please tell us here.

Jon Betts’s picture

@alanomaly Thanks for this!! It works great! Was here looking for this exact funtionality. This solves a pretty major UI issue for me. Thanks again!

alanom’s picture

Any chance of this patch getting tested, committed etc? I'd like to be able to update without then needing to reapply / re-hack this back in.

Eric-Alexander Schaefer’s picture

Sound interesting although I have no idea that ctools and page manager are. Could you shed some light on this?

alanom’s picture

Do you mean you don't know what ctools and page manager are? If so... I'm tempted to say google them...

That said Page Manager (part of the ctools module by the way) has really awful documentation... about the only decent resources for it that I know of are in this series of screencasts at nodeone.se. Also, here's that guy's overview on what page manager does and why it is important.

tripper54’s picture

Status: Active » Needs review
FileSize
3.48 KB

Hi,

I couldn't get the attached patch to run on the latest version, so I manually added the changes and re-rolled.

I made a couple of small changes:

* removed the fix for the grammar error in scheduler.module - I figure this should be in a separate patch.
* remove the hard-coded reference to the ctools module path, replaced with a drupal_get_path

Otherwise, all good - it seems to work as expected. Thanks so much for your work on this, alanomaly!

I always use page manager to customise node add/edit forms now - it's a fantastic way to quickly put together multiple versions of forms for different node types, user roles etc. Clients love it!

stred’s picture

Worked for me, thanks for the job. Page manager is a must ;)

webflo’s picture

Nice patch! I found a little bug and removed the trailing whitespace.

+++ b/plugins/content_types/scheduler_form_pane.incundefined
@@ -0,0 +1,57 @@
+    'category' => array(t('Form'), 8),
...
+    'category' => t('Form'),

Duplicate array key.

pfrenssen’s picture

Rerolled the patch to latest 7.x-1.x. Cleaned up coding standards and simplified documentation (mainly removed boilerplate documentation from the CTools example plugin).

tripper54’s picture

Status: Needs review » Reviewed & tested by the community

#9 Looks great and works a treat. I would love to see this committed!

jonathan1055’s picture

Minor question - is it correct to have underscores in a string passed to t( ) ?

 $block->module = t('node_form');

or maybe that string is not meant to be translated?

pfrenssen’s picture

No, that does not look right indeed. Fixed it in this patch.

I wondered how this got in there and discovered that several plugins in CTools have the same problem: node_form_title.inc, node_form_publishing.inc etc.

pfrenssen’s picture

I reported the problem in the CTools issue queue: #1978350: Do not translate $block->module assignments.

pfrenssen’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
2.6 KB

Rerolled patch so it does not conflict with #1069668: Default time with user override. This does not change the code, it only moves a function to a different spot. I need to be able to apply both patches for a distribution I'm working on, and this saves me from having to fork Scheduler.

Also setting back to needs review, since the patch from #12 fixes the problem reported in #11 but this had not yet been reviewed.

jonathan1055’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
202.79 KB
103.89 KB

This is fantastic! Tested and works. Patch applies cleanly to 7.x-1.1+10 of 27th July. Coder Review is clean.

Attached are a couple of screen shots, showing the new form item which can be added to a pane, and an example of editting a node using a custom pane.

Thank you to alanom, tripper54, webflo and pfrenssen for all contributing.

For reference, if anyone else want to learn about how to use this functionality, the screencasts at nodeone are very good. 1 to 4 are enough to find out how to create node edit panes and use the Scheduler form.

Jonathan

rickmanelius’s picture

Status: Reviewed & tested by the community » Fixed

Thanks everyone for the hard work on this one.
Committed http://drupalcode.org/project/scheduler.git/commitdiff/937411e

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.