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

r693:8edec20582c5 - - 7 files changed: 58 inserted, 30 deleted

@@ -57,25 +57,26
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 #bootstrap add-ons
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 gem 'momentjs-rails'
67 gem 'momentjs-rails'
68 gem 'rails_bootstrap_sortable'
68 gem 'rails_bootstrap_sortable'
69 - gem 'bootstrap3-datetimepicker-rails', '~> 4.17.47'
69 + gem 'bootstrap-datepicker-rails'
70 + gem 'bootstrap3-datetimepicker-rails'
70 gem 'jquery-datatables-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'
@@ -52,24 +52,26
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)
68 bootstrap3-datetimepicker-rails (4.17.47)
70 bootstrap3-datetimepicker-rails (4.17.47)
69 momentjs-rails (>= 2.8.1)
71 momentjs-rails (>= 2.8.1)
70 builder (3.2.2)
72 builder (3.2.2)
71 coffee-rails (4.2.1)
73 coffee-rails (4.2.1)
72 coffee-script (>= 2.2.0)
74 coffee-script (>= 2.2.0)
73 railties (>= 4.0.0, < 5.2.x)
75 railties (>= 4.0.0, < 5.2.x)
74 coffee-script (2.4.1)
76 coffee-script (2.4.1)
75 coffee-script-source
77 coffee-script-source
@@ -199,28 +201,29
199 yaml_db (0.4.2)
201 yaml_db (0.4.2)
200 rails (>= 3.0, < 5.1)
202 rails (>= 3.0, < 5.1)
201 rake (>= 0.8.7)
203 rake (>= 0.8.7)
202
204
203 PLATFORMS
205 PLATFORMS
204 ruby
206 ruby
205
207
206 DEPENDENCIES
208 DEPENDENCIES
207 ace-rails-ap
209 ace-rails-ap
208 activerecord-session_store
210 activerecord-session_store
209 autoprefixer-rails
211 autoprefixer-rails
210 best_in_place (~> 3.0.1)
212 best_in_place (~> 3.0.1)
213 + bootstrap-datepicker-rails
211 bootstrap-sass (~> 3.2.0)
214 bootstrap-sass (~> 3.2.0)
212 bootstrap-switch-rails
215 bootstrap-switch-rails
213 bootstrap-toggle-rails
216 bootstrap-toggle-rails
214 - bootstrap3-datetimepicker-rails (~> 4.17.47)
217 + bootstrap3-datetimepicker-rails
215 coffee-rails
218 coffee-rails
216 dynamic_form
219 dynamic_form
217 fuzzy-string-match
220 fuzzy-string-match
218 haml
221 haml
219 haml-rails
222 haml-rails
220 in_place_editing
223 in_place_editing
221 jquery-countdown-rails
224 jquery-countdown-rails
222 jquery-datatables-rails
225 jquery-datatables-rails
223 jquery-rails
226 jquery-rails
224 jquery-tablesorter
227 jquery-tablesorter
225 jquery-timepicker-addon-rails
228 jquery-timepicker-addon-rails
226 jquery-ui-rails
229 jquery-ui-rails
@@ -27,19 +27,21
27 //= require ace/mode-ruby
27 //= require ace/mode-ruby
28 //= require ace/mode-pascal
28 //= require ace/mode-pascal
29 //= require ace/mode-javascript
29 //= require ace/mode-javascript
30 //= require ace/mode-java
30 //= require ace/mode-java
31 //= require ace/theme-merbivore
31 //= require ace/theme-merbivore
32 //= require custom
32 //= require custom
33 //= require jquery.countdown
33 //= require jquery.countdown
34 //-------------- addition from local_jquery -----------
34 //-------------- addition from local_jquery -----------
35 //= require jquery-tablesorter
35 //= require jquery-tablesorter
36 //= require best_in_place
36 //= require best_in_place
37 //= require best_in_place.jquery-ui
37 //= require best_in_place.jquery-ui
38 //= require brython
38 //= require brython
39 + //= require bootstrap-datepicker
40 + //= require bootstrap-datetimepicker
39
41
40 // since this is after blank line, it is not downloaded
42 // since this is after blank line, it is not downloaded
41 //x= require prototype
43 //x= require prototype
42 //x= require prototype_ujs
44 //x= require prototype_ujs
43 //x= require effects
45 //x= require effects
44 //x= require dragdrop
46 //x= require dragdrop
45 //x= require controls
47 //x= require controls
@@ -24,24 +24,25
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";
36 @import "bootstrap-datetimepicker";
37 @import "bootstrap-datetimepicker";
37 @import "dataTables/bootstrap/3/jquery.dataTables.bootstrap";
38 @import "dataTables/bootstrap/3/jquery.dataTables.bootstrap";
38
39
39 //bootstrap navbar color (from)
40 //bootstrap navbar color (from)
40 $bgDefault: #19197b;
41 $bgDefault: #19197b;
41 $bgHighlight: #06064b;
42 $bgHighlight: #06064b;
42 $colDefault: #8e8eb4;
43 $colDefault: #8e8eb4;
43 $colHighlight: #ffffff;
44 $colHighlight: #ffffff;
44 $dropDown: false;
45 $dropDown: false;
45
46
46 @font-face {
47 @font-face {
47 font-family: 'Glyphicons Halflings';
48 font-family: 'Glyphicons Halflings';
@@ -249,28 +249,25
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
@@ -38,40 +38,44
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
@@ -83,12 +87,21
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,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 +
You need to be logged in to leave comments. Login now