Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Module to the Dashboard - always visible. #38649

Open
Open2logic opened this issue Aug 31, 2022 · 8 comments
Open

Add Module to the Dashboard - always visible. #38649

Open2logic opened this issue Aug 31, 2022 · 8 comments

Comments

@Open2logic
Copy link

Open2logic commented Aug 31, 2022

Steps to reproduce the issue

Go to administration and disable all modules.
So in the Dashboard you will only see one box, the "Add Module to the Dashboard"
But if you click on "Add module", you will see a blank popup and you can't add any modules as they are all disabled
So why is the "Add Module to the Dashboard" box still displayed?
There is no way to disable the "Add Module to the Dashboard" box?
If we want to create a custom administration for a client, but we don't want them to see this feature, what do we do?

Expected result

We want to disable the box "Add Module to the Dashboard"

Actual result

"Add Module to the Dashboard" always visible, even when ALL modules to add in the administration have been disabled.

System information (as much as possible)

Joomla 4.X

Additional comments

The togle menu is also always active even if there is no option visible.

@brianteeman
Copy link
Contributor

I'm sure you really meant to use a single ? instead of screaming!!!!

@brianteeman
Copy link
Contributor

To do this you can either remove the create module permissions for the user (probably not a good idea) or create a template override for administrator\components\com_cpanel\tmpl\cpanel\default.php

image

@Open2logic
Copy link
Author

Open2logic commented Aug 31, 2022

Thanks Brian, I don't mean to yell.

What it indicates I think requires average knowledge and my proposal is an option so that this box can be disabled by people without code knowledge, I have it like this:

1 - In the back end of Joomla, go to System > Templates > Administrator Templates.
2 - Click on "Atum Details and Files".
3 - Navigate to the tab "Create Overrides".
4 - In the "components" list, click on the "com_cpanel" folder, then on "cpanel". You should get a message that says "Override created in /administrator/templates/atum/html/com_cpanel/cpanel".
5 - In the "Editor" tab, click through the folders html > com_cpanel > cpanel > default.php
6 - Scroll down in the editor until you see the line "authorise('core.create', 'com_modules')) : ?>"
7 - Replace that line with: authorise('core.manage', 'com_modules') && in_array(8,$user->groups)) : ?>
8 - Save & Close.

That line originally checks if the logged in user has the permission to manage modules. The updated line checks that AND also if the user is a Super User, and only will show the "add module" box to Super Users.

But I see in forums that many people want to disable that box with a simple click.
It could not be an improvement with an option in the global configuration or in the template configuration.

As I have indicated, I have solved it, but several people want to disable that box and do not know or are afraid to edit code.

Thanks

@brianteeman
Copy link
Contributor

Personally speaking I see it as an advanced customisation

@chmst chmst added the Feature label Aug 31, 2022
@chmst
Copy link
Contributor

chmst commented Aug 31, 2022

Thanks for your suggestion, @Open2logic, it is surely worth being discussed. But please - could you change the title of your issue and use lower case without bangs?

@Open2logic Open2logic changed the title Add Module to the Dashboard - ALWAYS VISIBLE !!!!! Add Module to the Dashboard - always visible !!!!! Aug 31, 2022
@Open2logic
Copy link
Author

Open2logic commented Aug 31, 2022

Thinking about it, I think Brian is right, when a custom administration is prepared for a client, the developer is the one who hides that box by delivering a clean, empty or adapted interface.

I have reviewed forums where there is talk about how to hide the box and certainly all those interested are developers, however they do not think of code rewriting, it seems that their first natural option is to look for how to disable the box among the options (they are familiar with this method), which indicates that if everything that is shown in the panel can be hidden with a click, this box should also have the possibility to activate or deactivate it from an option, simply because it is the generic methodology.

A charm of the Joomla administration is its flexibility to be easily customized, simply with html modules and hyperlinks you can present a very attractive and practical administration with icons style App to an end client, pity of the exception of the "add modules" box to the board"

@Open2logic Open2logic changed the title Add Module to the Dashboard - always visible !!!!! Add Module to the Dashboard - always visible. Aug 31, 2022
@brianteeman
Copy link
Contributor

Your code proposal is also not suitable as the permissions for modules are the same for both site AND administrator modules. The ACL does not differientate between them.

@Open2logic
Copy link
Author

Woow thanks Brian.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants