Commit 2cae7836 authored by Florie Guibert's avatar Florie Guibert

Epic Boards - Add Boards navigation item under Epics

parent 5a50ad78
- return unless group_sidebar_link?(:epics)
- epics_count = group_epics_count(state: 'opened')
- epics_items = ['epics#show', 'epics#index', 'roadmap#show']
- epics_items = ['epics#show', 'epics#index', 'epic_boards#index', 'epic_boards#show', 'roadmap#show']
= nav_link(path: epics_items) do
= link_to group_epics_path(group), class: 'qa-group-epics-link' do
......@@ -20,6 +20,11 @@
= link_to group_epics_path(group), title: 'List' do
%span= _('List')
- if Feature.enabled?(:epic_boards, @group)
= nav_link(path: 'epic_boards#show', html_options: { class: "#{active_when(params[:board_type] == 'epic') } home" }) do
= link_to group_boards_path(group, board_type: "epic"), title: 'Boards' do
%span= _('Boards')
= nav_link(path: 'roadmap#show', html_options: { class: 'home' }) do
= link_to group_roadmap_path(group), title: 'Roadmap' do
%span= _('Roadmap')
......@@ -112,6 +112,10 @@ constraints(::Constraints::GroupUrlConstrainer.new) do
resources :notes, only: [:index, :create, :destroy, :update], concerns: :awardable, constraints: { id: /\d+/ }
end
collection do
resources :boards, only: [:index, :show], as: 'epic_boards'
end
collection do
post :bulk_update
end
......
......@@ -66,6 +66,7 @@ RSpec.describe 'Group navbar' do
context 'when epics are available' do
before do
stub_licensed_features(epics: true)
stub_feature_flags(epic_boards: false)
insert_after_nav_item(
_('Group overview'),
......@@ -84,6 +85,28 @@ RSpec.describe 'Group navbar' do
it_behaves_like 'verified navigation bar'
end
context 'when epics and epic boards are available' do
before do
stub_licensed_features(epics: true)
insert_after_nav_item(
_('Group overview'),
new_nav_item: {
nav_item: _('Epics'),
nav_sub_items: [
_('List'),
_('Boards'),
_('Roadmap')
]
}
)
visit group_path(group)
end
it_behaves_like 'verified navigation bar'
end
context 'when the logged in user is the owner' do
before do
group.add_owner(user)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment