Fórumok

How to hide the 'Options' (ie wrench) icon for regular users?

thumbnail
Raymond Gardner, módosítva 10 év-val korábban

How to hide the 'Options' (ie wrench) icon for regular users?

Regular Member Bejegyzések: 118 Csatlakozás dátuma: 2011.07.15. Legújabb bejegyzések
I need to hide the 'Options' icon, ie wrench, found on the portlet's title bar.

I need to do this for regular users while I need to display it for 'Administrator' users. We are not allowing users their own portlet configuration options of this nature so we wish to hide it.
Bradley Wood, módosítva 10 év-val korábban

RE: How to hide the 'Options' (ie wrench) icon for regular users?

thumbnail
Dhrutika Vyas, módosítva 10 év-val korábban

RE: How to hide the 'Options' (ie wrench) icon for regular users?

Expert Bejegyzések: 435 Csatlakozás dátuma: 2009.02.09. Legújabb bejegyzések
Hi Raymond,

You need to overwrite portlet.vm under _diffs.

You can add condition like
#if ($permissionChecker.isOmniadmin())
$theme.iconOptions()
#end

Regards,
Dhrutika
thumbnail
M J, módosítva 10 év-val korábban

RE: How to hide the 'Options' (ie wrench) icon for regular users?

Regular Member Bejegyzések: 184 Csatlakozás dátuma: 2013.03.01. Legújabb bejegyzések
@Dhrutika

I was looking for the same functionality. I will try this and will update.

Thanks,
MJ
thumbnail
Dhrutika Vyas, módosítva 10 év-val korábban

RE: How to hide the 'Options' (ie wrench) icon for regular users?

Expert Bejegyzések: 435 Csatlakozás dátuma: 2009.02.09. Legújabb bejegyzések
Fine M J.

Try and if it helps you mark it as answer so that it can other people as well.

Regards,
Dhrutika
thumbnail
Raymond Gardner, módosítva 10 év-val korábban

RE: How to hide the 'Options' (ie wrench) icon for regular users? (Válasz)

Regular Member Bejegyzések: 118 Csatlakozás dátuma: 2011.07.15. Legújabb bejegyzések
Hello Dhrutika and all,

Thanks for your replies. I did not try out the omniAdmin permission check. I'll have to keep that in mind.

I did figure out my issue. It had to do with page customizations. The page in question had customization permissions turned on. I guess at the time of turning on page customizations, every user had portlet configuration permissions turned on. (Or maybe this happens automatically with page customizations turned on.) So, every user was getting the 'Options' drop-down menu in every portlet title bar, on this page.

I was confused because I had portlet level configuration permissions turned off on all these portlets yet every user was getting the 'Options' drop-down. I was double sure to use the portlet's owner on this page in question, to turn off configuration permissions on a portlet level. Yet, users were still seeing the 'Options' drop-down.

Once I turned off page customizations, the 'Options' drop-down became configurable via the portlet level configuration permissions. If I turned on configuration permissions for a specific portlet, them everybody would get the 'Options' drop-down. If I turned off configuration permissions for this portlet then the 'Options' drop-down would no longer display. Of course, the portlet owner permissions for configuration were always turned on.

Did I loose everybody? I think there are sooo many configuration options it can get confusing. Also, I've noticed turning on page customizations seems to loose control, for an admin, over other options.

Thanks!
thumbnail
M J, módosítva 10 év-val korábban

RE: How to hide the 'Options' (ie wrench) icon for regular users?

Regular Member Bejegyzések: 184 Csatlakozás dátuma: 2013.03.01. Legújabb bejegyzések
@Dhrutika

It works. Here is the snippet from portlet.vm:

#if ($permissionChecker.isOmniadmin())
#if ($portlet_display.isShowBackIcon())
<a class="portlet-icon-back" href="$portlet_back_url">#language("return-to-full-page")</a>
#else
$theme.iconOptions()
$theme.iconMinimize()
$theme.iconMaximize()
$theme.iconClose()
#end
#end

Thanks,
MJ
thumbnail
Raymond Gardner, módosítva 10 év-val korábban

RE: How to hide the 'Options' (ie wrench) icon for regular users?

Regular Member Bejegyzések: 118 Csatlakozás dátuma: 2011.07.15. Legújabb bejegyzések
I also tried isOmniadmin() and it works.

This seems like a useful solution if we decide to turn back on page customizations.