Description:
fix report link
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r763:b90509d73a81 - - 2 files changed: 8 inserted, 2 deleted
@@ -3,26 +3,26 | |||
|
3 | 3 | / %h1 Tasks Hall of Fame |
|
4 | 4 | / = link_to('[back to All-Time Hall of Fame]', action: 'problem_hof', id: nil ) |
|
5 | 5 | /- else |
|
6 | 6 | / %h1 All-Time Hall of Fame |
|
7 | 7 | |
|
8 | 8 | .panel.panel-info |
|
9 | 9 | .panel-heading |
|
10 | 10 | Select Task |
|
11 | 11 | .panel-body |
|
12 | 12 | .form-inline |
|
13 | 13 | = select 'report', |
|
14 | 14 | 'problem_id', |
|
15 |
- @problems.collect {|p| ["[#{p.name}] #{p.full_name}", |
|
|
16 |
- {:selected => |
|
|
15 | + @problems.collect {|p| ["[#{p.name}] #{p.full_name}", problem_hof_report_path(p.id)]}, | |
|
16 | + {:selected => problem_hof_report_path(@problem)}, | |
|
17 | 17 | { class: 'select2 form-control' } |
|
18 | 18 | %button.btn.btn-primary.btn-sm.go-button#problem_go{data: {source: "#report_problem_id"}} Go |
|
19 | 19 | |
|
20 | 20 | |
|
21 | 21 | - unless params[:id] |
|
22 | 22 | /=render partial: 'all_time_hof' |
|
23 | 23 | Please select a problem. |
|
24 | 24 | - else |
|
25 | 25 | %h1 [#{Problem.find(params[:id]).name}] #{Problem.find(params[:id]).full_name} |
|
26 | 26 | %h2 Submission History |
|
27 | 27 | =render partial: 'application/bar_graph', locals: { histogram: @histogram } |
|
28 | 28 | =render partial: 'task_hof' |
@@ -129,24 +129,30 | |||
|
129 | 129 | #delete 'user_admin/:id', to: 'user_admin#destroy', as: 'user_admin_destroy' |
|
130 | 130 | |
|
131 | 131 | #singular resource |
|
132 | 132 | #---- BEWARE ---- singular resource maps to plural controller by default, we can override by provide controller name directly |
|
133 | 133 | #report |
|
134 | 134 | resource :report, only: [], controller: 'report' do |
|
135 | 135 | get 'login' |
|
136 | 136 | get 'multiple_login' |
|
137 | 137 | get 'problem_hof/:id', action: 'problem_hof' |
|
138 | 138 | get 'current_score(/:group_id)', action: 'current_score', as: 'current_score' |
|
139 | 139 | get 'max_score' |
|
140 | 140 | post 'show_max_score' |
|
141 | + get 'problem_hof(/:id)', action: 'problem_hof', as: 'problem_hof' | |
|
142 | + get 'stuck' | |
|
143 | + get 'cheat_report' | |
|
144 | + post 'cheat_report' | |
|
145 | + get 'cheat_scruntinize' | |
|
146 | + post 'cheat_scruntinize' | |
|
141 | 147 | end |
|
142 | 148 | #get 'report/current_score', to: 'report#current_score', as: 'report_current_score' |
|
143 | 149 | #get 'report/problem_hof(/:id)', to: 'report#problem_hof', as: 'report_problem_hof' |
|
144 | 150 | #get "report/login" |
|
145 | 151 | #get 'report/max_score', to: 'report#max_score', as: 'report_max_score' |
|
146 | 152 | #post 'report/show_max_score', to: 'report#show_max_score', as: 'report_show_max_score' |
|
147 | 153 | |
|
148 | 154 | resource :main, only: [], controller: 'main' do |
|
149 | 155 | get 'login' |
|
150 | 156 | get 'logout' |
|
151 | 157 | get 'list' |
|
152 | 158 | get 'submission(/:id)', action: 'submission', as: 'main_submission' |
You need to be logged in to leave comments.
Login now