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 36 # To use debugger
37 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 45 gem "haml"
40 46 gem "mail"
@@ -55,6 +55,18
55 55 i18n (0.6.11)
56 56 in_place_editing (1.2.0)
57 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 70 json (1.8.1)
59 71 mail (2.5.4)
60 72 mime-types (~> 1.16)
@@ -138,6 +150,9
138 150 dynamic_form
139 151 haml
140 152 in_place_editing
153 + jquery-rails
154 + jquery-timepicker-addon-rails
155 + jquery-ui-sass-rails
141 156 mail
142 157 mysql2
143 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 9 body
2 10 background: white image-url("topbg.jpg") repeat-x top center
3 11 font-size: 13px
@@ -290,4 +298,4
290 298
291 299 h2.contest-title
292 300 margin-top: 5px
293 - margin-bottom: 5px No newline at end of file
301 + margin-bottom: 5px
@@ -2,6 +2,11
2 2 def login_stat
3 3 @logins = Array.new
4 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 10 User.all.each do |user|
6 11 @logins << { login: user.login,
7 12 full_name: user.full_name,
@@ -5,7 +5,9
5 5 <%= stylesheet_link_tag "application", :media => "all" %>
6 6 <%= javascript_include_tag "application" %>
7 7 <%= csrf_meta_tags %>
8 + <%= content_for :header %>
8 9 <%= yield :head %>
10 +
9 11 </head>
10 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 3 .submitbox
4 4 %table
5 5 %tr
6 6 %td{colspan: 6, style: 'font-weight: bold'} Query maximum score in submission range
7 7 %tr
8 - %td{style: 'width: 120px; font-weight: bold'} Submission ID:
9 - %td{align: 'right'} From date:
10 - %td= text_field_tag 'start_date', params[:start_date]
11 - %td Time:
12 - %td= text_field_tag 'start_time', params[:start_time], style: 'width:40px'
13 - %td= submit_tag 'query'
8 + %td{style: 'width: 120px; font-weight: bold'}= param_text
9 + %td{align: 'right'} since:
10 + %td= text_field_tag 'since_datetime'
14 11 %tr
15 12 %td
16 - %td{colspan: 5} Leave blank date and/or time for no condition
17 - %br/
13 + %td{align: 'right'} until:
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 11 %h1 Login status
2 12
3 13
14 +
4 15 .task-menu
5 16 Reports
6 17 %br/
7 18 = link_to '[Submission]', :action => 'submit_stat'
8 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 28 %table.info
13 29 %thead
You need to be logged in to leave comments. Login now