Description:
announcement
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r868:826ade30ee35 - - 5 files changed: 45 inserted, 28 deleted
@@ -1,426 +1,427 | |||||
|
1 | /* This is a manifest file that'll be compiled into application.css, which will include all the files |
|
1 | /* This is a manifest file that'll be compiled into application.css, which will include all the files |
|
2 | * listed below. |
|
2 | * listed below. |
|
3 | * |
|
3 | * |
|
4 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, |
|
4 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, |
|
5 | * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. |
|
5 | * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. |
|
6 | * |
|
6 | * |
|
7 | * You're free to add application-wide styles to this file and they'll appear at the bottom of the |
|
7 | * You're free to add application-wide styles to this file and they'll appear at the bottom of the |
|
8 | * compiled file so the styles you add here take precedence over styles defined in any styles |
|
8 | * compiled file so the styles you add here take precedence over styles defined in any styles |
|
9 | * defined in the other CSS/SCSS files in this directory. It is generally better to create a new |
|
9 | * defined in the other CSS/SCSS files in this directory. It is generally better to create a new |
|
10 | * file per style scope. |
|
10 | * file per style scope. |
|
11 | * |
|
11 | * |
|
12 | * // bootstrap says that we should not do this, but @import each file instead |
|
12 | * // bootstrap says that we should not do this, but @import each file instead |
|
13 | * # *= require_tree . |
|
13 | * # *= require_tree . |
|
14 | * # *= require_self |
|
14 | * # *= require_self |
|
15 | */ |
|
15 | */ |
|
16 |
|
16 | ||
|
17 | //@import "jquery-ui"; |
|
17 | //@import "jquery-ui"; |
|
18 | //@import "jquery.ui.core"; |
|
18 | //@import "jquery.ui.core"; |
|
19 | //@import "jquery.ui.theme"; |
|
19 | //@import "jquery.ui.theme"; |
|
20 | //@import "jquery.ui.datepicker"; |
|
20 | //@import "jquery.ui.datepicker"; |
|
21 | //@import "jquery.ui.slider"; |
|
21 | //@import "jquery.ui.slider"; |
|
22 | //@import "jquery-ui-timepicker-addon"; |
|
22 | //@import "jquery-ui-timepicker-addon"; |
|
23 | //@import "jquery-tablesorter/theme.metro-dark"; |
|
23 | //@import "jquery-tablesorter/theme.metro-dark"; |
|
24 | //@import "jquery.countdown"; |
|
24 | //@import "jquery.countdown"; |
|
25 | //@import "tablesorter-theme.cafe"; |
|
25 | //@import "tablesorter-theme.cafe"; |
|
26 |
|
26 | ||
|
27 | //bootstrap |
|
27 | //bootstrap |
|
28 | //@import "bootstrap-sprockets"; |
|
28 | //@import "bootstrap-sprockets"; |
|
29 | @import "bootstrap"; |
|
29 | @import "bootstrap"; |
|
30 | @import "select2/select2.min"; |
|
30 | @import "select2/select2.min"; |
|
31 | @import "select2/select2-bootstrap-5-theme.min"; |
|
31 | @import "select2/select2-bootstrap-5-theme.min"; |
|
32 |
|
32 | ||
|
33 | //@import bootstrap3-switch |
|
33 | //@import bootstrap3-switch |
|
34 | //@import "bootstrap-toggle"; |
|
34 | //@import "bootstrap-toggle"; |
|
35 | //@import "bootstrap-sortable"; |
|
35 | //@import "bootstrap-sortable"; |
|
36 | //@import "bootstrap-datepicker3"; |
|
36 | //@import "bootstrap-datepicker3"; |
|
37 | //@import "bootstrap-datetimepicker"; |
|
37 | //@import "bootstrap-datetimepicker"; |
|
38 | //@import "datatables.net-bs/css/dataTables.bootstrap.min"; |
|
38 | //@import "datatables.net-bs/css/dataTables.bootstrap.min"; |
|
39 | //@import "datatables.net-buttons-bs/css/buttons.bootstrap.min"; |
|
39 | //@import "datatables.net-buttons-bs/css/buttons.bootstrap.min"; |
|
40 |
|
40 | ||
|
41 | //new import |
|
41 | //new import |
|
42 | @import 'datatables/datatables.min'; |
|
42 | @import 'datatables/datatables.min'; |
|
|
43 | + @import 'material_icons'; | ||
|
43 |
|
44 | ||
|
44 | //bootstrap navbar color (from) |
|
45 | //bootstrap navbar color (from) |
|
45 | $bgDefault: #19197b; |
|
46 | $bgDefault: #19197b; |
|
46 | $bgHighlight: #06064b; |
|
47 | $bgHighlight: #06064b; |
|
47 | $colDefault: #8e8eb4; |
|
48 | $colDefault: #8e8eb4; |
|
48 | $colHighlight: #ffffff; |
|
49 | $colHighlight: #ffffff; |
|
49 | $dropDown: false; |
|
50 | $dropDown: false; |
|
50 |
|
51 | ||
|
51 | @font-face { |
|
52 | @font-face { |
|
52 | font-family: 'Glyphicons Halflings'; |
|
53 | font-family: 'Glyphicons Halflings'; |
|
53 | src: font-path('bootstrap/glyphicons-halflings-regular.eot'); |
|
54 | src: font-path('bootstrap/glyphicons-halflings-regular.eot'); |
|
54 | src: font-path('bootstrap/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), |
|
55 | src: font-path('bootstrap/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), |
|
55 | font-path('bootstrap/glyphicons-halflings-regular.woff') format('woff'), |
|
56 | font-path('bootstrap/glyphicons-halflings-regular.woff') format('woff'), |
|
56 | font-path('bootstrap/glyphicons-halflings-regular.ttf') format('truetype'), |
|
57 | font-path('bootstrap/glyphicons-halflings-regular.ttf') format('truetype'), |
|
57 | font-path('bootstrap/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg'); |
|
58 | font-path('bootstrap/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg'); |
|
58 | } |
|
59 | } |
|
59 |
|
60 | ||
|
60 | /* |
|
61 | /* |
|
61 | .navbar-default { |
|
62 | .navbar-default { |
|
62 | background-color: $bgDefault; |
|
63 | background-color: $bgDefault; |
|
63 | border-color: $bgHighlight; |
|
64 | border-color: $bgHighlight; |
|
64 |
|
65 | ||
|
65 | .navbar-brand { |
|
66 | .navbar-brand { |
|
66 | color: $colDefault; |
|
67 | color: $colDefault; |
|
67 |
|
68 | ||
|
68 | &:hover, &:focus { |
|
69 | &:hover, &:focus { |
|
69 | color: $colHighlight; |
|
70 | color: $colHighlight; |
|
70 | } |
|
71 | } |
|
71 | } |
|
72 | } |
|
72 |
|
73 | ||
|
73 | .navbar-text { |
|
74 | .navbar-text { |
|
74 | color: $colDefault; |
|
75 | color: $colDefault; |
|
75 | } |
|
76 | } |
|
76 |
|
77 | ||
|
77 | .navbar-nav { |
|
78 | .navbar-nav { |
|
78 | > li { |
|
79 | > li { |
|
79 | > a { |
|
80 | > a { |
|
80 | color: $colDefault; |
|
81 | color: $colDefault; |
|
81 |
|
82 | ||
|
82 | &:hover, &:focus { |
|
83 | &:hover, &:focus { |
|
83 | color: $colHighlight; |
|
84 | color: $colHighlight; |
|
84 | } |
|
85 | } |
|
85 | } |
|
86 | } |
|
86 |
|
87 | ||
|
87 | @if $dropDown { |
|
88 | @if $dropDown { |
|
88 | > .dropdown-menu { |
|
89 | > .dropdown-menu { |
|
89 | background-color: $bgDefault; |
|
90 | background-color: $bgDefault; |
|
90 |
|
91 | ||
|
91 | > li { |
|
92 | > li { |
|
92 | > a { |
|
93 | > a { |
|
93 | color: $colDefault; |
|
94 | color: $colDefault; |
|
94 |
|
95 | ||
|
95 | &:hover, &:focus { |
|
96 | &:hover, &:focus { |
|
96 | color: $colHighlight; |
|
97 | color: $colHighlight; |
|
97 | background-color: $bgHighlight; |
|
98 | background-color: $bgHighlight; |
|
98 | } |
|
99 | } |
|
99 | } |
|
100 | } |
|
100 |
|
101 | ||
|
101 | > .divider { |
|
102 | > .divider { |
|
102 | background-color: $bgHighlight; |
|
103 | background-color: $bgHighlight; |
|
103 | } |
|
104 | } |
|
104 | } |
|
105 | } |
|
105 | } |
|
106 | } |
|
106 | } |
|
107 | } |
|
107 | } |
|
108 | } |
|
108 |
|
109 | ||
|
109 | @if $dropDown { |
|
110 | @if $dropDown { |
|
110 | .open .dropdown-menu > .active { |
|
111 | .open .dropdown-menu > .active { |
|
111 | > a, > a:hover, > a:focus { |
|
112 | > a, > a:hover, > a:focus { |
|
112 | color: $colHighlight; |
|
113 | color: $colHighlight; |
|
113 | background-color: $bgHighlight; |
|
114 | background-color: $bgHighlight; |
|
114 | } |
|
115 | } |
|
115 | } |
|
116 | } |
|
116 | } |
|
117 | } |
|
117 |
|
118 | ||
|
118 | > .active { |
|
119 | > .active { |
|
119 | > a, > a:hover, > a:focus { |
|
120 | > a, > a:hover, > a:focus { |
|
120 | color: $colHighlight; |
|
121 | color: $colHighlight; |
|
121 | background-color: $bgHighlight; |
|
122 | background-color: $bgHighlight; |
|
122 | } |
|
123 | } |
|
123 | } |
|
124 | } |
|
124 |
|
125 | ||
|
125 | > .open { |
|
126 | > .open { |
|
126 | > a, > a:hover, > a:focus { |
|
127 | > a, > a:hover, > a:focus { |
|
127 | color: $colHighlight; |
|
128 | color: $colHighlight; |
|
128 | background-color: $bgHighlight; |
|
129 | background-color: $bgHighlight; |
|
129 | } |
|
130 | } |
|
130 | } |
|
131 | } |
|
131 | } |
|
132 | } |
|
132 |
|
133 | ||
|
133 | .navbar-toggle { |
|
134 | .navbar-toggle { |
|
134 | border-color: $bgHighlight; |
|
135 | border-color: $bgHighlight; |
|
135 |
|
136 | ||
|
136 | &:hover, &:focus { |
|
137 | &:hover, &:focus { |
|
137 | background-color: $bgHighlight; |
|
138 | background-color: $bgHighlight; |
|
138 | } |
|
139 | } |
|
139 |
|
140 | ||
|
140 | .icon-bar { |
|
141 | .icon-bar { |
|
141 | background-color: $colDefault; |
|
142 | background-color: $colDefault; |
|
142 | } |
|
143 | } |
|
143 | } |
|
144 | } |
|
144 |
|
145 | ||
|
145 | .navbar-collapse, |
|
146 | .navbar-collapse, |
|
146 | .navbar-form { |
|
147 | .navbar-form { |
|
147 | border-color: $colDefault; |
|
148 | border-color: $colDefault; |
|
148 | } |
|
149 | } |
|
149 |
|
150 | ||
|
150 | .navbar-link { |
|
151 | .navbar-link { |
|
151 | color: $colDefault; |
|
152 | color: $colDefault; |
|
152 |
|
153 | ||
|
153 | &:hover { |
|
154 | &:hover { |
|
154 | color: $colHighlight; |
|
155 | color: $colHighlight; |
|
155 | } |
|
156 | } |
|
156 | } |
|
157 | } |
|
157 | } |
|
158 | } |
|
158 |
|
159 | ||
|
159 |
|
160 | ||
|
160 | @media (max-width: 767px) { |
|
161 | @media (max-width: 767px) { |
|
161 | .navbar-default .navbar-nav .open .dropdown-menu { |
|
162 | .navbar-default .navbar-nav .open .dropdown-menu { |
|
162 | > li > a { |
|
163 | > li > a { |
|
163 | color: $colDefault; |
|
164 | color: $colDefault; |
|
164 |
|
165 | ||
|
165 | &:hover, &:focus { |
|
166 | &:hover, &:focus { |
|
166 | color: $colHighlight; |
|
167 | color: $colHighlight; |
|
167 | } |
|
168 | } |
|
168 | } |
|
169 | } |
|
169 |
|
170 | ||
|
170 | > .active { |
|
171 | > .active { |
|
171 | > a, > a:hover, > a:focus { |
|
172 | > a, > a:hover, > a:focus { |
|
172 | color: $colHighlight; |
|
173 | color: $colHighlight; |
|
173 | background-color: $bgHighlight; |
|
174 | background-color: $bgHighlight; |
|
174 | } |
|
175 | } |
|
175 | } |
|
176 | } |
|
176 | } |
|
177 | } |
|
177 | } |
|
178 | } |
|
178 |
|
179 | ||
|
179 | */ |
|
180 | */ |
|
180 | .secondnavbar { |
|
181 | .secondnavbar { |
|
181 | top: 50px; |
|
182 | top: 50px; |
|
182 | } |
|
183 | } |
|
183 |
|
184 | ||
|
184 | // --------------- bootstrap file upload ---------------------- |
|
185 | // --------------- bootstrap file upload ---------------------- |
|
185 | .btn-file { |
|
186 | .btn-file { |
|
186 | position: relative; |
|
187 | position: relative; |
|
187 | overflow: hidden; |
|
188 | overflow: hidden; |
|
188 | } |
|
189 | } |
|
189 |
|
190 | ||
|
190 | .btn-file input[type=file] { |
|
191 | .btn-file input[type=file] { |
|
191 | position: absolute; |
|
192 | position: absolute; |
|
192 | top: 0; |
|
193 | top: 0; |
|
193 | right: 0; |
|
194 | right: 0; |
|
194 | min-width: 100%; |
|
195 | min-width: 100%; |
|
195 | min-height: 100%; |
|
196 | min-height: 100%; |
|
196 | font-size: 100px; |
|
197 | font-size: 100px; |
|
197 | text-align: right; |
|
198 | text-align: right; |
|
198 | filter: alpha(opacity = 0); |
|
199 | filter: alpha(opacity = 0); |
|
199 | opacity: 0; |
|
200 | opacity: 0; |
|
200 | outline: none; |
|
201 | outline: none; |
|
201 | background: white; |
|
202 | background: white; |
|
202 | cursor: inherit; |
|
203 | cursor: inherit; |
|
203 | display: block; |
|
204 | display: block; |
|
204 | } |
|
205 | } |
|
205 |
|
206 | ||
|
206 | body { |
|
207 | body { |
|
207 | background: white image-url("topbg.jpg") repeat-x top center; |
|
208 | background: white image-url("topbg.jpg") repeat-x top center; |
|
208 |
|
209 | ||
|
209 | //font-size: 13px |
|
210 | //font-size: 13px |
|
210 | //font-family: Tahoma, "sans-serif" |
|
211 | //font-family: Tahoma, "sans-serif" |
|
211 | margin: 10px; |
|
212 | margin: 10px; |
|
212 | padding: 10px; |
|
213 | padding: 10px; |
|
213 | padding-top: 60px; |
|
214 | padding-top: 60px; |
|
214 | } |
|
215 | } |
|
215 |
|
216 | ||
|
216 | // ------------------ bootstrap sortable -------------------- |
|
217 | // ------------------ bootstrap sortable -------------------- |
|
217 | table.sortable th { |
|
218 | table.sortable th { |
|
218 | padding-right: 20px !important; |
|
219 | padding-right: 20px !important; |
|
219 |
|
220 | ||
|
220 | span.sign { |
|
221 | span.sign { |
|
221 | right: (-15px) !important; |
|
222 | right: (-15px) !important; |
|
222 | } |
|
223 | } |
|
223 |
|
224 | ||
|
224 | &.text-right { |
|
225 | &.text-right { |
|
225 | padding-left: 20px !important; |
|
226 | padding-left: 20px !important; |
|
226 | padding-right: 8px !important; |
|
227 | padding-right: 8px !important; |
|
227 |
|
228 | ||
|
228 | &:after, span.sign { |
|
229 | &:after, span.sign { |
|
229 | left: (-15px) !important; |
|
230 | left: (-15px) !important; |
|
230 | } |
|
231 | } |
|
231 | } |
|
232 | } |
|
232 | } |
|
233 | } |
|
233 |
|
234 | ||
|
234 | input { |
|
235 | input { |
|
235 | font-family: Tahoma, "sans-serif"; |
|
236 | font-family: Tahoma, "sans-serif"; |
|
236 | } |
|
237 | } |
|
237 |
|
238 | ||
|
238 | h1 { |
|
239 | h1 { |
|
239 | font-size: 24px; |
|
240 | font-size: 24px; |
|
240 | color: #334488; |
|
241 | color: #334488; |
|
241 | line-height: 2em; |
|
242 | line-height: 2em; |
|
242 | } |
|
243 | } |
|
243 |
|
244 | ||
|
244 | h2 { |
|
245 | h2 { |
|
245 | font-size: 18px; |
|
246 | font-size: 18px; |
|
246 | color: #5566bb; |
|
247 | color: #5566bb; |
|
247 | line-height: 1.5em; |
|
248 | line-height: 1.5em; |
|
248 | } |
|
249 | } |
|
249 |
|
250 | ||
|
250 | hr { |
|
251 | hr { |
|
251 | border-top: 1px solid #dddddd; |
|
252 | border-top: 1px solid #dddddd; |
|
252 | border-bottom: 1px solid #eeeeee; |
|
253 | border-bottom: 1px solid #eeeeee; |
|
253 | } |
|
254 | } |
|
254 |
|
255 | ||
|
255 | //#a |
|
256 | //#a |
|
256 | // color: #6666cc |
|
257 | // color: #6666cc |
|
257 | // text-decoration: none |
|
258 | // text-decoration: none |
|
258 | // |
|
259 | // |
|
259 | // &:link, &:visited |
|
260 | // &:link, &:visited |
|
260 | // color: #6666cc |
|
261 | // color: #6666cc |
|
261 | // text-decoration: none |
|
262 | // text-decoration: none |
|
262 | // |
|
263 | // |
|
263 | // &:hover, &:focus |
|
264 | // &:hover, &:focus |
|
264 | // color: #111166 |
|
265 | // color: #111166 |
|
265 | // text-decoration: none |
|
266 | // text-decoration: none |
|
266 |
|
267 | ||
|
267 | div { |
|
268 | div { |
|
268 | &.userbar { |
|
269 | &.userbar { |
|
269 | line-height: 1.5em; |
|
270 | line-height: 1.5em; |
|
270 | text-align: right; |
|
271 | text-align: right; |
|
271 | font-size: 12px; |
|
272 | font-size: 12px; |
|
272 | } |
|
273 | } |
|
273 |
|
274 | ||
|
274 | &.title { |
|
275 | &.title { |
|
275 | padding: 10px 0px; |
|
276 | padding: 10px 0px; |
|
276 | line-height: 1.5em; |
|
277 | line-height: 1.5em; |
|
277 | font-size: 13px; |
|
278 | font-size: 13px; |
|
278 |
|
279 | ||
|
279 | span.contest-over-msg { |
|
280 | span.contest-over-msg { |
|
280 | font-size: 15px; |
|
281 | font-size: 15px; |
|
281 | color: red; |
|
282 | color: red; |
|
282 | } |
|
283 | } |
|
283 |
|
284 | ||
|
284 | table { |
|
285 | table { |
|
285 | width: 100%; |
|
286 | width: 100%; |
|
286 | font-weight: bold; |
|
287 | font-weight: bold; |
|
287 | } |
|
288 | } |
|
288 |
|
289 | ||
|
289 | td { |
|
290 | td { |
|
290 | &.left-col { |
|
291 | &.left-col { |
|
291 | text-align: left; |
|
292 | text-align: left; |
|
292 | vertical-align: top; |
|
293 | vertical-align: top; |
|
293 | color: #444444; |
|
294 | color: #444444; |
|
294 | } |
|
295 | } |
|
295 |
|
296 | ||
|
296 | &.right-col { |
|
297 | &.right-col { |
|
297 | text-align: right; |
|
298 | text-align: right; |
|
298 | vertical-align: top; |
|
299 | vertical-align: top; |
|
299 | font-size: 18px; |
|
300 | font-size: 18px; |
|
300 | color: #116699; |
|
301 | color: #116699; |
|
301 | } |
|
302 | } |
|
302 | } |
|
303 | } |
|
303 | } |
|
304 | } |
|
304 | } |
|
305 | } |
|
305 |
|
306 | ||
|
306 | table.info { |
|
307 | table.info { |
|
307 | margin: 10px 0; |
|
308 | margin: 10px 0; |
|
308 | border: 1px solid #666666; |
|
309 | border: 1px solid #666666; |
|
309 | border-collapse: collapse; |
|
310 | border-collapse: collapse; |
|
310 | font-size: 12px; |
|
311 | font-size: 12px; |
|
311 |
|
312 | ||
|
312 | th { |
|
313 | th { |
|
313 | border: 1px solid #666666; |
|
314 | border: 1px solid #666666; |
|
314 | line-height: 1.5em; |
|
315 | line-height: 1.5em; |
|
315 | padding: 0 0.5em; |
|
316 | padding: 0 0.5em; |
|
316 | } |
|
317 | } |
|
317 |
|
318 | ||
|
318 | td { |
|
319 | td { |
|
319 | border-left: 1px solid #666666; |
|
320 | border-left: 1px solid #666666; |
|
320 | border-right: 1px solid #666666; |
|
321 | border-right: 1px solid #666666; |
|
321 | line-height: 1.5em; |
|
322 | line-height: 1.5em; |
|
322 | padding: 0 0.5em; |
|
323 | padding: 0 0.5em; |
|
323 | } |
|
324 | } |
|
324 | } |
|
325 | } |
|
325 |
|
326 | ||
|
326 | tr { |
|
327 | tr { |
|
327 | &.info-head { |
|
328 | &.info-head { |
|
328 | background: #777777; |
|
329 | background: #777777; |
|
329 | color: white; |
|
330 | color: white; |
|
330 | } |
|
331 | } |
|
331 |
|
332 | ||
|
332 | &.info-odd { |
|
333 | &.info-odd { |
|
333 | background: #eeeeee; |
|
334 | background: #eeeeee; |
|
334 | } |
|
335 | } |
|
335 |
|
336 | ||
|
336 | &.info-even { |
|
337 | &.info-even { |
|
337 | background: #fcfcfc; |
|
338 | background: #fcfcfc; |
|
338 | } |
|
339 | } |
|
339 | } |
|
340 | } |
|
340 |
|
341 | ||
|
341 | @mixin basicbox { |
|
342 | @mixin basicbox { |
|
342 | background: #eeeeff; |
|
343 | background: #eeeeff; |
|
343 | border: 1px dotted #99aaee; |
|
344 | border: 1px dotted #99aaee; |
|
344 | padding: 5px; |
|
345 | padding: 5px; |
|
345 | margin: 10px 0px; |
|
346 | margin: 10px 0px; |
|
346 | color: black; |
|
347 | color: black; |
|
347 | font-size: 13px; |
|
348 | font-size: 13px; |
|
348 | } |
|
349 | } |
|
349 |
|
350 | ||
|
350 | .infobox { |
|
351 | .infobox { |
|
351 | @include basicbox; |
|
352 | @include basicbox; |
|
352 | } |
|
353 | } |
|
353 |
|
354 | ||
|
354 | .submitbox { |
|
355 | .submitbox { |
|
355 | @include basicbox; |
|
356 | @include basicbox; |
|
356 | } |
|
357 | } |
|
357 |
|
358 | ||
|
358 | .errorExplanation { |
|
359 | .errorExplanation { |
|
359 | border: 1px dotted gray; |
|
360 | border: 1px dotted gray; |
|
360 | color: #bb2222; |
|
361 | color: #bb2222; |
|
361 | padding: 5px 15px 5px 15px; |
|
362 | padding: 5px 15px 5px 15px; |
|
362 | margin-bottom: 5px; |
|
363 | margin-bottom: 5px; |
|
363 | background-color: white; |
|
364 | background-color: white; |
|
364 | font-weight: normal; |
|
365 | font-weight: normal; |
|
365 |
|
366 | ||
|
366 | h2 { |
|
367 | h2 { |
|
367 | color: #cc1111; |
|
368 | color: #cc1111; |
|
368 | font-weight: bold; |
|
369 | font-weight: bold; |
|
369 | } |
|
370 | } |
|
370 | } |
|
371 | } |
|
371 |
|
372 | ||
|
372 | table.uinfo { |
|
373 | table.uinfo { |
|
373 | border-collapse: collapse; |
|
374 | border-collapse: collapse; |
|
374 | border: 1px solid black; |
|
375 | border: 1px solid black; |
|
375 | font-size: 13px; |
|
376 | font-size: 13px; |
|
376 | } |
|
377 | } |
|
377 |
|
378 | ||
|
378 | td.uinfo { |
|
379 | td.uinfo { |
|
379 | vertical-align: top; |
|
380 | vertical-align: top; |
|
380 | border: 1px solid black; |
|
381 | border: 1px solid black; |
|
381 | padding: 5px; |
|
382 | padding: 5px; |
|
382 | } |
|
383 | } |
|
383 |
|
384 | ||
|
384 | th.uinfo { |
|
385 | th.uinfo { |
|
385 | background: lightgreen; |
|
386 | background: lightgreen; |
|
386 | vertical-align: top; |
|
387 | vertical-align: top; |
|
387 | text-align: right; |
|
388 | text-align: right; |
|
388 | border: 1px solid black; |
|
389 | border: 1px solid black; |
|
389 | padding: 5px; |
|
390 | padding: 5px; |
|
390 | } |
|
391 | } |
|
391 |
|
392 | ||
|
392 | div { |
|
393 | div { |
|
393 | &.compilermsgbody { |
|
394 | &.compilermsgbody { |
|
394 | font-family: monospace; |
|
395 | font-family: monospace; |
|
395 | } |
|
396 | } |
|
396 |
|
397 | ||
|
397 | &.task-menu { |
|
398 | &.task-menu { |
|
398 | text-align: center; |
|
399 | text-align: center; |
|
399 | font-size: 13px; |
|
400 | font-size: 13px; |
|
400 | line-height: 1.75em; |
|
401 | line-height: 1.75em; |
|
401 | font-weight: bold; |
|
402 | font-weight: bold; |
|
402 | border-top: 1px dashed gray; |
|
403 | border-top: 1px dashed gray; |
|
403 | border-bottom: 1px dashed gray; |
|
404 | border-bottom: 1px dashed gray; |
|
404 | margin-top: 2px; |
|
405 | margin-top: 2px; |
|
405 | margin-bottom: 4px; |
|
406 | margin-bottom: 4px; |
|
406 | } |
|
407 | } |
|
407 | } |
|
408 | } |
|
408 |
|
409 | ||
|
409 | table.taskdesc { |
|
410 | table.taskdesc { |
|
410 | border: 2px solid #dddddd; |
|
411 | border: 2px solid #dddddd; |
|
411 | border-collapse: collapse; |
|
412 | border-collapse: collapse; |
|
412 | margin: 10px auto; |
|
413 | margin: 10px auto; |
|
413 | width: 90%; |
|
414 | width: 90%; |
|
414 | font-size: 13px; |
|
415 | font-size: 13px; |
|
415 |
|
416 | ||
|
416 | p { |
|
417 | p { |
|
417 | font-size: 13px; |
|
418 | font-size: 13px; |
|
418 | } |
|
419 | } |
|
419 |
|
420 | ||
|
420 | tr.name { |
|
421 | tr.name { |
|
421 | border: 2px solid #dddddd; |
|
422 | border: 2px solid #dddddd; |
|
422 | background: #dddddd; |
|
423 | background: #dddddd; |
|
423 | color: #333333; |
|
424 | color: #333333; |
|
424 | font-weight: bold; |
|
425 | font-weight: bold; |
|
425 | font-size: 14px; |
|
426 | font-size: 14px; |
|
426 | line-height: 1.5em; |
|
427 | line-height: 1.5em; |
@@ -1,116 +1,116 | |||||
|
1 | class AnnouncementsController < ApplicationController |
|
1 | class AnnouncementsController < ApplicationController |
|
2 |
|
2 | ||
|
3 | before_action :admin_authorization |
|
3 | before_action :admin_authorization |
|
4 |
|
4 | ||
|
5 | in_place_edit_for :announcement, :published |
|
5 | in_place_edit_for :announcement, :published |
|
6 |
|
6 | ||
|
7 | # GET /announcements |
|
7 | # GET /announcements |
|
8 | # GET /announcements.xml |
|
8 | # GET /announcements.xml |
|
9 | def index |
|
9 | def index |
|
10 | @announcements = Announcement.order(created_at: :desc) |
|
10 | @announcements = Announcement.order(created_at: :desc) |
|
11 |
|
11 | ||
|
12 | respond_to do |format| |
|
12 | respond_to do |format| |
|
13 | format.html # index.html.erb |
|
13 | format.html # index.html.erb |
|
14 | format.xml { render :xml => @announcements } |
|
14 | format.xml { render :xml => @announcements } |
|
15 | end |
|
15 | end |
|
16 | end |
|
16 | end |
|
17 |
|
17 | ||
|
18 | # GET /announcements/1 |
|
18 | # GET /announcements/1 |
|
19 | # GET /announcements/1.xml |
|
19 | # GET /announcements/1.xml |
|
20 | def show |
|
20 | def show |
|
21 | @announcement = Announcement.find(params[:id]) |
|
21 | @announcement = Announcement.find(params[:id]) |
|
22 |
|
22 | ||
|
23 | respond_to do |format| |
|
23 | respond_to do |format| |
|
24 | format.html # show.html.erb |
|
24 | format.html # show.html.erb |
|
25 | format.xml { render :xml => @announcement } |
|
25 | format.xml { render :xml => @announcement } |
|
26 | end |
|
26 | end |
|
27 | end |
|
27 | end |
|
28 |
|
28 | ||
|
29 | # GET /announcements/new |
|
29 | # GET /announcements/new |
|
30 | # GET /announcements/new.xml |
|
30 | # GET /announcements/new.xml |
|
31 | def new |
|
31 | def new |
|
32 | @announcement = Announcement.new |
|
32 | @announcement = Announcement.new |
|
33 |
|
33 | ||
|
34 | respond_to do |format| |
|
34 | respond_to do |format| |
|
35 | format.html # new.html.erb |
|
35 | format.html # new.html.erb |
|
36 | format.xml { render :xml => @announcement } |
|
36 | format.xml { render :xml => @announcement } |
|
37 | end |
|
37 | end |
|
38 | end |
|
38 | end |
|
39 |
|
39 | ||
|
40 | # GET /announcements/1/edit |
|
40 | # GET /announcements/1/edit |
|
41 | def edit |
|
41 | def edit |
|
42 | @announcement = Announcement.find(params[:id]) |
|
42 | @announcement = Announcement.find(params[:id]) |
|
43 | end |
|
43 | end |
|
44 |
|
44 | ||
|
45 | # POST /announcements |
|
45 | # POST /announcements |
|
46 | # POST /announcements.xml |
|
46 | # POST /announcements.xml |
|
47 | def create |
|
47 | def create |
|
48 | @announcement = Announcement.new(announcement_params) |
|
48 | @announcement = Announcement.new(announcement_params) |
|
49 |
|
49 | ||
|
50 | respond_to do |format| |
|
50 | respond_to do |format| |
|
51 | if @announcement.save |
|
51 | if @announcement.save |
|
52 | flash[:notice] = 'Announcement was successfully created.' |
|
52 | flash[:notice] = 'Announcement was successfully created.' |
|
53 | format.html { redirect_to(@announcement) } |
|
53 | format.html { redirect_to(@announcement) } |
|
54 | format.xml { render :xml => @announcement, :status => :created, :location => @announcement } |
|
54 | format.xml { render :xml => @announcement, :status => :created, :location => @announcement } |
|
55 | else |
|
55 | else |
|
56 | format.html { render :action => "new" } |
|
56 | format.html { render :action => "new" } |
|
57 | format.xml { render :xml => @announcement.errors, :status => :unprocessable_entity } |
|
57 | format.xml { render :xml => @announcement.errors, :status => :unprocessable_entity } |
|
58 | end |
|
58 | end |
|
59 | end |
|
59 | end |
|
60 | end |
|
60 | end |
|
61 |
|
61 | ||
|
62 | # PUT /announcements/1 |
|
62 | # PUT /announcements/1 |
|
63 | # PUT /announcements/1.xml |
|
63 | # PUT /announcements/1.xml |
|
64 | def update |
|
64 | def update |
|
65 | @announcement = Announcement.find(params[:id]) |
|
65 | @announcement = Announcement.find(params[:id]) |
|
66 |
|
66 | ||
|
67 | respond_to do |format| |
|
67 | respond_to do |format| |
|
68 |
- if @announcement.update |
|
68 | + if @announcement.update(announcement_params) |
|
69 | flash[:notice] = 'Announcement was successfully updated.' |
|
69 | flash[:notice] = 'Announcement was successfully updated.' |
|
70 | format.html { redirect_to(@announcement) } |
|
70 | format.html { redirect_to(@announcement) } |
|
71 | format.js {} |
|
71 | format.js {} |
|
72 | format.xml { head :ok } |
|
72 | format.xml { head :ok } |
|
73 | else |
|
73 | else |
|
74 | format.html { render :action => "edit" } |
|
74 | format.html { render :action => "edit" } |
|
75 | format.js {} |
|
75 | format.js {} |
|
76 | format.xml { render :xml => @announcement.errors, :status => :unprocessable_entity } |
|
76 | format.xml { render :xml => @announcement.errors, :status => :unprocessable_entity } |
|
77 | end |
|
77 | end |
|
78 | end |
|
78 | end |
|
79 | end |
|
79 | end |
|
80 |
|
80 | ||
|
81 | def toggle |
|
81 | def toggle |
|
82 | @announcement = Announcement.find(params[:id]) |
|
82 | @announcement = Announcement.find(params[:id]) |
|
83 |
- @announcement.update |
|
83 | + @announcement.update( published: !@announcement.published? ) |
|
84 | respond_to do |format| |
|
84 | respond_to do |format| |
|
85 | format.js { render partial: 'toggle_button', |
|
85 | format.js { render partial: 'toggle_button', |
|
86 | locals: {button_id: "#announcement_toggle_#{@announcement.id}",button_on: @announcement.published? } } |
|
86 | locals: {button_id: "#announcement_toggle_#{@announcement.id}",button_on: @announcement.published? } } |
|
87 | end |
|
87 | end |
|
88 | end |
|
88 | end |
|
89 |
|
89 | ||
|
90 | def toggle_front |
|
90 | def toggle_front |
|
91 | @announcement = Announcement.find(params[:id]) |
|
91 | @announcement = Announcement.find(params[:id]) |
|
92 | @announcement.update_attributes( frontpage: !@announcement.frontpage? ) |
|
92 | @announcement.update_attributes( frontpage: !@announcement.frontpage? ) |
|
93 | respond_to do |format| |
|
93 | respond_to do |format| |
|
94 | format.js { render partial: 'toggle_button', |
|
94 | format.js { render partial: 'toggle_button', |
|
95 | locals: {button_id: "#announcement_toggle_front_#{@announcement.id}",button_on: @announcement.frontpage? } } |
|
95 | locals: {button_id: "#announcement_toggle_front_#{@announcement.id}",button_on: @announcement.frontpage? } } |
|
96 | end |
|
96 | end |
|
97 | end |
|
97 | end |
|
98 |
|
98 | ||
|
99 | # DELETE /announcements/1 |
|
99 | # DELETE /announcements/1 |
|
100 | # DELETE /announcements/1.xml |
|
100 | # DELETE /announcements/1.xml |
|
101 | def destroy |
|
101 | def destroy |
|
102 | @announcement = Announcement.find(params[:id]) |
|
102 | @announcement = Announcement.find(params[:id]) |
|
103 | @announcement.destroy |
|
103 | @announcement.destroy |
|
104 |
|
104 | ||
|
105 | respond_to do |format| |
|
105 | respond_to do |format| |
|
106 | format.html { redirect_to(announcements_url) } |
|
106 | format.html { redirect_to(announcements_url) } |
|
107 | format.xml { head :ok } |
|
107 | format.xml { head :ok } |
|
108 | end |
|
108 | end |
|
109 | end |
|
109 | end |
|
110 |
|
110 | ||
|
111 | private |
|
111 | private |
|
112 |
|
112 | ||
|
113 | def announcement_params |
|
113 | def announcement_params |
|
114 | params.require(:announcement).permit(:author, :body, :published, :frontpage, :contest_only, :title, :on_nav_bar) |
|
114 | params.require(:announcement).permit(:author, :body, :published, :frontpage, :contest_only, :title, :on_nav_bar) |
|
115 | end |
|
115 | end |
|
116 | end |
|
116 | end |
@@ -1,82 +1,87 | |||||
|
1 | %header |
|
1 | %header |
|
2 | %nav.navbar.fixed-top.navbar-dark.bg-primary.navbar-expand-lg |
|
2 | %nav.navbar.fixed-top.navbar-dark.bg-primary.navbar-expand-lg |
|
3 | .container-fluid |
|
3 | .container-fluid |
|
4 | %a.navbar-brand{href: list_main_path} |
|
4 | %a.navbar-brand{href: list_main_path} |
|
5 | %span.glyphicon.glyphicon-home |
|
5 | %span.glyphicon.glyphicon-home |
|
6 | MAIN |
|
6 | MAIN |
|
7 | %button.navbar-toggler.collapsed{ type: :button, 'data-bs': {toggle: 'collapse', target: '#navbar-collapse'} } |
|
7 | %button.navbar-toggler.collapsed{ type: :button, 'data-bs': {toggle: 'collapse', target: '#navbar-collapse'} } |
|
8 | %span.navbar-toggler-icon |
|
8 | %span.navbar-toggler-icon |
|
9 | .collapse.navbar-collapse#navbar-collapse |
|
9 | .collapse.navbar-collapse#navbar-collapse |
|
10 | %ul.navbar-nav.me-auto.mb-2.mb-lg-0 |
|
10 | %ul.navbar-nav.me-auto.mb-2.mb-lg-0 |
|
11 | / submission |
|
11 | / submission |
|
12 | - if (@current_user!=nil) and (GraderConfiguration.show_tasks_to?(@current_user)) |
|
12 | - if (@current_user!=nil) and (GraderConfiguration.show_tasks_to?(@current_user)) |
|
13 | %li.nav-item.dropdown |
|
13 | %li.nav-item.dropdown |
|
14 | %a.nav-link.dropdown-toggle{href: '#', 'data-bs': {toggle:'dropdown'}, aria: {expanded:"false"}, role: "button"} |
|
14 | %a.nav-link.dropdown-toggle{href: '#', 'data-bs': {toggle:'dropdown'}, aria: {expanded:"false"}, role: "button"} |
|
15 | = "#{I18n.t 'menu.submissions'}" |
|
15 | = "#{I18n.t 'menu.submissions'}" |
|
16 | %ul.dropdown-menu |
|
16 | %ul.dropdown-menu |
|
17 | %li= link_to 'View', submissions_path, class:'dropdown-item' |
|
17 | %li= link_to 'View', submissions_path, class:'dropdown-item' |
|
18 | %li= link_to 'Self Test', test_index_path, class:'dropdown-item' |
|
18 | %li= link_to 'Self Test', test_index_path, class:'dropdown-item' |
|
19 | / hall of fame |
|
19 | / hall of fame |
|
20 | - if GraderConfiguration['right.user_hall_of_fame'] |
|
20 | - if GraderConfiguration['right.user_hall_of_fame'] |
|
21 | = add_menu("#{I18n.t 'menu.hall_of_fame'}", 'report', 'problem_hof', class: 'nav-item') |
|
21 | = add_menu("#{I18n.t 'menu.hall_of_fame'}", 'report', 'problem_hof', class: 'nav-item') |
|
22 | / display MODE button (with countdown in contest mode) |
|
22 | / display MODE button (with countdown in contest mode) |
|
23 | - if GraderConfiguration.analysis_mode? |
|
23 | - if GraderConfiguration.analysis_mode? |
|
24 | %div.navbar-btn.btn.btn-success#countdown= "ANALYSIS MODE" |
|
24 | %div.navbar-btn.btn.btn-success#countdown= "ANALYSIS MODE" |
|
25 | - elsif GraderConfiguration.time_limit_mode? |
|
25 | - elsif GraderConfiguration.time_limit_mode? |
|
26 | - if @current_user.contest_finished? |
|
26 | - if @current_user.contest_finished? |
|
27 | %div.navbar-btn.btn.btn-danger#countdown= "Contest is over" |
|
27 | %div.navbar-btn.btn.btn-danger#countdown= "Contest is over" |
|
28 | - elsif !@current_user.contest_started? |
|
28 | - elsif !@current_user.contest_started? |
|
29 | %div.navbar-btn.btn.btn-primary#countdown= (t 'title_bar.contest_not_started') |
|
29 | %div.navbar-btn.btn.btn-primary#countdown= (t 'title_bar.contest_not_started') |
|
30 | - else |
|
30 | - else |
|
31 | %div.navbar-btn.btn.btn-primary#countdown asdf |
|
31 | %div.navbar-btn.btn.btn-primary#countdown asdf |
|
32 | :javascript |
|
32 | :javascript |
|
33 | $("#countdown").countdown({until: "+#{@current_user.contest_time_left.to_i}s", layout: 'Time left: {hnn}:{mnn}:{snn}'}); |
|
33 | $("#countdown").countdown({until: "+#{@current_user.contest_time_left.to_i}s", layout: 'Time left: {hnn}:{mnn}:{snn}'}); |
|
34 | / admin section |
|
34 | / admin section |
|
35 | - if (@current_user!=nil) and (session[:admin]) |
|
35 | - if (@current_user!=nil) and (session[:admin]) |
|
36 | / management |
|
36 | / management |
|
37 | %li.nav-item.dropdown |
|
37 | %li.nav-item.dropdown |
|
38 | %a.nav-link.dropdown-toggle{href: '#', 'data-bs': {toggle:'dropdown'}, aria: {haspopup:"true", expanded:"false"}, role: "button"} |
|
38 | %a.nav-link.dropdown-toggle{href: '#', 'data-bs': {toggle:'dropdown'}, aria: {haspopup:"true", expanded:"false"}, role: "button"} |
|
39 | Manage |
|
39 | Manage |
|
40 | %ul.dropdown-menu |
|
40 | %ul.dropdown-menu |
|
41 | %li= link_to 'Announcements', announcements_path, class: 'dropdown-item' |
|
41 | %li= link_to 'Announcements', announcements_path, class: 'dropdown-item' |
|
42 | %li= link_to 'Problems', problems_path, class: 'dropdown-item' |
|
42 | %li= link_to 'Problems', problems_path, class: 'dropdown-item' |
|
43 | %li= link_to 'Tags', tags_path, class: 'dropdown-item' |
|
43 | %li= link_to 'Tags', tags_path, class: 'dropdown-item' |
|
44 | %li= link_to 'Users', user_admin_index_path, class: 'dropdown-item' |
|
44 | %li= link_to 'Users', user_admin_index_path, class: 'dropdown-item' |
|
45 | %li= link_to 'User Groups', groups_path, class: 'dropdown-item' |
|
45 | %li= link_to 'User Groups', groups_path, class: 'dropdown-item' |
|
46 | %li= link_to 'Graders', graders_list_path, class: 'dropdown-item' |
|
46 | %li= link_to 'Graders', graders_list_path, class: 'dropdown-item' |
|
47 | %li= link_to 'Message ', console_messages_path, class: 'dropdown-item' |
|
47 | %li= link_to 'Message ', console_messages_path, class: 'dropdown-item' |
|
48 | %li |
|
48 | %li |
|
49 | %hr.dropdown-divider |
|
49 | %hr.dropdown-divider |
|
50 | %li= link_to 'System config', grader_configuration_index_path, class: 'dropdown-item' |
|
50 | %li= link_to 'System config', grader_configuration_index_path, class: 'dropdown-item' |
|
51 | %li |
|
51 | %li |
|
52 | %hr.dropdown-divider |
|
52 | %hr.dropdown-divider |
|
53 | %li= link_to 'Sites', sites_path, class: 'dropdown-item' |
|
53 | %li= link_to 'Sites', sites_path, class: 'dropdown-item' |
|
54 | %li= link_to 'Contests', contest_management_index_path, class: 'dropdown-item' |
|
54 | %li= link_to 'Contests', contest_management_index_path, class: 'dropdown-item' |
|
55 | -# |
|
55 | -# |
|
56 | / report |
|
56 | / report |
|
57 | %li.nav-item.dropdown |
|
57 | %li.nav-item.dropdown |
|
58 | %a.nav-link.dropdown-toggle{href: '#', 'data-bs': {toggle:'dropdown'}, aria: {haspopup:"true", expanded:"false"}, role: "button"} |
|
58 | %a.nav-link.dropdown-toggle{href: '#', 'data-bs': {toggle:'dropdown'}, aria: {haspopup:"true", expanded:"false"}, role: "button"} |
|
59 | Report |
|
59 | Report |
|
60 | %ul.dropdown-menu |
|
60 | %ul.dropdown-menu |
|
61 | %li= link_to 'Current Score', current_score_report_path, class: 'dropdown-item' |
|
61 | %li= link_to 'Current Score', current_score_report_path, class: 'dropdown-item' |
|
62 | %li= link_to 'Score Report', max_score_report_path, class: 'dropdown-item' |
|
62 | %li= link_to 'Score Report', max_score_report_path, class: 'dropdown-item' |
|
63 | %li= link_to 'Submission Report', submission_report_path, class: 'dropdown-item' |
|
63 | %li= link_to 'Submission Report', submission_report_path, class: 'dropdown-item' |
|
64 | %li= link_to 'Login Report', login_report_path, class: 'dropdown-item' |
|
64 | %li= link_to 'Login Report', login_report_path, class: 'dropdown-item' |
|
65 | - if (ungraded = Submission.where('graded_at is null').where('submitted_at < ?', 1.minutes.ago).count) > 0 |
|
65 | - if (ungraded = Submission.where('graded_at is null').where('submitted_at < ?', 1.minutes.ago).count) > 0 |
|
66 | =link_to "#{ungraded} backlogs!", |
|
66 | =link_to "#{ungraded} backlogs!", |
|
67 | graders_list_path, |
|
67 | graders_list_path, |
|
68 | class: 'navbar-btn btn btn-default btn-warning', data: {toggle: 'tooltip'},title: 'Number of ungraded submission' |
|
68 | class: 'navbar-btn btn btn-default btn-warning', data: {toggle: 'tooltip'},title: 'Number of ungraded submission' |
|
69 | / announcement |
|
69 | / announcement |
|
70 | - @nav_announcement.each do |ann| |
|
70 | - @nav_announcement.each do |ann| |
|
71 | %p.navbar-text |
|
71 | %p.navbar-text |
|
72 | = ann.body.html_safe |
|
72 | = ann.body.html_safe |
|
73 | - |
|
73 | + %ul.navbar-nav |
|
74 | - |
|
74 | + %li.nav-item |
|
75 | - |
|
75 | + %a.nav-link{href: help_main_path} |
|
76 | - %ul.nav.navbar-nav.navbar-right |
|
76 | + %span.mi.md-18 help |
|
77 | - = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-question-sign')}".html_safe, 'main', 'help') |
|
77 | + %li.nav-item |
|
78 | - = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-comment')}".html_safe, 'messages', 'index', {title: I18n.t('menu.messages'), data: {toggle: 'tooltip'}}) |
|
78 | + %a.nav-link{href: messages_path} |
|
79 | - - if GraderConfiguration['system.user_setting_enabled'] |
|
79 | + %span.mi.md-18 chat |
|
80 | - = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-cog', id: 'user_profile')}".html_safe, 'users', 'profile', {title: I18n.t('menu.settings'), data: {toggle: 'tooltip'}}) |
|
80 | + - if GraderConfiguration['system.user_setting_enabled'] |
|
81 | - = add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-log-out')} #{@current_user.full_name}".html_safe, 'main', 'login', {title: I18n.t('menu.log_out'), data: {toggle: 'tooltip'}}) |
|
81 | + %li.nav-item |
|
82 | - |
|
82 | + %a.nav-link{href: profile_users_path} |
|
|
83 | + %span.mi.md-18 settings | ||
|
|
84 | + %li.nav-item | ||
|
|
85 | + %a.nav-link{href: login_main_path} | ||
|
|
86 | + %span.mi.md-18 exit_to_app | ||
|
|
87 | + = @current_user.full_name |
@@ -1,15 +1,26 | |||||
|
1 | - %li.list-group-item |
|
1 | + .card-body |
|
2 | - %strong |
|
2 | + .card-title |
|
3 | = announcement.title |
|
3 | = announcement.title |
|
4 | - - if @current_user and @current_user.admin? |
|
4 | + - if @current_user and @current_user.admin? |
|
5 | - = link_to 'Edit', edit_announcement_path(announcement), class: 'btn btn-xs btn-default' |
|
5 | + = link_to 'Edit', edit_announcement_path(announcement), class: 'btn btn-xs btn-default' |
|
6 | - %small= "(updated #{time_ago_in_words(announcement.updated_at)} ago on #{announcement.updated_at})" |
|
6 | + .card-subtitle |
|
|
7 | + = "(updated #{time_ago_in_words(announcement.updated_at)} ago on #{announcement.updated_at})" | ||
|
|
8 | + .card-text | ||
|
|
9 | + = markdown(announcement.body) | ||
|
|
10 | + | ||
|
7 |
|
11 | ||
|
8 | - %br |
|
12 | + -# |
|
9 | - = markdown(announcement.body) |
|
13 | + %li.list-group-item |
|
10 | - :javascript |
|
14 | + %strong |
|
11 | - Announcement.updateRecentId(#{announcement.id}); |
|
15 | + - if @current_user and @current_user.admin? |
|
12 | - - if (defined? announcement_effect) and announcement_effect |
|
16 | + = link_to 'Edit', edit_announcement_path(announcement), class: 'btn btn-xs btn-default' |
|
|
17 | + %small= "(updated #{time_ago_in_words(announcement.updated_at)} ago on #{announcement.updated_at})" | ||
|
|
18 | + | ||
|
|
19 | + %br | ||
|
|
20 | + = markdown(announcement.body) | ||
|
13 | :javascript |
|
21 | :javascript |
|
14 | - $("announcement-#{announcement.id}").blindDown({duration: 0.2}); |
|
22 | + Announcement.updateRecentId(#{announcement.id}); |
|
15 | - $("announcement-#{announcement.id}").appear({duration: 0.5, queue: 'end'}); |
|
23 | + - if (defined? announcement_effect) and announcement_effect |
|
|
24 | + :javascript | ||
|
|
25 | + $("announcement-#{announcement.id}").blindDown({duration: 0.2}); | ||
|
|
26 | + $("announcement-#{announcement.id}").appear({duration: 0.5, queue: 'end'}); |
@@ -1,68 +1,68 | |||||
|
1 | - content_for :head do |
|
1 | - content_for :head do |
|
2 | = javascript_include_tag "announcement_refresh" |
|
2 | = javascript_include_tag "announcement_refresh" |
|
3 |
|
3 | ||
|
4 | = user_title_bar(@user) |
|
4 | = user_title_bar(@user) |
|
5 | - if @user.section |
|
5 | - if @user.section |
|
6 | passcode for CP Unofficial Logo voting is |
|
6 | passcode for CP Unofficial Logo voting is |
|
7 | %strong= @user.section |
|
7 | %strong= @user.section |
|
8 | %br |
|
8 | %br |
|
9 |
|
9 | ||
|
10 | - if (GraderConfiguration.contest_mode?) and (@user.site!=nil) and (@user.site.started!=true) |
|
10 | - if (GraderConfiguration.contest_mode?) and (@user.site!=nil) and (@user.site.started!=true) |
|
11 | %p=t 'main.start_soon' |
|
11 | %p=t 'main.start_soon' |
|
12 |
|
12 | ||
|
13 | .row |
|
13 | .row |
|
14 | .col-md-7 |
|
14 | .col-md-7 |
|
15 | - if GraderConfiguration.show_submitbox_to?(@user) |
|
15 | - if GraderConfiguration.show_submitbox_to?(@user) |
|
16 | .panel.panel-primary |
|
16 | .panel.panel-primary |
|
17 | .panel-heading |
|
17 | .panel-heading |
|
18 | Submission |
|
18 | Submission |
|
19 | .panel-body |
|
19 | .panel-body |
|
20 | = render :partial => 'submission_box' |
|
20 | = render :partial => 'submission_box' |
|
21 | - if GraderConfiguration.show_tasks_to?(@user) |
|
21 | - if GraderConfiguration.show_tasks_to?(@user) |
|
22 | - if not GraderConfiguration.multicontests? |
|
22 | - if not GraderConfiguration.multicontests? |
|
23 | %table.table.table-striped.table-condensed |
|
23 | %table.table.table-striped.table-condensed |
|
24 | %thead |
|
24 | %thead |
|
25 | %tr |
|
25 | %tr |
|
26 | %th Task name |
|
26 | %th Task name |
|
27 | %th Full name |
|
27 | %th Full name |
|
28 | %th # of sub(s) |
|
28 | %th # of sub(s) |
|
29 | %th Results |
|
29 | %th Results |
|
30 | %th |
|
30 | %th |
|
31 | %tbody |
|
31 | %tbody |
|
32 | = render :partial => 'problem', :collection => @problems |
|
32 | = render :partial => 'problem', :collection => @problems |
|
33 | - else |
|
33 | - else |
|
34 | - @contest_problems.each do |cp| |
|
34 | - @contest_problems.each do |cp| |
|
35 | - if cp[:problems].length > 0 |
|
35 | - if cp[:problems].length > 0 |
|
36 | %h2{:class =>'contest-title'} |
|
36 | %h2{:class =>'contest-title'} |
|
37 | = "#{cp[:contest] ? cp[:contest].title : 'Public problems'}" |
|
37 | = "#{cp[:contest] ? cp[:contest].title : 'Public problems'}" |
|
38 | %table.info |
|
38 | %table.info |
|
39 | %tr.info-head |
|
39 | %tr.info-head |
|
40 | %th Task name |
|
40 | %th Task name |
|
41 | %th Full name |
|
41 | %th Full name |
|
42 | %th # of sub(s) |
|
42 | %th # of sub(s) |
|
43 | %th Results |
|
43 | %th Results |
|
44 | %th |
|
44 | %th |
|
45 | = render :partial => 'problem', :collection => cp[:problems] |
|
45 | = render :partial => 'problem', :collection => cp[:problems] |
|
46 | .col-md-5 |
|
46 | .col-md-5 |
|
47 | - .panel.panel-info |
|
47 | + .card |
|
48 |
- . |
|
48 | + .card-header |
|
49 | Announcement |
|
49 | Announcement |
|
50 |
- = link_to 'Manage', announcements_path, class: 'btn btn- |
|
50 | + = link_to 'Manage', announcements_path, class: 'btn btn-small' |
|
51 | - %ul.list-group |
|
51 | + .card-body |
|
52 | = render :partial => 'announcement', :collection => @announcements |
|
52 | = render :partial => 'announcement', :collection => @announcements |
|
53 |
|
53 | ||
|
54 | %script{:type => 'text/javascript'} |
|
54 | %script{:type => 'text/javascript'} |
|
55 | = "Announcement.refreshUrl = '#{url_for :controller => 'main', :action => 'announcements'}';" |
|
55 | = "Announcement.refreshUrl = '#{url_for :controller => 'main', :action => 'announcements'}';" |
|
56 | Announcement.registerRefreshEventTimer(); |
|
56 | Announcement.registerRefreshEventTimer(); |
|
57 |
|
57 | ||
|
58 | .modal.fade#compiler{tabindex: -1,role: 'dialog'} |
|
58 | .modal.fade#compiler{tabindex: -1,role: 'dialog'} |
|
59 | .modal-dialog.modal-lg{role:'document'} |
|
59 | .modal-dialog.modal-lg{role:'document'} |
|
60 | .modal-content |
|
60 | .modal-content |
|
61 | .modal-header |
|
61 | .modal-header |
|
62 | %button.close{type: 'button', data: {dismissed: :modal}, aria: {label: 'close'}} |
|
62 | %button.close{type: 'button', data: {dismissed: :modal}, aria: {label: 'close'}} |
|
63 | %span{aria: {hidden: 'true'}, data: {dismiss: 'modal'}} × |
|
63 | %span{aria: {hidden: 'true'}, data: {dismiss: 'modal'}} × |
|
64 | %h4 Compiler message |
|
64 | %h4 Compiler message |
|
65 | .modal-body |
|
65 | .modal-body |
|
66 | %pre#compiler_msg |
|
66 | %pre#compiler_msg |
|
67 | .modal-footer |
|
67 | .modal-footer |
|
68 | %button.btn.btn-default{type: 'button', data: {dismiss: 'modal'}} Close |
|
68 | %button.btn.btn-default{type: 'button', data: {dismiss: 'modal'}} Close |
You need to be logged in to leave comments.
Login now