Description:
small changes, layouts
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@46 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r22:b40095435f1f - - 3 files changed: 4 inserted, 4 deleted
@@ -1,24 +1,24 | |||||
|
1 | # Methods added to this helper will be available to all templates in the application. |
|
1 | # Methods added to this helper will be available to all templates in the application. |
|
2 | module ApplicationHelper |
|
2 | module ApplicationHelper |
|
3 |
|
3 | ||
|
4 |
- def user_ |
|
4 | + def user_header |
|
5 | options = '' |
|
5 | options = '' |
|
6 | user = User.find(session[:user_id]) |
|
6 | user = User.find(session[:user_id]) |
|
7 | if user.admin? |
|
7 | if user.admin? |
|
8 | options = options + ' ' + |
|
8 | options = options + ' ' + |
|
9 | (link_to_unless_current '[Problem admin]', |
|
9 | (link_to_unless_current '[Problem admin]', |
|
10 | :controller => 'problems', :action => 'index') |
|
10 | :controller => 'problems', :action => 'index') |
|
11 | options = options + ' ' + |
|
11 | options = options + ' ' + |
|
12 | (link_to_unless_current '[User admin]', |
|
12 | (link_to_unless_current '[User admin]', |
|
13 | :controller => 'user_admin', :action => 'index') |
|
13 | :controller => 'user_admin', :action => 'index') |
|
14 | end |
|
14 | end |
|
15 | options += link_to_unless_current '[Main]', |
|
15 | options += link_to_unless_current '[Main]', |
|
16 | :controller => 'main', :action => 'list' |
|
16 | :controller => 'main', :action => 'list' |
|
17 | options += link_to_unless_current '[Settings]', |
|
17 | options += link_to_unless_current '[Settings]', |
|
18 | :controller => 'users', :action => 'index' |
|
18 | :controller => 'users', :action => 'index' |
|
19 | options = options + ' ' + |
|
19 | options = options + ' ' + |
|
20 | link_to('[Log out]', {:controller => 'main', :action => 'login'}) |
|
20 | link_to('[Log out]', {:controller => 'main', :action => 'login'}) |
|
21 | options |
|
21 | options |
|
22 | end |
|
22 | end |
|
23 |
|
23 | ||
|
24 | end |
|
24 | end |
@@ -1,22 +1,22 | |||||
|
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
|
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
|
2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
3 |
|
3 | ||
|
4 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
|
4 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
|
5 | <head> |
|
5 | <head> |
|
6 | <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> |
|
6 | <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> |
|
7 | <title>Grader!</title> |
|
7 | <title>Grader!</title> |
|
8 | <%= stylesheet_link_tag 'application' %> |
|
8 | <%= stylesheet_link_tag 'application' %> |
|
9 | <%= javascript_include_tag :defaults %> |
|
9 | <%= javascript_include_tag :defaults %> |
|
10 | </head> |
|
10 | </head> |
|
11 | <body> |
|
11 | <body> |
|
12 |
|
12 | ||
|
13 |
- <div class="user |
|
13 | + <div class="userbar"> |
|
14 |
- <%= user_ |
|
14 | + <%= user_header %> |
|
15 | </div> |
|
15 | </div> |
|
16 |
|
16 | ||
|
17 | <p style="color: green"><%= flash[:notice] %></p> |
|
17 | <p style="color: green"><%= flash[:notice] %></p> |
|
18 |
|
18 | ||
|
19 | <%= yield %> |
|
19 | <%= yield %> |
|
20 |
|
20 | ||
|
21 | </body> |
|
21 | </body> |
|
22 | </html> |
|
22 | </html> |
@@ -1,41 +1,41 | |||||
|
1 | p { |
|
1 | p { |
|
2 | font-size: 12px; |
|
2 | font-size: 12px; |
|
3 | } |
|
3 | } |
|
4 |
|
4 | ||
|
5 | div.title { |
|
5 | div.title { |
|
6 | font-size: 20px; |
|
6 | font-size: 20px; |
|
7 | font-weight: bold; |
|
7 | font-weight: bold; |
|
8 | background: lightgreen; |
|
8 | background: lightgreen; |
|
9 | padding: 2px; |
|
9 | padding: 2px; |
|
10 | } |
|
10 | } |
|
11 |
|
11 | ||
|
12 | div.problist-each { |
|
12 | div.problist-each { |
|
13 | margin-top: 2px; |
|
13 | margin-top: 2px; |
|
14 | margin-bottom: 2px |
|
14 | margin-bottom: 2px |
|
15 | } |
|
15 | } |
|
16 |
|
16 | ||
|
17 |
- div.user |
|
17 | + div.userbar { |
|
18 | border-top: thin solid grey; |
|
18 | border-top: thin solid grey; |
|
19 | border-bottom: thin solid grey; |
|
19 | border-bottom: thin solid grey; |
|
20 | text-align: right; |
|
20 | text-align: right; |
|
21 | font-size: 12px; |
|
21 | font-size: 12px; |
|
22 | } |
|
22 | } |
|
23 |
|
23 | ||
|
24 | div.probname { |
|
24 | div.probname { |
|
25 | background-color: #eeeeee; |
|
25 | background-color: #eeeeee; |
|
26 | font-weight: bold; |
|
26 | font-weight: bold; |
|
27 | padding: 2px; |
|
27 | padding: 2px; |
|
28 | border: 1px solid black; |
|
28 | border: 1px solid black; |
|
29 | } |
|
29 | } |
|
30 |
|
30 | ||
|
31 | div.subinfo { |
|
31 | div.subinfo { |
|
32 | margin-left: 20px; |
|
32 | margin-left: 20px; |
|
33 | margin-top: 2px; |
|
33 | margin-top: 2px; |
|
34 | border-bottom: thin solid grey; |
|
34 | border-bottom: thin solid grey; |
|
35 | border-left: thin solid grey; |
|
35 | border-left: thin solid grey; |
|
36 | font-size: 12px; |
|
36 | font-size: 12px; |
|
37 | } |
|
37 | } |
|
38 |
|
38 | ||
|
39 | div.compilermsgbody { |
|
39 | div.compilermsgbody { |
|
40 | font-family: monospace; |
|
40 | font-family: monospace; |
|
41 | } |
|
41 | } |
You need to be logged in to leave comments.
Login now