Fórum

Hiding portlet properties

thumbnail
Juan M. Gomez, modificado 16 Anos atrás.

Hiding portlet properties

Junior Member Postagens: 69 Data de Entrada: 07/11/07 Postagens Recentes
Hi, i was wondering if there is any way to hide the buttons that appear in the title bar of the portlets showing only the minimize, maximize and close ones? I only want my users to interact with that 3 options...

Thanks in advance for any advice.
thumbnail
Roman Hoyenko, modificado 16 Anos atrás.

RE: Hiding portlet properties

Liferay Master Postagens: 878 Data de Entrada: 08/10/07 Postagens Recentes
You can by disabling the permissions to do configuration, etc.
thumbnail
Juan M. Gomez, modificado 16 Anos atrás.

RE: Hiding portlet properties

Junior Member Postagens: 69 Data de Entrada: 07/11/07 Postagens Recentes
I know how to do that from the portal, but i was wondering if is there any way to manipulate those settings from a xml descriptor o something like that.. The general idea is to give a functional portal in which users can interact with the portlets and deploy new instances of the ones i create but i won't be the admin of that portal, so i can't set the permissions after i gave the product..

Aditionally.. how can i activate the "refresh" property of the portlets? I read in the wiki that it was enough to put <ajaxable>true</ajaxable> in the portlet descriptor, but it doesn't seem to work for me..


Thanks in advance.
thumbnail
Roman Hoyenko, modificado 16 Anos atrás.

RE: Hiding portlet properties

Liferay Master Postagens: 878 Data de Entrada: 08/10/07 Postagens Recentes
I am not sure if there is a property in the portlet xml file to achieve that.
What you can do is to modify the theme you are using, put this:

$permissionChecker.isOmniadmin()

around the icon display part and it will only be seen by admin users. Hope this solves your problem.
thumbnail
Juan M. Gomez, modificado 16 Anos atrás.

RE: Hiding portlet properties

Junior Member Postagens: 69 Data de Entrada: 07/11/07 Postagens Recentes
Thanks, it kinda worked... the icons are hidden but neither the user accounts nor the admin one can see them... I modified the source like this:


<div class="portlet-icons" id="portlet-small-icon-bar_$portlet_id">
			#if ($portlet_display.isShowBackIcon())
				<a href="$portlet_back_url" class="portlet-icon-back">#language ("return-to-full-page")</a>
			#else
			 	#if ($permissionChecker.isOmniadmin())
				    	$theme.iconRefresh()
					$theme.iconPortletCss()
					$theme.iconConfiguration()
					$theme.iconEdit()
					$theme.iconEditDefaults()
					$theme.iconEditGuest()
					$theme.iconHelp()
					$theme.iconPrint()
					$theme.iconMinimize()
					$theme.iconMaximize()
					$theme.iconClose()
				#else
				    	$theme.iconRefresh()
					$theme.iconMinimize()
					$theme.iconMaximize()
					$theme.iconClose()
				#end
			#end
		</div>


I'm still wondering about the refreshing property.. can you point me in the rigth direction?
i double-checked around the wiki and couldn't find something relevant..

Thanks again.
Adam Causey, modificado 16 Anos atrás.

RE: Hiding portlet properties

Junior Member Postagens: 70 Data de Entrada: 13/06/07 Postagens Recentes
The refresh icon should showup if you add the following properties to your portlets in liferay-portlet.xml. It looks like you already have the first one.


<ajaxable>true</ajaxable>
<render-weight>0</render-weight>
thumbnail
Juan M. Gomez, modificado 16 Anos atrás.

RE: Hiding portlet properties

Junior Member Postagens: 69 Data de Entrada: 07/11/07 Postagens Recentes
Using the both properties i got the refresh icon displaying and working but i'm also experiencing some weird behavior when the portlets need to display a swf... (it get displayed in a external page exiting the portal).. I needed to put the <render-weight> property back in 1 to get the portlets working normally :S

Nevertheless, that wasn't so important.. i was only testing some things.. The one that is important is the thing with the icons not showing to the admin.. is there any wrong configuration in my theme?

Juan M.
thumbnail
Roman Hoyenko, modificado 16 Anos atrás.

RE: Hiding portlet properties

Liferay Master Postagens: 878 Data de Entrada: 08/10/07 Postagens Recentes
Are you sure the user is omniadmin?
thumbnail
Juan M. Gomez, modificado 16 Anos atrás.

RE: Hiding portlet properties

Junior Member Postagens: 69 Data de Entrada: 07/11/07 Postagens Recentes
yes.. there is only one user with admin + power user roles, and its the one that's serving me for testing.. emoticon
thumbnail
Roman Hoyenko, modificado 16 Anos atrás.

RE: Hiding portlet properties

Liferay Master Postagens: 878 Data de Entrada: 08/10/07 Postagens Recentes
Try setting this user as omniadmin in portal-ext.properties.

# Omniadmin users can administer the portal's core functionality: gc,
# shutdown, etc. Omniadmin users must belong to the default company.
#
# Multiple portal instances might be deployed on one application server, and
# not all of the administrators should have access to this core
# functionality. Input the ids of users who are omniadmin users.
#
# Leave this field blank if users who belong to the right company and have
# the Administrator role are allowed to administer the portal's core
# functionality.
#
omniadmin.users=

you can look up the id in the database in User_ table