Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-584

Implement Sub-menus in Menu.php and Move CiviContribute into Main CiviCRM Menu Block

    Details

    • Type: New Feature
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Component/s: None
    • Labels:
      None

      Description

      1. Implement Sub-menus in Menu.php
      Currently our main menu block only supports a single level. We need to be able to generate 2-tier menus. For this implementation we will only support one nesting level and the rendering code can assume that child menu items MUST FOLLOW THEIR PARENTS in the menu $_items array.

      1.1 For nested menu items, both parent and child will have the same crmType:
      'crmType' => self::NORMAL_ITEM,

      1.2 When rendering the CiviCRM menu block, add code for the following NORMAL_ITEM cases:

      • Item does NOT have children. This is the current case, item is rendered as:
        <li class="leaf">Find Contacts</li>
      • Item is a 'parent' of one or more children w/ crmType = "NORMAL_ITEM" AND the current location is or includes the item's path. In this case, we render the 'parent' item as <li class="expanded"> AND we follow the item with a nested unordered list of the children. EXAMPLE:

      EXAMPLE:
      <li class="expanded">CiviContribute</li>
      <ul>
      <li class="leaf">Browse Pages</li>
      <li class="leaf">Import Contributions</li>
      </ul>

      • Item is a 'parent' of one or more children w/ crmType = "NORMAL_ITEM" AND the current location does NOT include the item's path. In this case, we render the 'parent' item as <li class="collapsed"> AND do NOT include the child items in the displayed menu block.

      2. Move CiviContribute into the main CiviCRM menu and eliminate the special CivContribute menu block.
      2.1 Implement using the new nested menu functionality.
      2.2 Use the new config->enableComponents setting to control whether CiviContribute and it's child menu items are included in the CiviCRM menu. Use the same logic as has been implemented in Admin/Admin.php:

      if ( in_array("CiviContribute", $config->enableComponents) )

      { // include CiviContribute menu options }

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: