Include new and edit links in breadcrumb for project milestones, group milestones, and labels
This commit is contained in:
parent
88254cd360
commit
0e75378b03
14 changed files with 81 additions and 20 deletions
|
@ -1,4 +1,6 @@
|
|||
- page_title 'Edit', @label.name, 'Labels'
|
||||
- add_to_breadcrumbs _("Labels"), group_labels_path(@group)
|
||||
- breadcrumb_title _("Edit")
|
||||
- page_title "Edit", @label.name, _("Labels")
|
||||
|
||||
%h3.page-title
|
||||
Edit Label
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
- breadcrumb_title "Labels"
|
||||
- page_title 'New Label'
|
||||
- add_to_breadcrumbs _("Labels"), group_labels_path(@group)
|
||||
- breadcrumb_title _("New")
|
||||
- page_title _("New Label")
|
||||
|
||||
%h3.page-title
|
||||
New Label
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
- page_title "Milestones"
|
||||
- breadcrumb_title _("Edit")
|
||||
- page_title _("Milestones")
|
||||
|
||||
- render "header_title"
|
||||
|
||||
%h3.page-title
|
||||
Edit Milestone
|
||||
%hr
|
||||
|
||||
= render "form"
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
- breadcrumb_title "Milestones"
|
||||
- page_title "Milestones"
|
||||
- @no_container = true
|
||||
- add_to_breadcrumbs _("Milestones"), group_milestones_path(@group)
|
||||
- breadcrumb_title _("New")
|
||||
- page_title _("Milestones"), @milestone.name, _("Milestones")
|
||||
|
||||
%h3.page-title
|
||||
New Milestone
|
||||
%div{ class: container_class }
|
||||
%h3.page-title
|
||||
New Milestone
|
||||
|
||||
= render "form"
|
||||
%hr
|
||||
|
||||
= render "form"
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
- @no_container = true
|
||||
- add_to_breadcrumbs "Labels", project_labels_path(@project)
|
||||
- breadcrumb_title "Edit"
|
||||
- page_title "Edit", @label.name, "Labels"
|
||||
|
||||
%div{ class: container_class }
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
- @no_container = true
|
||||
- breadcrumb_title "Labels"
|
||||
- add_to_breadcrumbs "Labels", project_labels_path(@project)
|
||||
- breadcrumb_title "New"
|
||||
- page_title "New Label"
|
||||
|
||||
%div{ class: container_class }
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
- @no_container = true
|
||||
- breadcrumb_title "Edit"
|
||||
- add_to_breadcrumbs "Milestones", project_milestones_path(@project)
|
||||
- page_title "Edit", @milestone.title, "Milestones"
|
||||
|
||||
|
||||
%div{ class: container_class }
|
||||
|
||||
%h3.page-title
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
- @no_container = true
|
||||
- breadcrumb_title "Milestones"
|
||||
- add_to_breadcrumbs "Milestones", project_milestones_path(@project)
|
||||
- breadcrumb_title "New"
|
||||
- page_title "New Milestone"
|
||||
|
||||
%div{ class: container_class }
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
- @content_class = "limit-container-width" unless fluid_layout
|
||||
- page_title _("Edit"), @page.title.capitalize, _("Wiki")
|
||||
- add_to_breadcrumbs _("Wiki"), project_wiki_path(@project, @page)
|
||||
- breadcrumb_title @page.persisted? ? _("Edit") : _("New")
|
||||
- page_title @page.persisted? ? _("Edit") : _("New"), @page.title.capitalize, _("Wiki")
|
||||
|
||||
= wiki_page_errors(@error)
|
||||
|
||||
|
|
5
changelogs/unreleased/include-new-link-in-breadcrumb.yml
Normal file
5
changelogs/unreleased/include-new-link-in-breadcrumb.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Include new link in breadcrumb for issues, merge requests, milestones, and labels
|
||||
merge_request: 18515
|
||||
author: George Tsiolis
|
||||
type: changed
|
|
@ -1,15 +1,15 @@
|
|||
require 'rails_helper'
|
||||
|
||||
describe 'New issue breadcrumbs' do
|
||||
describe 'New issue breadcrumb' do
|
||||
let(:project) { create(:project) }
|
||||
let(:user) { project.creator }
|
||||
let(:user) { project.creator }
|
||||
|
||||
before do
|
||||
sign_in(user)
|
||||
visit new_project_issue_path(project)
|
||||
visit(new_project_issue_path(project))
|
||||
end
|
||||
|
||||
it 'display a link to project issues and new issue pages' do
|
||||
it 'displays link to project issues and new issue' do
|
||||
page.within '.breadcrumbs' do
|
||||
expect(find_link('Issues')[:href]).to end_with(project_issues_path(project))
|
||||
expect(find_link('New')[:href]).to end_with(new_project_issue_path(project))
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
require 'rails_helper'
|
||||
|
||||
describe 'New merge request breadcrumbs' do
|
||||
describe 'New merge request breadcrumb' do
|
||||
let(:project) { create(:project, :repository) }
|
||||
let(:user) { project.creator }
|
||||
let(:user) { project.creator }
|
||||
|
||||
before do
|
||||
sign_in(user)
|
||||
visit project_new_merge_request_path(project)
|
||||
visit(project_new_merge_request_path(project))
|
||||
end
|
||||
|
||||
it 'display a link to project merge requests and new merge request pages' do
|
||||
it 'displays link to project merge requests and new merge request' do
|
||||
page.within '.breadcrumbs' do
|
||||
expect(find_link('Merge Requests')[:href]).to end_with(project_merge_requests_path(project))
|
||||
expect(find_link('New')[:href]).to end_with(project_new_merge_request_path(project))
|
||||
|
|
19
spec/features/milestones/user_sees_breadcrumb_links_spec.rb
Normal file
19
spec/features/milestones/user_sees_breadcrumb_links_spec.rb
Normal file
|
@ -0,0 +1,19 @@
|
|||
require 'rails_helper'
|
||||
|
||||
describe 'New project milestone breadcrumb' do
|
||||
let(:project) { create(:project) }
|
||||
let(:milestone) { create(:milestone, project: project) }
|
||||
let(:user) { project.creator }
|
||||
|
||||
before do
|
||||
sign_in(user)
|
||||
visit(new_project_milestone_path(project))
|
||||
end
|
||||
|
||||
it 'displays link to project milestones and new project milestone' do
|
||||
page.within '.breadcrumbs' do
|
||||
expect(find_link('Milestones')[:href]).to end_with(project_milestones_path(project))
|
||||
expect(find_link('New')[:href]).to end_with(new_project_milestone_path(project))
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,17 @@
|
|||
require 'rails_helper'
|
||||
|
||||
describe 'New project label breadcrumb' do
|
||||
let(:project) { create(:project) }
|
||||
let(:user) { project.creator }
|
||||
|
||||
before do
|
||||
sign_in(user)
|
||||
visit(project_labels_path(project))
|
||||
end
|
||||
|
||||
it 'displays link to project labels and new project label' do
|
||||
page.within '.breadcrumbs' do
|
||||
expect(find_link('Labels')[:href]).to end_with(project_labels_path(project))
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue