Jump to content

Recommended Posts

Posted (edited)

New Module which adds 1 more, but very tiny green buttons to the page list. It saves minimum 3 klicks :) to change page status from hidden to visible.
post-1246-0-67465100-1418068303_thumb.jp

Edit: update 11.12.14
Module provides up to 3 (more) buttons in page list to toggle status (hidden/visible, published/unpublished  and locked/unlocked).


Enable/Disable the buttons in the settings (screenshot)

post-1246-0-36598500-1418291439_thumb.jp

ProcessPageStatusToggler.module

Edited by kixe
  • Like 9
Posted

Looks very handy - thanks!

A few minor comments:

  • I don't see why it requires LazyCron
  • I think you have the messages reversed - it says "Changed page status to 'hidden'" when it should say "visible"
  • It would be nice if the message told you what page had its status changed
  • I'd love to see this work via ajax, rather than a page refresh, or at a minimum, it would be great if the EDIT / VIEW etc links were turned on for that page after the reload
  • I am not sure whether the obscurity of the tick/cross is really worth the reduced space usage - I would rather see hidden/visible, but maybe that's just me.

Thanks again!

  • Like 2
Posted

It doesn't require LazyCron. Thats a copy paste bug :rolleyes:. Thanks Adrian for the comments. I put it quickly together. Polishing will come soon. Thanks

  • Like 1
Posted

@Kixie,

Nice effort! Thanks. Not sure you know we already have a similar module?

@kongondo.

I saw that coming but didn't search enough in the growing modules directory.

Posted

Sorry - I figured the lazycron was a typo - I should have phrased my comment as such :)

I have another thought for you which I think is important. You are setting the status directly as statusHidden and StatusOn, but really you should be using addStatus and removeStatus to add/remove Page::statusHidden

Otherwise you will override unpublished, locked etc.

Posted

made some changes. Implements now publish/unpublish button too. Enable/ disable buttons via modules settings.
post-1246-0-63042100-1418120076_thumb.pn

@adrian
Thanks. I changed this.

  • Like 2
Posted

I'd say we don't. Maybe @kixie can collaborate with @geniestreiche to enhance the existing module(s)? Whilst I wouldn't want to discourage the enthusiasm of budding module developers, I'd say this is something we need to carefully consider and strike a good balance about. There's enough lessons from our neighbours Drumlapress about this :-). Just saying..

  • Like 1
Posted

Kixe, I really appreciated the effort you made here and I'm in total agreement here with Kongondo. Maybe it's even possible to take the lead on a combined Module as I haven't seen geniestreiche for a while.

Posted (edited)

@Soma
no we don't.

@Martijn Geerts
Its already done. I updated it and included lock/unlock button too.

@kongondo
When I started with the module I didn't know about the one from geniestreiche. I startet on the base of Nicos ProcessPageDelete.module.
I will not put it in the modules directory. I am open to merge the results with geniestreiche.
Sent him a message. :rolleyes:

 

Edited by kixe
  • Like 3
Posted

Btw, both yours and the ones I linked to are not really Process Modules :-)

Thats a question of philosophie. :)

  • This module creates a page with a process field (which calls the module).
  • This module hooks in ProcessPageListRender
  • Changing the page status is a process

In a way you are right: this module is not a process itself, but it executes one.

Any suggestions for a better name? Something like HookProcessPageStatusToggler.module? I am often thinking about a straight naming syntax for modules. I have no idea ...

  • 8 months later...
Posted

By the way there exists a built-in functionality, which makes my and the modules of geniestreiche obsolete.

Where can I activate this?

Posted

it is already activated under the following conditions:

  • not available for 'home' ($page->id == 1)
  • not available for 'admin' ($page->template == 'admin')
  • page editable status is needed
  • to show lock/unlock current user needs page-lock permission
  • trash/restore button only available for superuser
  • functionality disabled in demo mode

If you like to have a deeper view have a look in the script: /wire/modules/Process/ProcessPageList/ProcessPageListActions.php

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...