Description:
CRUD for contests. combined new contest pages with old contest management. fixed styling.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r267:0b01fdb623a8 - - 10 files changed: 548 inserted, 322 deleted
@@ -0,0 +1,290 | |||||
|
|
1 | + body | ||
|
|
2 | + background: white url(../images/topbg.jpg) repeat-x top center | ||
|
|
3 | + font-size: 13px | ||
|
|
4 | + font-family: Tahoma, "sans-serif" | ||
|
|
5 | + margin: 10px | ||
|
|
6 | + padding: 10px | ||
|
|
7 | + | ||
|
|
8 | + | ||
|
|
9 | + input | ||
|
|
10 | + font-family: Tahoma, "sans-serif" | ||
|
|
11 | + | ||
|
|
12 | + | ||
|
|
13 | + h1 | ||
|
|
14 | + font-size: 24px | ||
|
|
15 | + color: #334488 | ||
|
|
16 | + line-height: 2em | ||
|
|
17 | + | ||
|
|
18 | + | ||
|
|
19 | + h2 | ||
|
|
20 | + font-size: 18px | ||
|
|
21 | + color: #5566bb | ||
|
|
22 | + line-height: 1.5em | ||
|
|
23 | + | ||
|
|
24 | + | ||
|
|
25 | + hr | ||
|
|
26 | + border-top: 1px solid #dddddd | ||
|
|
27 | + border-bottom: 1px solid #eeeeee | ||
|
|
28 | + | ||
|
|
29 | + | ||
|
|
30 | + a | ||
|
|
31 | + color: #6666cc | ||
|
|
32 | + text-decoration: none | ||
|
|
33 | + | ||
|
|
34 | + &:link, &:visited | ||
|
|
35 | + color: #6666cc | ||
|
|
36 | + text-decoration: none | ||
|
|
37 | + | ||
|
|
38 | + &:hover, &:focus | ||
|
|
39 | + color: #111166 | ||
|
|
40 | + text-decoration: none | ||
|
|
41 | + | ||
|
|
42 | + | ||
|
|
43 | + div | ||
|
|
44 | + &.userbar | ||
|
|
45 | + line-height: 1.5em | ||
|
|
46 | + text-align: right | ||
|
|
47 | + font-size: 12px | ||
|
|
48 | + | ||
|
|
49 | + &.title | ||
|
|
50 | + padding: 10px 0px | ||
|
|
51 | + line-height: 1.5em | ||
|
|
52 | + font-size: 13px | ||
|
|
53 | + | ||
|
|
54 | + span.contest-over-msg | ||
|
|
55 | + font-size: 15px | ||
|
|
56 | + color: red | ||
|
|
57 | + | ||
|
|
58 | + table | ||
|
|
59 | + width: 100% | ||
|
|
60 | + font-weight: bold | ||
|
|
61 | + | ||
|
|
62 | + td | ||
|
|
63 | + &.left-col | ||
|
|
64 | + text-align: left | ||
|
|
65 | + vertical-align: top | ||
|
|
66 | + color: #444444 | ||
|
|
67 | + | ||
|
|
68 | + &.right-col | ||
|
|
69 | + text-align: right | ||
|
|
70 | + vertical-align: top | ||
|
|
71 | + font-size: 18px | ||
|
|
72 | + color: #116699 | ||
|
|
73 | + | ||
|
|
74 | + | ||
|
|
75 | + table.info | ||
|
|
76 | + margin: 10px 0 | ||
|
|
77 | + border: 1px solid #666666 | ||
|
|
78 | + border-collapse: collapse | ||
|
|
79 | + font-size: 12px | ||
|
|
80 | + | ||
|
|
81 | + th | ||
|
|
82 | + border: 1px solid #666666 | ||
|
|
83 | + line-height: 1.5em | ||
|
|
84 | + padding: 0 0.5em | ||
|
|
85 | + | ||
|
|
86 | + td | ||
|
|
87 | + border-left: 1px solid #666666 | ||
|
|
88 | + border-right: 1px solid #666666 | ||
|
|
89 | + line-height: 1.5em | ||
|
|
90 | + padding: 0 0.5em | ||
|
|
91 | + | ||
|
|
92 | + | ||
|
|
93 | + tr | ||
|
|
94 | + &.info-head | ||
|
|
95 | + background: #777777 | ||
|
|
96 | + color: white | ||
|
|
97 | + | ||
|
|
98 | + &.info-odd | ||
|
|
99 | + background: #eeeeee | ||
|
|
100 | + | ||
|
|
101 | + &.info-even | ||
|
|
102 | + background: #f9f9f9 | ||
|
|
103 | + | ||
|
|
104 | + =basicbox | ||
|
|
105 | + background: #eeeeff | ||
|
|
106 | + border: 1px dotted #99aaee | ||
|
|
107 | + padding: 5px | ||
|
|
108 | + margin: 10px 0px | ||
|
|
109 | + color: black | ||
|
|
110 | + font-size: 13px | ||
|
|
111 | + | ||
|
|
112 | + .infobox | ||
|
|
113 | + +basicbox | ||
|
|
114 | + | ||
|
|
115 | + .submitbox | ||
|
|
116 | + +basicbox | ||
|
|
117 | + | ||
|
|
118 | + .errorExplanation | ||
|
|
119 | + border: 1px dotted gray | ||
|
|
120 | + color: #bb2222 | ||
|
|
121 | + padding: 5px 15px 5px 15px | ||
|
|
122 | + margin-bottom: 5px | ||
|
|
123 | + background-color: white | ||
|
|
124 | + font-weight: normal | ||
|
|
125 | + | ||
|
|
126 | + h2 | ||
|
|
127 | + color: #cc1111 | ||
|
|
128 | + font-weight: bold | ||
|
|
129 | + | ||
|
|
130 | + | ||
|
|
131 | + table.uinfo | ||
|
|
132 | + border-collapse: collapse | ||
|
|
133 | + border: 1px solid black | ||
|
|
134 | + font-size: 13px | ||
|
|
135 | + | ||
|
|
136 | + | ||
|
|
137 | + td.uinfo | ||
|
|
138 | + vertical-align: top | ||
|
|
139 | + border: 1px solid black | ||
|
|
140 | + padding: 5px | ||
|
|
141 | + | ||
|
|
142 | + | ||
|
|
143 | + th.uinfo | ||
|
|
144 | + background: lightgreen | ||
|
|
145 | + vertical-align: top | ||
|
|
146 | + text-align: right | ||
|
|
147 | + border: 1px solid black | ||
|
|
148 | + padding: 5px | ||
|
|
149 | + | ||
|
|
150 | + | ||
|
|
151 | + div | ||
|
|
152 | + &.compilermsgbody | ||
|
|
153 | + font-family: monospace | ||
|
|
154 | + | ||
|
|
155 | + &.task-menu | ||
|
|
156 | + text-align: center | ||
|
|
157 | + font-size: 13px | ||
|
|
158 | + line-height: 1.75em | ||
|
|
159 | + font-weight: bold | ||
|
|
160 | + border-top: 1px dashed gray | ||
|
|
161 | + border-bottom: 1px dashed gray | ||
|
|
162 | + margin-top: 2px | ||
|
|
163 | + margin-bottom: 4px | ||
|
|
164 | + | ||
|
|
165 | + | ||
|
|
166 | + table.taskdesc | ||
|
|
167 | + border: 2px solid #dddddd | ||
|
|
168 | + border-collapse: collapse | ||
|
|
169 | + margin: 10px auto | ||
|
|
170 | + width: 90% | ||
|
|
171 | + font-size: 13px | ||
|
|
172 | + | ||
|
|
173 | + p | ||
|
|
174 | + font-size: 13px | ||
|
|
175 | + | ||
|
|
176 | + tr.name | ||
|
|
177 | + border: 2px solid #dddddd | ||
|
|
178 | + background: #dddddd | ||
|
|
179 | + color: #333333 | ||
|
|
180 | + font-weight: bold | ||
|
|
181 | + font-size: 14px | ||
|
|
182 | + line-height: 1.5em | ||
|
|
183 | + text-align: center | ||
|
|
184 | + | ||
|
|
185 | + td | ||
|
|
186 | + &.desc-odd | ||
|
|
187 | + padding: 5px | ||
|
|
188 | + padding-left: 20px | ||
|
|
189 | + background: #fefeee | ||
|
|
190 | + | ||
|
|
191 | + &.desc-even | ||
|
|
192 | + padding: 5px | ||
|
|
193 | + padding-left: 20px | ||
|
|
194 | + background: #feeefe | ||
|
|
195 | + | ||
|
|
196 | + | ||
|
|
197 | + div | ||
|
|
198 | + &.announcementbox | ||
|
|
199 | + margin: 10px 0px | ||
|
|
200 | + background: #bbddee | ||
|
|
201 | + padding: 1px | ||
|
|
202 | + | ||
|
|
203 | + span.title | ||
|
|
204 | + font-weight: bold | ||
|
|
205 | + color: #224455 | ||
|
|
206 | + padding-left: 10px | ||
|
|
207 | + line-height: 1.6em | ||
|
|
208 | + | ||
|
|
209 | + &.announcement | ||
|
|
210 | + margin: 2px | ||
|
|
211 | + background: white | ||
|
|
212 | + padding: 1px | ||
|
|
213 | + padding-left: 10px | ||
|
|
214 | + padding-right: 10px | ||
|
|
215 | + padding-top: 5px | ||
|
|
216 | + padding-bottom: 5px | ||
|
|
217 | + | ||
|
|
218 | + | ||
|
|
219 | + .announcement p | ||
|
|
220 | + font-size: 12px | ||
|
|
221 | + margin: 2px | ||
|
|
222 | + | ||
|
|
223 | + | ||
|
|
224 | + div.pub-info | ||
|
|
225 | + text-align: right | ||
|
|
226 | + font-style: italic | ||
|
|
227 | + font-size: 9px | ||
|
|
228 | + | ||
|
|
229 | + p | ||
|
|
230 | + text-align: right | ||
|
|
231 | + font-style: italic | ||
|
|
232 | + font-size: 9px | ||
|
|
233 | + | ||
|
|
234 | + | ||
|
|
235 | + .announcement | ||
|
|
236 | + .toggles | ||
|
|
237 | + font-weight: normal | ||
|
|
238 | + float: right | ||
|
|
239 | + font-size: 80% | ||
|
|
240 | + | ||
|
|
241 | + .announcement-title | ||
|
|
242 | + font-weight: bold | ||
|
|
243 | + | ||
|
|
244 | + | ||
|
|
245 | + div | ||
|
|
246 | + &.message | ||
|
|
247 | + margin: 10px 0 0 | ||
|
|
248 | + | ||
|
|
249 | + div | ||
|
|
250 | + &.message | ||
|
|
251 | + margin: 0 0 0 30px | ||
|
|
252 | + | ||
|
|
253 | + &.body | ||
|
|
254 | + border: 2px solid #dddddd | ||
|
|
255 | + background: #fff8f8 | ||
|
|
256 | + padding-left: 5px | ||
|
|
257 | + | ||
|
|
258 | + &.reply-body | ||
|
|
259 | + border: 2px solid #bbbbbb | ||
|
|
260 | + background: #fffff8 | ||
|
|
261 | + padding-left: 5px | ||
|
|
262 | + | ||
|
|
263 | + &.stat | ||
|
|
264 | + font-size: 10px | ||
|
|
265 | + line-height: 1.75em | ||
|
|
266 | + padding: 0 5px | ||
|
|
267 | + color: #333333 | ||
|
|
268 | + background: #dddddd | ||
|
|
269 | + font-weight: bold | ||
|
|
270 | + | ||
|
|
271 | + &.message div.stat | ||
|
|
272 | + font-size: 10px | ||
|
|
273 | + line-height: 1.75em | ||
|
|
274 | + padding: 0 5px | ||
|
|
275 | + color: #444444 | ||
|
|
276 | + background: #bbbbbb | ||
|
|
277 | + font-weight: bold | ||
|
|
278 | + | ||
|
|
279 | + &.contest-title | ||
|
|
280 | + color: white | ||
|
|
281 | + text-align: center | ||
|
|
282 | + line-height: 2em | ||
|
|
283 | + | ||
|
|
284 | + &.registration-desc, &.test-desc | ||
|
|
285 | + border: 1px dotted gray | ||
|
|
286 | + background: #f5f5f5 | ||
|
|
287 | + padding: 5px | ||
|
|
288 | + margin: 10px 0 | ||
|
|
289 | + font-size: 12px | ||
|
|
290 | + line-height: 1.5em |
@@ -1,11 +1,12 | |||||
|
1 | class ContestManagementController < ApplicationController |
|
1 | class ContestManagementController < ApplicationController |
|
2 |
|
2 | ||
|
3 | before_filter :admin_authorization |
|
3 | before_filter :admin_authorization |
|
4 |
|
4 | ||
|
5 | def index |
|
5 | def index |
|
|
6 | + @num_contests = Contest.count() | ||
|
6 | end |
|
7 | end |
|
7 |
|
8 | ||
|
8 | def user_stat |
|
9 | def user_stat |
|
9 | if not Configuration.indv_contest_mode? |
|
10 | if not Configuration.indv_contest_mode? |
|
10 | redirect_to :action => 'index' and return |
|
11 | redirect_to :action => 'index' and return |
|
11 | end |
|
12 | end |
@@ -32,7 +33,18 | |||||
|
32 |
|
33 | ||
|
33 | UserContestStat.delete_all() |
|
34 | UserContestStat.delete_all() |
|
34 | flash[:notice] = 'All start time statistic cleared.' |
|
35 | flash[:notice] = 'All start time statistic cleared.' |
|
35 | redirect_to :action => 'index' |
|
36 | redirect_to :action => 'index' |
|
36 | end |
|
37 | end |
|
37 |
|
38 | ||
|
|
39 | + def change_contest_mode | ||
|
|
40 | + if ['standard', 'contest', 'indv-contest'].include? params[:id] | ||
|
|
41 | + config = Configuration.find_by_key('system.mode') | ||
|
|
42 | + config.value = params[:id] | ||
|
|
43 | + config.save | ||
|
|
44 | + else | ||
|
|
45 | + flash[:notice] = 'Wrong contest mode value' | ||
|
|
46 | + end | ||
|
|
47 | + redirect_to :action => 'index' | ||
|
|
48 | + end | ||
|
|
49 | + | ||
|
38 | end |
|
50 | end |
@@ -1,10 +1,13 | |||||
|
1 | class ContestsController < ApplicationController |
|
1 | class ContestsController < ApplicationController |
|
2 |
|
2 | ||
|
3 | before_filter :admin_authorization |
|
3 | before_filter :admin_authorization |
|
4 |
|
4 | ||
|
|
5 | + in_place_edit_for :contest, :title | ||
|
|
6 | + in_place_edit_for :contest, :enabled | ||
|
|
7 | + | ||
|
5 | # GET /contests |
|
8 | # GET /contests |
|
6 | # GET /contests.xml |
|
9 | # GET /contests.xml |
|
7 | def index |
|
10 | def index |
|
8 | @contests = Contest.all |
|
11 | @contests = Contest.all |
|
9 |
|
12 | ||
|
10 | respond_to do |format| |
|
13 | respond_to do |format| |
@@ -1,4 +1,9 | |||||
|
1 | - .submitbox |
|
1 | + %h2 Individual contest mode |
|
2 | - %b Menu: |
|
2 | + |
|
|
3 | + In this mode, each individual user can log in and participate in the | ||
|
|
4 | + contest at any time. The contest timer starts as soon as the user log | ||
|
|
5 | + in. | ||
|
|
6 | + | ||
|
|
7 | + .infobox | ||
|
3 | = link_to '[View user start time]', :action => 'user_stat' |
|
8 | = link_to '[View user start time]', :action => 'user_stat' |
|
4 | = link_to '[Clear all start times]', {:action => 'clear_all_stat'}, {:confirm => 'Do you really want to clear all start time statistics?'} |
|
9 | = link_to '[Clear all start times]', {:action => 'clear_all_stat'}, {:confirm => 'Do you really want to clear all start time statistics?'} |
@@ -1,21 +1,31 | |||||
|
1 | %h1 Contest management |
|
1 | %h1 Contest management |
|
2 |
|
2 | ||
|
3 | - .submitbox |
|
3 | + .infobox |
|
4 |
|
4 | ||
|
5 | - %b Multiple contests: |
|
5 | + - if @num_contests>1 |
|
6 | - = "There are #{Contest.count} contests running." |
|
6 | + %b Multiple contests: |
|
7 | - = "[#{link_to 'Create/Update/Delete contests', :controller => 'contests', :action => 'index'}]" |
|
7 | + = "There are #{@num_contests} contests running." |
|
8 | - |
|
8 | + - else |
|
|
9 | + %b Single contest: | ||
|
|
10 | + = "[#{link_to 'Add/remove contests', :controller => 'contests', :action => 'index'}]" | ||
|
9 |
|
11 | ||
|
10 | - %b Contest mode: |
|
12 | + .infobox |
|
|
13 | + %b Web interface mode: | ||
|
|
14 | + - if (not Configuration.contest_mode?) and (not Configuration.indv_contest_mode?) | ||
|
|
15 | + standard mode | ||
|
|
16 | + - elsif Configuration.contest_mode? | ||
|
|
17 | + normal contest mode. | ||
|
|
18 | + - else | ||
|
|
19 | + individual contest mode. | ||
|
11 |
|
20 | ||
|
12 | - - if (not Configuration.contest_mode?) and (not Configuration.indv_contest_mode?) |
|
21 | + %br/ |
|
13 | - Currently the system is not running in contest mode. |
|
22 | + Change mode to: |
|
14 | - - elsif Configuration.contest_mode? |
|
23 | + = "[#{link_to 'standard', :action => 'change_contest_mode', :id => 'standard'}]" |
|
15 | - System running in normal contest mode. |
|
24 | + = "[#{link_to 'contest', :action => 'change_contest_mode', :id => 'contest'}]" |
|
16 | - - else |
|
25 | + = "[#{link_to 'individual contest', :action => 'change_contest_mode', :id => 'indv-contest'}]" |
|
17 | - System running in individual contest mode. |
|
26 | + |
|
|
27 | + - if Configuration.indv_contest_mode? | ||
|
18 | = render :partial => 'indv_contest_mode_index' |
|
28 | = render :partial => 'indv_contest_mode_index' |
|
19 |
|
29 | ||
|
20 | %br/ |
|
30 | %br/ |
|
21 |
|
31 |
@@ -1,20 +1,25 | |||||
|
1 | <h1>Editing contest</h1> |
|
1 | <h1>Editing contest</h1> |
|
2 |
|
2 | ||
|
3 | <% form_for(@contest) do |f| %> |
|
3 | <% form_for(@contest) do |f| %> |
|
4 | <%= f.error_messages %> |
|
4 | <%= f.error_messages %> |
|
5 |
|
5 | ||
|
6 | - <p> |
|
6 | + <table> |
|
7 | - <%= f.label :title %><br /> |
|
7 | + <tr> |
|
8 |
- <%= f. |
|
8 | + <td><%= f.label :title %></td> |
|
9 | - </p> |
|
9 | + <td><%= f.text_field :title %></td> |
|
10 | - <p> |
|
10 | + </tr> |
|
11 | - <%= f.label :enabled %><br /> |
|
11 | + <tr> |
|
12 | - <%= f.check_box :enabled %> |
|
12 | + <td></td> |
|
13 | - </p> |
|
13 | + <td> |
|
|
14 | + <%= f.check_box :enabled %> | ||
|
|
15 | + <%= f.label :enabled %> | ||
|
|
16 | + </td> | ||
|
|
17 | + </tr> | ||
|
|
18 | + </table> | ||
|
14 | <p> |
|
19 | <p> |
|
15 | <%= f.submit 'Update' %> |
|
20 | <%= f.submit 'Update' %> |
|
16 | </p> |
|
21 | </p> |
|
17 | <% end %> |
|
22 | <% end %> |
|
18 |
|
23 | ||
|
19 | <%= link_to 'Show', @contest %> | |
|
24 | <%= link_to 'Show', @contest %> | |
|
20 | - <%= link_to 'Back', contests_path %> No newline at end of file |
|
25 | + <%= link_to 'Back', contests_path %> |
@@ -1,22 +1,27 | |||||
|
|
1 | + <% content_for :head do %> | ||
|
|
2 | + <%= javascript_include_tag :defaults %> | ||
|
|
3 | + <% end %> | ||
|
|
4 | + | ||
|
1 | <h1>Listing contests</h1> |
|
5 | <h1>Listing contests</h1> |
|
2 |
|
6 | ||
|
3 |
- <div class=" |
|
7 | + <div class="infobox"> |
|
4 |
- <b>Go back</b> |
|
8 | + <b>Go back to:</b> [<%= link_to 'contest management', :controller => 'contest_management', :action => 'index' %>] |
|
5 | </div> |
|
9 | </div> |
|
6 |
|
10 | ||
|
7 | <table> |
|
11 | <table> |
|
8 | <tr> |
|
12 | <tr> |
|
9 | <th>Title</th> |
|
13 | <th>Title</th> |
|
10 | - <th>Enabled</th> |
|
14 | + <th>Enabled</th> |
|
11 | </tr> |
|
15 | </tr> |
|
12 |
|
16 | ||
|
13 | <% @contests.each do |contest| %> |
|
17 | <% @contests.each do |contest| %> |
|
|
18 | + <% @contest = contest %> | ||
|
14 | <tr> |
|
19 | <tr> |
|
15 | - <td><%=h contest.title %></td> |
|
20 | + <td><%= in_place_editor_field :contest, :title, {}, :rows => 1 %></td> |
|
16 |
- <td><%= |
|
21 | + <td><%= in_place_editor_field :contest, :enabled, {}, :rows => 1 %></td> |
|
17 | <td><%= link_to 'Show', contest %></td> |
|
22 | <td><%= link_to 'Show', contest %></td> |
|
18 | <td><%= link_to 'Edit', edit_contest_path(contest) %></td> |
|
23 | <td><%= link_to 'Edit', edit_contest_path(contest) %></td> |
|
19 | <td><%= link_to 'Destroy', contest, :confirm => 'Are you sure?', :method => :delete %></td> |
|
24 | <td><%= link_to 'Destroy', contest, :confirm => 'Are you sure?', :method => :delete %></td> |
|
20 | </tr> |
|
25 | </tr> |
|
21 | <% end %> |
|
26 | <% end %> |
|
22 | </table> |
|
27 | </table> |
@@ -1,13 +1,14 | |||||
|
1 | - <p> |
|
1 | + <h1>Contest: <%=h @contest.title %></h1> |
|
2 | - <b>Title:</b> |
|
2 | + |
|
3 | - <%=h @contest.title %> |
|
3 | + <div class="infobox"> |
|
4 | - </p> |
|
4 | + <b>Go back to:</b> [<%= link_to 'contest management', :controller => 'contest_management', :action => 'index' %>] |
|
|
5 | + </div> | ||
|
5 |
|
6 | ||
|
6 | <p> |
|
7 | <p> |
|
7 | <b>Enabled:</b> |
|
8 | <b>Enabled:</b> |
|
8 | <%=h @contest.enabled %> |
|
9 | <%=h @contest.enabled %> |
|
9 | </p> |
|
10 | </p> |
|
10 |
|
11 | ||
|
11 |
|
12 | ||
|
12 | <%= link_to 'Edit', edit_contest_path(@contest) %> | |
|
13 | <%= link_to 'Edit', edit_contest_path(@contest) %> | |
|
13 | - <%= link_to 'Back', contests_path %> No newline at end of file |
|
14 | + <%= link_to 'Back', contests_path %> |
@@ -1,41 +1,41 | |||||
|
1 | <h1>Listing users</h1> |
|
1 | <h1>Listing users</h1> |
|
2 |
|
2 | ||
|
3 | <div class="submitbox"> |
|
3 | <div class="submitbox"> |
|
4 | - <b>Quick add</b> |
|
4 | + <b>Quick add</b> |
|
5 | - <% form_tag :action => 'create' do %> |
|
5 | + <% form_tag :action => 'create' do %> |
|
6 | - <table border="0"> |
|
6 | + <table border="0"> |
|
7 | - <tr> |
|
7 | + <tr> |
|
8 |
- |
|
8 | + <td><label for="user_login">Login</label></td> |
|
9 |
- |
|
9 | + <td><label for="user_full_name">Full name</label></td> |
|
10 |
- |
|
10 | + <td><label for="user_password">Password</label></td> |
|
11 |
- |
|
11 | + <td><label for="user_password_confirmation">Confirm</label></td> |
|
12 |
- |
|
12 | + <td><label for="user_email">Email</label></td> |
|
13 | - </tr> |
|
13 | + </tr> |
|
14 | - <tr> |
|
14 | + <tr> |
|
15 |
- |
|
15 | + <td><%= text_field 'user', 'login', :size => 10 %></td> |
|
16 |
- |
|
16 | + <td><%= text_field 'user', 'full_name', :size => 30 %></td> |
|
17 |
- |
|
17 | + <td><%= password_field 'user', 'password', :size => 10 %></td> |
|
18 |
- |
|
18 | + <td><%= password_field 'user', 'password_confirmation', :size => 10 %></td> |
|
19 |
- |
|
19 | + <td><%= text_field 'user', 'email', :size => 15 %></td> |
|
20 |
- |
|
20 | + <td><%= submit_tag "Create" %></td> |
|
21 | - </tr></table> |
|
21 | + </tr> |
|
22 | - <% end %> |
|
22 | + </table> |
|
23 | - <br/> |
|
23 | + <% end %> |
|
24 | - <b>Import from site management</b> |
|
24 | + <br/> |
|
25 | - <% form_tag({:action => 'import'}, :multipart => true) do %> |
|
25 | + <b>Import from site management</b> |
|
26 | - File: <%= file_field_tag 'file' %> <%= submit_tag 'Import' %> |
|
26 | + <% form_tag({:action => 'import'}, :multipart => true) do %> |
|
27 | - <% end %> |
|
27 | + File: <%= file_field_tag 'file' %> <%= submit_tag 'Import' %> |
|
28 | - <br/> |
|
28 | + <% end %> |
|
29 | - <b>What else: </b> |
|
29 | + <br/> |
|
30 | - <%= link_to '[New user]', :action => 'new' %> |
|
30 | + <b>What else: </b> |
|
31 |
- <%= link_to '[New |
|
31 | + <%= link_to '[New user]', :action => 'new' %> |
|
32 |
- <%= link_to '[ |
|
32 | + <%= link_to '[New list of users]', :action => 'new_list' %> |
|
33 |
- <%= link_to '[ |
|
33 | + <%= link_to '[View administrators]', :action => 'admin' %> |
|
34 | - <%= link_to '[View active users]', :action => 'active' %> |
|
34 | + <%= link_to '[Random passwords]', :action => 'random_all_passwords' %> |
|
35 | - |
|
35 | + <%= link_to '[View active users]', :action => 'active' %> |
|
36 | </div> |
|
36 | </div> |
|
37 |
|
37 | ||
|
38 | <table> |
|
38 | <table> |
|
39 | <tr> |
|
39 | <tr> |
|
40 | <% for column in User.content_columns %> |
|
40 | <% for column in User.content_columns %> |
|
41 | <% if !@hidden_columns.index(column.name) %> |
|
41 | <% if !@hidden_columns.index(column.name) %> |
@@ -1,342 +1,237 | |||||
|
1 | - /* Main Default */ |
|
||
|
2 |
|
|
1 | body { |
|
3 |
- |
|
2 | + background: white url(../images/topbg.jpg) repeat-x top center; |
|
4 |
- |
|
3 | + font-size: 13px; |
|
5 |
- |
|
4 | + font-family: Tahoma, "sans-serif"; |
|
6 |
- |
|
5 | + margin: 10px; |
|
7 |
- |
|
6 | + padding: 10px; } |
|
8 | - } |
|
||
|
9 |
|
7 | ||
|
10 | - /* Form Font */ |
|
||
|
11 | input { |
|
8 | input { |
|
12 |
- |
|
9 | + font-family: Tahoma, "sans-serif"; } |
|
13 | - } |
|
||
|
14 |
|
10 | ||
|
15 | - /* Heading 1&2 */ |
|
||
|
16 | h1 { |
|
11 | h1 { |
|
17 |
- |
|
12 | + font-size: 24px; |
|
18 |
- |
|
13 | + color: #334488; |
|
19 |
- |
|
14 | + line-height: 2em; } |
|
20 | - } |
|
||
|
21 |
|
15 | ||
|
22 | h2 { |
|
16 | h2 { |
|
23 |
- |
|
17 | + font-size: 18px; |
|
24 |
- |
|
18 | + color: #5566bb; |
|
25 |
- |
|
19 | + line-height: 1.5em; } |
|
26 | - } |
|
||
|
27 | - |
|
||
|
28 | - /* Bar Line Color and Thickness */ |
|
||
|
29 | - hr { |
|
||
|
30 | - border-top: 1px solid #dddddd; |
|
||
|
31 | - border-bottom: 1px solid #eeeeee; |
|
||
|
32 | - } |
|
||
|
33 |
|
20 | ||
|
34 | - /* Link + Anchor Color */ |
|
21 | + hr { |
|
35 | - a, a:link, a:visited { |
|
22 | + border-top: 1px solid #dddddd; |
|
36 | - color: #6666cc; |
|
23 | + border-bottom: 1px solid #eeeeee; } |
|
37 | - text-decoration: none; |
|
||
|
38 | - } |
|
||
|
39 | - |
|
||
|
40 | - a:hover, a:focus { |
|
||
|
41 | - color: #111166; |
|
||
|
42 | - text-decoration: none; |
|
||
|
43 | - } |
|
||
|
44 |
|
24 | ||
|
45 | - /* This is the main menu bad*/ |
|
25 | + a { |
|
46 | - div.userbar { |
|
26 | + color: #6666cc; |
|
47 | - line-height: 1.5em; |
|
27 | + text-decoration: none; } |
|
48 | - text-align: right; |
|
28 | + a:link, a:visited { |
|
49 | - font-size: 12px; |
|
29 | + color: #6666cc; |
|
50 | - } |
|
30 | + text-decoration: none; } |
|
|
31 | + a:hover, a:focus { | ||
|
|
32 | + color: #111166; | ||
|
|
33 | + text-decoration: none; } | ||
|
51 |
|
34 | ||
|
52 | - /* This is the top bar, displaying user's full name */ |
|
35 | + div.userbar { |
|
|
36 | + line-height: 1.5em; | ||
|
|
37 | + text-align: right; | ||
|
|
38 | + font-size: 12px; } | ||
|
53 | div.title { |
|
39 | div.title { |
|
54 | - // background: #ddddff; |
|
40 | + padding: 10px 0px; |
|
55 | - // border: 1px dashed blue; |
|
41 | + line-height: 1.5em; |
|
56 | - padding: 10px 0px; |
|
42 | + font-size: 13px; } |
|
57 | - line-height: 1.5em; |
|
43 | + div.title span.contest-over-msg { |
|
58 | - font-size: 13px; |
|
||
|
59 | - } |
|
||
|
60 | - |
|
||
|
61 | - div.title span.contest-over-msg { |
|
||
|
62 | font-size: 15px; |
|
44 | font-size: 15px; |
|
63 | - color: red; |
|
45 | + color: red; } |
|
64 | - } |
|
46 | + div.title table { |
|
65 | - |
|
||
|
66 | - div.title table { |
|
||
|
67 | width: 100%; |
|
47 | width: 100%; |
|
68 | - font-weight: bold; |
|
48 | + font-weight: bold; } |
|
69 | - } |
|
49 | + div.title td.left-col { |
|
70 | - |
|
||
|
71 | - div.title td.left-col { |
|
||
|
72 | text-align: left; |
|
50 | text-align: left; |
|
73 | vertical-align: top; |
|
51 | vertical-align: top; |
|
74 | - color: #444444; |
|
52 | + color: #444444; } |
|
75 | - } |
|
53 | + div.title td.right-col { |
|
76 | - |
|
||
|
77 | - div.title td.right-col { |
|
||
|
78 | text-align: right; |
|
54 | text-align: right; |
|
79 | vertical-align: top; |
|
55 | vertical-align: top; |
|
80 | font-size: 18px; |
|
56 | font-size: 18px; |
|
81 | - color: #116699; |
|
57 | + color: #116699; } |
|
82 | - } |
|
||
|
83 |
|
58 | ||
|
84 | - /* Standard table with header and rows with alternating background */ |
|
||
|
85 | table.info { |
|
59 | table.info { |
|
86 |
- |
|
60 | + margin: 10px 0; |
|
87 |
- |
|
61 | + border: 1px solid #666666; |
|
88 |
- |
|
62 | + border-collapse: collapse; |
|
89 |
- |
|
63 | + font-size: 12px; } |
|
90 | - } |
|
64 | + table.info th { |
|
91 | - |
|
||
|
92 | - table.info th { |
|
||
|
93 | border: 1px solid #666666; |
|
65 | border: 1px solid #666666; |
|
94 | line-height: 1.5em; |
|
66 | line-height: 1.5em; |
|
95 | - padding: 0 0.5em; |
|
67 | + padding: 0 0.5em; } |
|
96 | - } |
|
68 | + table.info td { |
|
97 | - |
|
||
|
98 | - table.info td { |
|
||
|
99 | border-left: 1px solid #666666; |
|
69 | border-left: 1px solid #666666; |
|
100 | border-right: 1px solid #666666; |
|
70 | border-right: 1px solid #666666; |
|
101 | line-height: 1.5em; |
|
71 | line-height: 1.5em; |
|
102 | - padding: 0 0.5em; |
|
72 | + padding: 0 0.5em; } |
|
103 | - } |
|
||
|
104 |
|
73 | ||
|
105 | tr.info-head { |
|
74 | tr.info-head { |
|
106 |
- |
|
75 | + background: #777777; |
|
107 |
- |
|
76 | + color: white; } |
|
108 | - } |
|
||
|
109 | - |
|
||
|
110 | tr.info-odd { |
|
77 | tr.info-odd { |
|
111 |
- |
|
78 | + background: #eeeeee; } |
|
112 | - } |
|
||
|
113 | - |
|
||
|
114 | tr.info-even { |
|
79 | tr.info-even { |
|
115 |
- |
|
80 | + background: #f9f9f9; } |
|
116 | - } |
|
||
|
117 |
|
81 | ||
|
118 | - /******************************* |
|
82 | + .infobox { |
|
119 | - [Main] |
|
83 | + background: #eeeeff; |
|
120 | - ********************************/ |
|
84 | + border: 1px dotted #99aaee; |
|
121 | - div.submitbox { |
|
85 | + padding: 5px; |
|
122 | - background: #eeeeff; |
|
86 | + margin: 10px 0px; |
|
123 | - border: 1px dotted #99aaee; |
|
87 | + color: black; |
|
124 | - padding: 5px; |
|
88 | + font-size: 13px; } |
|
125 | - margin: 10px 0px; |
|
||
|
126 | - color: black; |
|
||
|
127 | - font-size: 13px; |
|
||
|
128 | - } |
|
||
|
129 |
|
89 | ||
|
130 | - div.errorExplanation { |
|
90 | + .submitbox { |
|
131 | - border: 1px dotted gray; |
|
91 | + background: #eeeeff; |
|
132 | - color: #bb2222; |
|
92 | + border: 1px dotted #99aaee; |
|
133 |
- |
|
93 | + padding: 5px; |
|
134 |
- |
|
94 | + margin: 10px 0px; |
|
135 | - background-color: white; |
|
95 | + color: black; |
|
136 | - font-weight: normal; |
|
96 | + font-size: 13px; } |
|
137 | - } |
|
||
|
138 |
|
97 | ||
|
139 | - |
|
98 | + .errorExplanation { |
|
140 | - div.errorExplanation h2 { |
|
99 | + border: 1px dotted gray; |
|
|
100 | + color: #bb2222; | ||
|
|
101 | + padding: 5px 15px 5px 15px; | ||
|
|
102 | + margin-bottom: 5px; | ||
|
|
103 | + background-color: white; | ||
|
|
104 | + font-weight: normal; } | ||
|
|
105 | + .errorExplanation h2 { | ||
|
141 | color: #cc1111; |
|
106 | color: #cc1111; |
|
142 | - font-weight: bold; |
|
107 | + font-weight: bold; } |
|
143 | - } |
|
||
|
144 |
|
108 | ||
|
145 | - /******************************* |
|
||
|
146 | - [Settings] |
|
||
|
147 | - ********************************/ |
|
||
|
148 | table.uinfo { |
|
109 | table.uinfo { |
|
149 |
- |
|
110 | + border-collapse: collapse; |
|
150 |
- |
|
111 | + border: 1px solid black; |
|
151 |
- |
|
112 | + font-size: 13px; } |
|
152 | - } |
|
||
|
153 |
|
113 | ||
|
154 | td.uinfo { |
|
114 | td.uinfo { |
|
155 |
- |
|
115 | + vertical-align: top; |
|
156 |
- |
|
116 | + border: 1px solid black; |
|
157 |
- |
|
117 | + padding: 5px; } |
|
158 | - } |
|
||
|
159 |
|
118 | ||
|
160 | th.uinfo { |
|
119 | th.uinfo { |
|
161 |
- |
|
120 | + background: lightgreen; |
|
162 |
- |
|
121 | + vertical-align: top; |
|
163 |
- |
|
122 | + text-align: right; |
|
164 |
- |
|
123 | + border: 1px solid black; |
|
165 |
- |
|
124 | + padding: 5px; } |
|
166 | - } |
|
||
|
167 |
|
125 | ||
|
168 | - /******************************* |
|
||
|
169 | - [Submission] |
|
||
|
170 | - ********************************/ |
|
||
|
171 | div.compilermsgbody { |
|
126 | div.compilermsgbody { |
|
172 |
- |
|
127 | + font-family: monospace; } |
|
173 | - } |
|
||
|
174 | - |
|
||
|
175 | div.task-menu { |
|
128 | div.task-menu { |
|
176 |
- |
|
129 | + text-align: center; |
|
177 |
- |
|
130 | + font-size: 13px; |
|
178 |
- |
|
131 | + line-height: 1.75em; |
|
179 |
- |
|
132 | + font-weight: bold; |
|
180 |
- |
|
133 | + border-top: 1px dashed gray; |
|
181 |
- |
|
134 | + border-bottom: 1px dashed gray; |
|
182 |
- |
|
135 | + margin-top: 2px; |
|
183 |
- |
|
136 | + margin-bottom: 4px; } |
|
184 | - } |
|
||
|
185 |
|
137 | ||
|
186 | - /******************************* |
|
||
|
187 | - [Submission] |
|
||
|
188 | - ********************************/ |
|
||
|
189 | table.taskdesc { |
|
138 | table.taskdesc { |
|
190 |
- |
|
139 | + border: 2px solid #dddddd; |
|
191 |
- |
|
140 | + border-collapse: collapse; |
|
192 |
- |
|
141 | + margin: 10px auto; |
|
193 |
- |
|
142 | + width: 90%; |
|
194 |
- |
|
143 | + font-size: 13px; } |
|
195 | - } |
|
144 | + table.taskdesc p { |
|
196 | - |
|
145 | + font-size: 13px; } |
|
197 |
- table.taskdesc |
|
146 | + table.taskdesc tr.name { |
|
198 | - font-size: 13px; |
|
||
|
199 | - } |
|
||
|
200 | - |
|
||
|
201 | - table.taskdesc tr.name { |
|
||
|
202 | border: 2px solid #dddddd; |
|
147 | border: 2px solid #dddddd; |
|
203 | background: #dddddd; |
|
148 | background: #dddddd; |
|
204 | color: #333333; |
|
149 | color: #333333; |
|
205 | font-weight: bold; |
|
150 | font-weight: bold; |
|
206 | font-size: 14px; |
|
151 | font-size: 14px; |
|
207 | line-height: 1.5em; |
|
152 | line-height: 1.5em; |
|
208 | - text-align: center; |
|
153 | + text-align: center; } |
|
209 | - } |
|
154 | + table.taskdesc td.desc-odd { |
|
210 | - |
|
||
|
211 | - table.taskdesc td.desc-odd { |
|
||
|
212 | padding: 5px; |
|
155 | padding: 5px; |
|
213 | padding-left: 20px; |
|
156 | padding-left: 20px; |
|
214 | - background: #fefeee; |
|
157 | + background: #fefeee; } |
|
215 | - } |
|
158 | + table.taskdesc td.desc-even { |
|
216 | - |
|
||
|
217 | - table.taskdesc td.desc-even { |
|
||
|
218 | padding: 5px; |
|
159 | padding: 5px; |
|
219 | padding-left: 20px; |
|
160 | padding-left: 20px; |
|
220 | - background: #feeefe; |
|
161 | + background: #feeefe; } |
|
221 | - } |
|
||
|
222 | - |
|
||
|
223 | - /********************** |
|
||
|
224 | - Announcement |
|
||
|
225 | - ***********************/ |
|
||
|
226 |
|
162 | ||
|
227 | div.announcementbox { |
|
163 | div.announcementbox { |
|
228 |
- |
|
164 | + margin: 10px 0px; |
|
229 |
- |
|
165 | + background: #bbddee; |
|
230 |
- |
|
166 | + padding: 1px; } |
|
231 | - } |
|
167 | + div.announcementbox span.title { |
|
232 | - |
|
||
|
233 | - div.announcementbox span.title { |
|
||
|
234 | font-weight: bold; |
|
168 | font-weight: bold; |
|
235 | color: #224455; |
|
169 | color: #224455; |
|
236 | padding-left: 10px; |
|
170 | padding-left: 10px; |
|
237 | - line-height: 1.6em; |
|
171 | + line-height: 1.6em; } |
|
238 | - } |
|
||
|
239 | - |
|
||
|
240 | div.announcement { |
|
172 | div.announcement { |
|
241 |
- |
|
173 | + margin: 2px; |
|
242 |
- |
|
174 | + background: white; |
|
243 |
- |
|
175 | + padding: 1px; |
|
244 |
- |
|
176 | + padding-left: 10px; |
|
245 |
- |
|
177 | + padding-right: 10px; |
|
246 |
- |
|
178 | + padding-top: 5px; |
|
247 |
- |
|
179 | + padding-bottom: 5px; } |
|
248 | - } |
|
||
|
249 |
|
180 | ||
|
250 | .announcement p { |
|
181 | .announcement p { |
|
251 |
- |
|
182 | + font-size: 12px; |
|
252 |
- |
|
183 | + margin: 2px; } |
|
253 | - } |
|
||
|
254 |
|
184 | ||
|
255 |
- div.pub-info |
|
185 | + div.pub-info { |
|
|
186 | + text-align: right; | ||
|
|
187 | + font-style: italic; | ||
|
|
188 | + font-size: 9px; } | ||
|
|
189 | + div.pub-info p { | ||
|
256 | text-align: right; |
|
190 | text-align: right; |
|
257 | font-style: italic; |
|
191 | font-style: italic; |
|
258 | - font-size: 9px; |
|
192 | + font-size: 9px; } |
|
259 | - } |
|
||
|
260 |
|
193 | ||
|
261 | .announcement .toggles { |
|
194 | .announcement .toggles { |
|
262 |
- |
|
195 | + font-weight: normal; |
|
263 |
- |
|
196 | + float: right; |
|
264 |
- |
|
197 | + font-size: 80%; } |
|
265 | - } |
|
||
|
266 | - |
|
||
|
267 | .announcement .announcement-title { |
|
198 | .announcement .announcement-title { |
|
268 |
- |
|
199 | + font-weight: bold; } |
|
269 | - } |
|
||
|
270 | - |
|
||
|
271 | - /****************** |
|
||
|
272 | - Messages |
|
||
|
273 | - ******************/ |
|
||
|
274 |
|
200 | ||
|
275 | div.message { |
|
201 | div.message { |
|
276 |
- |
|
202 | + margin: 10px 0 0; } |
|
277 | - } |
|
203 | + div.message div.message { |
|
278 | - |
|
204 | + margin: 0 0 0 30px; } |
|
279 |
- div.message div. |
|
205 | + div.message div.body { |
|
280 | - margin: 0 0 0 30px; |
|
||
|
281 | - } |
|
||
|
282 | - |
|
||
|
283 | - div.message div.body { |
|
||
|
284 | border: 2px solid #dddddd; |
|
206 | border: 2px solid #dddddd; |
|
285 | background: #fff8f8; |
|
207 | background: #fff8f8; |
|
286 | - padding-left: 5px; |
|
208 | + padding-left: 5px; } |
|
287 | - } |
|
209 | + div.message div.reply-body { |
|
288 | - |
|
||
|
289 | - div.message div.reply-body { |
|
||
|
290 | border: 2px solid #bbbbbb; |
|
210 | border: 2px solid #bbbbbb; |
|
291 | background: #fffff8; |
|
211 | background: #fffff8; |
|
292 | - padding-left: 5px; |
|
212 | + padding-left: 5px; } |
|
293 | - } |
|
213 | + div.message div.stat { |
|
294 | - |
|
||
|
295 | - div.message div.stat { |
|
||
|
296 | font-size: 10px; |
|
214 | font-size: 10px; |
|
297 | line-height: 1.75em; |
|
215 | line-height: 1.75em; |
|
298 | padding: 0 5px; |
|
216 | padding: 0 5px; |
|
299 | color: #333333; |
|
217 | color: #333333; |
|
300 | background: #dddddd; |
|
218 | background: #dddddd; |
|
301 | - font-weight: bold; |
|
219 | + font-weight: bold; } |
|
302 | - } |
|
220 | + div.message div.message div.stat { |
|
303 | - |
|
||
|
304 | - div.message div.message div.stat { |
|
||
|
305 | font-size: 10px; |
|
221 | font-size: 10px; |
|
306 | line-height: 1.75em; |
|
222 | line-height: 1.75em; |
|
307 | padding: 0 5px; |
|
223 | padding: 0 5px; |
|
308 | color: #444444; |
|
224 | color: #444444; |
|
309 | background: #bbbbbb; |
|
225 | background: #bbbbbb; |
|
310 | - font-weight: bold; |
|
226 | + font-weight: bold; } |
|
311 | - } |
|
||
|
312 | - |
|
||
|
313 | - /******************** |
|
||
|
314 | - Registration |
|
||
|
315 | - ********************/ |
|
||
|
316 | div.contest-title { |
|
227 | div.contest-title { |
|
317 |
- |
|
228 | + color: white; |
|
318 |
- |
|
229 | + text-align: center; |
|
319 |
- |
|
230 | + line-height: 2em; } |
|
320 | - } |
|
231 | + div.registration-desc, div.test-desc { |
|
321 | - |
|
232 | + border: 1px dotted gray; |
|
322 | - div.registration-desc { |
|
233 | + background: #f5f5f5; |
|
323 | - border: 1px dotted gray; |
|
234 | + padding: 5px; |
|
324 | - background: #f5f5f5; |
|
235 | + margin: 10px 0; |
|
325 | - padding: 5px; |
|
236 | + font-size: 12px; |
|
326 | - margin: 10px 0; |
|
237 | + line-height: 1.5em; } |
|
327 | - font-size: 12px; |
|
||
|
328 | - line-height: 1.5em; |
|
||
|
329 | - } |
|
||
|
330 | - |
|
||
|
331 | - /******************** |
|
||
|
332 | - [Test Interface] |
|
||
|
333 | - ********************/ |
|
||
|
334 | - |
|
||
|
335 | - div.test-desc { |
|
||
|
336 | - border: 1px dotted gray; |
|
||
|
337 | - background: #f5f5f5; |
|
||
|
338 | - padding: 5px; |
|
||
|
339 | - margin: 10px 0; |
|
||
|
340 | - font-size: 12px; |
|
||
|
341 | - line-height: 1.5em; |
|
||
|
342 | - } |
|
You need to be logged in to leave comments.
Login now