Commit c873cf81f61d644639b459b2fde1267a41050bc1

Authored by Dmitriy Zaporozhets
1 parent d8f825ef

Restyled error messages in common way. Added title to head partial

app/assets/stylesheets/common.scss
@@ -666,3 +666,10 @@ pre { @@ -666,3 +666,10 @@ pre {
666 float:left; 666 float:left;
667 } 667 }
668 } 668 }
  669 +
  670 +h1.http_status_code {
  671 + font-size: 56px;
  672 + line-height: 100px;
  673 + font-weight: normal;
  674 + color: #456;
  675 +}
app/views/errors/access_denied.html.haml
1 -%h1 Access Denied 1 +%h1 403
  2 +%h3.page_title Access Denied
2 %hr 3 %hr
3 -%h2 You are not allowed to access this page. 4 +%p You are not allowed to access this page.
4 %p Read more about project permissions #{link_to "here", help_permissions_path, class: "vlink"} 5 %p Read more about project permissions #{link_to "here", help_permissions_path, class: "vlink"}
app/views/errors/encoding.html.haml
1 -%h1 Encoding Error 1 +%h1.http_status_code 500
  2 +%h3.page_title Encoding Error
2 %hr 3 %hr
3 %p Page can't be loaded because of an encoding error. 4 %p Page can't be loaded because of an encoding error.
app/views/errors/git_not_found.html.haml
1 -%h1 404 1 +%h1.http_status_code 404
  2 +%h3.page_title Git Resource Not found
2 %hr 3 %hr
3 -%h2 Git Resource Not found  
4 %p 4 %p
5 Application can't get access to some branch or commit in your repository. It 5 Application can't get access to some branch or commit in your repository. It
6 may have been moved. 6 may have been moved.
app/views/errors/gitolite.html.haml
1 -%h1 Git Error 1 +%h1.http_status_code 500
  2 +%h3.page_title GitLab was unable to access your Gitolite system.
2 %hr 3 %hr
3 -%h2 GitLab was unable to access your Gitolite system.  
4 4
5 .git_error_tips 5 .git_error_tips
6 %h4 Tips for Administrator: 6 %h4 Tips for Administrator:
app/views/errors/not_found.html.haml
1 -%h1 404 1 +%h1.http_status_code 404
  2 +%h3.page_title The resource you were looking for doesn't exist.
2 %hr 3 %hr
3 -%h2 The resource you were looking for doesn't exist.  
4 %p You may have mistyped the address or the page may have moved. 4 %p You may have mistyped the address or the page may have moved.
app/views/layouts/_head.html.haml
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 %meta{charset: "utf-8"} 2 %meta{charset: "utf-8"}
3 %title 3 %title
4 GitLab 4 GitLab
5 - = " > #{@project.name}" if @project && !@project.new_record? 5 + = " > #{title}" if defined?(title)
6 = favicon_link_tag 'favicon.ico' 6 = favicon_link_tag 'favicon.ico'
7 = stylesheet_link_tag "application" 7 = stylesheet_link_tag "application"
8 = javascript_include_tag "application" 8 = javascript_include_tag "application"
app/views/layouts/admin.html.haml
1 !!! 5 1 !!! 5
2 %html{ lang: "en"} 2 %html{ lang: "en"}
3 - = render "layouts/head" 3 + = render "layouts/head", title: "Admin area"
4 %body{class: "#{app_theme} admin"} 4 %body{class: "#{app_theme} admin"}
5 = render "layouts/flash" 5 = render "layouts/flash"
6 = render "layouts/head_panel", title: "Admin area" 6 = render "layouts/head_panel", title: "Admin area"
app/views/layouts/application.html.haml
1 !!! 5 1 !!! 5
2 %html{ lang: "en"} 2 %html{ lang: "en"}
3 - = render "layouts/head" 3 + = render "layouts/head", title: "Dashboard"
4 %body{class: "#{app_theme} application"} 4 %body{class: "#{app_theme} application"}
5 = render "layouts/flash" 5 = render "layouts/flash"
6 = render "layouts/head_panel", title: "Dashboard" 6 = render "layouts/head_panel", title: "Dashboard"
app/views/layouts/errors.html.haml
1 !!! 5 1 !!! 5
2 %html{ lang: "en"} 2 %html{ lang: "en"}
3 - = render "layouts/head" 3 + = render "layouts/head", title: "Error"
4 %body{class: "#{app_theme} application"} 4 %body{class: "#{app_theme} application"}
5 = render "layouts/flash" 5 = render "layouts/flash"
6 = render "layouts/head_panel", title: "" 6 = render "layouts/head_panel", title: ""
app/views/layouts/group.html.haml
1 !!! 5 1 !!! 5
2 %html{ lang: "en"} 2 %html{ lang: "en"}
3 - = render "layouts/head" 3 + = render "layouts/head", title: "#{@group.name}"
4 %body{class: "#{app_theme} application"} 4 %body{class: "#{app_theme} application"}
5 = render "layouts/flash" 5 = render "layouts/flash"
6 = render "layouts/head_panel", title: "#{@group.name}" 6 = render "layouts/head_panel", title: "#{@group.name}"
app/views/layouts/profile.html.haml
1 !!! 5 1 !!! 5
2 %html{ lang: "en"} 2 %html{ lang: "en"}
3 - = render "layouts/head" 3 + = render "layouts/head", title: "Profile"
4 %body{class: "#{app_theme} profile"} 4 %body{class: "#{app_theme} profile"}
5 = render "layouts/flash" 5 = render "layouts/flash"
6 = render "layouts/head_panel", title: "Profile" 6 = render "layouts/head_panel", title: "Profile"
app/views/layouts/project_resource.html.haml
1 !!! 5 1 !!! 5
2 %html{ lang: "en"} 2 %html{ lang: "en"}
3 - = render "layouts/head" 3 + = render "layouts/head", title: @project.name
4 %body{class: "#{app_theme} project"} 4 %body{class: "#{app_theme} project"}
5 = render "layouts/flash" 5 = render "layouts/flash"
6 = render "layouts/head_panel", title: @project.name 6 = render "layouts/head_panel", title: @project.name
public/404.html
@@ -7,9 +7,8 @@ @@ -7,9 +7,8 @@
7 7
8 <body> 8 <body>
9 <h1>404</h1> 9 <h1>404</h1>
10 - <div>  
11 - <h2>The page you were looking for doesn't exist.</h2>  
12 - <p>You may have mistyped the address or the page may have moved.</p>  
13 - </div> 10 + <h3>The page you were looking for doesn't exist.</h3>
  11 + <hr/>
  12 + <p>You may have mistyped the address or the page may have moved.</p>
14 </body> 13 </body>
15 </html> 14 </html>
public/500.html
@@ -4,13 +4,10 @@ @@ -4,13 +4,10 @@
4 <title>We're sorry, but something went wrong (500)</title> 4 <title>We're sorry, but something went wrong (500)</title>
5 <link href="/static.css" media="screen" rel="stylesheet" type="text/css" /> 5 <link href="/static.css" media="screen" rel="stylesheet" type="text/css" />
6 </head> 6 </head>
7 -  
8 <body> 7 <body>
9 - <!-- This file lives in public/500.html -->  
10 <h1>500</h1> 8 <h1>500</h1>
11 - <div>  
12 - <h2>We're sorry, but something went wrong.</h2>  
13 - <p>We've been notified about this issue and we'll take a look at it shortly.</p>  
14 - </div> 9 + <h3>We're sorry, but something went wrong.</h3>
  10 + <hr/>
  11 + <p>We've been notified about this issue and we'll take a look at it shortly.</p>
15 </body> 12 </body>
16 </html> 13 </html>
public/githost_error.html
@@ -1,36 +0,0 @@ @@ -1,36 +0,0 @@
1 -<!DOCTYPE html>  
2 -<html>  
3 -<head>  
4 - <title>We're sorry, but we can't get access to your gitolite</title>  
5 - <style type="text/css">  
6 - body { background-color: #EAEAEA; color: #666; text-align: center; font-family: arial, sans-serif; }  
7 - div.dialog {  
8 - width: 600px;  
9 - padding: 0 4em;  
10 - margin: 4em auto 0 auto;  
11 - }  
12 - h1 { font-size: 48px; color: #444; line-height: 1.5em; }  
13 - h2 { font-size: 24px; color: #666; line-height: 1.5em; }  
14 - h3, code { text-align:left; }  
15 - code pre { margin-left:40px; }  
16 - </style>  
17 -</head>  
18 -  
19 -<body>  
20 - <!-- This file lives in public/500.html -->  
21 - <div class="dialog">  
22 - <h1>Gitolite Error</h1>  
23 - <h2>Application can't get access to your gitolite system.</h2>  
24 - <hr>  
25 - <h3> 1. Check 'config/gitlab.yml' for correct settings.</h3>  
26 - <h3> 2. Make sure web server user has access to gitolite. <a href="https://github.com/gitlabhq/gitlabhq/wiki/Gitolite">Setup tutorial</a></h3>  
27 - <h3> 3. Try: </h3>  
28 - <code>  
29 - <pre>  
30 -sudo chmod -R 770 /home/git/repositories/  
31 -sudo chown -R git:git /home/git/repositories/  
32 - </pre>  
33 - </code>  
34 - </div>  
35 -</body>  
36 -</html>  
public/static.css
1 -body { color: #666; text-align: center; font-family: arial, sans-serif; margin:0; padding:0; }  
2 -h1 { font-size: 48px; color: #444; line-height: 1.5em; } 1 +body {
  2 + color: #666;
  3 + text-align: center;
  4 + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  5 + sans-serif;
  6 + margin:0;
  7 + width: 800px;
  8 + margin: auto;
  9 + font-size: 14px;
  10 +}
  11 +h1 {
  12 + font-size: 56px;
  13 + line-height: 100px;
  14 + font-weight: normal;
  15 + color: #456;
  16 +}
3 h2 { font-size: 24px; color: #666; line-height: 1.5em; } 17 h2 { font-size: 24px; color: #666; line-height: 1.5em; }
4 18
5 -.alert-message {  
6 - position: relative;  
7 - padding: 7px 15px;  
8 - margin-bottom: 18px;  
9 - color: #404040;  
10 - background-color: #eedc94;  
11 - background-repeat: repeat-x;  
12 - background-image: -khtml-gradient(linear, left top, left bottom, from(#fceec1), to(#eedc94));  
13 - background-image: -moz-linear-gradient(top, #fceec1, #eedc94);  
14 - background-image: -ms-linear-gradient(top, #fceec1, #eedc94);  
15 - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fceec1), color-stop(100%, #eedc94));  
16 - background-image: -webkit-linear-gradient(top, #fceec1, #eedc94);  
17 - background-image: -o-linear-gradient(top, #fceec1, #eedc94);  
18 - background-image: linear-gradient(top, #fceec1, #eedc94);  
19 - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFCEEC1', endColorstr='#FFEEDC94', GradientType=0);  
20 - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);  
21 - border-color: #eedc94 #eedc94 #e4c652;  
22 - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) fadein(rgba(0, 0, 0, 0.1), 15%);  
23 - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);  
24 - border-width: 1px;  
25 - border-style: solid;  
26 - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);  
27 - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);  
28 - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);  
29 -}  
30 -.alert-message .close {  
31 - margin-top: 1px;  
32 - *margin-top: 0;  
33 -}  
34 -.alert-message a {  
35 - font-weight: bold;  
36 - color: #404040;  
37 -}  
38 -.alert-message.danger p a, .alert-message.error p a, .alert-message.success p a, .alert-message.info p a {  
39 - color: #404040;  
40 -}  
41 -.alert-message h5 {  
42 - line-height: 18px;  
43 -}  
44 -.alert-message p {  
45 - margin-bottom: 0;  
46 -}  
47 -.alert-message div {  
48 - margin-top: 5px;  
49 - margin-bottom: 2px; 19 +h3 {
  20 + color: #456;
  21 + font-size: 20px;
  22 + font-weight: normal;
50 line-height: 28px; 23 line-height: 28px;
51 } 24 }
52 25
53 -.alert-message.block-message.error {  
54 - background: #FDDFDE;  
55 - border-color: #FBC7C6; 26 +hr {
  27 + margin: 18px 0;
  28 + border: 0;
  29 + border-top: 1px solid #EEE;
  30 + border-bottom: 1px solid white;
56 } 31 }
57 -