Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-2186

When there is 1 sub-nav item under a primary nav link, go directly there

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.0-b1
    • Fix Version/s: 4.0.0-b1
    • Component/s: Staff Interface
    • Labels:
      None

      Description

      It's a bit silly to have a drop down with 1 menu item in it, as it requires 2 clicks (Click Primary Nav, click Sub-Nav item).

      Previously, clicking on a primary nav item would take you directly to an index page under that section. For example, clicking "Home" would take you to the Dashboard. Clicking "Clients" would show a listing of clients.

      With a fresh install of Blesta there are 2 nav links that should contain only 1 item:

      • Home
      • Clients

      I include Home in this because the "Calendar" sub-nav item should be removed, as it can be accessed through the mini calendar on the Dashboard. Clicking "Home" should take you directly to the Dashboard. (Unless, it actually has more than 1 sub-nav item, because a plugin registered one, as with other links)

        Activity

        Hide
        tyson Tyson Phillips (Inactive) added a comment -

        How about:

        • if the subnav contains 1 element AND the subnav URI matches the primary nav URI, don't render it

        The primary nav link will only work if there are no subnav items, or if there is 1 subnav item that links to the same place.

        Show
        tyson Tyson Phillips (Inactive) added a comment - How about: if the subnav contains 1 element AND the subnav URI matches the primary nav URI, don't render it The primary nav link will only work if there are no subnav items, or if there is 1 subnav item that links to the same place.
        Hide
        admin Paul Phillips added a comment -

        That seems reasonable

        Show
        admin Paul Phillips added a comment - That seems reasonable
        Hide
        cody Cody Phillips (Inactive) added a comment -

        The primary nav link will only work if there are no subnav items, or if there is 1 subnav item that links to the same place.

        If by that you mean only render the subnav if there is a non-empty set of subnav items that do no match the primary nav URI, then yes.

        I don't want JavaScript figuring out to trigger a click or not. If there's no rendered subnav then the primary nav will become clickable automatically.

        Show
        cody Cody Phillips (Inactive) added a comment - The primary nav link will only work if there are no subnav items, or if there is 1 subnav item that links to the same place. If by that you mean only render the subnav if there is a non-empty set of subnav items that do no match the primary nav URI, then yes. I don't want JavaScript figuring out to trigger a click or not. If there's no rendered subnav then the primary nav will become clickable automatically.
        Hide
        tyson Tyson Phillips (Inactive) added a comment -

        If by that you mean only render the subnav if there is a non-empty set of subnav items that do no match the primary nav URI, then yes.

        That is what I mean, yes.

        I don't want JavaScript figuring out to trigger a click or not. If there's no rendered subnav then the primary nav will become clickable automatically.

        My previous statement was simply summarizing the end behavior. Obviously, there will be no JavaScript changes. The subnav would just not be rendered at all if there is a subnav with a matching URI to the parent nav item.

        Show
        tyson Tyson Phillips (Inactive) added a comment - If by that you mean only render the subnav if there is a non-empty set of subnav items that do no match the primary nav URI, then yes. That is what I mean, yes. I don't want JavaScript figuring out to trigger a click or not. If there's no rendered subnav then the primary nav will become clickable automatically. My previous statement was simply summarizing the end behavior. Obviously, there will be no JavaScript changes. The subnav would just not be rendered at all if there is a subnav with a matching URI to the parent nav item.
        Hide
        cody Cody Phillips (Inactive) added a comment -

        Perfect!

        Show
        cody Cody Phillips (Inactive) added a comment - Perfect!

          People

          • Assignee:
            tyson Tyson Phillips (Inactive)
            Reporter:
            admin Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              15/Sep/16