Skip to content

Reimplement sidebar tabs and their configuration for Skosmos 3 #1465

@osma

Description

@osma

The sidebar navigation tabs (used on vocabulary home page & concept page) are implemented using messy Twig template code. For Skosmos 3 the sidebar is being reimplemented using client side Bootstrap tabs and Vue.js. This issue specifies the changes that still need to be done on the skosmos-3 branch.

Current (Skosmos 2) configuration settings that affect the sidebar

At least the following configuration settings affect the sidebar tabs:

  • skosmos:showAlphabeticalIndex (affects whether alphabetical index tab is shown)
  • skosmos:fullAlphabeticalIndex (switches to an alternate alphabetical index)
  • skosmos:showChangeList (affects whether the changes tab is shown)
  • skosmos:defaultSidebarView (selects the default tab to show)

This has gotten a bit messy and is not very logical. The configuration should be redesigned.

New configuration settings for the sidebar

The new style configuration should be designed. As a starting point I suggest the following:

  • all the available tabs have short mnemonic names, e.g. alpha, fullalpha, hierarchy, changes.
  • the skosmos:sidebarViews vocabulary specific setting takes an ordered list of tab names, e.g. ( "alpha" "hierarchy" "changes" ) which determines which tabs are shown.
  • the skosmos:defaultSidebarView setting selects the default tab, as it already does.

Support for these settings must be implemented on the PHP side (and the code for old, unnecessary settings removed) and the information must be passed to the frontend code. The frontend code should show the appropriate tabs.

Clean up templates

The template code in sidebar.inc contains logic and CSS class settings that are unnecessary and should be removed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions