mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 04:31:21 -03:30
Merge pull request #6331 from marshmalien/fix-project-schedule-breadcrumb
Add nested project schedule detail breadcrumb Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
64139f960f
@ -24,13 +24,15 @@ class Projects extends Component {
|
||||
};
|
||||
}
|
||||
|
||||
setBreadcrumbConfig = project => {
|
||||
setBreadcrumbConfig = (project, nested) => {
|
||||
const { i18n } = this.props;
|
||||
|
||||
if (!project) {
|
||||
return;
|
||||
}
|
||||
|
||||
const projectSchedulesPath = `/projects/${project.id}/schedules`;
|
||||
|
||||
const breadcrumbConfig = {
|
||||
'/projects': i18n._(t`Projects`),
|
||||
'/projects/add': i18n._(t`Create New Project`),
|
||||
@ -40,7 +42,12 @@ class Projects extends Component {
|
||||
[`/projects/${project.id}/access`]: i18n._(t`Access`),
|
||||
[`/projects/${project.id}/notifications`]: i18n._(t`Notifications`),
|
||||
[`/projects/${project.id}/job_templates`]: i18n._(t`Job Templates`),
|
||||
[`/projects/${project.id}/schedules`]: i18n._(t`Schedules`),
|
||||
|
||||
[`${projectSchedulesPath}`]: i18n._(t`Schedules`),
|
||||
[`${projectSchedulesPath}/${nested?.id}`]: `${nested?.name}`,
|
||||
[`${projectSchedulesPath}/${nested?.id}/details`]: i18n._(
|
||||
t`Edit Details`
|
||||
),
|
||||
};
|
||||
|
||||
this.setState({ breadcrumbConfig });
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user