Description:
disabled unused actions from controllers, protected statuses display, more styling
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r241:ce50017c6bce - - 5 files changed: 12 inserted, 2 deleted
@@ -100,6 +100,9 | |||||
|
100 | end |
|
100 | end |
|
101 |
|
101 | ||
|
102 | def submission |
|
102 | def submission |
|
|
103 | + # protect the action for Code Jom | ||
|
|
104 | + redirect_to :action => 'list' | ||
|
|
105 | + | ||
|
103 | @user = User.find(session[:user_id]) |
|
106 | @user = User.find(session[:user_id]) |
|
104 | @problems = Problem.find_available_problems |
|
107 | @problems = Problem.find_available_problems |
|
105 | if params[:id]==nil |
|
108 | if params[:id]==nil |
@@ -1,5 +1,8 | |||||
|
1 | class StatusesController < ApplicationController |
|
1 | class StatusesController < ApplicationController |
|
2 |
|
2 | ||
|
|
3 | + # protect the statuses, for now | ||
|
|
4 | + before_filter :admin_authorization | ||
|
|
5 | + | ||
|
3 | def index |
|
6 | def index |
|
4 | problem_count = Problem.available_problem_count |
|
7 | problem_count = Problem.available_problem_count |
|
5 |
|
8 |
@@ -1,5 +1,8 | |||||
|
1 | class TestController < ApplicationController |
|
1 | class TestController < ApplicationController |
|
2 |
|
2 | ||
|
|
3 | + # this page is unavailable in Code Jom | ||
|
|
4 | + before_filter :admin_authorization | ||
|
|
5 | + | ||
|
3 | before_filter :authenticate, :check_viewability |
|
6 | before_filter :authenticate, :check_viewability |
|
4 |
|
7 | ||
|
5 | # |
|
8 | # |
@@ -1,7 +1,7 | |||||
|
1 | .problem-bar{:id => "problem-bar-#{problem.id}"} |
|
1 | .problem-bar{:id => "problem-bar-#{problem.id}"} |
|
2 | %a{:href => "#", :onclick => "$$('.problem-panel').each(function(elt) {elt.hide();}); $('problem-panel-#{problem.id}').show(); $('problem-panel-filler').hide(); return false;"} |
|
2 | %a{:href => "#", :onclick => "$$('.problem-panel').each(function(elt) {elt.hide();}); $('problem-panel-#{problem.id}').show(); $('problem-panel-filler').hide(); return false;"} |
|
3 | %span{:class => 'problem-title'} |
|
3 | %span{:class => 'problem-title'} |
|
4 |
- = "#{problem.full_name} |
|
4 | + = "#{problem.full_name}" |
|
5 | - if @prob_submissions[problem_title_counter][:count] > 0 |
|
5 | - if @prob_submissions[problem_title_counter][:count] > 0 |
|
6 | = "[#{@prob_submissions[problem_title_counter][:count]} trials(s)]" |
|
6 | = "[#{@prob_submissions[problem_title_counter][:count]} trials(s)]" |
|
7 | - else |
|
7 | - else |
@@ -21,7 +21,8 | |||||
|
21 | = render :partial => 'problem_title', :collection => @problems, :as => :problem |
|
21 | = render :partial => 'problem_title', :collection => @problems, :as => :problem |
|
22 | .problem-content |
|
22 | .problem-content |
|
23 | %span{:id => "problem-panel-filler", :style => (@current_problem_id!=nil) ? "display:none" : ""} |
|
23 | %span{:id => "problem-panel-filler", :style => (@current_problem_id!=nil) ? "display:none" : ""} |
|
24 | - %b Welcome to Code Jom |
|
24 | + %h2 |
|
|
25 | + Welcome to Code Jom | ||
|
25 | %br/ |
|
26 | %br/ |
|
26 | Choose problems from the list on the right. |
|
27 | Choose problems from the list on the right. |
|
27 | = render :partial => 'problem', :collection => @problems |
|
28 | = render :partial => 'problem', :collection => @problems |
You need to be logged in to leave comments.
Login now