Description:
bootstrap navbar
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r553:d50bf0fc7252 - - 4 files changed: 69 inserted, 54 deleted
@@ -1,306 +1,326 | |||
|
1 | + /* | |
|
2 | + * This is a manifest file that'll be compiled into application.css, which will include all the files | |
|
3 | + * listed below. | |
|
4 | + * | |
|
5 | + * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, | |
|
6 | + * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. | |
|
7 | + * | |
|
8 | + * You're free to add application-wide styles to this file and they'll appear at the bottom of the | |
|
9 | + * compiled file so the styles you add here take precedence over styles defined in any styles | |
|
10 | + * defined in the other CSS/SCSS files in this directory. It is generally better to create a new | |
|
11 | + * file per style scope. | |
|
12 | + * | |
|
13 | + *= require_tree . | |
|
14 | + *= require_self | |
|
15 | + */ | |
|
16 | + | |
|
1 | 17 | |
|
2 | 18 | @import jquery.ui.core |
|
3 | 19 | @import jquery.ui.theme |
|
4 | 20 | @import jquery.ui.datepicker |
|
5 | 21 | @import jquery.ui.slider |
|
6 | 22 | @import jquery-ui-timepicker-addon |
|
7 | 23 | @import jquery-tablesorter/theme.metro-dark |
|
8 | 24 | @import tablesorter-theme.cafe |
|
9 | 25 | |
|
10 | 26 | |
|
11 | 27 | @import "bootstrap-sprockets" |
|
12 | 28 | @import "bootstrap" |
|
13 | 29 | |
|
30 | + .secondnavbar | |
|
31 | + top: 50px | |
|
32 | + | |
|
14 | 33 | body |
|
15 | 34 | background: white image-url("topbg.jpg") repeat-x top center |
|
16 | 35 | font-size: 13px |
|
17 | 36 | font-family: Tahoma, "sans-serif" |
|
18 | 37 | margin: 10px |
|
19 | 38 | padding: 10px |
|
39 | + padding-top: 100px | |
|
20 | 40 | |
|
21 | 41 | |
|
22 | 42 | input |
|
23 | 43 | font-family: Tahoma, "sans-serif" |
|
24 | 44 | |
|
25 | 45 | |
|
26 | 46 | h1 |
|
27 | 47 | font-size: 24px |
|
28 | 48 | color: #334488 |
|
29 | 49 | line-height: 2em |
|
30 | 50 | |
|
31 | 51 | |
|
32 | 52 | h2 |
|
33 | 53 | font-size: 18px |
|
34 | 54 | color: #5566bb |
|
35 | 55 | line-height: 1.5em |
|
36 | 56 | |
|
37 | 57 | |
|
38 | 58 | hr |
|
39 | 59 | border-top: 1px solid #dddddd |
|
40 | 60 | border-bottom: 1px solid #eeeeee |
|
41 | 61 | |
|
42 | 62 | |
|
43 | 63 | a |
|
44 | 64 | color: #6666cc |
|
45 | 65 | text-decoration: none |
|
46 | 66 | |
|
47 | 67 | &:link, &:visited |
|
48 | 68 | color: #6666cc |
|
49 | 69 | text-decoration: none |
|
50 | 70 | |
|
51 | 71 | &:hover, &:focus |
|
52 | 72 | color: #111166 |
|
53 | 73 | text-decoration: none |
|
54 | 74 | |
|
55 | 75 | |
|
56 | 76 | div |
|
57 | 77 | &.userbar |
|
58 | 78 | line-height: 1.5em |
|
59 | 79 | text-align: right |
|
60 | 80 | font-size: 12px |
|
61 | 81 | |
|
62 | 82 | &.title |
|
63 | 83 | padding: 10px 0px |
|
64 | 84 | line-height: 1.5em |
|
65 | 85 | font-size: 13px |
|
66 | 86 | |
|
67 | 87 | span.contest-over-msg |
|
68 | 88 | font-size: 15px |
|
69 | 89 | color: red |
|
70 | 90 | |
|
71 | 91 | table |
|
72 | 92 | width: 100% |
|
73 | 93 | font-weight: bold |
|
74 | 94 | |
|
75 | 95 | td |
|
76 | 96 | &.left-col |
|
77 | 97 | text-align: left |
|
78 | 98 | vertical-align: top |
|
79 | 99 | color: #444444 |
|
80 | 100 | |
|
81 | 101 | &.right-col |
|
82 | 102 | text-align: right |
|
83 | 103 | vertical-align: top |
|
84 | 104 | font-size: 18px |
|
85 | 105 | color: #116699 |
|
86 | 106 | |
|
87 | 107 | |
|
88 | 108 | table.info |
|
89 | 109 | margin: 10px 0 |
|
90 | 110 | border: 1px solid #666666 |
|
91 | 111 | border-collapse: collapse |
|
92 | 112 | font-size: 12px |
|
93 | 113 | |
|
94 | 114 | th |
|
95 | 115 | border: 1px solid #666666 |
|
96 | 116 | line-height: 1.5em |
|
97 | 117 | padding: 0 0.5em |
|
98 | 118 | |
|
99 | 119 | td |
|
100 | 120 | border-left: 1px solid #666666 |
|
101 | 121 | border-right: 1px solid #666666 |
|
102 | 122 | line-height: 1.5em |
|
103 | 123 | padding: 0 0.5em |
|
104 | 124 | |
|
105 | 125 | |
|
106 | 126 | tr |
|
107 | 127 | &.info-head |
|
108 | 128 | background: #777777 |
|
109 | 129 | color: white |
|
110 | 130 | |
|
111 | 131 | &.info-odd |
|
112 | 132 | background: #eeeeee |
|
113 | 133 | |
|
114 | 134 | &.info-even |
|
115 | 135 | background: #fcfcfc |
|
116 | 136 | |
|
117 | 137 | =basicbox |
|
118 | 138 | background: #eeeeff |
|
119 | 139 | border: 1px dotted #99aaee |
|
120 | 140 | padding: 5px |
|
121 | 141 | margin: 10px 0px |
|
122 | 142 | color: black |
|
123 | 143 | font-size: 13px |
|
124 | 144 | |
|
125 | 145 | .infobox |
|
126 | 146 | +basicbox |
|
127 | 147 | |
|
128 | 148 | .submitbox |
|
129 | 149 | +basicbox |
|
130 | 150 | |
|
131 | 151 | .errorExplanation |
|
132 | 152 | border: 1px dotted gray |
|
133 | 153 | color: #bb2222 |
|
134 | 154 | padding: 5px 15px 5px 15px |
|
135 | 155 | margin-bottom: 5px |
|
136 | 156 | background-color: white |
|
137 | 157 | font-weight: normal |
|
138 | 158 | |
|
139 | 159 | h2 |
|
140 | 160 | color: #cc1111 |
|
141 | 161 | font-weight: bold |
|
142 | 162 | |
|
143 | 163 | |
|
144 | 164 | table.uinfo |
|
145 | 165 | border-collapse: collapse |
|
146 | 166 | border: 1px solid black |
|
147 | 167 | font-size: 13px |
|
148 | 168 | |
|
149 | 169 | |
|
150 | 170 | td.uinfo |
|
151 | 171 | vertical-align: top |
|
152 | 172 | border: 1px solid black |
|
153 | 173 | padding: 5px |
|
154 | 174 | |
|
155 | 175 | |
|
156 | 176 | th.uinfo |
|
157 | 177 | background: lightgreen |
|
158 | 178 | vertical-align: top |
|
159 | 179 | text-align: right |
|
160 | 180 | border: 1px solid black |
|
161 | 181 | padding: 5px |
|
162 | 182 | |
|
163 | 183 | |
|
164 | 184 | div |
|
165 | 185 | &.compilermsgbody |
|
166 | 186 | font-family: monospace |
|
167 | 187 | |
|
168 | 188 | &.task-menu |
|
169 | 189 | text-align: center |
|
170 | 190 | font-size: 13px |
|
171 | 191 | line-height: 1.75em |
|
172 | 192 | font-weight: bold |
|
173 | 193 | border-top: 1px dashed gray |
|
174 | 194 | border-bottom: 1px dashed gray |
|
175 | 195 | margin-top: 2px |
|
176 | 196 | margin-bottom: 4px |
|
177 | 197 | |
|
178 | 198 | |
|
179 | 199 | table.taskdesc |
|
180 | 200 | border: 2px solid #dddddd |
|
181 | 201 | border-collapse: collapse |
|
182 | 202 | margin: 10px auto |
|
183 | 203 | width: 90% |
|
184 | 204 | font-size: 13px |
|
185 | 205 | |
|
186 | 206 | p |
|
187 | 207 | font-size: 13px |
|
188 | 208 | |
|
189 | 209 | tr.name |
|
190 | 210 | border: 2px solid #dddddd |
|
191 | 211 | background: #dddddd |
|
192 | 212 | color: #333333 |
|
193 | 213 | font-weight: bold |
|
194 | 214 | font-size: 14px |
|
195 | 215 | line-height: 1.5em |
|
196 | 216 | text-align: center |
|
197 | 217 | |
|
198 | 218 | td |
|
199 | 219 | &.desc-odd |
|
200 | 220 | padding: 5px |
|
201 | 221 | padding-left: 20px |
|
202 | 222 | background: #fefeee |
|
203 | 223 | |
|
204 | 224 | &.desc-even |
|
205 | 225 | padding: 5px |
|
206 | 226 | padding-left: 20px |
|
207 | 227 | background: #feeefe |
|
208 | 228 | |
|
209 | 229 | |
|
210 | 230 | .announcementbox |
|
211 | 231 | margin: 10px 0px |
|
212 | 232 | background: #bbddee |
|
213 | 233 | padding: 1px |
|
214 | 234 | |
|
215 | 235 | span.title |
|
216 | 236 | font-weight: bold |
|
217 | 237 | color: #224455 |
|
218 | 238 | padding-left: 10px |
|
219 | 239 | line-height: 1.6em |
|
220 | 240 | |
|
221 | 241 | .announcement |
|
222 | 242 | margin: 2px |
|
223 | 243 | background: white |
|
224 | 244 | padding: 1px |
|
225 | 245 | padding-left: 10px |
|
226 | 246 | padding-right: 10px |
|
227 | 247 | padding-top: 5px |
|
228 | 248 | padding-bottom: 5px |
|
229 | 249 | |
|
230 | 250 | |
|
231 | 251 | .announcement p |
|
232 | 252 | font-size: 12px |
|
233 | 253 | margin: 2px |
|
234 | 254 | |
|
235 | 255 | |
|
236 | 256 | .pub-info |
|
237 | 257 | text-align: right |
|
238 | 258 | font-style: italic |
|
239 | 259 | font-size: 9px |
|
240 | 260 | |
|
241 | 261 | p |
|
242 | 262 | text-align: right |
|
243 | 263 | font-style: italic |
|
244 | 264 | font-size: 9px |
|
245 | 265 | |
|
246 | 266 | |
|
247 | 267 | .announcement |
|
248 | 268 | .toggles |
|
249 | 269 | font-weight: normal |
|
250 | 270 | float: right |
|
251 | 271 | font-size: 80% |
|
252 | 272 | |
|
253 | 273 | .announcement-title |
|
254 | 274 | font-weight: bold |
|
255 | 275 | |
|
256 | 276 | |
|
257 | 277 | div |
|
258 | 278 | &.message |
|
259 | 279 | margin: 10px 0 0 |
|
260 | 280 | |
|
261 | 281 | div |
|
262 | 282 | &.message |
|
263 | 283 | margin: 0 0 0 30px |
|
264 | 284 | |
|
265 | 285 | &.body |
|
266 | 286 | border: 2px solid #dddddd |
|
267 | 287 | background: #fff8f8 |
|
268 | 288 | padding-left: 5px |
|
269 | 289 | |
|
270 | 290 | &.reply-body |
|
271 | 291 | border: 2px solid #bbbbbb |
|
272 | 292 | background: #fffff8 |
|
273 | 293 | padding-left: 5px |
|
274 | 294 | |
|
275 | 295 | &.stat |
|
276 | 296 | font-size: 10px |
|
277 | 297 | line-height: 1.75em |
|
278 | 298 | padding: 0 5px |
|
279 | 299 | color: #333333 |
|
280 | 300 | background: #dddddd |
|
281 | 301 | font-weight: bold |
|
282 | 302 | |
|
283 | 303 | &.message div.stat |
|
284 | 304 | font-size: 10px |
|
285 | 305 | line-height: 1.75em |
|
286 | 306 | padding: 0 5px |
|
287 | 307 | color: #444444 |
|
288 | 308 | background: #bbbbbb |
|
289 | 309 | font-weight: bold |
|
290 | 310 | |
|
291 | 311 | &.contest-title |
|
292 | 312 | color: white |
|
293 | 313 | text-align: center |
|
294 | 314 | line-height: 2em |
|
295 | 315 | |
|
296 | 316 | &.registration-desc, &.test-desc |
|
297 | 317 | border: 1px dotted gray |
|
298 | 318 | background: #f5f5f5 |
|
299 | 319 | padding: 5px |
|
300 | 320 | margin: 10px 0 |
|
301 | 321 | font-size: 12px |
|
302 | 322 | line-height: 1.5em |
|
303 | 323 | |
|
304 | 324 | h2.contest-title |
|
305 | 325 | margin-top: 5px |
|
306 | 326 | margin-bottom: 5px |
@@ -1,138 +1,170 | |||
|
1 | 1 | # Methods added to this helper will be available to all templates in the application. |
|
2 | 2 | module ApplicationHelper |
|
3 | 3 | |
|
4 | + def navbar_user_header | |
|
5 | + left_menu = '' | |
|
6 | + right_menu = '' | |
|
7 | + user = User.find(session[:user_id]) | |
|
8 | + | |
|
9 | + if (user!=nil) and (GraderConfiguration.show_tasks_to?(user)) | |
|
10 | + left_menu << add_menu("#{I18n.t 'menu.tasks'}", 'tasks', 'list') | |
|
11 | + left_menu << add_menu("#{I18n.t 'menu.submissions'}", 'main', 'submission') | |
|
12 | + left_menu << add_menu("#{I18n.t 'menu.test'}", 'test', 'index') | |
|
13 | + end | |
|
14 | + | |
|
15 | + if GraderConfiguration['right.user_hall_of_fame'] | |
|
16 | + left_menu << add_menu("#{I18n.t 'menu.hall_of_fame'}", 'report', 'problem_hof') | |
|
17 | + end | |
|
18 | + left_menu << add_menu("#{I18n.t 'menu.help'}", 'main', 'help') | |
|
19 | + | |
|
20 | + | |
|
21 | + right_menu << add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-comment')} #{I18n.t 'menu.messages'}".html_safe, 'messages', 'list') | |
|
22 | + if GraderConfiguration['system.user_setting_enabled'] | |
|
23 | + right_menu << add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-cog')} #{I18n.t 'menu.settings'}".html_safe, 'users', 'index') | |
|
24 | + end | |
|
25 | + right_menu << add_menu("#{content_tag(:span,'',class: 'glyphicon glyphicon-log-out')} #{I18n.t 'menu.log_out'}".html_safe, 'main', 'login',) | |
|
26 | + | |
|
27 | + result = content_tag(:ul,left_menu.html_safe,class: 'nav navbar-nav') + content_tag(:ul,right_menu.html_safe,class: 'nav navbar-nav navbar-right') | |
|
28 | + end | |
|
29 | + | |
|
30 | + def add_menu(title, controller, action,html_option = {}) | |
|
31 | + link_option = {controller: controller, action: action} | |
|
32 | + html_option[:class] = (html_option[:class] || '') + " active" if current_page?(link_option) | |
|
33 | + content_tag(:li, link_to(title,link_option),html_option) | |
|
34 | + end | |
|
35 | + | |
|
4 | 36 | def user_header |
|
5 | 37 | menu_items = '' |
|
6 | 38 | user = User.find(session[:user_id]) |
|
7 | 39 | |
|
8 | 40 | if (user!=nil) and (session[:admin]) |
|
9 | 41 | # admin menu |
|
10 | 42 | menu_items << "<b>Administrative task:</b> " |
|
11 | 43 | append_to menu_items, '[Announcements]', 'announcements', 'index' |
|
12 | 44 | append_to menu_items, '[Msg console]', 'messages', 'console' |
|
13 | 45 | append_to menu_items, '[Problems]', 'problems', 'index' |
|
14 | 46 | append_to menu_items, '[Users]', 'user_admin', 'index' |
|
15 | 47 | append_to menu_items, '[Results]', 'user_admin', 'user_stat' |
|
16 | 48 | append_to menu_items, '[Report]', 'report', 'multiple_login' |
|
17 | 49 | append_to menu_items, '[Graders]', 'graders', 'list' |
|
18 | 50 | append_to menu_items, '[Contests]', 'contest_management', 'index' |
|
19 | 51 | append_to menu_items, '[Sites]', 'sites', 'index' |
|
20 | 52 | append_to menu_items, '[System config]', 'configurations', 'index' |
|
21 | 53 | menu_items << "<br/>" |
|
22 | 54 | end |
|
23 | 55 | |
|
24 | 56 | # main page |
|
25 | 57 | append_to menu_items, "[#{I18n.t 'menu.main'}]", 'main', 'list' |
|
26 | 58 | append_to menu_items, "[#{I18n.t 'menu.messages'}]", 'messages', 'list' |
|
27 | 59 | |
|
28 | 60 | if (user!=nil) and (GraderConfiguration.show_tasks_to?(user)) |
|
29 | 61 | append_to menu_items, "[#{I18n.t 'menu.tasks'}]", 'tasks', 'list' |
|
30 | 62 | append_to menu_items, "[#{I18n.t 'menu.submissions'}]", 'main', 'submission' |
|
31 | 63 | append_to menu_items, "[#{I18n.t 'menu.test'}]", 'test', 'index' |
|
32 | 64 | end |
|
33 | 65 | |
|
34 | 66 | if GraderConfiguration['right.user_hall_of_fame'] |
|
35 | 67 | append_to menu_items, "[#{I18n.t 'menu.hall_of_fame'}]", 'report', 'problem_hof' |
|
36 | 68 | end |
|
37 | 69 | append_to menu_items, "[#{I18n.t 'menu.help'}]", 'main', 'help' |
|
38 | 70 | |
|
39 | 71 | if GraderConfiguration['system.user_setting_enabled'] |
|
40 | 72 | append_to menu_items, "[#{I18n.t 'menu.settings'}]", 'users', 'index' |
|
41 | 73 | end |
|
42 | 74 | append_to menu_items, "[#{I18n.t 'menu.log_out'}]", 'main', 'login' |
|
43 | 75 | |
|
44 | 76 | menu_items.html_safe |
|
45 | 77 | end |
|
46 | 78 | |
|
47 | 79 | def append_to(option,label, controller, action) |
|
48 | 80 | option << ' ' if option!='' |
|
49 | 81 | option << link_to_unless_current(label, |
|
50 | 82 | :controller => controller, |
|
51 | 83 | :action => action) |
|
52 | 84 | end |
|
53 | 85 | |
|
54 | 86 | def format_short_time(time) |
|
55 | 87 | now = Time.now.gmtime |
|
56 | 88 | st = '' |
|
57 | 89 | if (time.yday != now.yday) or |
|
58 | 90 | (time.year != now.year) |
|
59 | 91 | st = time.strftime("%x ") |
|
60 | 92 | end |
|
61 | 93 | st + time.strftime("%X") |
|
62 | 94 | end |
|
63 | 95 | |
|
64 | 96 | def format_short_duration(duration) |
|
65 | 97 | return '' if duration==nil |
|
66 | 98 | d = duration.to_f |
|
67 | 99 | return Time.at(d).gmtime.strftime("%X") |
|
68 | 100 | end |
|
69 | 101 | |
|
70 | 102 | def read_textfile(fname,max_size=2048) |
|
71 | 103 | begin |
|
72 | 104 | File.open(fname).read(max_size) |
|
73 | 105 | rescue |
|
74 | 106 | nil |
|
75 | 107 | end |
|
76 | 108 | end |
|
77 | 109 | |
|
78 | 110 | def user_title_bar(user) |
|
79 | 111 | header = '' |
|
80 | 112 | time_left = '' |
|
81 | 113 | |
|
82 | 114 | # |
|
83 | 115 | # if the contest is over |
|
84 | 116 | if GraderConfiguration.time_limit_mode? |
|
85 | 117 | if user.contest_finished? |
|
86 | 118 | header = <<CONTEST_OVER |
|
87 | 119 | <tr><td colspan="2" align="center"> |
|
88 | 120 | <span class="contest-over-msg">THE CONTEST IS OVER</span> |
|
89 | 121 | </td></tr> |
|
90 | 122 | CONTEST_OVER |
|
91 | 123 | end |
|
92 | 124 | if !user.contest_started? |
|
93 | 125 | time_left = " " + (t 'title_bar.contest_not_started') |
|
94 | 126 | else |
|
95 | 127 | time_left = " " + (t 'title_bar.remaining_time') + |
|
96 | 128 | " #{format_short_duration(user.contest_time_left)}" |
|
97 | 129 | end |
|
98 | 130 | end |
|
99 | 131 | |
|
100 | 132 | # |
|
101 | 133 | # if the contest is in the anaysis mode |
|
102 | 134 | if GraderConfiguration.analysis_mode? |
|
103 | 135 | header = <<ANALYSISMODE |
|
104 | 136 | <tr><td colspan="2" align="center"> |
|
105 | 137 | <span class="contest-over-msg">ANALYSIS MODE</span> |
|
106 | 138 | </td></tr> |
|
107 | 139 | ANALYSISMODE |
|
108 | 140 | end |
|
109 | 141 | |
|
110 | 142 | contest_name = GraderConfiguration['contest.name'] |
|
111 | 143 | |
|
112 | 144 | # |
|
113 | 145 | # build real title bar |
|
114 | 146 | result = <<TITLEBAR |
|
115 | 147 | <div class="title"> |
|
116 | 148 | <table> |
|
117 | 149 | #{header} |
|
118 | 150 | <tr> |
|
119 | 151 | <td class="left-col"> |
|
120 | 152 | #{user.full_name}<br/> |
|
121 | 153 | #{t 'title_bar.current_time'} #{format_short_time(Time.zone.now)} |
|
122 | 154 | #{time_left} |
|
123 | 155 | <br/> |
|
124 | 156 | </td> |
|
125 | 157 | <td class="right-col">#{contest_name}</td> |
|
126 | 158 | </tr> |
|
127 | 159 | </table> |
|
128 | 160 | </div> |
|
129 | 161 | TITLEBAR |
|
130 | 162 | result.html_safe |
|
131 | 163 | end |
|
132 | 164 | |
|
133 | 165 | def markdown(text) |
|
134 | 166 | markdown = RDiscount.new(text) |
|
135 | 167 | markdown.to_html.html_safe |
|
136 | 168 | end |
|
137 | 169 | |
|
138 | 170 | end |
@@ -1,18 +1,30 | |||
|
1 | 1 | <!DOCTYPE html> |
|
2 | 2 | %html |
|
3 | 3 | %head |
|
4 | 4 | %title= GraderConfiguration['contest.name'] |
|
5 | 5 | = stylesheet_link_tag "application", :media => "all" |
|
6 | 6 | = javascript_include_tag "application" |
|
7 | 7 | = csrf_meta_tags |
|
8 | 8 | = content_for :header |
|
9 | 9 | = yield :head |
|
10 | 10 | |
|
11 | 11 | %body |
|
12 | + %nav.navbar.navbar-default.navbar-fixed-top | |
|
13 | + .container-fluid | |
|
14 | + .navbar-header | |
|
15 | + %a.navbar-brand{href: main_list_path} ΰΈ«ΰΈΰΉΰΈ²ΰΈ«ΰΈ₯ΰΈ±ΰΈ | |
|
16 | + .collapse.navbar-collapse | |
|
17 | + = navbar_user_header #call helper function | |
|
18 | + %nav.navbar.navbar-default.navbar-fixed-top.navbar-inverse.secondnavbar | |
|
19 | + .container-fluid | |
|
20 | + .collapse.navbar-collapse | |
|
21 | + %ul.nav.navbar-nav | |
|
22 | + %li | |
|
23 | + %a{href:'#'}hahaha | |
|
12 | 24 | |
|
13 | 25 | %div.userbar |
|
14 | 26 | = user_header |
|
15 | 27 | |
|
16 | 28 | = content_tag(:p,flash[:notice],:style => "color:green") if flash[:notice]!=nil |
|
17 | 29 | = yield |
|
18 | 30 |
@@ -1,74 +1,25 | |||
|
1 | 1 | CafeGrader::Application.routes.draw do |
|
2 | + root :to => 'main#login' | |
|
3 | + | |
|
2 | 4 | get "report/login" |
|
3 | 5 | |
|
4 | 6 | resources :contests |
|
5 | 7 | |
|
6 | 8 | resources :announcements |
|
7 | 9 | resources :sites |
|
8 | 10 | |
|
9 | 11 | resources :grader_configuration, controller: 'configurations' |
|
10 | 12 | |
|
11 | - # The priority is based upon order of creation: | |
|
12 | - # first created -> highest priority. | |
|
13 | - | |
|
14 | - # Sample of regular route: | |
|
15 | - # match 'products/:id' => 'catalog#view' | |
|
16 | - # Keep in mind you can assign values other than :controller and :action | |
|
17 | - | |
|
18 | - # Sample of named route: | |
|
19 | - # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase | |
|
20 | - # This route can be invoked with purchase_url(:id => product.id) | |
|
21 | - | |
|
22 | - # Sample resource route (maps HTTP verbs to controller actions automatically): | |
|
23 | - # resources :products | |
|
24 | - | |
|
25 | - # Sample resource route with options: | |
|
26 | - # resources :products do | |
|
27 | - # member do | |
|
28 | - # get 'short' | |
|
29 | - # post 'toggle' | |
|
30 | - # end | |
|
31 | - # | |
|
32 | - # collection do | |
|
33 | - # get 'sold' | |
|
34 | - # end | |
|
35 | - # end | |
|
36 | - | |
|
37 | - # Sample resource route with sub-resources: | |
|
38 | - # resources :products do | |
|
39 | - # resources :comments, :sales | |
|
40 | - # resource :seller | |
|
41 | - # end | |
|
42 | - | |
|
43 | - # Sample resource route with more complex sub-resources | |
|
44 | - # resources :products do | |
|
45 | - # resources :comments | |
|
46 | - # resources :sales do | |
|
47 | - # get 'recent', :on => :collection | |
|
48 | - # end | |
|
49 | - # end | |
|
50 | - | |
|
51 | - # Sample resource route within a namespace: | |
|
52 | - # namespace :admin do | |
|
53 | - # # Directs /admin/products/* to Admin::ProductsController | |
|
54 | - # # (app/controllers/admin/products_controller.rb) | |
|
55 | - # resources :products | |
|
56 | - # end | |
|
57 | - | |
|
58 | - # You can have the root of your site routed with "root" | |
|
59 | - # just remember to delete public/index.html. | |
|
60 | - # root :to => 'welcome#index' | |
|
61 | - | |
|
62 | - root :to => 'main#login' | |
|
63 | - | |
|
64 | 13 | match 'tasks/view/:file.:ext' => 'tasks#view' |
|
65 | 14 | match 'tasks/download/:id/:file.:ext' => 'tasks#download' |
|
15 | + match 'heartbeat/:id/edit' => 'heartbeat#edit' | |
|
66 | 16 | |
|
67 | - match 'heartbeat/:id/edit' => 'heartbeat#edit' | |
|
17 | + #main | |
|
18 | + get "main/list" | |
|
68 | 19 | |
|
69 | 20 | # See how all your routes lay out with "rake routes" |
|
70 | 21 | |
|
71 | 22 | # This is a legacy wild controller route that's not recommended for RESTful applications. |
|
72 | 23 | # Note: This route will make all actions in every controller accessible via GET requests. |
|
73 | 24 | match ':controller(/:action(/:id))(.:format)' |
|
74 | 25 | end |
You need to be logged in to leave comments.
Login now