Jump to content

AdminOnSteroids


tpr

Recommended Posts

10 hours ago, gmclelland said:

I added that snippet to a template file, but it didn't output anything.  I also have Tracy debugger and tried using the php console, but it didn't output anything either.

Even if you re-save your profile? Then it could be something with your PW. Next would be trying to disable/uninstall other modules to see what may interfere. I don't have this issue on any on the sites I checked (different servers, different php versions).

  • Like 1
Link to comment
Share on other sites

Still no idea why you guys don't have this class.

Anyway, could you try replacing line #323 with this?:

$this->adminTheme = (isset($this->user->admin_theme) && $this->user->admin_theme !== "") ? $this->user->admin_theme : 'AdminThemeDefault';

 

  • Like 1
Link to comment
Share on other sites

Thanks. The problem is with the default admin theme. I decided to make things simpler and add its class to the html instead to the body, but it seems some PW installations doesn't return the $user->admin_theme like on in my sites. I hope I can figure out why because there are some tweaks where I use need to check which theme is active.

  • Like 2
Link to comment
Share on other sites

I was on the right track when I posted the snippet above. I suspected that $user->admin_theme is not available until there's only the default theme and apparently that was the case.  That's another question why my condition was always FALSE above but it's hard to bugtrack blindly :)

Try v057, it should detect the current admin theme correctly. If there isn't any then $config->defaultAdminTheme is used.

Btw, it was the first time I used grabpw.php to install PW (by Soma) which made things a lot easier. It downloads the 2.7.2 version so it's recommended to modify the "SOURCE_URL" to the latest PW version (otherwise you can use the module ProcessWireUpgrade to upgrade from the admin). TracyDebugger's Console panel was also of great help identifying the issue.

Otoh I'm not very satisfied with the current html classes solution and regexp implementation. I may rewrite this very part in the future using data- attributes.

  • Like 4
Link to comment
Share on other sites

AdminLangSwitcher is coming!

This makes easier to see the admin in the selected language. Useful to check the page names and other stuff in other languages.

Implementation is quite easy, it just sets a cookie with JavaScript and then sets $user->language based on that.

aos_admin_lang_switcher.gif

  • Like 5
Link to comment
Share on other sites

Hello tpr,

z-index man is back :) with a new z-index issue concerning the date/time inputfield.

Screenshot_14.jpg

As you can see the date/time picker div will be overlapped by using the static header.

The CSS used for this inputfield:

.ui-datepicker {z-index: 100!important}

So you have to add this line of code also to your Stylesheet with a higher index than the static header divs and the important addition.

This is what it looks like with a much higher index:

Screenshot_15.jpg

Best regards the z-index man

  • Like 1
Link to comment
Share on other sites

I haven't got the need for this so I need to think about it a bit more. Are your "editors" responsible for only one language?

On "think more" I actually meant that it  would be better to create a module setting that is more general. For example a setting where you could enable/disable submodules for each role, eg. using asmSelects. It's just a quick idea but this would allow fine-tuning permissions for every submodule.

  • Like 1
Link to comment
Share on other sites

The editors only translate text and therefore they dont need this feature, because I use language tabs for translations of fields. I use your language switcher fe to check if all the page labels were translated and so on. In general I use it to check if the admin section is understandable for non native speakers as well, because some editors have another mother language and this makes it (only for me as superuser) much easier.

  • Like 1
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
×
×
  • Create New...