Clarity PPM

Expand all | Collapse all

Remove Export to Excel and Power Point Icons

Jump to Best Answer
  • 1.  Remove Export to Excel and Power Point Icons

    Posted 08-26-2015 05:18 AM

    Hi all,

     

    I know I have seen how to do this somewhere before, and possibly have done it myself but just need a reminder.

    We would like to remove the "Export to excel" and "Export to Power Point" icons from the general page on v14..2. We would also like to deactivate these options from portlets.



  • 2.  Re: Remove Export to Excel and Power Point Icons

    Posted 08-26-2015 05:56 AM

    I think I might have found a way to 'hide' the icons.

     

    In the nikuhome\webroot\ui\uitk\css folder location open the clarity.min.css file for editing

     

    Add the following and save:

     

    #export_to_xls

    {visibility:hidden;}

     

     

    #export_to_ppt

    {visibility:hidden;}

     

    You may need to restart application services for the changes to take effect.



  • 3.  Re: Remove Export to Excel and Power Point Icons
    Best Answer

    Posted 08-26-2015 06:22 AM

    Hi  CMCN1982

     

    You can also try hiding it via the UI theme.

     

    Modify your theme to include the below mentioned at the end of the CSS.

     

    #export_to_xls, #export_to_ppt {

    display: none;

    }

     

     

    Regards

    Nitin



  • 4.  Re: Remove Export to Excel and Power Point Icons

    Posted 08-26-2015 06:35 AM

    Thanks Nitin - yes both approaches seem to work!



  • 5.  Re: Remove Export to Excel and Power Point Icons

    Posted 08-26-2015 06:44 AM

    Hi Nitin,

     

    while the icons are gone, we can still see the options available in the list:

     

    export.PNG

     

    Do you know how we can remove these?



  • 6.  Re: Remove Export to Excel and Power Point Icons

    Posted 08-26-2015 07:09 AM

    Hi @CMCN1982

     

    I think the below steps should do the trick

    1. Navigate to the /<CLARITY_HOME>/META-INF/union/vxsl/personal directory.
    2. Make a copy of the pageTabs.xsl file and copy to a remote location.
    3. Look for the following section in the pagetabs.xsl file:

    <action type="flyoutLink">
    <label value="Export"/>
    <action id="content" type="url"
    actionId="prodpack.dashboardExport" style="pageToolbarLink">
    <label value="Export to Excel"/>
    <event id="navigateToPage" type="onClick">
    <data value="prodpack.dashboardExport"/>
    <data id="pageId" value="{header/action/@pageId}"/>
    <data id="url" value="{header/action/@url}"/>
    <data id="instance_type"
    value="{pageInfo/page/@frame_instance_type}"/>
    <data id="instance_id" value="-1"/>
    <data id="format" value="xlsx"/>
    </event>
    </action>
    <action id="content" type="url"
    actionId="prodpack.dashboardExport" style="pageToolbarLink">
    <label value="Export to Powerpoint"/>
    <event id="navigateToPage" type="onClick">
    <data value="prodpack.dashboardExport"/>
    <data id="pageId" value="{header/action/@pageId}"/>
    <data id="url" value="{header/action/@url}"/>
    <data id="instance_type"
    value="{pageInfo/page/@frame_instance_type}"/>
    <data id="instance_id" value="-1"/>
    <data id="format" value="pptx"/>
    </event>
    </action>
    </action>

    4. Please modify this section to look like the following:

    <!--<action type="flyoutLink">
    <label value="Export"/>
    <action id="content" type="url"
    actionId="prodpack.dashboardExport" style="pageToolbarLink">
    <label value="Export to Excel"/>
    <event id="navigateToPage" type="onClick">
    <data value="prodpack.dashboardExport"/>
    <data id="pageId" value="{header/action/@pageId}"/>
    <data id="url" value="{header/action/@url}"/>
    <data id="instance_type"
    value="{pageInfo/page/@frame_instance_type}"/>
    <data id="instance_id" value="-1"/>
    <data id="format" value="xlsx"/>
    </event>
    </action>
    <action id="content" type="url"
    actionId="prodpack.dashboardExport" style="pageToolbarLink">
    <label value="Export to Powerpoint"/>
    <event id="navigateToPage" type="onClick">
    <data value="prodpack.dashboardExport"/>
    <data id="pageId" value="{header/action/@pageId}"/>
    <data id="url" value="{header/action/@url}"/>
    <data id="instance_type"
    value="{pageInfo/page/@frame_instance_type}"/>
    <data id="instance_id" value="-1"/>
    <data id="format" value="pptx"/>
    </event>
    </action>
    </action>-->

    We are commenting out the whole section.

    (Please note this will remove the export link in its entirety from the
    page.)

    5. Navigate to the <CLARITY_HOME>\META-INF\union\vxsl directory.
    6. Make a copy of the foundation.xsl file and copy to a remote location.
    7. Look for the following section in the foundation.xsl file:

    <data value="e2e( 'this',
    '{$exportExcelAction}{$parameterList}' )">
    <label value="Export to Excel"/>
    </data>

    8. Please modify this section to look like the following:

    <!--<data value="e2e( 'this',
    '{$exportExcelAction}{$parameterList}' )">
    <label value="Export to Excel"/>
    </data>-->

    (Please note that this will only remove 'Export To Excel' option in the
    dropdown menu.)
    9. Restart the application service for the changes to take effect.

    ( Please note that users will need to clear internet history and cache to
    ensure that the new page is displayed properly)

     

     

    Regards

    Nitin



  • 7.  Re: Remove Export to Excel and Power Point Icons

    Posted 08-26-2015 09:21 AM

    The files seem to be different in v14.2

     

    e.g. when I open the pageTabs.xsl file and look for <action type="flyoutLink"> to comment it out, I cannot find it.

    Instead I see this:


    <?xml version="1.0" encoding="UTF-8"?>

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

        xmlns:date="http://www.niku.com/java/com.niku.union.xsl.DateExt"

        xmlns:saxon="http://saxon.sf.net/"

        version="2.0" xmlns="http://schemas.niku.com/2002/view"

        xmlns:xsd="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xsd date">

      <xsl:param name = "ShowExport"/>

      <xsl:template name="pageTabs" match="data">

        <view type="content" id="page" form="false">

          <!-- add page title --> 

          <xsl:choose>

            <xsl:when test="tabs/tab">

              <title id="pageTabs.tabPageTitle1" value="{/data/pageNames/@frame_name}: {/data/tabs/tab[@action_code = /data/header/action/@id]/@name}" xml:lang="en"/>

            </xsl:when>

            <xsl:otherwise>

              <title id="pageTabs.tabPageTitle2" value="{/data/pageNames/@frame_name}" xml:lang="en"/>

            </xsl:otherwise>

          </xsl:choose>

     

     

          <xsl:variable name="requesturi" select="header/action/@requesturi"/>

     

     

          <xsl:variable name="actionType">

            <xsl:choose>

              <xsl:when test="contains( $requesturi, '/go') or contains( $requesturi, '/app')">

                <xsl:text>url</xsl:text>

              </xsl:when>

              <xsl:otherwise>

                <xsl:text>image</xsl:text>

              </xsl:otherwise>

            </xsl:choose>

          </xsl:variable>

       

          <!-- add personalization toolbar -->

          <pageToolbar style="pageToolbar">

            <xsl:if test="not(contains( $requesturi, '/go') or contains( $requesturi, '/app'))">

              <xsl:attribute name="type">icon</xsl:attribute>

            </xsl:if>

            <!-- If there is a non interactive portlet on the page then only show Export link-->

            <xsl:if test="$ShowExport = 'true'">

              <label value="Export to Excel"/>

              <action id="export_to_xls" type="{$actionType}" style="pageToolbarLink">

                <xsl:if test="contains( $requesturi, '/go') or contains( $requesturi, '/app')">

                  <xsl:attribute name="actionId">prodpack.dashboardExport</xsl:attribute>

                </xsl:if>

                <xsl:choose>

                  <xsl:when test="not(contains( $requesturi, '/go') or contains( $requesturi, '/app'))">

                    <image src="export_to_xls" type="png" width="16" height="16">

                      <tip value="Export to Excel"/>

                    </image>

                  </xsl:when>

                  <xsl:otherwise>

                    <label value="Export to Excel"/>

                  </xsl:otherwise>

                </xsl:choose>

                <event id="documentExport">

                  <xsl:if test="contains( $requesturi, '/go') or contains( $requesturi, '/app' )">

                    <xsl:attribute name="type">onClick</xsl:attribute>

                  </xsl:if>

                  <data value="prodpack.dashboardExport"/>

                  <data id="pageId" value="{header/action/@pageId}"/>

                  <data id="url" value="{header/action/@url}"/>

                  <data id="instance_type" value="{pageInfo/page/@frame_instance_type}"/>

                  <data id="instance_id" value="-1"/>

                  <data id="format" value="xlsx"/>

                  <data id="RhXm0r7tSeUqEr" value="true"/>

                </event>

              </action>

              <action id="export_to_ppt" type="{$actionType}" style="pageToolbarLink">

                <xsl:if test="contains( $requesturi, '/go') or contains( $requesturi, '/app')">

                  <xsl:attribute name="actionId">prodpack.dashboardExport</xsl:attribute>

                </xsl:if>

                <xsl:choose>

                  <xsl:when test="not(contains( $requesturi, '/go') or contains( $requesturi, '/app'))">

                    <image src="export_to_ppt" type="png" width="16" height="16">

                      <tip value="Export to Powerpoint"/>

                    </image>

                  </xsl:when>

                  <xsl:otherwise>

                    <label value="Export to Powerpoint"/>

                  </xsl:otherwise>

                </xsl:choose>

                <event id="documentExport">

                  <xsl:if test="contains( $requesturi, '/go') or contains( $requesturi, '/app')">

                    <xsl:attribute name="type">onClick</xsl:attribute>

                  </xsl:if>

                  <data value="prodpack.dashboardExport"/>

                  <data id="pageId" value="{header/action/@pageId}"/>

                  <data id="url" value="{header/action/@url}"/>

                  <data id="instance_type" value="{pageInfo/page/@frame_instance_type}"/>

                  <data id="instance_id" value="-1"/>

                  <data id="format" value="pptx"/>

                  <data id="RhXm0r7tSeUqEr" value="true"/>

                </event>

              </action>

            </xsl:if>

            <xsl:if test="header/action/@personal = 'true'">

              <!--

              <action id="properties" type="url" actionId="npt.pageProperties" style="contextLink">

                <label value="Page Properties"/>

                <event id="navigateToPage" type="onClick">

                  <data value="npt.pageProperties"/>

                  <data id="pageId" value="{header/action/@pageId}"/>

                  <data id="url" value="{header/action/@url}"/>

                </event>

              </action>

              -->

              <action id="content" type="{$actionType}" style="pageToolbarLink">

                <xsl:if test="contains( $requesturi, '/go') or contains( $requesturi, '/app')">

                  <xsl:attribute name="actionId">npt.pageContent</xsl:attribute>

                </xsl:if>

                <xsl:choose>

                  <xsl:when test="not(contains( $requesturi, '/go') or contains( $requesturi, '/app'))">

                    <image src="personalize" type="png" width="16" height="16">

                      <tip value="Personalize"/>

                    </image>

                  </xsl:when>

                  <xsl:otherwise>

                    <label value="Personalize"/>

                  </xsl:otherwise>

                </xsl:choose>

                <event id="navigateToPage">

                  <xsl:if test="contains( $requesturi, '/go') or contains( $requesturi, '/app')">

                    <xsl:attribute name="type">onClick</xsl:attribute>

                  </xsl:if>

                  <data value="npt.pageContent"/>

                  <data id="pageId" value="{header/action/@pageId}"/>

                  <data id="ui.page.template" value="{pageNames/@template_page_code}"/>

                  <data id="ui.page.space" value="{header/action/@id}"/>                                                                 

                  <data id="url" value="{header/action/@url}"/>

                  <data id="instance_type" value="{pageNames/@frame_instance_type}"/>

                  <data id="instance_id" value="-1"/>

                  <data id="hide_portlet_type" value="filter"/>

                </event>

              </action>

              <!--

              <action id="layout" type="url" actionId="npt.pageLayout" style="contextLink">

                <label value="Layout"/>

                <event id="navigateToPage" type="onClick">

                  <data value="npt.pageLayout"/>

                  <data id="pageId" value="{header/action/@pageId}"/>

                  <data id="url" value="{header/action/@url}"/>

                </event>

              </action>                   

              -->

            </xsl:if>

            <xsl:if test="header/action/@pageType = 'layer' and (pageNames/@is_personalizable = '1' or (tabs/tab[@principal_type='USER' and @has_permission='1']) )">

              <!--

                If tabbed page, and the container page is personalizable,

                or has at least one user tab and was previously personalized,

                then display the Manage Tabs link.

                -->

              <action id="BtnTabs" type="{$actionType}" actionId="npt.pageLayers" style="pageToolbarLink">

                <xsl:if test="contains( $requesturi, '/go') or contains( $requesturi, '/app')">

                  <xsl:attribute name="actionId">npt.pageLayers</xsl:attribute>

                </xsl:if>

                <xsl:choose>

                  <xsl:when test="not(contains( $requesturi, '/go') or contains( $requesturi, '/app'))">

                    <image src="manage_tabs" type="png" width="16" height="16">

                      <tip value="Manage My Tabs"/>

                    </image>

                  </xsl:when>

                  <xsl:otherwise>

                    <label value="Manage My Tabs"/>

                  </xsl:otherwise>

                </xsl:choose>

                <event id="navigateToPage">

                  <xsl:if test="contains( $requesturi, '/go') or contains( $requesturi, '/app')">

                    <xsl:attribute name="type">onClick</xsl:attribute>

                  </xsl:if>

                  <data value="npt.pageLayers"/>

                  <data id="pageId" value="{header/action/@pageId}"/>

                  <data id="ui.page.template" value="{pageNames/@template_page_code}"/>             

                  <data id="ui.page.space" value="{header/action/@id}"/>                                                                 

                  <data id="url" value="{header/action/@url}"/>

                  <data id="instance_type" value="{pageNames/@frame_instance_type}"/>

                  <data id="instance_id" value="-1"/>

                </event>

              </action>

            </xsl:if>

          </pageToolbar>

          <!-- add tabs -->

          <xsl:if test="tabs/tab">

            <tabs>

              <xsl:attribute name="selected"><xsl:value-of select="header/action/@id"/></xsl:attribute>

              <xsl:for-each select="tabs/tab">

                <xsl:if test="not(@policy_id) or (@has_permission = '1')">

                  <action id="{@action_code}" type="url" actionId="{@action_code}">

                    <data id="frame_id" value="{@frame_id}"/>

                    <xsl:variable name="actionId"><xsl:value-of select="@action_id"/></xsl:variable>

                    <xsl:for-each select="/data/tabParams/param[@action_id = $actionId]">

                      <xsl:variable name="paramName" select="@parameter_code"/>

                      <xsl:choose>

                        <xsl:when test="@source = 'static'">

                          <data id="{@parameter_code}" value="{@parameter_value}"/>

                        </xsl:when>

                        <xsl:when test="@source = 'input'">

                          <data id="{@parameter_code}" value="{saxon:evaluate(@parameter_value)}"/>

                        </xsl:when>

                        <xsl:when test="@source = 'data'"> <!-- Get this from params /data/name/@value -->

                          <data id="{@parameter_code}">

                            <xsl:attribute name="value">

                              <xsl:apply-templates select="/data/*[local-name() = $paramName]/@value"/>

                            </xsl:attribute>

                          </data>

                        </xsl:when>

                      </xsl:choose>

                    </xsl:for-each>

                    <label value="{@name}"/>

                  </action>

                </xsl:if>

              </xsl:for-each>

            </tabs>

          </xsl:if>

        </view>

      </xsl:template>

    </xsl:stylesheet>

     

    Can you please advise where I should comment out? Thanks!

     





  • 8.  Re: Remove Export to Excel and Power Point Icons

    Posted 08-26-2015 09:43 AM

    Please be advised that making a change to your UI Theme is something that can be supported, but these changes to out of the box application files is not something we can support - and as you can see, will break or no longer work from one version to the next.



  • 9.  Re: Remove Export to Excel and Power Point Icons

    Posted 08-26-2015 09:55 AM

    Understood Nick - I have ensured that backups are taken prior to any 'hack' being attempted to OOB files/config.



  • 10.  Re: Remove Export to Excel and Power Point Icons

    Posted 08-26-2015 12:19 PM

    I echo with Nick. Apologies since I forgot to mention the disclaimer.

    Thanks Nick.

     

    Although I have not tried it personally , try commenting from the label node and both the action nodes.

     

     

    <label value="Export to Excel"/>

    <action id="export_to_ppt">

    <action id="export_to_xls">

     

     

    Regards

    Nitin



  • 11.  Re: Remove Export to Excel and Power Point Icons

    Posted 09-29-2015 07:10 AM

    Hi all,

     

    so we have removed the Export to Excel and Power Point icons.]

     

    Is there a way that we can remove the options from the drop-down list by simply modifying the UI theme?



  • 12.  Re: Remove Export to Excel and Power Point Icons

    Posted 09-29-2015 09:38 AM

    If the browsers you are using are supporting Clarity in a high enough compatibility mode, you may be able to use CSS selectors to identify the export to excel/powerpoint items and filter them out with something like this:

    a[href*='prodpack.dashboardExport&format=pptx'] { display: none; }

    a[href*='prodpack.dashboardExport&format=xlsx'] { display: none; }

     

    This will likely have more chance of results with higher versions of Clarity (e.g. 14.2+ as you are using) than lower ones though.