Please enable JavaScript to use RhodeCode Enterprise
r78:822d6c35aada -
Wed, 02 Apr 2008 15:42:27 -
12 files changed: 68 inserted, 45 deleted
app/views/main/list.html.haml
created
644
¶
+22
@@
-0,0
+1,22
1
+ = user_title_bar ( @user )
2
+
3
+ .submitbox
4
+ = error_messages_for 'submission'
5
+ = render :partial => 'submission_box'
6
+
7
+
8
+ %hr /
9
+
10
+ %table .info
11
+ %tr .info-head
12
+ %th
13
+ %th Tasks
14
+ %th # of sub(s)
15
+ %th Results
16
+ = render :partial => 'problem' , :collection => @problems
17
+
18
+ %hr
19
+
20
+ .submitbox
21
+ = render :partial => 'submission_box'
22
+
app/controllers/main_controller.rb
¶
-3
@@
-15,9
+15,6
15
15
reset_session
16
16
flash [ :notice ] = saved_notice
17
17
18
- @title = Configuration [ 'ui.front.title' ]
19
- @welcome = Configuration [ 'ui.front.welcome_message' ]
20
-
21
18
render :action => 'login' , :layout => 'empty'
22
19
end
23
20
app/helpers/application_helper.rb
¶
+17
@@
-43,4
+43,21
43
43
st + time . strftime ( "%X" )
44
44
end
45
45
46
+
47
+ def user_title_bar ( user )
48
+ << TITLEBAR
49
+ <div class="title">
50
+ <table>
51
+ <tr>
52
+ <td class="left-col">
53
+ #{user.full_name}<br/>
54
+ Current time is #{format_short_time(Time.new)}<br/>
55
+ </td>
56
+ <td class="right-col">APIO'08</td>
57
+ </tr>
58
+ </table>
59
+ </div>
60
+ TITLEBAR
61
+ end
62
+
46
63
end
app/views/layouts/application.html.erb
¶
+1
-1
@@
-14,7
+14,7
14
14
<%= user_header %>
15
15
</div>
16
16
17
- <p style="color: green"><%= flash[:notice] %></p>
17
+ <%= content_tag(:p,flash[:notice],:style => "color:green") if flash[:notice]!=nil %>
18
18
19
19
<%= yield %>
20
20
app/views/main/_submission.html.haml
¶
+1
-1
@@
-9,7
+9,7
9
9
- if submission . graded_at! = nil
10
10
= "Graded at #{ format_short_time ( submission . graded_at ) } ."
11
11
%br /
12
- = "Score: #{ submission . points } "
12
+ = "Score: #{ submission . points } " if Configuration [ 'ui.show_score' ]
13
13
= " ["
14
14
%tt
15
15
= submission . grader_comment
app/views/main/_submission_short.html.haml
¶
+1
-1
@@
-7,7
+7,7
7
7
= format_short_time ( submission . submitted_at )
8
8
- else
9
9
= "Graded at #{ format_short_time ( submission . graded_at ) } , "
10
- = "score: #{ submission . points } "
10
+ = "score: #{ submission . points } " if Configuration [ 'ui.show_score' ]
11
11
= " ["
12
12
%tt
13
13
= submission . grader_comment
app/views/main/login.rhtml
¶
+2
-2
@@
-1,6
+1,6
1
- < h1 > <%= @title %> </ h1 >
1
+ < h1 > <%= Configuration [ 'ui.front.title' ] %> </ h1 >
2
2
3
- < b > <%= @welcome %> </ b >< br />
3
+ < b > <%= Configuration [ 'ui.front.welcome_message' ] %> </ b >< br />
4
4
Please login to see the problem list. < br />< br />
5
5
6
6
<% if flash [ :notice ] %>
app/views/main/submission.html.haml
¶
+1
-7
@@
-1,10
+1,4
1
- .title
2
- Hello
3
- = h @user . full_name
4
-
5
- Current time is
6
- = format_short_time ( Time . new )
7
- %br /
1
+ = user_title_bar ( @user )
8
2
9
3
.task-menu
10
4
Task List
app/views/test/index.html.erb
¶
+2
@@
-1,3
+1,5
1
+ <%= user_title_bar(@user) %>
2
+
1
3
<h2>Test Interface</h2>
2
4
3
5
<% if @problems.length==0 %>
app/views/users/index.html.haml
¶
+2
-1
@@
-1,7
+1,8
1
-
2
1
- content_for :head do
3
2
= javascript_include_tag :defaults
4
3
4
+ = user_title_bar ( @user )
5
+
5
6
%h1 Your account settings
6
7
7
8
%p
public/stylesheets/application.css
¶
+19
-3
@@
-13,10
+13,26
13
13
14
14
/* This is the top bar, displaying user's full name */
15
15
div . title {
16
- font-size : 20 px ;
17
- font-weight : bold ;
18
- background : lightgreen ;
16
+ font-size : 1 2px ;
17
+ background : #ddffdd ;
18
+ border : 1 px solid black ;
19
19
padding : 2 px ;
20
+ margin-top : 3 px ;
21
+ margin-bottom : 5 px ;
22
+ }
23
+
24
+ div . title table {
25
+ width : 100 % ;
26
+ }
27
+
28
+ div . title td . left-col {
29
+ text-align : left ;
30
+ vertical-align : top ;
31
+ }
32
+
33
+ div . title td . right-col {
34
+ text-align : right ;
35
+ vertical-align : top ;
20
36
}
21
37
22
38
/* Standard table with header and rows with alternating background */
app/views/main/list.rhtml
removed
¶
-26
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository permissions settings