Skip to content
代码片段 群组 项目
提交 6ebf62f0 编辑于 作者: Julia Miocene's avatar Julia Miocene
浏览文件

Add the proper empty state when wiki page not found

Changelog: changed
上级 b54ce709
No related branches found
No related tags found
无相关合并请求
......@@ -157,6 +157,8 @@ def handle_redirection
)
elsif show_create_form?
handle_create_form
elsif wiki.exists?
render 'shared/wikis/404', status: :not_found
else
render 'shared/wikis/empty'
end
......
- page_title _("Wiki")
- @right_sidebar = true
- add_page_specific_style 'page_bundles/wiki'
- if @error.present?
= render Pajamas::AlertComponent.new(alert_options: { id: 'error_explanation', class: 'gl-mb-3'},
dismissible: false,
variant: :danger) do |c|
- c.with_body do
%ul.gl-pl-4
= @error
= render Pajamas::EmptyStateComponent.new(svg_path: 'illustrations/empty-state/empty-wiki-md.svg',
title: _('Sorry, this page doesn\'t exist'),
empty_state_options: { data: { testid: 'wiki-404' } }) do |c|
- c.with_description do
= s_('Wiki|Use the sidebar to find a different page.')
= render 'shared/wikis/sidebar'
......@@ -50588,6 +50588,9 @@ msgstr ""
msgid "Sorry, no projects matched your search"
msgstr ""
 
msgid "Sorry, this page doesn't exist"
msgstr ""
msgid "Sorry, you have exceeded the maximum browsable page number. Please use the API to explore further."
msgstr ""
 
......@@ -59604,6 +59607,9 @@ msgstr ""
msgid "Wiki|There are no pages in this wiki yet"
msgstr ""
 
msgid "Wiki|Use the sidebar to find a different page."
msgstr ""
msgid "Wiki|View all pages"
msgstr ""
 
......@@ -255,8 +255,8 @@
it 'shows the empty state' do
request
expect(response).to have_gitlab_http_status(:ok)
expect(response).to render_template('shared/wikis/empty')
expect(response).to have_gitlab_http_status(:not_found)
expect(response).to render_template('shared/wikis/404')
end
end
end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册