If you are unable to create a new account, please email bspsoftware@techdata.com

Author Topic: Hide 'Set Properties' & 'More' links  (Read 20307 times)

Offline tupac_rd

  • Statesman
  • ******
  • Join Date: Apr 2008
  • Posts: 293
  • Forum Citizenship: +9/-0
Hide 'Set Properties' & 'More' links
« on: 28 Jan 2010 10:57:27 am »
Hi All,

Is there a way to Hide 'Set Properties' & 'More' links in Cognos Connection for a set of users or a group.

Thanks
dd

Offline CognosPaul

  • Global Moderator
  • Statesman
  • *****
  • Join Date: Jan 2009
  • Posts: 1,912
  • Forum Citizenship: +268/-1
    • Paul's Cognos Blog

Offline tupac_rd

  • Statesman
  • ******
  • Join Date: Apr 2008
  • Posts: 293
  • Forum Citizenship: +9/-0
Re: Hide 'Set Properties' & 'More' links
« Reply #2 on: 28 Jan 2010 03:47:21 pm »
Thanks for the reply Paul. I knew about that list, and these 2 are not in there. Just wanted to see if there is some other way to hide the 'Set Properties' and 'More' links.....

Offline CognosPaul

  • Global Moderator
  • Statesman
  • *****
  • Join Date: Jan 2009
  • Posts: 1,912
  • Forum Citizenship: +268/-1
    • Paul's Cognos Blog
Re: Hide 'Set Properties' & 'More' links
« Reply #3 on: 28 Jan 2010 04:32:34 pm »
To the best of my knowledge there's no set way to do it. Even users with read only privileges can still select the two options. If it's absolutely essential you might be able to modify the xslt files that control the generation of the rows. The hard part would just be identifying which file to modify. Once you know that it's simply a matter of copying the whitelist code from the other xslt files, like presentation.xslt.

This sounds like an interesting problem. I'll check it out on Monday when I have a little bit of free time.

Offline tupac_rd

  • Statesman
  • ******
  • Join Date: Apr 2008
  • Posts: 293
  • Forum Citizenship: +9/-0
Re: Hide 'Set Properties' & 'More' links
« Reply #4 on: 30 Jan 2010 11:12:54 am »
Wow, Thanks for some details Paul. I never knew that there is a way to find the whitelist code, ofcourse looks like its not so easy, but atleast there is a way. If at all you come to know about a way to hide Set Properties and More links, please share with us. I will try to figure out with what you have mentioned, but I highly doubt I will be able to figure it out...

Offline CognosPaul

  • Global Moderator
  • Statesman
  • *****
  • Join Date: Jan 2009
  • Posts: 1,912
  • Forum Citizenship: +268/-1
    • Paul's Cognos Blog
Re: Hide 'Set Properties' & 'More' links
« Reply #5 on: 01 Feb 2010 04:01:27 am »
I've discovered how to prevent the Set Properties from rendering in the portal.

In the system.xml file add <SET_PROPERTIES_BUTTON show ="Administrators"/> to the <param name="ui_hide">

In ..\c8\templates\ps\logicsheets\presentation\main\presentation.xsl

Look for the string <!-- CRN Object -->  There should be two of them. Under the first one, and under the <out:otherwise> is where the template for the properties button is called. You need to wrap the call:template with the white list code as follows:

<out:if test=" not(contains($ui_black_list, ' SET_PROPERTIES_BUTTON ')) ">
   <xsl:call-template name="renderAction">
      <xsl:with-param name="onclick">actions('{xtsext:javascriptencode(string($obj-name))}', '{$obj-class}', '{xtsext:javascriptencode(string($obj-path))}','properties_general.xts');</xsl:with-param>
      <xsl:with-param name="icon" select="'action_properties.gif'"/>
      <xsl:with-param name="tooltip" select="'IDS_PROPERTIES'"/>
   </xsl:call-template>
</out:if>

I strongly recommend saving and backing up both files before doing this. I have not thoroughly tested this, nor is this something that IBM will support. As this only hides the icon from the portal, the users will still be able to get to the Set Properties via the More link. I'll see if I can figure out how to hide that next but I can't promise I'll be able to get back today.


EDIT: I've tested this on 8.4.1. From what I've seen it's almost identical to 8.4. Your results may vary (wrong things being hidden, Cognos service not starting, the world imploding into a black hole, etc) if you try this on previous versions.
« Last Edit: 01 Feb 2010 04:08:01 am by PaulM »

Offline CognosPaul

  • Global Moderator
  • Statesman
  • *****
  • Join Date: Jan 2009
  • Posts: 1,912
  • Forum Citizenship: +268/-1
    • Paul's Cognos Blog
Re: Hide 'Set Properties' & 'More' links
« Reply #6 on: 01 Feb 2010 06:45:35 am »
Hiding the More is just as easy.

In system.xml add <MORE_LINK show ="Administrators"/> to the <param name="ui_hide">


In ..\c8\templates\ps\logicsheets\presentation\main\presentation.xsl look for the second <!-- CRN Object --> and replace the code with:
Code: [Select]
<!-- CRN object -->
<out:otherwise>
<out:if test=" not(contains($ui_black_list, ' MORE_LINK ')) ">
<a href="#">
<!--  For shortcuts we always use the current object's class, name, and path to launch the "Actions" dialog -->
<out:attribute name="onClick">actions('<out:value-of select="xtsext:javascriptencode(string($obj-name))"/>', '<out:value-of select="$obj-class"/>','<out:value-of select="xtsext:javascriptencode(string($obj-path))"/>','actions.xts', null, '<out:value-of select="xtsext:javascriptencode(string($location))"/>');</out:attribute>
<xts:string id="IDS_ACT_MORE"/>
</a>
</out:if>
</out:otherwise>
Back up the files before you modify them, Cognos will not load if there is a single character out of place. Also, please do some tests to make sure that this works properly and doesn't break anything else. I spent a grand total of 30 seconds testing this so I might have missed something.


EDIT: Added code tag to prevent SMF from screwing up the xsl tags.
« Last Edit: 01 Feb 2010 07:05:53 am by PaulM »

Offline tupac_rd

  • Statesman
  • ******
  • Join Date: Apr 2008
  • Posts: 293
  • Forum Citizenship: +9/-0
Re: Hide 'Set Properties' & 'More' links
« Reply #7 on: 02 Feb 2010 12:14:21 pm »
Holy Canoli!!!!

Thankyou very much for the detailed response Paul. I will definitely try it out only on the Sandbox first and then go ahead in other environments....We are using 8.4, so hope it should not be an issue....

Thanks again
dd

Offline tupac_rd

  • Statesman
  • ******
  • Join Date: Apr 2008
  • Posts: 293
  • Forum Citizenship: +9/-0
Re: Hide 'Set Properties' & 'More' links
« Reply #8 on: 02 Feb 2010 12:53:02 pm »
Hi Paul,

I tried to do the changes to the xsl file, but the issue I am having is the 'More' link gets hidden only on the main page, once I click on a folder under Public Folders, I can again see it for the reports.... and other folders... Not sure what I might be doing wrong. Anyways, I will try to do it on 8.4.1 and see if its a bug in 8.4 and all the hotfixes we have installed....

Thanks again
dd

Offline CognosPaul

  • Global Moderator
  • Statesman
  • *****
  • Join Date: Jan 2009
  • Posts: 1,912
  • Forum Citizenship: +268/-1
    • Paul's Cognos Blog
Re: Hide 'Set Properties' & 'More' links
« Reply #9 on: 02 Feb 2010 01:31:46 pm »
Hi Tupak,

It's probably not a bug on your end. As I said, I didn't test it thoroughly. Are the properties reappearing on the other pages as well?

It seems like the root directory is rendered differently from the other folders. I'll do some more research next time I get some free time. Unfortunately it's looking like I'll only have some time early next week. In the mean time, if you do a search for IDS_ACT_MORE in that page you'll find every occurrence. You can try wrapping those sections in the
   <out:if test=" not(contains($ui_black_list, ' MORE_LINK ')) ">
   </out:if>
tags.

Good luck!
« Last Edit: 17 Jul 2010 05:50:33 am by PaulM »

Offline tupac_rd

  • Statesman
  • ******
  • Join Date: Apr 2008
  • Posts: 293
  • Forum Citizenship: +9/-0
Re: Hide 'Set Properties' & 'More' links
« Reply #10 on: 02 Feb 2010 03:13:38 pm »
Hi Paul,

Thanks for the quick reply again.

I tried to do the steps you mentioned but no luck. Proabably I am not doing it right.

Thanks
dd

Offline tupac_rd

  • Statesman
  • ******
  • Join Date: Apr 2008
  • Posts: 293
  • Forum Citizenship: +9/-0
Re: Hide 'Set Properties' & 'More' links
« Reply #11 on: 09 Feb 2010 02:10:47 pm »
Hi Paul,

do you edit xsl files using any specific editor...

Offline CognosPaul

  • Global Moderator
  • Statesman
  • *****
  • Join Date: Jan 2009
  • Posts: 1,912
  • Forum Citizenship: +268/-1
    • Paul's Cognos Blog
Re: Hide 'Set Properties' & 'More' links
« Reply #12 on: 10 Feb 2010 03:07:38 am »
Hi Tupak,

I use Notepad++ to modify these files. The ability to expand and collapse groups of code is invaluable in finding exactly where you need to modify.

I haven't forgotton that it only effects the root directory, I still haven't had the time to play, but it's looking like it might be next week. The only thing I can suggest in the meantime is to keep experimenting with the XSL. The feeling of success is incomparable, especially after a task as difficult as this.
« Last Edit: 17 Jul 2010 05:50:20 am by PaulM »

Offline CognosPaul

  • Global Moderator
  • Statesman
  • *****
  • Join Date: Jan 2009
  • Posts: 1,912
  • Forum Citizenship: +268/-1
    • Paul's Cognos Blog
Re: Hide 'Set Properties' & 'More' links
« Reply #13 on: 08 Mar 2010 04:57:13 am »
Are you still having this problem? I just had a chance to check on the 8.4.1 test environment where I made these changes. I'm not seeing the properties or More buttons for anything now. Can you check that the more link section is set like this:

Code: [Select]
<!-- CRN object -->
<out:otherwise>
<out:if test=" not(contains($ui_black_list, ' MORE_LINK ')) ">
<a href="#">
<!--  For shortcuts we always use the current object's class, name, and path to launch the "Actions" dialog -->
<out:attribute name="onClick">actions('<out:value-of select="xtsext:javascriptencode(string($obj-name))"/>', '<out:value-of select="$obj-class"/>','<out:value-of select="xtsext:javascriptencode(string($obj-path))"/>','actions.xts', null, '<out:value-of select="xtsext:javascriptencode(string($location))"/>');</out:attribute>
<xts:string id="IDS_ACT_MORE"/>
</a>
</out:if>
</out:otherwise>
and the set properties section is set up like:
Code: [Select]
<!-- CRN Object -->
<out:otherwise>
<out:if test=" not(contains($ui_black_list, ' SET_PROPERTIES_BUTTON ')) ">
<xsl:call-template name="renderAction">
<xsl:with-param name="onclick">actions('{xtsext:javascriptencode(string($obj-name))}', '{$obj-class}', '{xtsext:javascriptencode(string($obj-path))}','properties_general.xts');</xsl:with-param>
<xsl:with-param name="icon" select="'action_properties.gif'"/>
<xsl:with-param name="tooltip" select="'IDS_PROPERTIES'"/>
</xsl:call-template>
</out:if>

uuiioo

  • Guest
Re: Hide 'Set Properties' & 'More' links
« Reply #14 on: 22 Mar 2011 08:33:11 pm »
Hi Guys,

Do you have any progress on this topic? Recently I am facing the similar case. This case is
* to hide action items by user group in navigator (I created a page)  but not in folder view
* the wanted hide items are 'set properties', ' run with options' and 'more link'

I know Paul provided work around for the 'set properties' and 'more link'. I tried it. The thing is I can hide the 'more link' in
folder view (public folder, personal folder) but it is still displayed in the navigator part. And I did not make the 'set properties'
solution work in folder view or navigator. I may did something wrong. Could you provide me some suggestions?

Paul,

Could you give me some ideas about the solution you provided? I can follow you solution and use your code but I want to know
the meaning of your code. I do not want to waste your time to explain the code just give me a direction. Sorry I am not good at
the Cognos customization, xml and xsl. 

Thanks in advance.