How to: Modify the Ribbon in PWA

Applies to: Office 2010 | Project 2010 | Project Server 2010 | SharePoint Server 2010

In this article
Adding a Close Project Button to the Project Details Page
Using Windows PowerShell to Install or Remove a Feature
Developing a Feature to Modify the Timesheet Ribbon

Project Web App in Microsoft Project Server 2010 is a SharePoint application that uses the ribbon infrastructure from Microsoft SharePoint Server 2010. You can create SharePoint features by using Microsoft Visual Studio 2010; each feature can contain one or more custom actions that modify the ribbon interface. This article demonstrates how to add and modify buttons and other controls in the ribbon for the Project Details page and for the Timesheet page. (The code in this article is based on code samples by Adrian Jenkins and Maria Kouvlaki, Microsoft Corporation.)

This article contains the following sections:

  • Adding a Close Project Button to the Project Details Page

  • Using Windows PowerShell to Install or Remove a Feature

  • Developing a Feature to Modify the Timesheet Ribbon

Solution download:   For the complete RibbonCustomization Visual Studio solution, see the Project 2010 SDK download.

For more information, see Customizing and Extending the SharePoint 2010 Server Ribbon and User Interface Customization Resource Center | SharePoint 2010.

Note

Different versions of Internet Explorer, which have different implementations of ECMAScript (JavaScript, JScript), can affect the behavior of customization features that hide some ribbon controls. For example, hiding controls in the Show/Hide group of the Project Center ribbon works with the final release of Internet Explorer 9, but does not work with pre-release versions or with Internet Explorer 8. For more information, see the blog post, Trials and Tribulations in Customizing the Project Center Ribbon.

When you modify the ribbon in a SharePoint application, we recommend that you test each change one-by-one, rather than make many changes at once. Testing is easy to do within Visual Studio; press F5 after each change, to see the result.

Adding a Close Project Button to the Project Details Page

The definition file for the ribbon in Project Web App is [Program Files]\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\PWARibbon\listtemplates\pwaribbon.xml. The Project Web App ribbon definitions are built on SharePoint ribbon template definitions in the ~\TEMPLATE\GLOBAL\XML\CMDUI.XML file. To modify the Project Web App ribbon, you can deploy a SharePoint feature that contains an Elements.xml file that defines CustomAction elements to add, change, disable, or remove controls, groups, and tabs in the ribbon.

Warning

You should not modify the ribbon definition files. Updates and service packs can replace the files and overwrite your changes. Changes that you make in the pwaribbon.xml file or in the CMDUI.xml file are not supported.

The RibbonCustomization solution includes a SharePoint feature that adds a Close Project button to the ribbon on the page that includes the Project Details Web Part. To see the page in Project Web App, in the Quick Launch, click Project Center, and then click a project name in the grid on the Project Center page.

Figure 1. Groups and controls on the Task tab of the Schedule Tools ribbon

Groups and controls on the Schedule Tools ribbon

To add a control to the Task tab of the Schedule Tools ribbon (Figure 1) on the Project Details page, for example, find the following comment in the pwaribbon.xml file: <!-- REGION Project Drilldown Ribbon-->. Locate the Project group in the Task tab, which is the second group as specified by the Sequence="20" attribute for the group. The following XML snippet defines the Project group and the first two controls in the group.

<Group Id="Ribbon.ContextualTabs.ProjectDrilldown.Tasks.Update" 
    Command="cxtGroupUpdate" 
    Sequence="20"  
    Title="$Resources:pwafeatures,WEBPARTS_GENERAL_PROJECT_TAB_TITLE" 
    <!-- Remainder of group attributes ... --> >
  <Controls Id="Ribbon.ContextualTabs.ProjectDrilldown.Tasks.Update.Controls">
    <SplitButton 
        Id="Ribbon.ContextualTabs.ProjectDrilldown.Tasks.Update.EditPWAProject" 
        Command="EditPWAProject" 
        Sequence="10" 
        MenuCommand="EditMenu" 
        <!-- Remainder of the Edit menu attributes and child menu items ... -->
    <Button 
        Id="Ribbon.ContextualTabs.ProjectDrilldown.Tasks.Update.SaveProject"  
        Command="SaveProject" 
        Sequence="20"
        <!-- Remainder of the Save button attributes ... -->

The Sequence="10" attribute for the SplitButton control (the Edit drop-down menu in Figure 1) specifies that it is the first control in the Project group. After the SplitButton menu items in the pwaribbon.xml file, the second control is the Save button, specified by the Sequence="20" attribute.

Procedure 1 shows how to add a Close Project button between the Edit menu and the Save button. The Close Project button definition is copied from another button in the pwaribbon.xml file.

Procedure 1. To create a Visual Studio project that adds a Close Project button

  1. On a computer running Project Server, start Visual Studio, and then create an empty SharePoint project (expand the SharePoint 2010 node in the Installed Templates pane of the New Project dialog box).

  2. Select .NET Framework 3.5 as the target framework in the drop-down list at the top. Name the project RibbonCustomization, select a location for the project directory, and then click OK.

  3. In the SharePoint Customization Wizard dialog box, the local site address should already be specified. Click Deploy as a farm solution, and then click Finish.

  4. In Solution Explorer, right-click the Features node, and then click Add Feature. Right-click the new Feature1 node, and then click Rename. Name the feature ProjectDetailsCustomization.

  5. In the ProjectDetailscustomization.feature tab, change the Title field to be Project Details Customization - add Close button. Type a description of the feature. For example, type On the Project Details page, adds a Close button in the Project group, on the Task tab of the Schedule Tools ribbon.

  6. Set the scope of the feature to Web.

  7. In Solution Explorer, right-click the RibbonCustomization project (not the top-level solution node), and then add a new folder. Name the folder Elements.

    Note

    The Elements folder simply helps to organize files in the solution. For feature deployment, the Elements folder is not used as a SharePoint mapped folder in Visual Studio.

  8. Right-click the Elements folder, and then add a new item. In the New Item dialog box, click Empty Element, name the element AddCloseButton, and then click Add.

    If you open the ProjectDetailsCustomization feature designer again, you can see that the AddCloseButton element is included in the Items in the Feature pane.

  9. Open the Elements.xml file for the AddCloseButton element. Select all of the XML code, and then replace it with the following code.

    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="https://schemas.microsoft.com/sharepoint/">
      <CustomAction Id="Ribbon.ContextualTabs.ProjectDrillDown.Tasks.Update" Location="CommandUI.Ribbon">
        <CommandUIExtension>
          <CommandUIDefinitions>
            <CommandUIDefinition Location="Ribbon.ContextualTabs.ProjectDrilldown.Tasks.Update.Controls._children">
              <Button 
                Id="Ribbon.ContextualTabs.ProjectDrilldown.Tasks.Update.CloseProject" 
                Sequence="15" 
                Command="CloseProject" LabelText="Close Project" Alt="Close Project" 
                Image16by16="/_layouts/$Resources:core,Language;/images/ps16x16.png" 
                Image16by16Top="-64" Image16by16Left="0" 
                Image32by32="/_layouts/$Resources:core,Language;/images/ps32x32.png" 
                Image32by32Top="0" Image32by32Left="-96" 
                TemplateAlias="o1" />
            </CommandUIDefinition>
          </CommandUIDefinitions>
        </CommandUIExtension>
      </CustomAction>
    </Elements>
    

    Following are descriptions of the elements and attributes:

    • The CommandUIExtension element extends the CustomAction that is specified by Id="Ribbon.ContextualTabs.ProjectDrillDown.Tasks.Update". That is, the extension adds to the Project group in the ribbon.

    • The CommandUIDefinition element specifies in the Location attribute that the added button is a child of the collection of controls in the Project group.

    • The Button element specifies the type of control to add. The definition is copied from a CloseProject button control in the <!-- Regular PDP Ribbon --> section of the pwaribbon.xml file. The attributes are slightly modified.

    • The Id attribute of the Button element must be unique for each element Id value, within the pwaribbon.xml file and the CMDUI.XML file. An Id value of "Picasso" would satisfy the requirement, but could be confusing to future developers who inherit your code.

    • The Sequence attribute can be any integer value between 10 and 20, to add the Close Project button between the Edit button (Sequence="10") and the Save button (Sequence="20").

    • The Command attribute specifies the built-in CloseProject command that some other buttons in the regular PDP ribbon use.

    • The Image16x16 attribute specifies the image to use when the button is scaled down for a narrow ribbon. In an English installation of Project Server, the image is extracted from the ~\TEMPLATE\LAYOUTS\1033\IMAGES\ps16x16.png file, which includes many icon images. The Image16by16Top="-64" Image16by16Left="0" attribute values specify that the top-left corner of the 16 x 16-pixel icon starts 64 pixels down from the top of the entire image and 0 pixels in from the left side.

    • Similarly, the Image32by32 attribute specifies the image to use when the button is scaled up for a wide ribbon. The 32 x 32-pixel icon starts 0 pixels down from the top and 96 pixels in from the left of the ps32x32.png file.

    • The TemplateAlias attribute specifies the SharePoint ribbon template to use for the overall ribbon structure and behavior. For example, the o1 template is defined in the CMDUI.XML file. The template specifies how to resize and position controls as the page is resized. The other controls in the Project group also use the o1 template.

  10. In Visual Studio, press F5 to build and deploy the RibbonCustomization solution (first ensure that Project Web App is not running on the local computer). When Project Web App opens, navigate to the Project Center page, and then click a project to see the Project Details page with the modified ribbon (Figure 2).

Figure 2. The Project group in the Task tab of the Schedule Tools ribbon contains the Close Project button

The ribbon with the Close Project button

When you deploy a feature by using Visual Studio, it does all the work of installing the feature in the website (or in the site collection, if you set the scope of the feature to Site), recycling IIS, activating the feature, deleting the Internet Explorer page cache, and opening the website. When you close the website, Visual Studio deactivates the feature and retracts it. While Project Web App is running, click Site Settings on the Site Actions menu, and then click Manage site features. Figure 3 shows the Features page with the activated Project Details Customization - add Close button feature. The feature title and description are from the values that you added in the ProjectDetailsCustomization feature designer.

Figure 3. The Features page in Project Web App Site Settings shows the new feature is activated

The Features page with the new feature activated

You can open the Features mapped SharePoint folder (~\TEMPLATE\FEATURES) to see that Visual Studio installed the feature in a subdirectory named RibbonCustomization_ProjectDetailsCustomization, which matches the project name and feature name that you created during development.

The Close Project button uses built-in icons and a built-in function. To add buttons to a Project Web App ribbon that use custom icons and custom ECMAScript (JavaScript, JScript) functions, see Walkthrough: Customizing the PWA Ribbon and Accessing the JS Grid.

Using Windows PowerShell to Install or Remove a Feature

Procedure 2 demonstrates how to deploy the RibbonCustomization solution and activate the ProjectDetailsCustomization feature on other Project Web App instances, by using Windows PowerShell commands. Procedure 3 demonstrates how to deactivate the feature and uninstall the solution. For more information about creating and installing a package file, see the Deploying a Project Center Extension section in the Walkthrough: Customizing the PWA Ribbon and Accessing the JS Grid article.

Procedure 2. To deploy the RibbonCustomization solution and activate a feature

  1. In Visual Studio, on the Build menu, click Package. Visual Studio creates the RibbonCustomization.wsp file in the \bin\debug subdirectory of the solution.

  2. Copy the RibbonCustomization.wsp file to the Project Server computer where you want to install the solution. For example, copy the file to the C:\PWASamples directory.

  3. Run the SharePoint 2010 Management Shell as an administrator (on the Start menu, click Microsoft SharePoint 2010 Products, right-click SharePoint 2010 Management Shell, and then click Run as Administrator).

  4. Run the following commands in order, one at a time. The commands add the solution to SharePoint, install the solution in the global assembly cache, and then activate the feature.

    add-spsolution -literalpath C:\PWASamples\RibbonCustomization.wsp
    
    install-spsolution -identity RibbonCustomization.wsp -force -gacdeployment
    
    enable-spfeature –identity RibbonCustomization_ProjectDetailsCustomization -url https://ServerName/ProjectServerName
    

    Note

    The identity parameter in the enable-spfeature command must match the name of the feature subdirectory.

  5. If you have implemented the TimesheetRibbonCustomization feature that is described in the next section, activate the feature with the following command.

    enable-spfeature -identity RibbonCustomization_TimesheetRibbonCustomization -urlhttps://ServerName/ProjectServerName
    
  6. To see the installed solution, on the SharePoint 2010 Central Administration home page, in the Quick Launch, click System Settings, and then click Manage Farm Solutions in the Farm Management section of the System Settings page. The Solution Management page shows that the ribboncustomization.wsp solution is globally deployed.

  7. Click ribboncustomization.wsp to go to the Solution Properties page, where you can see the solution deployment properties. You can click Retract Solution to remove the solution, or use the commands in Procedure 3. You should deactivate the active features before removing the solution.

Procedure 3. To deactivate features and remove the RibbonCustomization solution

  1. To deactivate just the ProjectDetailsCustomization feature in Project Web App, for example, run the following command (or click Deactivate for the feature on the Features page).

    disable-spfeature -identity RibbonCustomization_ProjectDetailsCustomization -url https://ServerName/ProjectServerName
    
  2. If you have implemented the TimesheetRibbonCustomization feature, deactivate the feature with the following command.

    disable-spfeature -identity RibbonCustomization_TimesheetRibbonCustomization -url https://ServerName/ProjectServerName
    
  3. After all features in the solution are deactivated, remove the RibbonCustomization solution with the following commands.

    uninstall-spsolution -identity RibbonCustomization.wsp
    remove-spsolution -identity RibbonCustomization.wsp
    

Tip

To create a Windows PowerShell script that incorporates all of the previous commands, waits for the install and uninstall commands to finish before continuing, and has an option to update a feature, you could modify the similar Complete Script Example for Managing a Workflow Solution in the How to: Deploy a Project Server Workflow article.

Developing a Feature to Modify the Timesheet Ribbon

There are different ribbon definitions for the Timesheet page in Project Web App, depending on whether the timesheet is in single entry mode (so that an entry for task status also makes an entry in the timesheet). In Figure 4, the Group By drop-down menu shows the default No Group menu item and the default tooltip for the menu. The Remove Task button is disabled because no task is selected.

Figure 4. Default ribbon for the Timesheet page, for single entry mode

Default Timesheet ribbon, single entry mode

In organizations that use Project Server timesheets, a common request is to modify the Timesheet ribbon; for example, delete the Remove Task button. Procedure 4 shows how to add a feature named TimesheetRibbonCustomization to the RibbonCustomization solution that does the following:

  • In the Submit group, remove the Send Status drop-down control.

  • In the Tasks group:

    • Remove the Insert Row drop-down control.

    • Remove the Reassign button.

    • Remove the Remove Task button.

  • In the Show/Hide group:

    • Remove the Planned check box for planned work.

    • Remove the Units drop-down control.

    • Remove the Comment On Submit check box.

  • Modify the Group By drop-down control in the Data group, as follows:

    • Change the tooltip text of the Group By drop-down control.

    • Remove the No Group item in the menu.

    • Change the command action of the Project item.

    • Disable the Status item.

When you develop the TimesheetRibbonCustomization feature, you can comment-out any section in the Elements.xml file that you do not want to use, or add XML code to modify other ribbon controls. When you deploy the RibbonCustomization solution, which contains both the ProjectDetailsCustomization feature and the TimesheetRibbonCustomization feature, you can selectively enable or disable either feature.

Procedure 4. To develop a feature that modifies the Timesheet ribbon

  1. Ensure that the timesheet is in single entry mode. For more information, see the Timesheet Single Entry Mode section in the What's New for Developers in Project 2010 article.

  2. In Solution Explorer in Visual Studio, right-click the Elements folder of the RibbonCustomization project, and then add a new item. In the Add New Item dialog box, click Empty Element, name the element ModifyTimesheetRibbon, and then click Add.

  3. Double-click the ProjectDetailsCustomization feature to open the feature designer. Click the ModifyTimesheetRibbon (RibbonCustomization) Element in the Items in the Feature pane, and then move the element to the Items in the Solution pane by using the left arrow (<) button. Close the ProjectDetailsCustomization feature window.

  4. In Solution Explorer, right-click the Features folder, and then click Add Feature. Right-click the new Feature1, and then rename the feature to be TimesheetRibbonCustomization.

  5. In the TimesheetRibbonCustomization feature designer window, change the Title field to be Timesheet Ribbon Customization - modify multiple controls. In the Description field, type the following: On the Timesheet page, when in single entry mode, removes, modifies, or disables several controls on the Timesheet ribbon.

  6. Set the Scope to Web, and then move the ModifyTimesheetRibbon element to the Items in the Feature pane.

  7. Open the Elements.xml file in the ModifyTimesheetRibbon element, and then replace all of the code in the file with the following XML.

    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="https://schemas.microsoft.com/sharepoint/">
    
      <!--This Elements.xml file contains custom action examples that remove, modify, or disable
           buttons and other controls on the Timesheet tab of the ribbon on the Timesheet page in 
           Project Web App (https://ServerName/ProjectServerName/timesheet.aspx). 
           The following custom actions work when the timesheet is in single entry mode.
      -->
    
      <!-- Remove the Send Status drop-down control in the Submit group. -->
      <CustomAction
              Id="Ribbon.ContextualTabs.TiedMode.Home.Sheet.SubmitMenu"
              Location="CommandUI.Ribbon"
              Title="Hides the Send Status drop-down control in the Timesheet ribbon">
        <CommandUIExtension>
          <CommandUIDefinitions>
            <CommandUIDefinition Location="Ribbon.ContextualTabs.TiedMode.Home.Sheet.SubmitMenu"/>
          </CommandUIDefinitions>
        </CommandUIExtension>
      </CustomAction>
    
    
      <!-- Remove the Insert Row drop-down control in the Tasks group. -->
      <CustomAction
            Id="Ribbon.ContextualTabs.TiedMode.Home.Tasks.AddLine"
            Location="CommandUI.Ribbon"
            Title="Hides the Insert Row drop-down control in the Timesheet ribbon">
        <CommandUIExtension>
          <CommandUIDefinitions>
            <CommandUIDefinition Location="Ribbon.ContextualTabs.TiedMode.Home.Tasks.AddLine"/>
          </CommandUIDefinitions>
        </CommandUIExtension>
      </CustomAction>
    
      <!-- Remove the Reassign button in the Tasks group. -->
      <CustomAction
            Id="Ribbon.ContextualTabs.TiedMode.Home.Tasks.Reassign"
            Location="CommandUI.Ribbon"
            Title="Hides the Reassign button in the Timesheet ribbon">
        <CommandUIExtension>
          <CommandUIDefinitions>
            <CommandUIDefinition Location="Ribbon.ContextualTabs.TiedMode.Home.Tasks.Reassign"/>
          </CommandUIDefinitions>
        </CommandUIExtension>
      </CustomAction>
    
      <!-- Remove the Remove Task button in the Tasks group. -->
      <CustomAction
             Id="Ribbon.ContextualTabs.TiedMode.Home.Tasks.RemoveTask"
             Location="CommandUI.Ribbon"
             Title="Hides the Remove Task button in the Timesheet ribbon.">
        <CommandUIExtension>
          <CommandUIDefinitions>
            <CommandUIDefinition Location="Ribbon.ContextualTabs.TiedMode.Home.Tasks.RemoveTask"/>
          </CommandUIDefinitions>
        </CommandUIExtension>
      </CustomAction>
    
      <!-- Remove the Planned check box for planned work in the Show/Hide group. -->
      <
    
              Id="Ribbon.ContextualTabs.TiedMode.Home.ShowHide.PlannedWork"
              Location="CommandUI.Ribbon"
              Title="Hides the Planned check box in the Timesheet ribbon">
        <CommandUIExtension>
          <CommandUIDefinitions>
            <CommandUIDefinition Location="Ribbon.ContextualTabs.TiedMode.Home.ShowHide.PlannedWork"/>
          </CommandUIDefinitions>
        </CommandUIExtension>
      </CustomAction>
    
      <!-- Remove the Units drop-down control in the Show/Hide group. -->
      <CustomAction
            Id="Ribbon.ContextualTabs.TiedMode.Home.ShowHide.PlannedWork"
            Location="CommandUI.Ribbon"
            Title="Hides the Units drop-down control from the Timesheet ribbon">
        <CommandUIExtension>
          <CommandUIDefinitions>
            <CommandUIDefinition Location="Ribbon.ContextualTabs.TiedMode.Home.ShowHide.DataOptions"/>
          </CommandUIDefinitions>
        </CommandUIExtension>
      </CustomAction>
    
      <!--Remove the Comment On Sumbit check box in the Show/Hide group. -->
      <CustomAction
          Id="Ribbon.ContextualTabs.TiedMode.Home.ShowHide.CommentOnSubmit"
          Location="CommandUI.Ribbon"
          Title="Hides the Comment On Submit check box from the Timesheet ribbon">
        <CommandUIExtension>
          <CommandUIDefinitions>
            <CommandUIDefinition Location="Ribbon.ContextualTabs.TiedMode.Home.ShowHide.CommentOnSubmit"/>
          </CommandUIDefinitions>
        </CommandUIExtension>
      </CustomAction>
    
      <!-- Modify the Group By drop-down control in the Data group. 
             - Change the tooltip text of the drop-down control. 
             - Remove the No Group item in the menu. 
             - Change the command action of the Project item.
             - Disable the Status item. -->
      <CustomAction
        Id="Ribbon.ContextualTabs.TiedMode.Home.Data.Replace"
        Location="CommandUI.Ribbon"
        Title="Ribbon.ContextualTabs.TiedMode.Home.Data.GroupsDropDown">
        <CommandUIExtension>
          <CommandUIDefinitions>
            <CommandUIDefinition Location="Ribbon.ContextualTabs.TiedMode.Home.Data.GroupsDropDown">
    
              <DropDown Id="Ribbon.ContextualTabs.TiedMode.Home.Data.Replace"  Command="ShowProject" 
                  Sequence="60" InitialItem="InboxGroups.Project" Width="100px" TemplateAlias="c7" 
                  ToolTipTitle="$Resources:pwafeatures,WEBPARTS_GENERAL_GROUP_LABEL" 
                  ToolTipDescription="The Group By menu functionality has been replaced.">
                <Menu Id="Ribbon.ContextualTabs.TiedMode.Home.Data.Replace.Menu">
                  <MenuSection Id="Ribbon.ContextualTabs.TiedMode.Home.Data.Replace.Menu.InboxGroups" 
                      Sequence="10" DisplayMode="Menu16">
                    <Controls 
                        Id="Ribbon.ContextualTabs.TiedMode.Home.Data.Replace.Menu.InboxGroups.Controls">
                      <Button 
                          Id="Ribbon.ContextualTabs.TiedMode.Home.Data.Replace.Menu.InboxGroups.Project" 
                          Command="ProjGroup" Sequence="20" MenuItemId="InboxGroups.Project" 
                          Alt="$Resources:pwafeatures,WEBPARTS_TIEDMODE_CM_PROJECT" 
                          LabelText="$Resources:pwafeatures,WEBPARTS_TIEDMODE_CM_PROJECT"/>
                      <Button 
                          Id="Ribbon.ContextualTabs.TiedMode.Home.Data.Replace.Menu.InboxGroups.Status" 
                          Command="StatusGroup" Sequence="30" MenuItemId="InboxGroups.Status" 
                          Alt="$Resources:pwafeatures,WEBPARTS_TIEDMODE_CM_STATUS" 
                          LabelText="$Resources:pwafeatures,WEBPARTS_TIEDMODE_CM_STATUS"/>
                    </Controls>
                  </MenuSection>
                </Menu>
              </DropDown>
            </CommandUIDefinition>
          </CommandUIDefinitions>
    
          <CommandUIHandlers>
            <!-- Comment-out the following line to disable the Group By drop-down menu. -->
            <CommandUIHandler Command="ShowProject" 
                CommandAction="javascript:alert('The ShowProject button has been replaced.');" />
            <CommandUIHandler Command="ProjGroup" 
                CommandAction="javascript:alert('The Project item (ProjGroup button) has been replaced.');" />
    
            <!-- Uncomment the following line to enable the Status item in the menu. -->
            <!-- <CommandUIHandler Command="StatusGroup" 
                CommandAction="javascript:alert('The Status item (StatusGroup button) has been replaced.');" /> 
            -->
    
          </CommandUIHandlers>
        </CommandUIExtension>
      </CustomAction>
    </Elements>
    

    The custom action extensions in the ModifyTimesheetRibbon element replace several of the default control definitions that are in the <!-- REGION Tied Mode Ribbon--> section of the pwaribbon.xml file.

    Tip

    To modify the Timesheet ribbon when the timesheet is not in tied mode, extend custom actions in the <!-- REGION Timesheet Ribbon--> section of the pwaribbon.xml file.

  8. Press F5 to build and deploy the RibbonCustomization solution, and then test the features.

  9. Package the RibbonCustomization solution for deployment.

The ribbon on the Timesheet page in Project Web App is modified as previously described. When you click the Project item in the Group By drop-down menu control, Figure 5 shows that the button command action is replaced by an JavaScript alert.

Figure 5. Some controls in the Timesheet ribbon are hidden or modified

Some controls in the ribbon are hidden or modified

When you open the Manage Features page in Project Web App, both the Project Details Customization - add Close button feature and the Timesheet Ribbon Customization - modify multiple controls feature are active. The ~\TEMPLATE\FEATURES directory includes both the RibbonCustomization_ProjectDetailsCustomization subdirectory and the RibbonCustomization_TimesheetRibbonCustomization subdirectory.

For information about how to deploy either feature or both features in the RibbonCustomization solution, see Using Windows PowerShell to Install or Remove a Feature.

See Also

Tasks

Walkthrough: Customizing the PWA Ribbon and Accessing the JS Grid

How to: Deploy a Project Server Workflow

Concepts

What's New for Developers in Project 2010

Other Resources

Customizing and Extending the SharePoint 2010 Server Ribbon

User Interface Customization Resource Center | SharePoint 2010

SharePoint Schema References

Features and Solutions Cmdlets (SharePoint Server 2010)

Walkthrough: Remove a Button from the Server Ribbon

Chris O'Brien's Blog: Adding Ribbon Items into Existing Tabs/Groups (Ribbon Customization Part 2)