Description:
merge
Commit status:
[Not Reviewed]
References:
merge java
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r695:55afb135c5f9 - - 12 files changed: 117 inserted, 54 deleted

@@ -14,78 +14,79
14 #for testing
14 #for testing
15 gem 'sqlite3'
15 gem 'sqlite3'
16 #for dumping database into yaml
16 #for dumping database into yaml
17 gem 'yaml_db'
17 gem 'yaml_db'
18
18
19 # Gems used only for assets and not required
19 # Gems used only for assets and not required
20 # in production environments by default.
20 # in production environments by default.
21 gem 'sass-rails'
21 gem 'sass-rails'
22 gem 'coffee-rails'
22 gem 'coffee-rails'
23
23
24 # See https://github.com/sstephenson/execjs#readme for more supported runtimes
24 # See https://github.com/sstephenson/execjs#readme for more supported runtimes
25 # gem 'therubyracer', :platforms => :ruby
25 # gem 'therubyracer', :platforms => :ruby
26
26
27 gem 'uglifier'
27 gem 'uglifier'
28
28
29 gem 'haml'
29 gem 'haml'
30 gem 'haml-rails'
30 gem 'haml-rails'
31 # gem 'prototype-rails'
31 # gem 'prototype-rails'
32
32
33 # To use ActiveModel has_secure_password
33 # To use ActiveModel has_secure_password
34 # gem 'bcrypt-ruby', '~> 3.0.0'
34 # gem 'bcrypt-ruby', '~> 3.0.0'
35
35
36 # To use Jbuilder templates for JSON
36 # To use Jbuilder templates for JSON
37 # gem 'jbuilder'
37 # gem 'jbuilder'
38
38
39 # Use unicorn as the app server
39 # Use unicorn as the app server
40 # gem 'unicorn'
40 # gem 'unicorn'
41
41
42 # Deploy with Capistrano
42 # Deploy with Capistrano
43 # gem 'capistrano'
43 # gem 'capistrano'
44
44
45 # To use debugger
45 # To use debugger
46 # gem 'debugger'
46 # gem 'debugger'
47 #
47 #
48
48
49 #in-place editor
49 #in-place editor
50 gem 'best_in_place', '~> 3.0.1'
50 gem 'best_in_place', '~> 3.0.1'
51
51
52 # jquery addition
52 # jquery addition
53 gem 'jquery-rails'
53 gem 'jquery-rails'
54 gem 'jquery-ui-rails'
54 gem 'jquery-ui-rails'
55 gem 'jquery-timepicker-addon-rails'
55 gem 'jquery-timepicker-addon-rails'
56 gem 'jquery-tablesorter'
56 gem 'jquery-tablesorter'
57 gem 'jquery-countdown-rails'
57 gem 'jquery-countdown-rails'
58
58
59 #syntax highlighter
59 #syntax highlighter
60 gem 'rouge'
60 gem 'rouge'
61
61
62 - #add bootstrap
62 + #bootstrap add-ons
63 gem 'bootstrap-sass', '~> 3.2.0'
63 gem 'bootstrap-sass', '~> 3.2.0'
64 gem 'bootstrap-switch-rails'
64 gem 'bootstrap-switch-rails'
65 gem 'bootstrap-toggle-rails'
65 gem 'bootstrap-toggle-rails'
66 gem 'autoprefixer-rails'
66 gem 'autoprefixer-rails'
67 -
68 - #bootstrap sortable
69 gem 'momentjs-rails'
67 gem 'momentjs-rails'
70 gem 'rails_bootstrap_sortable'
68 gem 'rails_bootstrap_sortable'
69 + gem 'bootstrap-datepicker-rails'
70 + gem 'bootstrap3-datetimepicker-rails'
71 + gem 'jquery-datatables-rails'
71
72
72 #----------- user interface -----------------
73 #----------- user interface -----------------
73 #select 2
74 #select 2
74 gem 'select2-rails'
75 gem 'select2-rails'
75 #ace editor
76 #ace editor
76 gem 'ace-rails-ap'
77 gem 'ace-rails-ap'
77 #paginator
78 #paginator
78 gem 'will_paginate', '~> 3.0.7'
79 gem 'will_paginate', '~> 3.0.7'
79
80
80 gem 'mail'
81 gem 'mail'
81 gem 'rdiscount'
82 gem 'rdiscount'
82 gem 'dynamic_form'
83 gem 'dynamic_form'
83 gem 'in_place_editing'
84 gem 'in_place_editing'
84 gem 'verification', :git => 'https://github.com/sikachu/verification.git'
85 gem 'verification', :git => 'https://github.com/sikachu/verification.git'
85
86
86
87
87 #---------------- testiing -----------------------
88 #---------------- testiing -----------------------
88 gem 'minitest-reporters'
89 gem 'minitest-reporters'
89
90
90 #---------------- for console --------------------
91 #---------------- for console --------------------
91 gem 'fuzzy-string-match'
92 gem 'fuzzy-string-match'
@@ -16,132 +16,141
16 actionmailer (4.2.7.1)
16 actionmailer (4.2.7.1)
17 actionpack (= 4.2.7.1)
17 actionpack (= 4.2.7.1)
18 actionview (= 4.2.7.1)
18 actionview (= 4.2.7.1)
19 activejob (= 4.2.7.1)
19 activejob (= 4.2.7.1)
20 mail (~> 2.5, >= 2.5.4)
20 mail (~> 2.5, >= 2.5.4)
21 rails-dom-testing (~> 1.0, >= 1.0.5)
21 rails-dom-testing (~> 1.0, >= 1.0.5)
22 actionpack (4.2.7.1)
22 actionpack (4.2.7.1)
23 actionview (= 4.2.7.1)
23 actionview (= 4.2.7.1)
24 activesupport (= 4.2.7.1)
24 activesupport (= 4.2.7.1)
25 rack (~> 1.6)
25 rack (~> 1.6)
26 rack-test (~> 0.6.2)
26 rack-test (~> 0.6.2)
27 rails-dom-testing (~> 1.0, >= 1.0.5)
27 rails-dom-testing (~> 1.0, >= 1.0.5)
28 rails-html-sanitizer (~> 1.0, >= 1.0.2)
28 rails-html-sanitizer (~> 1.0, >= 1.0.2)
29 actionview (4.2.7.1)
29 actionview (4.2.7.1)
30 activesupport (= 4.2.7.1)
30 activesupport (= 4.2.7.1)
31 builder (~> 3.1)
31 builder (~> 3.1)
32 erubis (~> 2.7.0)
32 erubis (~> 2.7.0)
33 rails-dom-testing (~> 1.0, >= 1.0.5)
33 rails-dom-testing (~> 1.0, >= 1.0.5)
34 rails-html-sanitizer (~> 1.0, >= 1.0.2)
34 rails-html-sanitizer (~> 1.0, >= 1.0.2)
35 activejob (4.2.7.1)
35 activejob (4.2.7.1)
36 activesupport (= 4.2.7.1)
36 activesupport (= 4.2.7.1)
37 globalid (>= 0.3.0)
37 globalid (>= 0.3.0)
38 activemodel (4.2.7.1)
38 activemodel (4.2.7.1)
39 activesupport (= 4.2.7.1)
39 activesupport (= 4.2.7.1)
40 builder (~> 3.1)
40 builder (~> 3.1)
41 activerecord (4.2.7.1)
41 activerecord (4.2.7.1)
42 activemodel (= 4.2.7.1)
42 activemodel (= 4.2.7.1)
43 activesupport (= 4.2.7.1)
43 activesupport (= 4.2.7.1)
44 arel (~> 6.0)
44 arel (~> 6.0)
45 activerecord-session_store (1.0.0)
45 activerecord-session_store (1.0.0)
46 actionpack (>= 4.0, < 5.1)
46 actionpack (>= 4.0, < 5.1)
47 activerecord (>= 4.0, < 5.1)
47 activerecord (>= 4.0, < 5.1)
48 multi_json (~> 1.11, >= 1.11.2)
48 multi_json (~> 1.11, >= 1.11.2)
49 rack (>= 1.5.2, < 3)
49 rack (>= 1.5.2, < 3)
50 railties (>= 4.0, < 5.1)
50 railties (>= 4.0, < 5.1)
51 activesupport (4.2.7.1)
51 activesupport (4.2.7.1)
52 i18n (~> 0.7)
52 i18n (~> 0.7)
53 json (~> 1.7, >= 1.7.7)
53 json (~> 1.7, >= 1.7.7)
54 minitest (~> 5.1)
54 minitest (~> 5.1)
55 thread_safe (~> 0.3, >= 0.3.4)
55 thread_safe (~> 0.3, >= 0.3.4)
56 tzinfo (~> 1.1)
56 tzinfo (~> 1.1)
57 ansi (1.5.0)
57 ansi (1.5.0)
58 arel (6.0.4)
58 arel (6.0.4)
59 autoprefixer-rails (6.6.0)
59 autoprefixer-rails (6.6.0)
60 execjs
60 execjs
61 best_in_place (3.0.3)
61 best_in_place (3.0.3)
62 actionpack (>= 3.2)
62 actionpack (>= 3.2)
63 railties (>= 3.2)
63 railties (>= 3.2)
64 + bootstrap-datepicker-rails (1.7.1.1)
65 + railties (>= 3.0)
64 bootstrap-sass (3.2.0.2)
66 bootstrap-sass (3.2.0.2)
65 sass (~> 3.2)
67 sass (~> 3.2)
66 bootstrap-switch-rails (3.3.3)
68 bootstrap-switch-rails (3.3.3)
67 bootstrap-toggle-rails (2.2.1.0)
69 bootstrap-toggle-rails (2.2.1.0)
70 + bootstrap3-datetimepicker-rails (4.17.47)
71 + momentjs-rails (>= 2.8.1)
68 builder (3.2.2)
72 builder (3.2.2)
69 coffee-rails (4.2.1)
73 coffee-rails (4.2.1)
70 coffee-script (>= 2.2.0)
74 coffee-script (>= 2.2.0)
71 railties (>= 4.0.0, < 5.2.x)
75 railties (>= 4.0.0, < 5.2.x)
72 coffee-script (2.4.1)
76 coffee-script (2.4.1)
73 coffee-script-source
77 coffee-script-source
74 execjs
78 execjs
75 coffee-script-source (1.12.2)
79 coffee-script-source (1.12.2)
76 concurrent-ruby (1.0.4)
80 concurrent-ruby (1.0.4)
77 dynamic_form (1.1.4)
81 dynamic_form (1.1.4)
78 erubis (2.7.0)
82 erubis (2.7.0)
79 execjs (2.7.0)
83 execjs (2.7.0)
80 fuzzy-string-match (1.0.0)
84 fuzzy-string-match (1.0.0)
81 RubyInline (>= 3.8.6)
85 RubyInline (>= 3.8.6)
82 globalid (0.3.7)
86 globalid (0.3.7)
83 activesupport (>= 4.1.0)
87 activesupport (>= 4.1.0)
84 haml (4.0.7)
88 haml (4.0.7)
85 tilt
89 tilt
86 haml-rails (0.9.0)
90 haml-rails (0.9.0)
87 actionpack (>= 4.0.1)
91 actionpack (>= 4.0.1)
88 activesupport (>= 4.0.1)
92 activesupport (>= 4.0.1)
89 haml (>= 4.0.6, < 5.0)
93 haml (>= 4.0.6, < 5.0)
90 html2haml (>= 1.0.1)
94 html2haml (>= 1.0.1)
91 railties (>= 4.0.1)
95 railties (>= 4.0.1)
92 html2haml (2.0.0)
96 html2haml (2.0.0)
93 erubis (~> 2.7.0)
97 erubis (~> 2.7.0)
94 haml (~> 4.0.0)
98 haml (~> 4.0.0)
95 nokogiri (~> 1.6.0)
99 nokogiri (~> 1.6.0)
96 ruby_parser (~> 3.5)
100 ruby_parser (~> 3.5)
97 i18n (0.7.0)
101 i18n (0.7.0)
98 in_place_editing (1.2.0)
102 in_place_editing (1.2.0)
99 jquery-countdown-rails (2.0.2)
103 jquery-countdown-rails (2.0.2)
104 + jquery-datatables-rails (3.4.0)
105 + actionpack (>= 3.1)
106 + jquery-rails
107 + railties (>= 3.1)
108 + sass-rails
100 jquery-rails (4.2.1)
109 jquery-rails (4.2.1)
101 rails-dom-testing (>= 1, < 3)
110 rails-dom-testing (>= 1, < 3)
102 railties (>= 4.2.0)
111 railties (>= 4.2.0)
103 thor (>= 0.14, < 2.0)
112 thor (>= 0.14, < 2.0)
104 jquery-tablesorter (1.23.3)
113 jquery-tablesorter (1.23.3)
105 railties (>= 3.2, < 6)
114 railties (>= 3.2, < 6)
106 jquery-timepicker-addon-rails (1.4.1)
115 jquery-timepicker-addon-rails (1.4.1)
107 railties (>= 3.1)
116 railties (>= 3.1)
108 jquery-ui-rails (6.0.1)
117 jquery-ui-rails (6.0.1)
109 railties (>= 3.2.16)
118 railties (>= 3.2.16)
110 json (1.8.3)
119 json (1.8.3)
111 loofah (2.0.3)
120 loofah (2.0.3)
112 nokogiri (>= 1.5.9)
121 nokogiri (>= 1.5.9)
113 mail (2.6.4)
122 mail (2.6.4)
114 mime-types (>= 1.16, < 4)
123 mime-types (>= 1.16, < 4)
115 mime-types (3.1)
124 mime-types (3.1)
116 mime-types-data (~> 3.2015)
125 mime-types-data (~> 3.2015)
117 mime-types-data (3.2016.0521)
126 mime-types-data (3.2016.0521)
118 mini_portile2 (2.1.0)
127 mini_portile2 (2.1.0)
119 minitest (5.10.1)
128 minitest (5.10.1)
120 minitest-reporters (1.1.13)
129 minitest-reporters (1.1.13)
121 ansi
130 ansi
122 builder
131 builder
123 minitest (>= 5.0)
132 minitest (>= 5.0)
124 ruby-progressbar
133 ruby-progressbar
125 momentjs-rails (2.15.1)
134 momentjs-rails (2.15.1)
126 railties (>= 3.1)
135 railties (>= 3.1)
127 multi_json (1.12.1)
136 multi_json (1.12.1)
128 mysql2 (0.4.5)
137 mysql2 (0.4.5)
129 nokogiri (1.6.8.1)
138 nokogiri (1.6.8.1)
130 mini_portile2 (~> 2.1.0)
139 mini_portile2 (~> 2.1.0)
131 rack (1.6.5)
140 rack (1.6.5)
132 rack-test (0.6.3)
141 rack-test (0.6.3)
133 rack (>= 1.0)
142 rack (>= 1.0)
134 rails (4.2.7.1)
143 rails (4.2.7.1)
135 actionmailer (= 4.2.7.1)
144 actionmailer (= 4.2.7.1)
136 actionpack (= 4.2.7.1)
145 actionpack (= 4.2.7.1)
137 actionview (= 4.2.7.1)
146 actionview (= 4.2.7.1)
138 activejob (= 4.2.7.1)
147 activejob (= 4.2.7.1)
139 activemodel (= 4.2.7.1)
148 activemodel (= 4.2.7.1)
140 activerecord (= 4.2.7.1)
149 activerecord (= 4.2.7.1)
141 activesupport (= 4.2.7.1)
150 activesupport (= 4.2.7.1)
142 bundler (>= 1.3.0, < 2.0)
151 bundler (>= 1.3.0, < 2.0)
143 railties (= 4.2.7.1)
152 railties (= 4.2.7.1)
144 sprockets-rails
153 sprockets-rails
145 rails-deprecated_sanitizer (1.0.3)
154 rails-deprecated_sanitizer (1.0.3)
146 activesupport (>= 4.2.0.alpha)
155 activesupport (>= 4.2.0.alpha)
147 rails-dom-testing (1.0.8)
156 rails-dom-testing (1.0.8)
@@ -156,80 +165,83
156 actionpack (= 4.2.7.1)
165 actionpack (= 4.2.7.1)
157 activesupport (= 4.2.7.1)
166 activesupport (= 4.2.7.1)
158 rake (>= 0.8.7)
167 rake (>= 0.8.7)
159 thor (>= 0.18.1, < 2.0)
168 thor (>= 0.18.1, < 2.0)
160 rake (12.0.0)
169 rake (12.0.0)
161 rdiscount (2.2.0.1)
170 rdiscount (2.2.0.1)
162 rouge (2.0.7)
171 rouge (2.0.7)
163 ruby-progressbar (1.8.1)
172 ruby-progressbar (1.8.1)
164 ruby_parser (3.8.3)
173 ruby_parser (3.8.3)
165 sexp_processor (~> 4.1)
174 sexp_processor (~> 4.1)
166 sass (3.4.23)
175 sass (3.4.23)
167 sass-rails (5.0.6)
176 sass-rails (5.0.6)
168 railties (>= 4.0.0, < 6)
177 railties (>= 4.0.0, < 6)
169 sass (~> 3.1)
178 sass (~> 3.1)
170 sprockets (>= 2.8, < 4.0)
179 sprockets (>= 2.8, < 4.0)
171 sprockets-rails (>= 2.0, < 4.0)
180 sprockets-rails (>= 2.0, < 4.0)
172 tilt (>= 1.1, < 3)
181 tilt (>= 1.1, < 3)
173 select2-rails (4.0.3)
182 select2-rails (4.0.3)
174 thor (~> 0.14)
183 thor (~> 0.14)
175 sexp_processor (4.7.0)
184 sexp_processor (4.7.0)
176 sprockets (3.7.1)
185 sprockets (3.7.1)
177 concurrent-ruby (~> 1.0)
186 concurrent-ruby (~> 1.0)
178 rack (> 1, < 3)
187 rack (> 1, < 3)
179 sprockets-rails (3.2.0)
188 sprockets-rails (3.2.0)
180 actionpack (>= 4.0)
189 actionpack (>= 4.0)
181 activesupport (>= 4.0)
190 activesupport (>= 4.0)
182 sprockets (>= 3.0.0)
191 sprockets (>= 3.0.0)
183 sqlite3 (1.3.12)
192 sqlite3 (1.3.12)
184 thor (0.19.4)
193 thor (0.19.4)
185 thread_safe (0.3.5)
194 thread_safe (0.3.5)
186 tilt (2.0.5)
195 tilt (2.0.5)
187 tzinfo (1.2.2)
196 tzinfo (1.2.2)
188 thread_safe (~> 0.1)
197 thread_safe (~> 0.1)
189 uglifier (3.0.4)
198 uglifier (3.0.4)
190 execjs (>= 0.3.0, < 3)
199 execjs (>= 0.3.0, < 3)
191 will_paginate (3.0.12)
200 will_paginate (3.0.12)
192 yaml_db (0.4.2)
201 yaml_db (0.4.2)
193 rails (>= 3.0, < 5.1)
202 rails (>= 3.0, < 5.1)
194 rake (>= 0.8.7)
203 rake (>= 0.8.7)
195
204
196 PLATFORMS
205 PLATFORMS
197 ruby
206 ruby
198
207
199 DEPENDENCIES
208 DEPENDENCIES
200 ace-rails-ap
209 ace-rails-ap
201 activerecord-session_store
210 activerecord-session_store
202 autoprefixer-rails
211 autoprefixer-rails
203 best_in_place (~> 3.0.1)
212 best_in_place (~> 3.0.1)
213 + bootstrap-datepicker-rails
204 bootstrap-sass (~> 3.2.0)
214 bootstrap-sass (~> 3.2.0)
205 bootstrap-switch-rails
215 bootstrap-switch-rails
206 bootstrap-toggle-rails
216 bootstrap-toggle-rails
217 + bootstrap3-datetimepicker-rails
207 coffee-rails
218 coffee-rails
208 dynamic_form
219 dynamic_form
209 fuzzy-string-match
220 fuzzy-string-match
210 haml
221 haml
211 haml-rails
222 haml-rails
212 in_place_editing
223 in_place_editing
213 jquery-countdown-rails
224 jquery-countdown-rails
225 + jquery-datatables-rails
214 jquery-rails
226 jquery-rails
215 jquery-tablesorter
227 jquery-tablesorter
216 jquery-timepicker-addon-rails
228 jquery-timepicker-addon-rails
217 jquery-ui-rails
229 jquery-ui-rails
218 mail
230 mail
219 minitest-reporters
231 minitest-reporters
220 momentjs-rails
232 momentjs-rails
221 mysql2
233 mysql2
222 rails (~> 4.2.0)
234 rails (~> 4.2.0)
223 rails_bootstrap_sortable
235 rails_bootstrap_sortable
224 rdiscount
236 rdiscount
225 rouge
237 rouge
226 sass-rails
238 sass-rails
227 select2-rails
239 select2-rails
228 sqlite3
240 sqlite3
229 uglifier
241 uglifier
230 verification!
242 verification!
231 will_paginate (~> 3.0.7)
243 will_paginate (~> 3.0.7)
232 yaml_db
244 yaml_db
233
245
234 BUNDLED WITH
246 BUNDLED WITH
235 - 1.13.6
247 + 1.15.4
@@ -1,41 +1,47
1 // This is a manifest file that'll be compiled into application.js, which will include all the files
1 // This is a manifest file that'll be compiled into application.js, which will include all the files
2 // listed below.
2 // listed below.
3 //
3 //
4 // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
4 // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5 // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
5 // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6 //
6 //
7 // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
7 // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8 // the compiled file.
8 // the compiled file.
9 //
9 //
10 // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
10 // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11 // GO AFTER THE REQUIRES BELOW.
11 // GO AFTER THE REQUIRES BELOW.
12 //
12 //
13 //= require jquery
13 //= require jquery
14 //= require jquery_ujs
14 //= require jquery_ujs
15 + //= require dataTables/jquery.dataTables
16 + //= require dataTables/bootstrap/3/jquery.dataTables.bootstrap
15 //= require jquery-ui
17 //= require jquery-ui
16 //= require bootstrap-sprockets
18 //= require bootstrap-sprockets
17 //= require moment
19 //= require moment
20 + //= require moment/th
18 //= require bootstrap-sortable
21 //= require bootstrap-sortable
22 + //= require bootstrap-datetimepicker
19 //= require select2
23 //= require select2
20 //= require ace-rails-ap
24 //= require ace-rails-ap
21 //= require ace/mode-c_cpp
25 //= require ace/mode-c_cpp
22 //= require ace/mode-python
26 //= require ace/mode-python
23 //= require ace/mode-ruby
27 //= require ace/mode-ruby
24 //= require ace/mode-pascal
28 //= require ace/mode-pascal
25 //= require ace/mode-javascript
29 //= require ace/mode-javascript
26 //= require ace/mode-java
30 //= require ace/mode-java
27 //= require ace/theme-merbivore
31 //= require ace/theme-merbivore
28 //= require custom
32 //= require custom
29 //= require jquery.countdown
33 //= require jquery.countdown
30 //-------------- addition from local_jquery -----------
34 //-------------- addition from local_jquery -----------
31 //= require jquery-tablesorter
35 //= require jquery-tablesorter
32 //= require best_in_place
36 //= require best_in_place
33 //= require best_in_place.jquery-ui
37 //= require best_in_place.jquery-ui
34 //= require brython
38 //= require brython
39 + //= require bootstrap-datepicker
40 + //= require bootstrap-datetimepicker
35
41
36 // since this is after blank line, it is not downloaded
42 // since this is after blank line, it is not downloaded
37 //x= require prototype
43 //x= require prototype
38 //x= require prototype_ujs
44 //x= require prototype_ujs
39 //x= require effects
45 //x= require effects
40 //x= require dragdrop
46 //x= require dragdrop
41 //x= require controls
47 //x= require controls
@@ -1,83 +1,86
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";
30 @import "select2";
31 @import "select2-bootstrap";
31 @import "select2-bootstrap";
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";
37 + @import "bootstrap-datetimepicker";
38 + @import "dataTables/bootstrap/3/jquery.dataTables.bootstrap";
36
39
37 //bootstrap navbar color (from)
40 //bootstrap navbar color (from)
38 $bgDefault: #19197b;
41 $bgDefault: #19197b;
39 $bgHighlight: #06064b;
42 $bgHighlight: #06064b;
40 $colDefault: #8e8eb4;
43 $colDefault: #8e8eb4;
41 $colHighlight: #ffffff;
44 $colHighlight: #ffffff;
42 $dropDown: false;
45 $dropDown: false;
43
46
44 @font-face {
47 @font-face {
45 font-family: 'Glyphicons Halflings';
48 font-family: 'Glyphicons Halflings';
46 src: font-path('bootstrap/glyphicons-halflings-regular.eot');
49 src: font-path('bootstrap/glyphicons-halflings-regular.eot');
47 src: font-path('bootstrap/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
50 src: font-path('bootstrap/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
48 font-path('bootstrap/glyphicons-halflings-regular.woff') format('woff'),
51 font-path('bootstrap/glyphicons-halflings-regular.woff') format('woff'),
49 font-path('bootstrap/glyphicons-halflings-regular.ttf') format('truetype'),
52 font-path('bootstrap/glyphicons-halflings-regular.ttf') format('truetype'),
50 font-path('bootstrap/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
53 font-path('bootstrap/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
51 }
54 }
52
55
53
56
54 .navbar-default {
57 .navbar-default {
55 background-color: $bgDefault;
58 background-color: $bgDefault;
56 border-color: $bgHighlight;
59 border-color: $bgHighlight;
57
60
58 .navbar-brand {
61 .navbar-brand {
59 color: $colDefault;
62 color: $colDefault;
60
63
61 &:hover, &:focus {
64 &:hover, &:focus {
62 color: $colHighlight;
65 color: $colHighlight;
63 }
66 }
64 }
67 }
65
68
66 .navbar-text {
69 .navbar-text {
67 color: $colDefault;
70 color: $colDefault;
68 }
71 }
69
72
70 .navbar-nav {
73 .navbar-nav {
71 > li {
74 > li {
72 > a {
75 > a {
73 color: $colDefault;
76 color: $colDefault;
74
77
75 &:hover, &:focus {
78 &:hover, &:focus {
76 color: $colHighlight;
79 color: $colHighlight;
77 }
80 }
78 }
81 }
79
82
80 @if $dropDown {
83 @if $dropDown {
81 > .dropdown-menu {
84 > .dropdown-menu {
82 background-color: $bgDefault;
85 background-color: $bgDefault;
83
86
@@ -1,57 +1,63
1 class LoginController < ApplicationController
1 class LoginController < ApplicationController
2
2
3 def index
3 def index
4 # show login screen
4 # show login screen
5 reset_session
5 reset_session
6 redirect_to :controller => 'main', :action => 'login'
6 redirect_to :controller => 'main', :action => 'login'
7 end
7 end
8
8
9 def login
9 def login
10 - if (!GraderConfiguration['right.bypass_agreement']) and (!params[:accept_agree])
10 + user = User.authenticate(params[:login], params[:password])
11 + unless user
12 + flash[:notice] = 'Wrong password'
13 + redirect_to :controller => 'main', :action => 'login'
14 + return
15 + end
16 +
17 + if (!GraderConfiguration['right.bypass_agreement']) and (!params[:accept_agree]) and !user.admin?
11 flash[:notice] = 'You must accept the agreement before logging in'
18 flash[:notice] = 'You must accept the agreement before logging in'
12 redirect_to :controller => 'main', :action => 'login'
19 redirect_to :controller => 'main', :action => 'login'
13 - elsif user = User.authenticate(params[:login], params[:password])
20 + return
21 + end
22 +
23 + #process logging in
14 session[:user_id] = user.id
24 session[:user_id] = user.id
15 session[:admin] = user.admin?
25 session[:admin] = user.admin?
16
26
17 # clear forced logout flag for multicontests contest change
27 # clear forced logout flag for multicontests contest change
18 if GraderConfiguration.multicontests?
28 if GraderConfiguration.multicontests?
19 contest_stat = user.contest_stat
29 contest_stat = user.contest_stat
20 if contest_stat.respond_to? :forced_logout
30 if contest_stat.respond_to? :forced_logout
21 if contest_stat.forced_logout
31 if contest_stat.forced_logout
22 contest_stat.forced_logout = false
32 contest_stat.forced_logout = false
23 contest_stat.save
33 contest_stat.save
24 end
34 end
25 end
35 end
26 end
36 end
27
37
28 #save login information
38 #save login information
29 Login.create(user_id: user.id, ip_address: request.remote_ip)
39 Login.create(user_id: user.id, ip_address: request.remote_ip)
30
40
31 redirect_to :controller => 'main', :action => 'list'
41 redirect_to :controller => 'main', :action => 'list'
32 - else
33 - flash[:notice] = 'Wrong password'
34 - redirect_to :controller => 'main', :action => 'login'
35 - end
36 end
42 end
37
43
38 def site_login
44 def site_login
39 begin
45 begin
40 site = Site.find(params[:login][:site_id])
46 site = Site.find(params[:login][:site_id])
41 rescue ActiveRecord::RecordNotFound
47 rescue ActiveRecord::RecordNotFound
42 site = nil
48 site = nil
43 end
49 end
44 if site==nil
50 if site==nil
45 flash[:notice] = 'Wrong site'
51 flash[:notice] = 'Wrong site'
46 redirect_to :controller => 'main', :action => 'login' and return
52 redirect_to :controller => 'main', :action => 'login' and return
47 end
53 end
48 if (site.password) and (site.password == params[:login][:password])
54 if (site.password) and (site.password == params[:login][:password])
49 session[:site_id] = site.id
55 session[:site_id] = site.id
50 redirect_to :controller => 'site', :action => 'index'
56 redirect_to :controller => 'site', :action => 'index'
51 else
57 else
52 flash[:notice] = 'Wrong site password'
58 flash[:notice] = 'Wrong site password'
53 redirect_to :controller => 'site', :action => 'login'
59 redirect_to :controller => 'site', :action => 'login'
54 end
60 end
55 end
61 end
56
62
57 end
63 end
@@ -213,97 +213,94
213
213
214 redirect_to :action => 'manage'
214 redirect_to :action => 'manage'
215 end
215 end
216
216
217 def import
217 def import
218 @allow_test_pair_import = allow_test_pair_import?
218 @allow_test_pair_import = allow_test_pair_import?
219 end
219 end
220
220
221 def do_import
221 def do_import
222 old_problem = Problem.find_by_name(params[:name])
222 old_problem = Problem.find_by_name(params[:name])
223 if !allow_test_pair_import? and params.has_key? :import_to_db
223 if !allow_test_pair_import? and params.has_key? :import_to_db
224 params.delete :import_to_db
224 params.delete :import_to_db
225 end
225 end
226 @problem, import_log = Problem.create_from_import_form_params(params,
226 @problem, import_log = Problem.create_from_import_form_params(params,
227 old_problem)
227 old_problem)
228
228
229 if !@problem.errors.empty?
229 if !@problem.errors.empty?
230 render :action => 'import' and return
230 render :action => 'import' and return
231 end
231 end
232
232
233 if old_problem!=nil
233 if old_problem!=nil
234 flash[:notice] = "The test data has been replaced for problem #{@problem.name}"
234 flash[:notice] = "The test data has been replaced for problem #{@problem.name}"
235 end
235 end
236 @log = import_log
236 @log = import_log
237 end
237 end
238
238
239 def remove_contest
239 def remove_contest
240 problem = Problem.find(params[:id])
240 problem = Problem.find(params[:id])
241 contest = Contest.find(params[:contest_id])
241 contest = Contest.find(params[:contest_id])
242 if problem!=nil and contest!=nil
242 if problem!=nil and contest!=nil
243 problem.contests.delete(contest)
243 problem.contests.delete(contest)
244 end
244 end
245 redirect_to :action => 'manage'
245 redirect_to :action => 'manage'
246 end
246 end
247
247
248 ##################################
248 ##################################
249 protected
249 protected
250
250
251 def allow_test_pair_import?
251 def allow_test_pair_import?
252 if defined? ALLOW_TEST_PAIR_IMPORT
252 if defined? ALLOW_TEST_PAIR_IMPORT
253 return ALLOW_TEST_PAIR_IMPORT
253 return ALLOW_TEST_PAIR_IMPORT
254 else
254 else
255 return false
255 return false
256 end
256 end
257 end
257 end
258
258
259 def change_date_added
259 def change_date_added
260 problems = get_problems_from_params
260 problems = get_problems_from_params
261 - year = params[:date_added][:year].to_i
261 + date = Date.parse(params[:date_added])
262 - month = params[:date_added][:month].to_i
263 - day = params[:date_added][:day].to_i
264 - date = Date.new(year,month,day)
265 problems.each do |p|
262 problems.each do |p|
266 p.date_added = date
263 p.date_added = date
267 p.save
264 p.save
268 end
265 end
269 end
266 end
270
267
271 def add_to_contest
268 def add_to_contest
272 problems = get_problems_from_params
269 problems = get_problems_from_params
273 contest = Contest.find(params[:contest][:id])
270 contest = Contest.find(params[:contest][:id])
274 if contest!=nil and contest.enabled
271 if contest!=nil and contest.enabled
275 problems.each do |p|
272 problems.each do |p|
276 p.contests << contest
273 p.contests << contest
277 end
274 end
278 end
275 end
279 end
276 end
280
277
281 def set_available(avail)
278 def set_available(avail)
282 problems = get_problems_from_params
279 problems = get_problems_from_params
283 problems.each do |p|
280 problems.each do |p|
284 p.available = avail
281 p.available = avail
285 p.save
282 p.save
286 end
283 end
287 end
284 end
288
285
289 def get_problems_from_params
286 def get_problems_from_params
290 problems = []
287 problems = []
291 params.keys.each do |k|
288 params.keys.each do |k|
292 if k.index('prob-')==0
289 if k.index('prob-')==0
293 name, id, order = k.split('-')
290 name, id, order = k.split('-')
294 problems << Problem.find(id)
291 problems << Problem.find(id)
295 end
292 end
296 end
293 end
297 problems
294 problems
298 end
295 end
299
296
300 def get_problems_stat
297 def get_problems_stat
301 end
298 end
302
299
303 private
300 private
304
301
305 def problem_params
302 def problem_params
306 params.require(:problem).permit(:name, :full_name, :full_score, :date_added, :available, :test_allowed,:output_only, :url, :description)
303 params.require(:problem).permit(:name, :full_name, :full_score, :date_added, :available, :test_allowed,:output_only, :url, :description)
307 end
304 end
308
305
309 end
306 end
@@ -1,74 +1,75
1 require 'csv'
1 require 'csv'
2
2
3 class UserAdminController < ApplicationController
3 class UserAdminController < ApplicationController
4
4
5 include MailHelperMethods
5 include MailHelperMethods
6
6
7 before_filter :admin_authorization
7 before_filter :admin_authorization
8
8
9 # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
9 # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
10 verify :method => :post, :only => [
10 verify :method => :post, :only => [
11 :create, :create_from_list,
11 :create, :create_from_list,
12 :update,
12 :update,
13 :manage_contest,
13 :manage_contest,
14 :bulk_mail
14 :bulk_mail
15 ],
15 ],
16 :redirect_to => { :action => :list }
16 :redirect_to => { :action => :list }
17
17
18 def index
18 def index
19 @user_count = User.count
19 @user_count = User.count
20 if params[:page] == 'all'
20 if params[:page] == 'all'
21 @users = User.all
21 @users = User.all
22 @paginated = false
22 @paginated = false
23 else
23 else
24 @users = User.paginate :page => params[:page]
24 @users = User.paginate :page => params[:page]
25 @paginated = true
25 @paginated = true
26 end
26 end
27 + @users = User.all
27 @hidden_columns = ['hashed_password', 'salt', 'created_at', 'updated_at']
28 @hidden_columns = ['hashed_password', 'salt', 'created_at', 'updated_at']
28 @contests = Contest.enabled
29 @contests = Contest.enabled
29 end
30 end
30
31
31 def active
32 def active
32 sessions = ActiveRecord::SessionStore::Session.where("updated_at >= ?", 60.minutes.ago)
33 sessions = ActiveRecord::SessionStore::Session.where("updated_at >= ?", 60.minutes.ago)
33 @users = []
34 @users = []
34 sessions.each do |session|
35 sessions.each do |session|
35 if session.data[:user_id]
36 if session.data[:user_id]
36 @users << User.find(session.data[:user_id])
37 @users << User.find(session.data[:user_id])
37 end
38 end
38 end
39 end
39 end
40 end
40
41
41 def show
42 def show
42 @user = User.find(params[:id])
43 @user = User.find(params[:id])
43 end
44 end
44
45
45 def new
46 def new
46 @user = User.new
47 @user = User.new
47 end
48 end
48
49
49 def create
50 def create
50 @user = User.new(user_params)
51 @user = User.new(user_params)
51 @user.activated = true
52 @user.activated = true
52 if @user.save
53 if @user.save
53 flash[:notice] = 'User was successfully created.'
54 flash[:notice] = 'User was successfully created.'
54 redirect_to :action => 'index'
55 redirect_to :action => 'index'
55 else
56 else
56 render :action => 'new'
57 render :action => 'new'
57 end
58 end
58 end
59 end
59
60
60 def clear_last_ip
61 def clear_last_ip
61 @user = User.find(params[:id])
62 @user = User.find(params[:id])
62 @user.last_ip = nil
63 @user.last_ip = nil
63 @user.save
64 @user.save
64 redirect_to action: 'index', page: params[:page]
65 redirect_to action: 'index', page: params[:page]
65 end
66 end
66
67
67 def create_from_list
68 def create_from_list
68 lines = params[:user_list]
69 lines = params[:user_list]
69
70
70 note = []
71 note = []
71
72
72 lines.split("\n").each do |line|
73 lines.split("\n").each do |line|
73 items = line.chomp.split(',')
74 items = line.chomp.split(',')
74 if items.length>=2
75 if items.length>=2
@@ -2,93 +2,106
2 = stylesheet_link_tag 'problems'
2 = stylesheet_link_tag 'problems'
3 = javascript_include_tag 'local_jquery'
3 = javascript_include_tag 'local_jquery'
4
4
5 :javascript
5 :javascript
6 $(document).ready( function() {
6 $(document).ready( function() {
7 function shiftclick(start,stop,value) {
7 function shiftclick(start,stop,value) {
8 $('tr input').each( function(id,input) {
8 $('tr input').each( function(id,input) {
9 var $input=$(input);
9 var $input=$(input);
10 var iid=parseInt($input.attr('id').split('-')[2]);
10 var iid=parseInt($input.attr('id').split('-')[2]);
11 if(iid>=start&&iid<=stop){
11 if(iid>=start&&iid<=stop){
12 $input.prop('checked',value)
12 $input.prop('checked',value)
13 }
13 }
14 });
14 });
15 }
15 }
16
16
17 $('tr input').click( function(e) {
17 $('tr input').click( function(e) {
18 if (e.shiftKey) {
18 if (e.shiftKey) {
19 stop = parseInt($(this).attr('id').split('-')[2]);
19 stop = parseInt($(this).attr('id').split('-')[2]);
20 var orig_stop = stop
20 var orig_stop = stop
21 if (typeof start !== 'undefined') {
21 if (typeof start !== 'undefined') {
22 if (start > stop) {
22 if (start > stop) {
23 var tmp = start;
23 var tmp = start;
24 start = stop;
24 start = stop;
25 stop = tmp;
25 stop = tmp;
26 }
26 }
27 shiftclick(start,stop,$(this).is(':checked') )
27 shiftclick(start,stop,$(this).is(':checked') )
28 }
28 }
29 start = orig_stop
29 start = orig_stop
30 } else {
30 } else {
31 start = parseInt($(this).attr('id').split('-')[2]);
31 start = parseInt($(this).attr('id').split('-')[2]);
32 }
32 }
33 });
33 });
34 });
34 });
35
35
36
36
37 %h1 Manage problems
37 %h1 Manage problems
38
38
39 %p= link_to '[Back to problem list]', problems_path
39 %p= link_to '[Back to problem list]', problems_path
40
40
41 = form_tag :action=>'do_manage' do
41 = form_tag :action=>'do_manage' do
42 .panel.panel-primary
42 .panel.panel-primary
43 .panel-heading
43 .panel-heading
44 Action
44 Action
45 .panel-body
45 .panel-body
46 .submit-box
46 .submit-box
47 What do you want to do to the selected problem?
47 What do you want to do to the selected problem?
48 %br/
48 %br/
49 (You can shift-click to select a range of problems)
49 (You can shift-click to select a range of problems)
50 - %ul
50 + %ul.form-inline
51 %li
51 %li
52 Change date added to
52 Change date added to
53 - = select_date Date.current, :prefix => 'date_added'
53 + .input-group.date
54 + = text_field_tag :date_added, class: 'form-control'
55 + %span.input-group-addon
56 + %span.glyphicon.glyphicon-calendar
57 + -# = select_date Date.current, :prefix => 'date_added'
54 &nbsp;&nbsp;&nbsp;
58 &nbsp;&nbsp;&nbsp;
55 - = submit_tag 'Change', :name => 'change_date_added', class: 'btn btn-default'
59 + = submit_tag 'Change', :name => 'change_date_added', class: 'btn btn-primary btn-sm'
56 %li
60 %li
57 Set available to
61 Set available to
58 - = submit_tag 'True', :name => 'enable_problem', class: 'btn btn-default'
62 + = submit_tag 'True', :name => 'enable_problem', class: 'btn btn-primary btn-sm'
59 - = submit_tag 'False', :name => 'disable_problem', class: 'btn btn-default'
63 + = submit_tag 'False', :name => 'disable_problem', class: 'btn btn-primary btn-sm'
60
64
61 - if GraderConfiguration.multicontests?
65 - if GraderConfiguration.multicontests?
62 %li
66 %li
63 Add to
67 Add to
64 = select("contest","id",Contest.all.collect {|c| [c.title, c.id]})
68 = select("contest","id",Contest.all.collect {|c| [c.title, c.id]})
65 - = submit_tag 'Add', :name => 'add_to_contest', class: 'btn btn-default'
69 + = submit_tag 'Add', :name => 'add_to_contest', class: 'btn btn-primary btn-sm'
66 %li
70 %li
67 Add problems to group
71 Add problems to group
68 = select_tag "group_id", options_from_collection_for_select( Group.all, 'id','name',params[:group_name]), id: 'group_name',class: 'select2'
72 = select_tag "group_id", options_from_collection_for_select( Group.all, 'id','name',params[:group_name]), id: 'group_name',class: 'select2'
69 = submit_tag 'Add', name: 'add_group', class: 'btn btn-default'
73 = submit_tag 'Add', name: 'add_group', class: 'btn btn-default'
70
74
71
75
72 %table.table.table-hover
76 %table.table.table-hover
73 %tr{style: "text-align: left;"}
77 %tr{style: "text-align: left;"}
74 %th= check_box_tag 'select_all'
78 %th= check_box_tag 'select_all'
75 %th Name
79 %th Name
76 %th Full name
80 %th Full name
77 %th Available
81 %th Available
78 %th Date added
82 %th Date added
79 - if GraderConfiguration.multicontests?
83 - if GraderConfiguration.multicontests?
80 %th Contests
84 %th Contests
81
85
82 - num = 0
86 - num = 0
83 - for problem in @problems
87 - for problem in @problems
84 - num += 1
88 - num += 1
85 %tr{:id => "row-prob-#{problem.id}", :name=> "prob-#{problem.id}"}
89 %tr{:id => "row-prob-#{problem.id}", :name=> "prob-#{problem.id}"}
86 %td= check_box_tag "prob-#{problem.id}-#{num}"
90 %td= check_box_tag "prob-#{problem.id}-#{num}"
87 %td= problem.name
91 %td= problem.name
88 %td= problem.full_name
92 %td= problem.full_name
89 %td= problem.available
93 %td= problem.available
90 %td= problem.date_added
94 %td= problem.date_added
91 - if GraderConfiguration.multicontests?
95 - if GraderConfiguration.multicontests?
92 %td
96 %td
93 - problem.contests.each do |contest|
97 - problem.contests.each do |contest|
94 = "(#{contest.name} [#{link_to 'x', :action => 'remove_contest', :id => problem.id, :contest_id => contest.id }])"
98 = "(#{contest.name} [#{link_to 'x', :action => 'remove_contest', :id => problem.id, :contest_id => contest.id }])"
99 +
100 + :javascript
101 + $('.input-group.date').datetimepicker({
102 + format: 'DD/MMM/YYYY',
103 + showTodayButton: true,
104 + widgetPositioning: {horizontal: 'auto', vertical: 'bottom'},
105 +
106 + });
107 +
@@ -1,53 +1,57
1 :css
1 :css
2 .fix-width {
2 .fix-width {
3 font-family: "Consolas, Monaco, Droid Sans Mono,Mono, Monospace,Courier"
3 font-family: "Consolas, Monaco, Droid Sans Mono,Mono, Monospace,Courier"
4 }
4 }
5
5
6 %h1 Problem stat: #{@problem.name}
6 %h1 Problem stat: #{@problem.name}
7 %h2 Overview
7 %h2 Overview
8
8
9
9
10 %table.info
10 %table.info
11 %thead
11 %thead
12 %tr.info-head
12 %tr.info-head
13 %th Stat
13 %th Stat
14 %th Value
14 %th Value
15 %tbody
15 %tbody
16 %tr{class: cycle('info-even','info-odd')}
16 %tr{class: cycle('info-even','info-odd')}
17 %td Submissions
17 %td Submissions
18 %td= @submissions.count
18 %td= @submissions.count
19 %tr{class: cycle('info-even','info-odd')}
19 %tr{class: cycle('info-even','info-odd')}
20 %td Solved/Attempted User
20 %td Solved/Attempted User
21 %td #{@summary[:solve]}/#{@summary[:attempt]} (#{(@summary[:solve]*100.0/@summary[:attempt]).round(1)}%)
21 %td #{@summary[:solve]}/#{@summary[:attempt]} (#{(@summary[:solve]*100.0/@summary[:attempt]).round(1)}%)
22
22
23 %h2 Submissions Count
23 %h2 Submissions Count
24 = render partial: 'application/bar_graph', locals: { histogram: @histogram }
24 = render partial: 'application/bar_graph', locals: { histogram: @histogram }
25
25
26 %h2 Submissions
26 %h2 Submissions
27 - if @submissions and @submissions.count > 0
27 - if @submissions and @submissions.count > 0
28 - %table.info#main_table
28 + %table#main_table.table.table-condensed.table-striped
29 %thead
29 %thead
30 - %tr.info-head
30 + %tr
31 %th ID
31 %th ID
32 %th Login
32 %th Login
33 %th Name
33 %th Name
34 %th Submitted_at
34 %th Submitted_at
35 %th Points
35 %th Points
36 %th comment
36 %th comment
37 %th IP
37 %th IP
38 %tbody
38 %tbody
39 - row_odd,curr = true,''
39 - row_odd,curr = true,''
40 - @submissions.each do |sub|
40 - @submissions.each do |sub|
41 - next unless sub.user
41 - next unless sub.user
42 - row_odd,curr = !row_odd, sub.user if curr != sub.user
42 - row_odd,curr = !row_odd, sub.user if curr != sub.user
43 - %tr{class: row_odd ? "info-odd" : "info-even"}
43 + %tr
44 %td= link_to sub.id, submission_path(sub)
44 %td= link_to sub.id, submission_path(sub)
45 %td= link_to sub.user.login, stat_user_path(sub.user)
45 %td= link_to sub.user.login, stat_user_path(sub.user)
46 %td= sub.user.full_name
46 %td= sub.user.full_name
47 - %td= time_ago_in_words(sub.submitted_at) + " ago"
47 + %td{data: {order: sub.submitted_at}}= time_ago_in_words(sub.submitted_at) + " ago"
48 %td= sub.points
48 %td= sub.points
49 %td.fix-width= sub.grader_comment
49 %td.fix-width= sub.grader_comment
50 %td= sub.ip_address
50 %td= sub.ip_address
51 - else
51 - else
52 No submission
52 No submission
53
53
54 + :javascript
55 + $("#main_table").DataTable({
56 + paging: false
57 + });
@@ -1,24 +1,35
1 %h1 Editing site
1 %h1 Editing site
2 = error_messages_for :site
2 = error_messages_for :site
3 = form_for(@site) do |f|
3 = form_for(@site) do |f|
4 - %p
4 + .row
5 - %b Name
5 + .col-md-4
6 - %br/
6 + .form-group.field
7 - = f.text_field :name
7 + = f.label :name, "Name"
8 - %p
8 + = f.text_field :name, class: 'form-control'
9 - %b Password
9 + .form-group.field
10 - %br/
10 + = f.label :password, "Password"
11 - = f.text_field :password
11 + = f.text_field :password, class: 'form-control'
12 - %p
12 + .form-group.field
13 - %b Started
13 + = f.label :started, "Started"
14 - %br/
14 + = f.check_box :started, class: 'form-control'
15 - = f.check_box :started
15 + .form-group.field
16 - %p
16 + = f.label :start_time, "Start time"
17 - %b Start time
17 + -# = f.datetime_select :start_time, :include_blank => true
18 - %br/
18 + .input-group.date
19 - = f.datetime_select :start_time, :include_blank => true
19 + = f.text_field :start_time, class:'form-control' , value: (@site.start_time ? @site.start_time.strftime('%d/%b/%Y %H:%M') : '')
20 - %p
20 + %span.input-group-addon
21 - = f.submit "Update"
21 + %span.glyphicon.glyphicon-calendar
22 + .actions
23 + = f.submit "Update", class: 'btn btn-primary'
24 + .col-md-8
25 +
22 = link_to 'Show', @site
26 = link_to 'Show', @site
23 |
27 |
24 = link_to 'Back', sites_path
28 = link_to 'Back', sites_path
29 +
30 +
31 + :javascript
32 + $('.input-group.date').datetimepicker({
33 + format: 'DD/MMM/YYYY HH:mm',
34 + });
35 +
@@ -1,101 +1,106
1 - %h1 Listing users
1 + %h1 Users
2
2
3 .panel.panel-primary
3 .panel.panel-primary
4 .panel-title.panel-heading
4 .panel-title.panel-heading
5 Quick Add
5 Quick Add
6 .panel-body
6 .panel-body
7 = form_tag( {method: 'post'}, {class: 'form-inline'}) do
7 = form_tag( {method: 'post'}, {class: 'form-inline'}) do
8 .form-group
8 .form-group
9 = label_tag 'user_login', 'Login'
9 = label_tag 'user_login', 'Login'
10 = text_field 'user', 'login', :size => 10,class: 'form-control'
10 = text_field 'user', 'login', :size => 10,class: 'form-control'
11 .form-group
11 .form-group
12 = label_tag 'user_full_name', 'Full Name'
12 = label_tag 'user_full_name', 'Full Name'
13 = text_field 'user', 'full_name', :size => 10,class: 'form-control'
13 = text_field 'user', 'full_name', :size => 10,class: 'form-control'
14 .form-group
14 .form-group
15 = label_tag 'user_password', 'Password'
15 = label_tag 'user_password', 'Password'
16 = text_field 'user', 'password', :size => 10,class: 'form-control'
16 = text_field 'user', 'password', :size => 10,class: 'form-control'
17 .form-group
17 .form-group
18 = label_tag 'user_password_confirmation', 'Confirm'
18 = label_tag 'user_password_confirmation', 'Confirm'
19 = text_field 'user', 'password_confirmation', :size => 10,class: 'form-control'
19 = text_field 'user', 'password_confirmation', :size => 10,class: 'form-control'
20 .form-group
20 .form-group
21 = label_tag 'user_email', 'email'
21 = label_tag 'user_email', 'email'
22 = text_field 'user', 'email', :size => 10,class: 'form-control'
22 = text_field 'user', 'email', :size => 10,class: 'form-control'
23 =submit_tag "Create", class: 'btn btn-primary'
23 =submit_tag "Create", class: 'btn btn-primary'
24
24
25 .panel.panel-primary
25 .panel.panel-primary
26 .panel-title.panel-heading
26 .panel-title.panel-heading
27 Import from site management
27 Import from site management
28 .panel-body
28 .panel-body
29 = form_tag({:action => 'import'}, :multipart => true,class: 'form form-inline') do
29 = form_tag({:action => 'import'}, :multipart => true,class: 'form form-inline') do
30 .form-group
30 .form-group
31 = label_tag :file, 'File:'
31 = label_tag :file, 'File:'
32 .input-group
32 .input-group
33 %span.input-group-btn
33 %span.input-group-btn
34 %span.btn.btn-default.btn-file
34 %span.btn.btn-default.btn-file
35 Browse
35 Browse
36 = file_field_tag 'file'
36 = file_field_tag 'file'
37 = text_field_tag '' , nil, {readonly: true, class: 'form-control'}
37 = text_field_tag '' , nil, {readonly: true, class: 'form-control'}
38 = submit_tag 'Submit', class: 'btn btn-default'
38 = submit_tag 'Submit', class: 'btn btn-default'
39
39
40
40
41 %p
41 %p
42 = link_to '+ New user', { :action => 'new' }, { class: 'btn btn-success '}
42 = link_to '+ New user', { :action => 'new' }, { class: 'btn btn-success '}
43 = link_to '+ New list of users', { :action => 'new_list' }, { class: 'btn btn-success '}
43 = link_to '+ New list of users', { :action => 'new_list' }, { class: 'btn btn-success '}
44 + = link_to 'Bulk Manage', bulk_manage_user_admin_path , { class: 'btn btn-default btn-info'}
44 = link_to 'View administrators',{ :action => 'admin'}, { class: 'btn btn-default '}
45 = link_to 'View administrators',{ :action => 'admin'}, { class: 'btn btn-default '}
45 - = link_to 'Bulk Manage', bulk_manage_user_admin_path , { class: 'btn btn-default '}
46 = link_to 'Random passwords',{ :action => 'random_all_passwords'}, { class: 'btn btn-default '}
46 = link_to 'Random passwords',{ :action => 'random_all_passwords'}, { class: 'btn btn-default '}
47 = link_to 'View active users',{ :action => 'active'}, { class: 'btn btn-default '}
47 = link_to 'View active users',{ :action => 'active'}, { class: 'btn btn-default '}
48 = link_to 'Mass mailing',{ :action => 'mass_mailing'}, { class: 'btn btn-default '}
48 = link_to 'Mass mailing',{ :action => 'mass_mailing'}, { class: 'btn btn-default '}
49
49
50 - if GraderConfiguration.multicontests?
50 - if GraderConfiguration.multicontests?
51 %br/
51 %br/
52 %b Multi-contest:
52 %b Multi-contest:
53 = link_to '[Manage bulk users in contests]', :action => 'contest_management'
53 = link_to '[Manage bulk users in contests]', :action => 'contest_management'
54 View users in:
54 View users in:
55 - @contests.each do |contest|
55 - @contests.each do |contest|
56 = link_to "[#{contest.name}]", :action => 'contests', :id => contest.id
56 = link_to "[#{contest.name}]", :action => 'contests', :id => contest.id
57 = link_to "[no contest]", :action => 'contests', :id => 'none'
57 = link_to "[no contest]", :action => 'contests', :id => 'none'
58
58
59 - Total #{@user_count} users |
59 + -# Total #{@user_count} users |
60 - - if !@paginated
60 + -# - if !@paginated
61 - Display all users.
61 + -# Display all users.
62 - \#{link_to '[show in pages]', :action => 'index', :page => '1'}
62 + -# \#{link_to '[show in pages]', :action => 'index', :page => '1'}
63 - - else
63 + -# - else
64 - Display in pages.
64 + -# Display in pages.
65 - \#{link_to '[display all]', :action => 'index', :page => 'all'} |
65 + -# \#{link_to '[display all]', :action => 'index', :page => 'all'} |
66 - \#{will_paginate @users, :container => false}
66 + -# \#{will_paginate @users, :container => false}
67
67
68
68
69 - %table.table.table-hover.table-condense
69 + %table.table.table-hover.table-condense.datatable
70 %thead
70 %thead
71 %th Login
71 %th Login
72 %th Full name
72 %th Full name
73 %th email
73 %th email
74 %th Remark
74 %th Remark
75 %th
75 %th
76 Activated
76 Activated
77 %sup{class: 'text-primary',data: {toggle: 'tooltip', placement: 'top'}, title: 'User has already confirmed the email?' } [?]
77 %sup{class: 'text-primary',data: {toggle: 'tooltip', placement: 'top'}, title: 'User has already confirmed the email?' } [?]
78 %th
78 %th
79 Enabled
79 Enabled
80 %sup{class: 'text-primary',data: {toggle: 'tooltip', placement: 'top'}, title: 'Allow the user to login?' } [?]
80 %sup{class: 'text-primary',data: {toggle: 'tooltip', placement: 'top'}, title: 'Allow the user to login?' } [?]
81 %th Last IP
81 %th Last IP
82 %th
82 %th
83 %th
83 %th
84 %th
84 %th
85 %th
85 %th
86 - for user in @users
86 - for user in @users
87 %tr
87 %tr
88 %td= link_to user.login, stat_user_path(user)
88 %td= link_to user.login, stat_user_path(user)
89 %td= user.full_name
89 %td= user.full_name
90 %td= user.email
90 %td= user.email
91 %td= user.remark
91 %td= user.remark
92 %td= toggle_button(user.activated?, toggle_activate_user_path(user),"toggle_activate_user_#{user.id}")
92 %td= toggle_button(user.activated?, toggle_activate_user_path(user),"toggle_activate_user_#{user.id}")
93 %td= toggle_button(user.enabled?, toggle_enable_user_path(user),"toggle_enable_user_#{user.id}")
93 %td= toggle_button(user.enabled?, toggle_enable_user_path(user),"toggle_enable_user_#{user.id}")
94 %td= user.last_ip
94 %td= user.last_ip
95 %td= link_to 'Clear IP', {:action => 'clear_last_ip', :id => user, :page=>params[:page]}, :confirm => 'This will reset last logging in ip of the user, are you sure?', class: 'btn btn-default btn-xs btn-block'
95 %td= link_to 'Clear IP', {:action => 'clear_last_ip', :id => user, :page=>params[:page]}, :confirm => 'This will reset last logging in ip of the user, are you sure?', class: 'btn btn-default btn-xs btn-block'
96 %td= link_to 'Show', {:action => 'show', :id => user}, class: 'btn btn-default btn-xs btn-block'
96 %td= link_to 'Show', {:action => 'show', :id => user}, class: 'btn btn-default btn-xs btn-block'
97 %td= link_to 'Edit', {:action => 'edit', :id => user}, class: 'btn btn-default btn-xs btn-block'
97 %td= link_to 'Edit', {:action => 'edit', :id => user}, class: 'btn btn-default btn-xs btn-block'
98 %td= link_to 'Destroy', user_admin_destroy_path(user), data: {confirm: 'Are you sure?'}, method: :delete, class: 'btn btn-danger btn-xs btn-block'
98 %td= link_to 'Destroy', user_admin_destroy_path(user), data: {confirm: 'Are you sure?'}, method: :delete, class: 'btn btn-danger btn-xs btn-block'
99 %br/
99 %br/
100 = link_to '+ New user', { :action => 'new' }, { class: 'btn btn-success '}
100 = link_to '+ New user', { :action => 'new' }, { class: 'btn btn-success '}
101 = link_to '+ New list of users', { :action => 'new_list' }, { class: 'btn btn-success '}
101 = link_to '+ New list of users', { :action => 'new_list' }, { class: 'btn btn-success '}
102 +
103 + :javascript
104 + $('.datatable').DataTable({
105 + 'pageLength': 50
106 + });
@@ -1,66 +1,70
1 - content_for :header do
1 - content_for :header do
2 = javascript_include_tag 'local_jquery'
2 = javascript_include_tag 'local_jquery'
3
3
4 :javascript
4 :javascript
5 $(function () {
5 $(function () {
6 $('#submission_table').tablesorter({widgets: ['zebra']});
6 $('#submission_table').tablesorter({widgets: ['zebra']});
7 });
7 });
8
8
9 :css
9 :css
10 .fix-width {
10 .fix-width {
11 font-family: Droid Sans Mono,Consolas, monospace, mono, Courier New, Courier;
11 font-family: Droid Sans Mono,Consolas, monospace, mono, Courier New, Courier;
12 }
12 }
13
13
14 %h1= @user.full_name
14 %h1= @user.full_name
15
15
16 <b>Login:</b> #{@user.login} <br/>
16 <b>Login:</b> #{@user.login} <br/>
17 <b>Full name:</b> #{@user.full_name} <br />
17 <b>Full name:</b> #{@user.full_name} <br />
18
18
19
19
20 %h2 Problem Stat
20 %h2 Problem Stat
21 %table.info
21 %table.info
22 %thead
22 %thead
23 %tr.info-head
23 %tr.info-head
24 %th Stat
24 %th Stat
25 %th Value
25 %th Value
26 %tbody
26 %tbody
27 %tr{class: cycle('info-even','info-odd')}
27 %tr{class: cycle('info-even','info-odd')}
28 %td.info_param Submissions
28 %td.info_param Submissions
29 %td= @summary[:count]
29 %td= @summary[:count]
30 %tr{class: cycle('info-even','info-odd')}
30 %tr{class: cycle('info-even','info-odd')}
31 %td.info_param Solved/Attempted Problem
31 %td.info_param Solved/Attempted Problem
32 %td #{@summary[:solve]}/#{@summary[:attempt]} (#{(@summary[:solve]*100.0/@summary[:attempt]).round(1)}%)
32 %td #{@summary[:solve]}/#{@summary[:attempt]} (#{(@summary[:solve]*100.0/@summary[:attempt]).round(1)}%)
33
33
34 %h2 Submission History
34 %h2 Submission History
35
35
36 =render partial: 'application/bar_graph', locals: {histogram: @histogram, param: {bar_width: 7}}
36 =render partial: 'application/bar_graph', locals: {histogram: @histogram, param: {bar_width: 7}}
37
37
38
38
39 - %table.tablesorter-cafe#submission_table
39 + %table#submission_table.table.table-striped
40 %thead
40 %thead
41 %tr
41 %tr
42 %th ID
42 %th ID
43 %th Problem code
43 %th Problem code
44 %th Problem full name
44 %th Problem full name
45 %th Language
45 %th Language
46 %th Submitted at
46 %th Submitted at
47 %th Result
47 %th Result
48 %th Score
48 %th Score
49 - if session[:admin]
49 - if session[:admin]
50 %th IP
50 %th IP
51 %tbody
51 %tbody
52 - @submission.each do |s|
52 - @submission.each do |s|
53 - next unless s.problem
53 - next unless s.problem
54 %tr
54 %tr
55 %td= link_to s.id, submission_path(s)
55 %td= link_to s.id, submission_path(s)
56 %td= link_to s.problem.name, stat_problem_path(s.problem)
56 %td= link_to s.problem.name, stat_problem_path(s.problem)
57 %td= s.problem.full_name
57 %td= s.problem.full_name
58 %td= s.language.pretty_name
58 %td= s.language.pretty_name
59 %td #{s.submitted_at.strftime('%Y-%m-%d %H:%M')} (#{time_ago_in_words(s.submitted_at)} ago)
59 %td #{s.submitted_at.strftime('%Y-%m-%d %H:%M')} (#{time_ago_in_words(s.submitted_at)} ago)
60 %td.fix-width= s.grader_comment
60 %td.fix-width= s.grader_comment
61 %td= ( s.try(:points) ? (s.points*100/s.problem.full_score) : '' )
61 %td= ( s.try(:points) ? (s.points*100/s.problem.full_score) : '' )
62 - if session[:admin]
62 - if session[:admin]
63 %td= s.ip_address
63 %td= s.ip_address
64
64
65
65
66
66
67 + :javascript
68 + $("#submission_table").DataTable({
69 + paging: false
70 + });
You need to be logged in to leave comments. Login now