diff options
author | Mike Greiling <mike@pixelcog.com> | 2016-11-15 01:44:43 -0600 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2016-11-30 15:22:43 -0600 |
commit | 48f4f76c16352278600174c13744b3ce8c026f1a (patch) | |
tree | 39e8844e5ef6b37425b490aa918df919ca3af54b /app/views | |
parent | a167897bed66ed2b9aafad7020d75334e2badf32 (diff) | |
download | gitlab-ce-48f4f76c16352278600174c13744b3ce8c026f1a.tar.gz |
add active states to sidebar nav
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/wikis/_sidebar.html.haml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/views/projects/wikis/_sidebar.html.haml b/app/views/projects/wikis/_sidebar.html.haml index f833b844df4..4e0fe46f8fc 100644 --- a/app/views/projects/wikis/_sidebar.html.haml +++ b/app/views/projects/wikis/_sidebar.html.haml @@ -3,7 +3,8 @@ %a.gutter-toggle.pull-right.visible-xs-block.visible-sm-block.js-sidebar-wiki-toggle{ href: "#" } = icon('angle-double-right') - = link_to namespace_project_wikis_git_access_path(@project.namespace, @project) do + - git_access_url = namespace_project_wikis_git_access_path(@project.namespace, @project) + = link_to git_access_url, class: active_nav_link?(path: 'wikis#git_access') ? 'active' : '' do = succeed ' ' do = icon('cloud-download') Clone repository @@ -11,9 +12,10 @@ .blocks-container .block.block-first %ul.wiki-pages - %li + %li{ class: params[:id] == 'home' ? 'active' : '' } = link_to 'Home', namespace_project_wiki_path(@project.namespace, @project, :home) - %li + + %li{ class: active_nav_link?(path: 'wikis#pages') ? 'active' : '' } = link_to 'Pages', namespace_project_wikis_pages_path(@project.namespace, @project) = render 'projects/wikis/new' |