Robin S

PageListTrash - allows non-superusers to trash pages from Page List

Recommended Posts

PageListTrash

Allows non-superusers to trash pages directly from Page List (if they have page-delete permission for that page).

Not much to say really - the module adds a "Trash" option to the extra actions for pages in Page List. It looks and works just like the Trash action available to superusers.

2017-09-15_131750

https://github.com/Toutouwai/PageListTrash/

 

Up to you whether you think non-superusers should be trusted with simpler trashing. For most cases I like the default behaviour where editors have to jump through some more hoops - I want them to think carefully about what they are doing. But if an editor needs to trash several pages then this module might reduce frustration.

@tpr, by now you can probably predict what I'm going to say...:D

...something to merge into AdminOnSteroids?

  • Like 4

Share this post


Link to post
Share on other sites

Sure, thanks! Will try it soon and commit :)

  • Like 2

Share this post


Link to post
Share on other sites

Update: just added and works fine, thanks. However, at least a JS confirm could be beneficial because non-superusers can't see the Trash to restore, what do you think? I've done an "inline" confirm in case of the "Delete" action (aos feature), I could tweak it to make more generic and apply to this button too.

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, tpr said:

However, at least a JS confirm could be beneficial because non-superusers can't see the Trash to restore, what do you think? I've done an "inline" confirm in case of the "Delete" action (aos feature), I could tweak it to make more generic and apply to this button too.

Good idea.

Share this post


Link to post
Share on other sites

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


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By kixe
      Email Verification
      This module provides functions to validate email adresses and hosts. The module generates a textfile for blacklisted mailhosts (trashmail), which will be always up to date.
      Download
      https://modules.processwire.com/modules/email-verification/
      API
      // get module $mailcheck = $modules->get('EmailVerification'); // return bool/ string - automatted update of blacklist file $mailcheck->blacklisted(email|domain) // return bool - validate a top level domain, checks against IANA list $mailcheck->validTLD(tld) // return array of punycoded TLDs - cyclic updated, data pulled from IANA $mailcheck->getTLDs(cycle=2592000) // return bool - checks syntax converts to punycode $mailcheck->validDomainName(domain); // return bool - checks punycode encoded syntax $mailcheck->validHostName(host); // return bool - checks syntax and accessibility $mailcheck->validHost(email|domain) // add a single value to blacklist $mailcheck->addToBlacklist(email|domain) USAGE
      $mailcheck = $modules->get('EmailCheck'); $email = 'susi@trashmail.com'; if($mailcheck->blacklisted($email)) echo 'Email Provider not allowed'; if(!$mailcheck->validHost($email)) echo 'Mailhost not available'; Example blacklist file:  blacklist.txt
       
    • By teppo
      Code Blocks Textformatter is a tiny Textformatter module I cooked up to add support for code blocks to text/textarea/RTE fields on some of the sites I work with. Unlike a full-blown Markdown Textformatter – which is something that we already have in the core – this module simply adds support for fenced and inline code blocks.
      The syntax is based on the GitHub code block documentation, so please refer to that for additional instructions. The README at GitHub also includes some basic examples. As with any Textformatter, in order to enable this one, install it and enable it via field settings. Note that there's no syntax highlighting built in (at least for the time being), so use a tool of your choice for that – personally I prefer Prism.js.
      Since this module doesn't use a Markdown tool behind the scenes, but rather some home baked regular expressions, there's always the possibility that I've missed something – but please let me know if you use this module and run into any issues. On the other hand this module should be relatively fast and unobtrusive, as there are no unnecessary bits of code to run 
      GitHub repository: https://github.com/teppokoivula/TextformatterCodeBlocks Modules directory: http://modules.processwire.com/modules/textformatter-code-blocks/
    • By celfred
      Hello,
      I have a feeling I'm missing an easy thing here (again...). If I trash a page from API with :
      mypage->trash()
      Is there a simple way to restore it if needed ? I can do it in back-end, but I'd like to do it through API with something like
      mypage->restore()
       but this doesn't exit  
      So if you can give me a little help on that, I'd appreciate. Thanks in advance !
    • By theo
      Here is my first processwire module (beta).
      https://github.com/theo222/ImagePickerField
      A lot of "first times". First time Github, Markdown and of course PW Modules.
      So be gentle please.
      I hope it works.