cancel
Showing results for 
Search instead for 
Did you mean: 

How to invisible Customize Dashboard Button

miraclesuki
Champ in-the-making
Champ in-the-making
[img]http://i.imgur.com/Haurk.png[/img]

In Alfresco Share, the title component consist a "Customize Dashboard" button which shows on UI.
I would like to ask Can I disable or delete this button which the role is NOT Admin(Manager) ?

That mean the user cannot modify the layout of the Alfresco Share. What files are need to change?

Many thanks for help.

Regards
Mandy
3 REPLIES 3

jpfi
Champ in-the-making
Champ in-the-making
Hi,
the customize dashboard button is generated in site-webscripts/org/alfresco/components/title/user-dashboard-title.get.html.ftl
To hide the button, you should add an extension module that customizes the markup "html".

But, you should know, that customize-user-dashboard page will still be available if someone knows enters the URL directly.
So, to be save you should also change the customize-dashboard page.

more:
http://docs.alfresco.com/4.1/topic/com.alfresco.enterprise.doc/concepts/dev-Share-intro.html
http://blogs.alfresco.com/wp/ddraper/category/alfresco-share-customization/
http://www.youtube.com/watch?v=rx-uaKTc8xs

Cheers, jan

lgonzalez
Champ in-the-making
Champ in-the-making
Hello, i do that, but don work forme, i deleted the line, after that what i do ?

her is the code

<!– <div class="links title-button">
            <#assign linkClass><#if "customise-user-dashboard" == activePage>class="active-page"</#if></#assign>
          
            <span class="yui-button yui-link-button">
               <span class="first-child">
                  <a href="${url.context}/page/customise-user-dashboard" ${linkClass}>${msg("link.customiseDashboard")}</a>
               </span>
            </span>
        
         </div> –>

sandeepreddy1
Star Contributor
Star Contributor
Go to this location alfresco\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\share\imports\share-header.lib.js

and add the "if" condition like this

if(user.isAdmin){         
             if (page.titleId == "page.userDashboard.title")
         {
      // If the page is a user dashboard then make the customize dashboard item an
      // option…
      // NOTE: At the moment this is just a single menu item and not the child of a popup?
      // NOTE: Should this still be shown if the user is not the dashboard owner?
      var userDashboardConfiguration = {
         id: "HEADER_CUSTOMIZE_USER_DASHBOARD",
         name: "alfresco/menus/AlfMenuBarItem",
         config: {
            id: "HEADER_CUSTOMIZE_USER_DASHBOARD",
            label: "",
            title: msg.get("customize_dashboard.label"),
            iconAltText: msg.get("customize_dashboard.label"),
            iconClass: "alf-configure-icon",
            targetUrl: "customise-user-dashboard"
               }
           };
      titleConfig.push(userDashboardConfiguration);
       }
    }

Restart the alfresco server. it will disable the customise dashboard to the users except admin

Smiley Happy- cheers (Solved)