Description:
(in progress) add date range
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r412:cee35860e689 - - 8 files changed: 70 inserted, 11 deleted

@@ -0,0 +1,6
1 + //= require jquery
2 + //= require jquery_ujs
3 + //= require jquery.ui.all
4 + //= require jquery.ui.datepicker
5 + //= require jquery.ui.slider
6 + //= require jquery-ui-timepicker-addon
@@ -35,6 +35,12
35
35
36 # To use debugger
36 # To use debugger
37 # gem 'debugger'
37 # gem 'debugger'
38 + #
39 +
40 + gem 'jquery-rails'
41 + gem 'jquery-ui-sass-rails'
42 + gem 'jquery-timepicker-addon-rails'
43 +
38
44
39 gem "haml"
45 gem "haml"
40 gem "mail"
46 gem "mail"
@@ -55,6 +55,18
55 i18n (0.6.11)
55 i18n (0.6.11)
56 in_place_editing (1.2.0)
56 in_place_editing (1.2.0)
57 journey (1.0.4)
57 journey (1.0.4)
58 + jquery-rails (3.1.1)
59 + railties (>= 3.0, < 5.0)
60 + thor (>= 0.14, < 2.0)
61 + jquery-timepicker-addon-rails (1.4.1)
62 + railties (>= 3.1)
63 + jquery-ui-rails (4.0.3)
64 + jquery-rails
65 + railties (>= 3.1.0)
66 + jquery-ui-sass-rails (4.0.3.0)
67 + jquery-rails
68 + jquery-ui-rails (= 4.0.3)
69 + railties (>= 3.1.0)
58 json (1.8.1)
70 json (1.8.1)
59 mail (2.5.4)
71 mail (2.5.4)
60 mime-types (~> 1.16)
72 mime-types (~> 1.16)
@@ -138,6 +150,9
138 dynamic_form
150 dynamic_form
139 haml
151 haml
140 in_place_editing
152 in_place_editing
153 + jquery-rails
154 + jquery-timepicker-addon-rails
155 + jquery-ui-sass-rails
141 mail
156 mail
142 mysql2
157 mysql2
143 prototype-rails
158 prototype-rails
@@ -1,3 +1,11
1 +
2 + @import jquery.ui.core
3 + @import jquery.ui.theme
4 + @import jquery.ui.datepicker
5 + @import jquery.ui.slider
6 + @import jquery-ui-timepicker-addon
7 +
8 +
1 body
9 body
2 background: white image-url("topbg.jpg") repeat-x top center
10 background: white image-url("topbg.jpg") repeat-x top center
3 font-size: 13px
11 font-size: 13px
@@ -290,4 +298,4
290
298
291 h2.contest-title
299 h2.contest-title
292 margin-top: 5px
300 margin-top: 5px
293 - margin-bottom: 5px No newline at end of file
301 + margin-bottom: 5px
@@ -2,6 +2,11
2 def login_stat
2 def login_stat
3 @logins = Array.new
3 @logins = Array.new
4 login = Login.all
4 login = Login.all
5 +
6 + date_and_time = '%y-%m-%d %H:%M'
7 + since_time = strptime(params[:since_datetime],date_and_time)
8 + until_time = strptime(params[:until_datetime],date_and_time)
9 +
5 User.all.each do |user|
10 User.all.each do |user|
6 @logins << { login: user.login,
11 @logins << { login: user.login,
7 full_name: user.full_name,
12 full_name: user.full_name,
@@ -5,7 +5,9
5 <%= stylesheet_link_tag "application", :media => "all" %>
5 <%= stylesheet_link_tag "application", :media => "all" %>
6 <%= javascript_include_tag "application" %>
6 <%= javascript_include_tag "application" %>
7 <%= csrf_meta_tags %>
7 <%= csrf_meta_tags %>
8 + <%= content_for :header %>
8 <%= yield :head %>
9 <%= yield :head %>
10 +
9 </head>
11 </head>
10 <body>
12 <body>
11
13
@@ -1,18 +1,19
1
1
2 - = form_tag({action: :user_stat_max }) do
2 + = form_tag({session: :url }) do
3 .submitbox
3 .submitbox
4 %table
4 %table
5 %tr
5 %tr
6 %td{colspan: 6, style: 'font-weight: bold'} Query maximum score in submission range
6 %td{colspan: 6, style: 'font-weight: bold'} Query maximum score in submission range
7 %tr
7 %tr
8 - %td{style: 'width: 120px; font-weight: bold'} Submission ID:
8 + %td{style: 'width: 120px; font-weight: bold'}= param_text
9 - %td{align: 'right'} From date:
9 + %td{align: 'right'} since:
10 - %td= text_field_tag 'start_date', params[:start_date]
10 + %td= text_field_tag 'since_datetime'
11 - %td Time:
12 - %td= text_field_tag 'start_time', params[:start_time], style: 'width:40px'
13 - %td= submit_tag 'query'
14 %tr
11 %tr
15 %td
12 %td
16 - %td{colspan: 5} Leave blank date and/or time for no condition
13 + %td{align: 'right'} until:
17 - %br/
14 + %td= text_field_tag 'until_datetime'
15 + %tr
16 + %td
17 + %td
18 + %td= submit_tag 'query'
18
19
@@ -1,13 +1,29
1 + - content_for :header do
2 + = javascript_include_tag 'new'
3 +
4 + %script{:type=>"text/javascript"}
5 + $(function () {
6 + $('#since_datetime').datetimepicker({ showButtonPanel: true, dateFormat: "yy-mm-dd", controlType: "slider"} );
7 + $('#until_datetime').datetimepicker({ showButtonPanel: true, dateFormat: "yy-mm-dd", controlType: "slider"} );
8 + });
9 +
10 +
1 %h1 Login status
11 %h1 Login status
2
12
3
13
14 +
4 .task-menu
15 .task-menu
5 Reports
16 Reports
6 %br/
17 %br/
7 = link_to '[Submission]', :action => 'submit_stat'
18 = link_to '[Submission]', :action => 'submit_stat'
8 = link_to '[Login]', :action => 'login_stat'
19 = link_to '[Login]', :action => 'login_stat'
9
20
10 - =render partial: 'date_range'
21 +
22 + =render partial: 'date_range', locals: {param_text: 'Submission range:' }
23 +
24 + hahaha
25 +
26 + =params[:since_datetime]
11
27
12 %table.info
28 %table.info
13 %thead
29 %thead
You need to be logged in to leave comments. Login now