Skip to content

Commit c873cf8

Browse files
committed
Restyled error messages in common way. Added title to head partial
1 parent d8f825e commit c873cf8

17 files changed

+56
-113
lines changed

app/assets/stylesheets/common.scss

+7
Original file line numberDiff line numberDiff line change
@@ -666,3 +666,10 @@ pre {
666666
float:left;
667667
}
668668
}
669+
670+
h1.http_status_code {
671+
font-size: 56px;
672+
line-height: 100px;
673+
font-weight: normal;
674+
color: #456;
675+
}
+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
%h1 Access Denied
1+
%h1 403
2+
%h3.page_title Access Denied
23
%hr
3-
%h2 You are not allowed to access this page.
4+
%p You are not allowed to access this page.
45
%p Read more about project permissions #{link_to "here", help_permissions_path, class: "vlink"}

app/views/errors/encoding.html.haml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
%h1 Encoding Error
1+
%h1.http_status_code 500
2+
%h3.page_title Encoding Error
23
%hr
34
%p Page can't be loaded because of an encoding error.
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
%h1 404
1+
%h1.http_status_code 404
2+
%h3.page_title Git Resource Not found
23
%hr
3-
%h2 Git Resource Not found
44
%p
55
Application can't get access to some branch or commit in your repository. It
66
may have been moved.

app/views/errors/gitolite.html.haml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
%h1 Git Error
1+
%h1.http_status_code 500
2+
%h3.page_title GitLab was unable to access your Gitolite system.
23
%hr
3-
%h2 GitLab was unable to access your Gitolite system.
44

55
.git_error_tips
66
%h4 Tips for Administrator:

app/views/errors/not_found.html.haml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%h1 404
1+
%h1.http_status_code 404
2+
%h3.page_title The resource you were looking for doesn't exist.
23
%hr
3-
%h2 The resource you were looking for doesn't exist.
44
%p You may have mistyped the address or the page may have moved.

app/views/layouts/_head.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
%meta{charset: "utf-8"}
33
%title
44
GitLab
5-
= " > #{@project.name}" if @project && [email protected]_record?
5+
= " > #{title}" if defined?(title)
66
= favicon_link_tag 'favicon.ico'
77
= stylesheet_link_tag "application"
88
= javascript_include_tag "application"

app/views/layouts/admin.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
!!! 5
22
%html{ lang: "en"}
3-
= render "layouts/head"
3+
= render "layouts/head", title: "Admin area"
44
%body{class: "#{app_theme} admin"}
55
= render "layouts/flash"
66
= render "layouts/head_panel", title: "Admin area"

app/views/layouts/application.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
!!! 5
22
%html{ lang: "en"}
3-
= render "layouts/head"
3+
= render "layouts/head", title: "Dashboard"
44
%body{class: "#{app_theme} application"}
55
= render "layouts/flash"
66
= render "layouts/head_panel", title: "Dashboard"

app/views/layouts/errors.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
!!! 5
22
%html{ lang: "en"}
3-
= render "layouts/head"
3+
= render "layouts/head", title: "Error"
44
%body{class: "#{app_theme} application"}
55
= render "layouts/flash"
66
= render "layouts/head_panel", title: ""

app/views/layouts/group.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
!!! 5
22
%html{ lang: "en"}
3-
= render "layouts/head"
3+
= render "layouts/head", title: "#{@group.name}"
44
%body{class: "#{app_theme} application"}
55
= render "layouts/flash"
66
= render "layouts/head_panel", title: "#{@group.name}"

app/views/layouts/profile.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
!!! 5
22
%html{ lang: "en"}
3-
= render "layouts/head"
3+
= render "layouts/head", title: "Profile"
44
%body{class: "#{app_theme} profile"}
55
= render "layouts/flash"
66
= render "layouts/head_panel", title: "Profile"

app/views/layouts/project_resource.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
!!! 5
22
%html{ lang: "en"}
3-
= render "layouts/head"
3+
= render "layouts/head", title: @project.name
44
%body{class: "#{app_theme} project"}
55
= render "layouts/flash"
66
= render "layouts/head_panel", title: @project.name

public/404.html

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77

88
<body>
99
<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>
1413
</body>
1514
</html>

public/500.html

+3-6
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@
44
<title>We're sorry, but something went wrong (500)</title>
55
<link href="/static.css" media="screen" rel="stylesheet" type="text/css" />
66
</head>
7-
87
<body>
9-
<!-- This file lives in public/500.html -->
108
<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>
1512
</body>
1613
</html>

public/githost_error.html

-36
This file was deleted.

public/static.css

+25-51
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,31 @@
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+
}
317
h2 { font-size: 24px; color: #666; line-height: 1.5em; }
418

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;
5023
line-height: 28px;
5124
}
5225

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;
5631
}
57-

0 commit comments

Comments
 (0)