diff --git a/app/views/layouts/snippets.html.haml b/app/views/layouts/snippets.html.haml index a9790802b825bff5d87ee51d906e28fc99e5e36e..f34cd34f0f21a53e9b82d89f9fd7c919fa7d716c 100644 --- a/app/views/layouts/snippets.html.haml +++ b/app/views/layouts/snippets.html.haml @@ -1,6 +1,5 @@ - page_title _("Snippets") - header_title _("Your work"), root_path -- add_to_breadcrumbs _("Snippets"), dashboard_snippets_path - snippets_upload_path = snippets_upload_path(@snippet, current_user) - if current_user diff --git a/app/views/projects/snippets/edit.html.haml b/app/views/projects/snippets/edit.html.haml index 812e2353c1ea35658f3c15c04495e2f9479d571a..26a353953f7a903a32458413a0bbb3657f5debf2 100644 --- a/app/views/projects/snippets/edit.html.haml +++ b/app/views/projects/snippets/edit.html.haml @@ -1,5 +1,6 @@ - add_to_breadcrumbs _("Snippets"), project_snippets_path(@project) -- breadcrumb_title @snippet.to_reference +- add_to_breadcrumbs @snippet.to_reference, project_snippet_path(@project, @snippet) +- breadcrumb_title _("Edit") - page_title _("Edit"), "#{@snippet.title} (#{@snippet.to_reference})", _("Snippets") %h1.page-title.gl-text-size-h-display diff --git a/app/views/snippets/edit.html.haml b/app/views/snippets/edit.html.haml index 5c699200d4f611c1c4df2131f48baa41540c8024..8672f4a25e70b035835c751bf5b575a119018ea6 100644 --- a/app/views/snippets/edit.html.haml +++ b/app/views/snippets/edit.html.haml @@ -1,4 +1,6 @@ -- breadcrumb_title _("Edit snippet") +- add_to_breadcrumbs _("Snippets"), dashboard_snippets_path +- add_to_breadcrumbs @snippet.to_reference, snippet_path(@snippet) +- breadcrumb_title _("Edit") - page_title _("Edit"), "#{@snippet.title} (#{@snippet.to_reference})", _("Snippets") - content_for :prefetch_asset_tags do - webpack_preload_asset_tag('monaco') diff --git a/app/views/snippets/new.html.haml b/app/views/snippets/new.html.haml index 09c039976d86cf3435d1e9cc32e15c570d3c0f36..f880d822bbef5af534e06b9a97d1912ef52a3729 100644 --- a/app/views/snippets/new.html.haml +++ b/app/views/snippets/new.html.haml @@ -1,3 +1,4 @@ +- add_to_breadcrumbs _("Snippets"), dashboard_snippets_path - page_title _("New snippet") = render ::Layouts::PageHeadingComponent.new(_('New snippet')) diff --git a/app/views/snippets/show.html.haml b/app/views/snippets/show.html.haml index fe05a3de13aab7f48ecd86dbc12a7ffe8b2501d9..34477f85ff65f8135192d2142186daf62c6e7112 100644 --- a/app/views/snippets/show.html.haml +++ b/app/views/snippets/show.html.haml @@ -7,6 +7,8 @@ - if @snippet.author != current_user -# If current user is not the snippet author, then it renders with the Explore layout which doesn't have this breadcrumb. - add_to_breadcrumbs _("Snippets"), explore_snippets_path +- else + - add_to_breadcrumbs _("Snippets"), dashboard_snippets_path - breadcrumb_title @snippet.to_reference - page_title "#{@snippet.title} (#{@snippet.to_reference})", _("Snippets") - content_for :prefetch_asset_tags do