Jump to content

AdminHelperLinks - shortcut links to edit fields and template directly from page edit


Richard Jedlička
 Share

Recommended Posts

Hi I created new module for adding links to quickly edit a field directly from page edit. 

https://processwire.com/modules/admin-helper-links/

admin-helper-links.thumb.png.3220f23c38da003c6ed4b4b5d063c460.png

You probably already know existing module HelperFieldLinks created by @Soma which was my inspiration. I was using that module for a long time so thank you @Soma! The reasons for this new module are that HelperFieldLinks seems inactive and contains few bugs. I decided to try to fix them, but after a short time I realized a better (i think) and simpler solution and also got some new ideas how to improve. I used javascript instead of PHP and modified a code which is already in PW source code to show field names when you hover the inputfield's expand arrow (in debug mode). I also moved the cog icon next to the expand icons which doen't break the layout so much. What is missing is the field info panel with it's props, never used it, but it can be done too. The template edit links needs to be added too. 

If you got some ideas how to improve, tell me.

  • Like 10
  • Thanks 1
Link to comment
Share on other sites

Hello,

Thank you for sharing your module. I used to install AdminOnSteriods on all of the sites I work on, which module (among lots of other features) can do the same. However, since AdminOnSteroids might not be maintained in the future, I started not to use it. What I am really missing without AdminOnSteroids is this feature you implemented, and a similar one, which is a link to the edit template page.

So my first idea to improve the module would be to add an "Edit template: templatename" link next to the title of the page (H1 id="pw-content-title" in the html source of the page). 

BTW, I installed it and the cog icon does not show up, because you hardcoded the admin url into the module. Could you please us $pages->get($config->adminRootPageID)->url instead? Yeah, it involves PHP, but: https://processwire.com/talk/topic/8343-access-page-and-pages-variables-from-inside-a-javascript-file/

 

Or maybe some knows that the admin URL is already provided by the PW admin on the JavaScript side as well?

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

6 hours ago, szabesz said:

Thank you for sharing your module. I used to install AdminOnSteriods on all of the sites I work on, which module (among lots of other features) can do the same. However, since AdminOnSteroids will might not be maintained in the future, I started not to use it. What I am really missing without AdminOnSteroids is this feature you implemented, and a similar one, which is a link to the edit template page.

Same here 🙂 So thx for you module!

@szabesz you know that tracy shows the template in the panel (and it's a link)

W741xwH.png

@Richard Jedlička you can add uk-tooltip attribute then AdminThemeUikit will show the title="foo" as nice tooltip on hover 🙂

  • Like 2
Link to comment
Share on other sites

38 minutes ago, bernhard said:

you know that tracy shows the template in the panel (and it's a link)

Thanks, since it is not so intuitive to look there (and AOS has probably spoiled me, and I often hide/disable Tracy anyway...) I keep forgetting it. Also, I do not work on PW projects these days too much, so my memory is fading, but I'm trying to keep it fresh by reading all the forum posts that look "interesting".

Side note: I could have just implemented my own module like this one as it is not rocket science to do it but I do not have free time these days I'm afraid, so I am happy to see that someone deals with these features, and puts those links into the positions where l would look for them.

Link to comment
Share on other sites

  • Richard Jedlička changed the title to AdminHelperLinks - shortcut links to edit fields and template directly from page edit
  • 2 weeks later...

Thanks @Richard Jedlička, seems like a very useful module!

One thing I would love to be able to do is to limit use of these links by user roles. I'm not sure I want some adventurous clients changing something I don't want them to 🙂 In my opinion custom permission/role would be best for this. However sometimes I make client users "superusers" too, so it would be best to be able to disable/enable links for some superusers only. Do you think it's possible?

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...
1 hour ago, bernhard said:

there's one slash too much on line 134

Ah ok, will fix it, does it make any problems (just curious)?

 

1 hour ago, bernhard said:

If it is easy to implement a "save + reload" button would be nice to have in the modal

You mean to reload the page edit after you update the field? Yeah it will be useful.

If you have time PR's are welcomed 🙂 

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

Hey @Richard Jedlička just wanted so say thank you as your module is really helpful in my daily work 🙂

Also thank you for your suggestions regarding RockMigrations field context syntax, I'm using that all over and it makes the migration syntax a lot better!! 😎

  • Like 2
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...