Description:
add best_in_place
tidy up route
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r474:24d67ab56dc2 - - 7 files changed: 32 inserted, 4 deleted
@@ -1,60 +1,63 | |||||
|
1 | source 'https://rubygems.org' |
|
1 | source 'https://rubygems.org' |
|
2 |
|
2 | ||
|
3 | gem 'rails', '3.2.19' |
|
3 | gem 'rails', '3.2.19' |
|
4 |
|
4 | ||
|
5 | # Bundle edge Rails instead: |
|
5 | # Bundle edge Rails instead: |
|
6 | # gem 'rails', :git => 'git://github.com/rails/rails.git' |
|
6 | # gem 'rails', :git => 'git://github.com/rails/rails.git' |
|
7 |
|
7 | ||
|
8 | gem 'mysql2' |
|
8 | gem 'mysql2' |
|
9 |
|
9 | ||
|
10 | # Gems used only for assets and not required |
|
10 | # Gems used only for assets and not required |
|
11 | # in production environments by default. |
|
11 | # in production environments by default. |
|
12 | group :assets do |
|
12 | group :assets do |
|
13 | gem 'sass-rails', '~> 3.2.3' |
|
13 | gem 'sass-rails', '~> 3.2.3' |
|
14 | gem 'coffee-rails', '~> 3.2.1' |
|
14 | gem 'coffee-rails', '~> 3.2.1' |
|
15 |
|
15 | ||
|
16 | # See https://github.com/sstephenson/execjs#readme for more supported runtimes |
|
16 | # See https://github.com/sstephenson/execjs#readme for more supported runtimes |
|
17 | # gem 'therubyracer', :platforms => :ruby |
|
17 | # gem 'therubyracer', :platforms => :ruby |
|
18 |
|
18 | ||
|
19 | gem 'uglifier', '>= 1.0.3' |
|
19 | gem 'uglifier', '>= 1.0.3' |
|
20 | end |
|
20 | end |
|
21 |
|
21 | ||
|
22 | gem 'prototype-rails' |
|
22 | gem 'prototype-rails' |
|
23 |
|
23 | ||
|
24 | # To use ActiveModel has_secure_password |
|
24 | # To use ActiveModel has_secure_password |
|
25 | # gem 'bcrypt-ruby', '~> 3.0.0' |
|
25 | # gem 'bcrypt-ruby', '~> 3.0.0' |
|
26 |
|
26 | ||
|
27 | # To use Jbuilder templates for JSON |
|
27 | # To use Jbuilder templates for JSON |
|
28 | # gem 'jbuilder' |
|
28 | # gem 'jbuilder' |
|
29 |
|
29 | ||
|
30 | # Use unicorn as the app server |
|
30 | # Use unicorn as the app server |
|
31 | # gem 'unicorn' |
|
31 | # gem 'unicorn' |
|
32 |
|
32 | ||
|
33 | # Deploy with Capistrano |
|
33 | # Deploy with Capistrano |
|
34 | # gem 'capistrano' |
|
34 | # gem 'capistrano' |
|
35 |
|
35 | ||
|
36 | # To use debugger |
|
36 | # To use debugger |
|
37 | # gem 'debugger' |
|
37 | # gem 'debugger' |
|
38 | # |
|
38 | # |
|
39 |
|
39 | ||
|
|
40 | + #in-place editor | ||
|
|
41 | + gem 'best_in_place', '~> 3.0.1' | ||
|
|
42 | + | ||
|
40 | # jquery addition |
|
43 | # jquery addition |
|
41 | gem 'jquery-rails' |
|
44 | gem 'jquery-rails' |
|
42 | gem 'jquery-ui-sass-rails' |
|
45 | gem 'jquery-ui-sass-rails' |
|
43 | gem 'jquery-timepicker-addon-rails' |
|
46 | gem 'jquery-timepicker-addon-rails' |
|
44 | gem 'jquery-tablesorter' |
|
47 | gem 'jquery-tablesorter' |
|
45 |
|
48 | ||
|
46 | #syntax highlighter |
|
49 | #syntax highlighter |
|
47 | gem 'rouge' |
|
50 | gem 'rouge' |
|
48 |
|
51 | ||
|
49 | gem "haml" |
|
52 | gem "haml" |
|
50 | gem "mail" |
|
53 | gem "mail" |
|
51 | gem "rdiscount" |
|
54 | gem "rdiscount" |
|
52 | gem "test-unit" |
|
55 | gem "test-unit" |
|
53 | gem 'will_paginate', '~> 3.0.0' |
|
56 | gem 'will_paginate', '~> 3.0.0' |
|
54 | gem 'dynamic_form' |
|
57 | gem 'dynamic_form' |
|
55 | gem 'in_place_editing' |
|
58 | gem 'in_place_editing' |
|
56 | gem 'verification', :git => 'git://github.com/sikachu/verification.git' |
|
59 | gem 'verification', :git => 'git://github.com/sikachu/verification.git' |
|
57 |
|
60 | ||
|
58 | group :test, :development do |
|
61 | group :test, :development do |
|
59 | gem "rspec-rails", "~> 2.0" |
|
62 | gem "rspec-rails", "~> 2.0" |
|
60 | end |
|
63 | end |
@@ -1,87 +1,90 | |||||
|
1 | GIT |
|
1 | GIT |
|
2 | remote: git://github.com/sikachu/verification.git |
|
2 | remote: git://github.com/sikachu/verification.git |
|
3 | revision: 76eaf51b13276ecae54bd9cd115832595d2ff56d |
|
3 | revision: 76eaf51b13276ecae54bd9cd115832595d2ff56d |
|
4 | specs: |
|
4 | specs: |
|
5 | verification (1.0.3) |
|
5 | verification (1.0.3) |
|
6 | actionpack (>= 3.0.0, < 5.0) |
|
6 | actionpack (>= 3.0.0, < 5.0) |
|
7 | activesupport (>= 3.0.0, < 5.0) |
|
7 | activesupport (>= 3.0.0, < 5.0) |
|
8 |
|
8 | ||
|
9 | GEM |
|
9 | GEM |
|
10 | remote: https://rubygems.org/ |
|
10 | remote: https://rubygems.org/ |
|
11 | specs: |
|
11 | specs: |
|
12 | actionmailer (3.2.19) |
|
12 | actionmailer (3.2.19) |
|
13 | actionpack (= 3.2.19) |
|
13 | actionpack (= 3.2.19) |
|
14 | mail (~> 2.5.4) |
|
14 | mail (~> 2.5.4) |
|
15 | actionpack (3.2.19) |
|
15 | actionpack (3.2.19) |
|
16 | activemodel (= 3.2.19) |
|
16 | activemodel (= 3.2.19) |
|
17 | activesupport (= 3.2.19) |
|
17 | activesupport (= 3.2.19) |
|
18 | builder (~> 3.0.0) |
|
18 | builder (~> 3.0.0) |
|
19 | erubis (~> 2.7.0) |
|
19 | erubis (~> 2.7.0) |
|
20 | journey (~> 1.0.4) |
|
20 | journey (~> 1.0.4) |
|
21 | rack (~> 1.4.5) |
|
21 | rack (~> 1.4.5) |
|
22 | rack-cache (~> 1.2) |
|
22 | rack-cache (~> 1.2) |
|
23 | rack-test (~> 0.6.1) |
|
23 | rack-test (~> 0.6.1) |
|
24 | sprockets (~> 2.2.1) |
|
24 | sprockets (~> 2.2.1) |
|
25 | activemodel (3.2.19) |
|
25 | activemodel (3.2.19) |
|
26 | activesupport (= 3.2.19) |
|
26 | activesupport (= 3.2.19) |
|
27 | builder (~> 3.0.0) |
|
27 | builder (~> 3.0.0) |
|
28 | activerecord (3.2.19) |
|
28 | activerecord (3.2.19) |
|
29 | activemodel (= 3.2.19) |
|
29 | activemodel (= 3.2.19) |
|
30 | activesupport (= 3.2.19) |
|
30 | activesupport (= 3.2.19) |
|
31 | arel (~> 3.0.2) |
|
31 | arel (~> 3.0.2) |
|
32 | tzinfo (~> 0.3.29) |
|
32 | tzinfo (~> 0.3.29) |
|
33 | activeresource (3.2.19) |
|
33 | activeresource (3.2.19) |
|
34 | activemodel (= 3.2.19) |
|
34 | activemodel (= 3.2.19) |
|
35 | activesupport (= 3.2.19) |
|
35 | activesupport (= 3.2.19) |
|
36 | activesupport (3.2.19) |
|
36 | activesupport (3.2.19) |
|
37 | i18n (~> 0.6, >= 0.6.4) |
|
37 | i18n (~> 0.6, >= 0.6.4) |
|
38 | multi_json (~> 1.0) |
|
38 | multi_json (~> 1.0) |
|
39 | arel (3.0.3) |
|
39 | arel (3.0.3) |
|
|
40 | + best_in_place (3.0.2) | ||
|
|
41 | + actionpack (>= 3.2) | ||
|
|
42 | + railties (>= 3.2) | ||
|
40 | builder (3.0.4) |
|
43 | builder (3.0.4) |
|
41 | coffee-rails (3.2.2) |
|
44 | coffee-rails (3.2.2) |
|
42 | coffee-script (>= 2.2.0) |
|
45 | coffee-script (>= 2.2.0) |
|
43 | railties (~> 3.2.0) |
|
46 | railties (~> 3.2.0) |
|
44 | coffee-script (2.3.0) |
|
47 | coffee-script (2.3.0) |
|
45 | coffee-script-source |
|
48 | coffee-script-source |
|
46 | execjs |
|
49 | execjs |
|
47 | coffee-script-source (1.7.1) |
|
50 | coffee-script-source (1.7.1) |
|
48 | diff-lcs (1.2.5) |
|
51 | diff-lcs (1.2.5) |
|
49 | dynamic_form (1.1.4) |
|
52 | dynamic_form (1.1.4) |
|
50 | erubis (2.7.0) |
|
53 | erubis (2.7.0) |
|
51 | execjs (2.2.1) |
|
54 | execjs (2.2.1) |
|
52 | haml (4.0.5) |
|
55 | haml (4.0.5) |
|
53 | tilt |
|
56 | tilt |
|
54 | hike (1.2.3) |
|
57 | hike (1.2.3) |
|
55 | i18n (0.6.11) |
|
58 | i18n (0.6.11) |
|
56 | in_place_editing (1.2.0) |
|
59 | in_place_editing (1.2.0) |
|
57 | journey (1.0.4) |
|
60 | journey (1.0.4) |
|
58 | jquery-rails (3.1.1) |
|
61 | jquery-rails (3.1.1) |
|
59 | railties (>= 3.0, < 5.0) |
|
62 | railties (>= 3.0, < 5.0) |
|
60 | thor (>= 0.14, < 2.0) |
|
63 | thor (>= 0.14, < 2.0) |
|
61 | jquery-tablesorter (1.12.7) |
|
64 | jquery-tablesorter (1.12.7) |
|
62 | railties (>= 3.1, < 5) |
|
65 | railties (>= 3.1, < 5) |
|
63 | jquery-timepicker-addon-rails (1.4.1) |
|
66 | jquery-timepicker-addon-rails (1.4.1) |
|
64 | railties (>= 3.1) |
|
67 | railties (>= 3.1) |
|
65 | jquery-ui-rails (4.0.3) |
|
68 | jquery-ui-rails (4.0.3) |
|
66 | jquery-rails |
|
69 | jquery-rails |
|
67 | railties (>= 3.1.0) |
|
70 | railties (>= 3.1.0) |
|
68 | jquery-ui-sass-rails (4.0.3.0) |
|
71 | jquery-ui-sass-rails (4.0.3.0) |
|
69 | jquery-rails |
|
72 | jquery-rails |
|
70 | jquery-ui-rails (= 4.0.3) |
|
73 | jquery-ui-rails (= 4.0.3) |
|
71 | railties (>= 3.1.0) |
|
74 | railties (>= 3.1.0) |
|
72 | json (1.8.1) |
|
75 | json (1.8.1) |
|
73 | mail (2.5.4) |
|
76 | mail (2.5.4) |
|
74 | mime-types (~> 1.16) |
|
77 | mime-types (~> 1.16) |
|
75 | treetop (~> 1.4.8) |
|
78 | treetop (~> 1.4.8) |
|
76 | mime-types (1.25.1) |
|
79 | mime-types (1.25.1) |
|
77 | multi_json (1.10.1) |
|
80 | multi_json (1.10.1) |
|
78 | mysql2 (0.3.16) |
|
81 | mysql2 (0.3.16) |
|
79 | polyglot (0.3.5) |
|
82 | polyglot (0.3.5) |
|
80 | power_assert (0.1.3) |
|
83 | power_assert (0.1.3) |
|
81 | prototype-rails (3.2.1) |
|
84 | prototype-rails (3.2.1) |
|
82 | rails (~> 3.2) |
|
85 | rails (~> 3.2) |
|
83 | rack (1.4.5) |
|
86 | rack (1.4.5) |
|
84 | rack-cache (1.2) |
|
87 | rack-cache (1.2) |
|
85 | rack (>= 0.4) |
|
88 | rack (>= 0.4) |
|
86 | rack-ssl (1.3.4) |
|
89 | rack-ssl (1.3.4) |
|
87 | rack |
|
90 | rack |
@@ -104,68 +107,69 | |||||
|
104 | thor (>= 0.14.6, < 2.0) |
|
107 | thor (>= 0.14.6, < 2.0) |
|
105 | rake (10.3.2) |
|
108 | rake (10.3.2) |
|
106 | rdiscount (2.1.7.1) |
|
109 | rdiscount (2.1.7.1) |
|
107 | rdoc (3.12.2) |
|
110 | rdoc (3.12.2) |
|
108 | json (~> 1.4) |
|
111 | json (~> 1.4) |
|
109 | rouge (1.6.2) |
|
112 | rouge (1.6.2) |
|
110 | rspec-collection_matchers (1.0.0) |
|
113 | rspec-collection_matchers (1.0.0) |
|
111 | rspec-expectations (>= 2.99.0.beta1) |
|
114 | rspec-expectations (>= 2.99.0.beta1) |
|
112 | rspec-core (2.99.2) |
|
115 | rspec-core (2.99.2) |
|
113 | rspec-expectations (2.99.2) |
|
116 | rspec-expectations (2.99.2) |
|
114 | diff-lcs (>= 1.1.3, < 2.0) |
|
117 | diff-lcs (>= 1.1.3, < 2.0) |
|
115 | rspec-mocks (2.99.2) |
|
118 | rspec-mocks (2.99.2) |
|
116 | rspec-rails (2.99.0) |
|
119 | rspec-rails (2.99.0) |
|
117 | actionpack (>= 3.0) |
|
120 | actionpack (>= 3.0) |
|
118 | activemodel (>= 3.0) |
|
121 | activemodel (>= 3.0) |
|
119 | activesupport (>= 3.0) |
|
122 | activesupport (>= 3.0) |
|
120 | railties (>= 3.0) |
|
123 | railties (>= 3.0) |
|
121 | rspec-collection_matchers |
|
124 | rspec-collection_matchers |
|
122 | rspec-core (~> 2.99.0) |
|
125 | rspec-core (~> 2.99.0) |
|
123 | rspec-expectations (~> 2.99.0) |
|
126 | rspec-expectations (~> 2.99.0) |
|
124 | rspec-mocks (~> 2.99.0) |
|
127 | rspec-mocks (~> 2.99.0) |
|
125 | sass (3.4.1) |
|
128 | sass (3.4.1) |
|
126 | sass-rails (3.2.6) |
|
129 | sass-rails (3.2.6) |
|
127 | railties (~> 3.2.0) |
|
130 | railties (~> 3.2.0) |
|
128 | sass (>= 3.1.10) |
|
131 | sass (>= 3.1.10) |
|
129 | tilt (~> 1.3) |
|
132 | tilt (~> 1.3) |
|
130 | sprockets (2.2.2) |
|
133 | sprockets (2.2.2) |
|
131 | hike (~> 1.2) |
|
134 | hike (~> 1.2) |
|
132 | multi_json (~> 1.0) |
|
135 | multi_json (~> 1.0) |
|
133 | rack (~> 1.0) |
|
136 | rack (~> 1.0) |
|
134 | tilt (~> 1.1, != 1.3.0) |
|
137 | tilt (~> 1.1, != 1.3.0) |
|
135 | test-unit (3.0.1) |
|
138 | test-unit (3.0.1) |
|
136 | power_assert |
|
139 | power_assert |
|
137 | thor (0.19.1) |
|
140 | thor (0.19.1) |
|
138 | tilt (1.4.1) |
|
141 | tilt (1.4.1) |
|
139 | treetop (1.4.15) |
|
142 | treetop (1.4.15) |
|
140 | polyglot |
|
143 | polyglot |
|
141 | polyglot (>= 0.3.1) |
|
144 | polyglot (>= 0.3.1) |
|
142 | tzinfo (0.3.41) |
|
145 | tzinfo (0.3.41) |
|
143 | uglifier (2.5.3) |
|
146 | uglifier (2.5.3) |
|
144 | execjs (>= 0.3.0) |
|
147 | execjs (>= 0.3.0) |
|
145 | json (>= 1.8.0) |
|
148 | json (>= 1.8.0) |
|
146 | will_paginate (3.0.7) |
|
149 | will_paginate (3.0.7) |
|
147 |
|
150 | ||
|
148 | PLATFORMS |
|
151 | PLATFORMS |
|
149 | ruby |
|
152 | ruby |
|
150 |
|
153 | ||
|
151 | DEPENDENCIES |
|
154 | DEPENDENCIES |
|
|
155 | + best_in_place (~> 3.0.1) | ||
|
152 | coffee-rails (~> 3.2.1) |
|
156 | coffee-rails (~> 3.2.1) |
|
153 | dynamic_form |
|
157 | dynamic_form |
|
154 | haml |
|
158 | haml |
|
155 | in_place_editing |
|
159 | in_place_editing |
|
156 | jquery-rails |
|
160 | jquery-rails |
|
157 | jquery-tablesorter |
|
161 | jquery-tablesorter |
|
158 | jquery-timepicker-addon-rails |
|
162 | jquery-timepicker-addon-rails |
|
159 | jquery-ui-sass-rails |
|
163 | jquery-ui-sass-rails |
|
160 |
|
164 | ||
|
161 | mysql2 |
|
165 | mysql2 |
|
162 | prototype-rails |
|
166 | prototype-rails |
|
163 | rails (= 3.2.19) |
|
167 | rails (= 3.2.19) |
|
164 | rdiscount |
|
168 | rdiscount |
|
165 | rouge |
|
169 | rouge |
|
166 | rspec-rails (~> 2.0) |
|
170 | rspec-rails (~> 2.0) |
|
167 | sass-rails (~> 3.2.3) |
|
171 | sass-rails (~> 3.2.3) |
|
168 | test-unit |
|
172 | test-unit |
|
169 | uglifier (>= 1.0.3) |
|
173 | uglifier (>= 1.0.3) |
|
170 | verification! |
|
174 | verification! |
|
171 | will_paginate (~> 3.0.0) |
|
175 | will_paginate (~> 3.0.0) |
@@ -1,7 +1,14 | |||||
|
1 | //= require jquery |
|
1 | //= require jquery |
|
2 | //= require jquery_ujs |
|
2 | //= require jquery_ujs |
|
3 | //= require jquery.ui.all |
|
3 | //= require jquery.ui.all |
|
4 | //= require jquery.ui.datepicker |
|
4 | //= require jquery.ui.datepicker |
|
5 | //= require jquery.ui.slider |
|
5 | //= require jquery.ui.slider |
|
6 | //= require jquery-ui-timepicker-addon |
|
6 | //= require jquery-ui-timepicker-addon |
|
7 | //= require jquery-tablesorter |
|
7 | //= require jquery-tablesorter |
|
|
8 | + //= require best_in_place | ||
|
|
9 | + //= require best_in_place.jquery-ui | ||
|
|
10 | + | ||
|
|
11 | + $(document).ready(function() { | ||
|
|
12 | + /* Activating Best In Place */ | ||
|
|
13 | + jQuery(".best_in_place").best_in_place(); | ||
|
|
14 | + }); |
@@ -1,20 +1,28 | |||||
|
1 | class ConfigurationsController < ApplicationController |
|
1 | class ConfigurationsController < ApplicationController |
|
2 |
|
2 | ||
|
3 | before_filter :authenticate |
|
3 | before_filter :authenticate |
|
4 | before_filter { |controller| controller.authorization_by_roles(['admin'])} |
|
4 | before_filter { |controller| controller.authorization_by_roles(['admin'])} |
|
5 |
|
5 | ||
|
6 | - in_place_edit_for :grader_configuration, :key |
|
||
|
7 | - in_place_edit_for :grader_configuration, :type |
|
||
|
8 | - in_place_edit_for :grader_configuration, :value |
|
||
|
9 |
|
6 | ||
|
10 | def index |
|
7 | def index |
|
11 | @configurations = GraderConfiguration.find(:all, |
|
8 | @configurations = GraderConfiguration.find(:all, |
|
12 | :order => '`key`') |
|
9 | :order => '`key`') |
|
13 | end |
|
10 | end |
|
14 |
|
11 | ||
|
15 | def reload |
|
12 | def reload |
|
16 | GraderConfiguration.reload |
|
13 | GraderConfiguration.reload |
|
17 | redirect_to :action => 'index' |
|
14 | redirect_to :action => 'index' |
|
18 | end |
|
15 | end |
|
19 |
|
16 | ||
|
|
17 | + def update | ||
|
|
18 | + @config = GraderConfiguration.find(params[:id]) | ||
|
|
19 | + respond_to do |format| | ||
|
|
20 | + if @config.update_attributes(params[:grader_configuration]) | ||
|
|
21 | + format.json { head :ok } | ||
|
|
22 | + else | ||
|
|
23 | + format.json { respond_with_bip(@config) } | ||
|
|
24 | + end | ||
|
|
25 | + end | ||
|
|
26 | + end | ||
|
|
27 | + | ||
|
20 | end |
|
28 | end |
@@ -1,29 +1,32 | |||||
|
|
1 | + - content_for :header do | ||
|
|
2 | + = javascript_include_tag 'local_jquery' | ||
|
|
3 | + | ||
|
1 | %h1 System configuration |
|
4 | %h1 System configuration |
|
2 |
|
5 | ||
|
3 | %table.info |
|
6 | %table.info |
|
4 | %tr.info-head |
|
7 | %tr.info-head |
|
5 | %th Key |
|
8 | %th Key |
|
6 | %th Type |
|
9 | %th Type |
|
7 | %th Value |
|
10 | %th Value |
|
8 | %th Description |
|
11 | %th Description |
|
9 | - @configurations.each do |conf| |
|
12 | - @configurations.each do |conf| |
|
10 | - @grader_configuration = conf |
|
13 | - @grader_configuration = conf |
|
11 | %tr{:class => cycle("info-odd", "info-even")} |
|
14 | %tr{:class => cycle("info-odd", "info-even")} |
|
12 | %td |
|
15 | %td |
|
13 | = in_place_editor_field :grader_configuration, :key, {}, :rows=>1 |
|
16 | = in_place_editor_field :grader_configuration, :key, {}, :rows=>1 |
|
14 | %td |
|
17 | %td |
|
15 | = in_place_editor_field :grader_configuration, :value_type, {}, :rows=>1 |
|
18 | = in_place_editor_field :grader_configuration, :value_type, {}, :rows=>1 |
|
16 | %td |
|
19 | %td |
|
17 |
- = in_place |
|
20 | + = best_in_place @grader_configuration, :value, ok_button: "ok", cancel_button: "cancel" |
|
18 | %td= conf.description |
|
21 | %td= conf.description |
|
19 |
|
22 | ||
|
20 | - if GraderConfiguration.config_cached? |
|
23 | - if GraderConfiguration.config_cached? |
|
21 | %br/ |
|
24 | %br/ |
|
22 | Your config is saved, but it does not automatically take effect. |
|
25 | Your config is saved, but it does not automatically take effect. |
|
23 | %br/ |
|
26 | %br/ |
|
24 | If you have one mongrel process running, you can |
|
27 | If you have one mongrel process running, you can |
|
25 | = link_to '[click]', :action => 'reload' |
|
28 | = link_to '[click]', :action => 'reload' |
|
26 | here to reload. |
|
29 | here to reload. |
|
27 | %br/ |
|
30 | %br/ |
|
28 | If you have more than one process running, you should restart |
|
31 | If you have more than one process running, you should restart |
|
29 | them manually. |
|
32 | them manually. |
@@ -1,50 +1,51 | |||||
|
1 | - content_for :head do |
|
1 | - content_for :head do |
|
2 | = stylesheet_link_tag 'graders' |
|
2 | = stylesheet_link_tag 'graders' |
|
|
3 | + = javascript_include_tag 'local_jquery' | ||
|
3 | <meta http-equiv ="refresh" content="60"/> |
|
4 | <meta http-equiv ="refresh" content="60"/> |
|
4 |
|
5 | ||
|
5 | %h1 Grader information |
|
6 | %h1 Grader information |
|
6 |
|
7 | ||
|
7 | = link_to '[Refresh]', :action => 'list' |
|
8 | = link_to '[Refresh]', :action => 'list' |
|
8 | %br/ |
|
9 | %br/ |
|
9 |
|
10 | ||
|
10 | .submitbox |
|
11 | .submitbox |
|
11 | .item |
|
12 | .item |
|
12 | Grader control: |
|
13 | Grader control: |
|
13 | .item |
|
14 | .item |
|
14 | = form_for :clear, :url => {:action => 'start_grading'} do |f| |
|
15 | = form_for :clear, :url => {:action => 'start_grading'} do |f| |
|
15 | = submit_tag 'Start graders in grading env' |
|
16 | = submit_tag 'Start graders in grading env' |
|
16 | .item |
|
17 | .item |
|
17 | = form_for :clear, :url => {:action => 'start_exam'} do |f| |
|
18 | = form_for :clear, :url => {:action => 'start_exam'} do |f| |
|
18 | = submit_tag 'Start graders in exam env' |
|
19 | = submit_tag 'Start graders in exam env' |
|
19 | .item |
|
20 | .item |
|
20 | = form_for :clear, :url => {:action => 'stop_all'} do |f| |
|
21 | = form_for :clear, :url => {:action => 'stop_all'} do |f| |
|
21 | = submit_tag 'Stop all running graders' |
|
22 | = submit_tag 'Stop all running graders' |
|
22 | .item |
|
23 | .item |
|
23 | = form_for :clear, :url => {:action => 'clear_all'} do |f| |
|
24 | = form_for :clear, :url => {:action => 'clear_all'} do |f| |
|
24 | = submit_tag 'Clear all data' |
|
25 | = submit_tag 'Clear all data' |
|
25 | %br{:style => 'clear:both'}/ |
|
26 | %br{:style => 'clear:both'}/ |
|
26 |
|
27 | ||
|
27 | %div{style: 'width:500px; float: left;'} |
|
28 | %div{style: 'width:500px; float: left;'} |
|
28 | - if @last_task |
|
29 | - if @last_task |
|
29 | Last task: |
|
30 | Last task: |
|
30 | = link_to "#{@last_task.id}", :action => 'view', :id => @last_task.id, :type => 'Task' |
|
31 | = link_to "#{@last_task.id}", :action => 'view', :id => @last_task.id, :type => 'Task' |
|
31 |
|
32 | ||
|
32 | %br/ |
|
33 | %br/ |
|
33 |
|
34 | ||
|
34 | - if @last_test_request |
|
35 | - if @last_test_request |
|
35 | Last test_request: |
|
36 | Last test_request: |
|
36 | = link_to "#{@last_test_request.id}", :action => 'view', :id => @last_test_request.id, :type => 'TestRequest' |
|
37 | = link_to "#{@last_test_request.id}", :action => 'view', :id => @last_test_request.id, :type => 'TestRequest' |
|
37 |
|
38 | ||
|
38 | %h2 Current graders |
|
39 | %h2 Current graders |
|
39 |
|
40 | ||
|
40 | = render :partial => 'grader_list', :locals => {:grader_list => @grader_processes} |
|
41 | = render :partial => 'grader_list', :locals => {:grader_list => @grader_processes} |
|
41 |
|
42 | ||
|
42 | %h2 Stalled graders |
|
43 | %h2 Stalled graders |
|
43 |
|
44 | ||
|
44 | = render :partial => 'grader_list', :locals => {:grader_list => @stalled_processes} |
|
45 | = render :partial => 'grader_list', :locals => {:grader_list => @stalled_processes} |
|
45 |
|
46 | ||
|
46 | %h2 Terminated graders |
|
47 | %h2 Terminated graders |
|
47 |
|
48 | ||
|
48 | = form_for :clear, :url => {:action => 'clear_terminated'} do |f| |
|
49 | = form_for :clear, :url => {:action => 'clear_terminated'} do |f| |
|
49 | = submit_tag 'Clear data for terminated graders' |
|
50 | = submit_tag 'Clear data for terminated graders' |
|
50 |
|
51 |
@@ -1,56 +1,58 | |||||
|
1 | CafeGrader::Application.routes.draw do |
|
1 | CafeGrader::Application.routes.draw do |
|
2 | get "report/login" |
|
2 | get "report/login" |
|
3 |
|
3 | ||
|
4 | resources :contests |
|
4 | resources :contests |
|
5 |
|
5 | ||
|
6 | resources :announcements |
|
6 | resources :announcements |
|
7 | resources :sites |
|
7 | resources :sites |
|
8 |
|
8 | ||
|
|
9 | + resources :grader_configuration, controller: 'configurations' | ||
|
|
10 | + | ||
|
9 | # The priority is based upon order of creation: |
|
11 | # The priority is based upon order of creation: |
|
10 | # first created -> highest priority. |
|
12 | # first created -> highest priority. |
|
11 |
|
13 | ||
|
12 | # Sample of regular route: |
|
14 | # Sample of regular route: |
|
13 | # match 'products/:id' => 'catalog#view' |
|
15 | # match 'products/:id' => 'catalog#view' |
|
14 | # Keep in mind you can assign values other than :controller and :action |
|
16 | # Keep in mind you can assign values other than :controller and :action |
|
15 |
|
17 | ||
|
16 | # Sample of named route: |
|
18 | # Sample of named route: |
|
17 | # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase |
|
19 | # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase |
|
18 | # This route can be invoked with purchase_url(:id => product.id) |
|
20 | # This route can be invoked with purchase_url(:id => product.id) |
|
19 |
|
21 | ||
|
20 | # Sample resource route (maps HTTP verbs to controller actions automatically): |
|
22 | # Sample resource route (maps HTTP verbs to controller actions automatically): |
|
21 | # resources :products |
|
23 | # resources :products |
|
22 |
|
24 | ||
|
23 | # Sample resource route with options: |
|
25 | # Sample resource route with options: |
|
24 | # resources :products do |
|
26 | # resources :products do |
|
25 | # member do |
|
27 | # member do |
|
26 | # get 'short' |
|
28 | # get 'short' |
|
27 | # post 'toggle' |
|
29 | # post 'toggle' |
|
28 | # end |
|
30 | # end |
|
29 | # |
|
31 | # |
|
30 | # collection do |
|
32 | # collection do |
|
31 | # get 'sold' |
|
33 | # get 'sold' |
|
32 | # end |
|
34 | # end |
|
33 | # end |
|
35 | # end |
|
34 |
|
36 | ||
|
35 | # Sample resource route with sub-resources: |
|
37 | # Sample resource route with sub-resources: |
|
36 | # resources :products do |
|
38 | # resources :products do |
|
37 | # resources :comments, :sales |
|
39 | # resources :comments, :sales |
|
38 | # resource :seller |
|
40 | # resource :seller |
|
39 | # end |
|
41 | # end |
|
40 |
|
42 | ||
|
41 | # Sample resource route with more complex sub-resources |
|
43 | # Sample resource route with more complex sub-resources |
|
42 | # resources :products do |
|
44 | # resources :products do |
|
43 | # resources :comments |
|
45 | # resources :comments |
|
44 | # resources :sales do |
|
46 | # resources :sales do |
|
45 | # get 'recent', :on => :collection |
|
47 | # get 'recent', :on => :collection |
|
46 | # end |
|
48 | # end |
|
47 | # end |
|
49 | # end |
|
48 |
|
50 | ||
|
49 | # Sample resource route within a namespace: |
|
51 | # Sample resource route within a namespace: |
|
50 | # namespace :admin do |
|
52 | # namespace :admin do |
|
51 | # # Directs /admin/products/* to Admin::ProductsController |
|
53 | # # Directs /admin/products/* to Admin::ProductsController |
|
52 | # # (app/controllers/admin/products_controller.rb) |
|
54 | # # (app/controllers/admin/products_controller.rb) |
|
53 | # resources :products |
|
55 | # resources :products |
|
54 | # end |
|
56 | # end |
|
55 |
|
57 | ||
|
56 | # You can have the root of your site routed with "root" |
|
58 | # You can have the root of your site routed with "root" |
You need to be logged in to leave comments.
Login now