From c6b43ec460f448a5da39f556240dc82d56b0d00c Mon Sep 17 00:00:00 2001 From: Florian Scholdei Date: Fri, 18 Jan 2019 14:32:35 +0100 Subject: [PATCH] fixed submenu navlinks --- .../ui-components/src/navigation/SubNavigation.js | 8 +++++++- scm-ui/src/containers/Profile.js | 2 +- scm-ui/src/users/containers/SingleUser.js | 2 +- scm-ui/styles/scm.scss | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/scm-ui-components/packages/ui-components/src/navigation/SubNavigation.js b/scm-ui-components/packages/ui-components/src/navigation/SubNavigation.js index b577955a34..0eef244f59 100644 --- a/scm-ui-components/packages/ui-components/src/navigation/SubNavigation.js +++ b/scm-ui-components/packages/ui-components/src/navigation/SubNavigation.js @@ -42,8 +42,14 @@ class SubNavigation extends React.Component { render() { const { to, activeOnlyWhenExact } = this.props; + + // removes last part of url + let parents = to.split("/"); + parents.splice(-1,1); + let parent = parents.join("/"); + return ( - + ); } } diff --git a/scm-ui/src/containers/Profile.js b/scm-ui/src/containers/Profile.js index 2ad78d3527..e603a565e8 100644 --- a/scm-ui/src/containers/Profile.js +++ b/scm-ui/src/containers/Profile.js @@ -76,7 +76,7 @@ class Profile extends React.Component { label={t("profile.informationNavLink")} /> { label={t("single-user.informationNavLink")} /> diff --git a/scm-ui/styles/scm.scss b/scm-ui/styles/scm.scss index b3764749a3..df32e8eb7d 100644 --- a/scm-ui/styles/scm.scss +++ b/scm-ui/styles/scm.scss @@ -253,7 +253,6 @@ $fa-font-path: "webfonts"; } .menu-list { a { - border-radius: 0; color: #333; padding: 1rem; @@ -287,6 +286,7 @@ $fa-font-path: "webfonts"; } } + border-radius: 0; border-top: 1px solid #eee; border-left: 1px solid #eee; border-right: 1px solid #eee;