From bbff2d680d22051041be5fc5dd2e801fd1cc862d Mon Sep 17 00:00:00 2001 From: Paul Slaughter Date: Thu, 31 May 2018 21:28:19 +0000 Subject: Update 404 and 403 pages --- app/views/errors/_footer.html.haml | 11 +++++++++++ app/views/errors/access_denied.html.haml | 19 ++++++++++--------- app/views/errors/not_found.html.haml | 19 +++++++++++++------ 3 files changed, 34 insertions(+), 15 deletions(-) create mode 100644 app/views/errors/_footer.html.haml (limited to 'app/views/errors') diff --git a/app/views/errors/_footer.html.haml b/app/views/errors/_footer.html.haml new file mode 100644 index 00000000000..e67a3a142f6 --- /dev/null +++ b/app/views/errors/_footer.html.haml @@ -0,0 +1,11 @@ +%nav + %ul.error-nav + %li + = link_to s_('Nav|Home'), root_path + %li + - if current_user + = link_to s_('Nav|Sign out and sign in with a different account'), destroy_user_session_path + - else + = link_to s_('Nav|Sign In / Register'), new_session_path(:user, redirect_to_referer: 'yes') + %li + = link_to s_('Nav|Help'), help_path diff --git a/app/views/errors/access_denied.html.haml b/app/views/errors/access_denied.html.haml index bf540439c79..227c7884915 100644 --- a/app/views/errors/access_denied.html.haml +++ b/app/views/errors/access_denied.html.haml @@ -1,15 +1,16 @@ - message = local_assigns.fetch(:message) - - content_for(:title, 'Access Denied') -%img{ :alt => "GitLab Logo", :src => image_path('logo.svg') } - %h1 - 403 + += image_tag('illustrations/error-403.svg', alt: '403', lazy: false) .container - %h3 Access Denied - %hr + %h3 + = s_("403|You don't have the permission to access this page.") - if message %p = message - - else - %p You are not allowed to access this page. - %p Read more about project permissions #{link_to "here", help_page_path("user/permissions"), class: "vlink"} + %p + = s_('403|Please contact your GitLab administrator to get the permission.') + .action-container.js-go-back{ style: 'display: none' } + %a{ href: 'javascript:history.back()', class: 'btn btn-success' } + = s_('Go Back') += render "errors/footer" diff --git a/app/views/errors/not_found.html.haml b/app/views/errors/not_found.html.haml index a0b9a632e22..ae055f398ac 100644 --- a/app/views/errors/not_found.html.haml +++ b/app/views/errors/not_found.html.haml @@ -1,8 +1,15 @@ - content_for(:title, 'Not Found') -%img{ :alt => "GitLab Logo", :src => image_path('logo.svg') } - %h1 - 404 += image_tag('illustrations/error-404.svg', alt: '404', lazy: false) .container - %h3 The resource you were looking for doesn't exist. - %hr - %p You may have mistyped the address or the page may have moved. + %h3 + = s_('404|Page Not Found') + %p + = s_("404|Make sure the address is correct and the page hasn't moved.") + %p + = s_('404|Please contact your GitLab administrator if you think this is a mistake.') + .action-container + = form_tag search_path, method: :get, class: 'form-inline-flex' do |f| + .field + = search_field_tag :search, '', placeholder: _('Search for projects, issues, etc.'), class: 'form-control' + = button_tag 'Search', class: 'btn btn-success', name: nil, type: 'submit' += render 'errors/footer' -- cgit v1.2.1