will_filter 3.0.5 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +6 -0
- data/.rspec +1 -0
- data/.rvmrc +1 -0
- data/CHANGELOG.rdoc +2 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +156 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +78 -0
- data/Rakefile +68 -0
- data/app/.DS_Store +0 -0
- data/app/assets/images/.DS_Store +0 -0
- data/{public/favicon.ico → app/assets/images/will_filter/.gitkeep} +0 -0
- data/{public/will_filter/images → app/assets/images/will_filter}/buttons.png +0 -0
- data/{public/will_filter/images → app/assets/images/will_filter}/calendar.png +0 -0
- data/{public/will_filter/images → app/assets/images/will_filter}/clock.png +0 -0
- data/{public/will_filter/images → app/assets/images/will_filter}/close.gif +0 -0
- data/{public/will_filter/images → app/assets/images/will_filter}/sort_arrow_all.gif +0 -0
- data/{public/will_filter/images → app/assets/images/will_filter}/sort_bg.gif +0 -0
- data/{public/will_filter/images → app/assets/images/will_filter}/spinner.gif +0 -0
- data/{public/will_filter/javascripts/will_filter.js → app/assets/javascripts/will_filter/filter.js} +7 -7
- data/app/assets/javascripts/will_filter/filter_prototype_effects.js +38 -0
- data/app/assets/stylesheets/will_filter/actions.css.scss +27 -0
- data/app/assets/stylesheets/will_filter/buttons.css.scss +24 -0
- data/app/assets/stylesheets/will_filter/calendar.css.scss +55 -0
- data/app/assets/stylesheets/will_filter/exporter.css.scss +43 -0
- data/app/assets/stylesheets/will_filter/filter.css.scss +152 -0
- data/app/assets/stylesheets/will_filter/results.css.scss +63 -0
- data/app/controllers/{application_controller.rb → will_filter/application_controller.rb} +4 -4
- data/app/controllers/will_filter/calendar_controller.rb +1 -1
- data/app/controllers/will_filter/exporter_controller.rb +1 -1
- data/app/controllers/will_filter/filter_controller.rb +1 -7
- data/app/models/will_filter/filter.rb +12 -40
- data/app/views/.DS_Store +0 -0
- data/app/views/layouts/will_filter/application.html.erb +14 -0
- data/app/views/will_filter/.DS_Store +0 -0
- data/app/views/will_filter/calendar/.tmp__annual.html.erb.10120~ +32 -0
- data/app/views/will_filter/calendar/.tmp__annual.html.erb.2839~ +14 -0
- data/app/views/will_filter/calendar/.tmp__annual.html.erb.58862~ +14 -0
- data/app/views/will_filter/calendar/.tmp__annual.html.erb.64846~ +14 -0
- data/app/views/will_filter/calendar/.tmp__annual.html.erb.68789~ +32 -0
- data/app/views/will_filter/calendar/.tmp__annual.html.erb.93003~ +14 -0
- data/app/views/will_filter/calendar/.tmp__annual.html.erb.93827~ +32 -0
- data/app/views/will_filter/calendar/.tmp__month.html.erb.756~ +39 -0
- data/app/views/will_filter/calendar/.tmp__quarter.html.erb.69400~ +24 -0
- data/app/views/will_filter/calendar/.tmp_index.html.erb.11043~ +52 -0
- data/app/views/will_filter/calendar/.tmp_index.html.erb.33725~ +52 -0
- data/app/views/will_filter/calendar/.tmp_index.html.erb.56447~ +66 -0
- data/app/views/will_filter/calendar/.tmp_index.html.erb.85379~ +70 -0
- data/app/views/will_filter/calendar/.tmp_index.html.erb.86425~ +70 -0
- data/app/views/will_filter/calendar/.tmp_index.html.erb.95884~ +52 -0
- data/app/views/will_filter/calendar/index.html.erb +3 -3
- data/app/views/will_filter/common/.tmp__results_table.html.erb.47785~ +87 -0
- data/app/views/will_filter/common/.tmp__results_table.html.erb.88043~ +87 -0
- data/app/views/will_filter/common/.tmp__scripts.html.erb.51111~ +0 -0
- data/app/views/will_filter/common/.tmp__scripts.html.erb.6990~ +2 -0
- data/app/views/will_filter/common/.tmp__scripts.html.erb.88469~ +6 -0
- data/app/views/will_filter/common/_results_table.html.erb +6 -2
- data/app/views/will_filter/common/_scripts.html.erb +8 -2
- data/app/views/will_filter/exporter/.tmp_export.html.erb.10837~ +9 -0
- data/app/views/will_filter/exporter/.tmp_export.html.erb.1415~ +29 -0
- data/app/views/will_filter/exporter/.tmp_export.html.erb.60681~ +29 -0
- data/app/views/will_filter/exporter/.tmp_export.html.erb.61343~ +29 -0
- data/app/views/will_filter/exporter/.tmp_export_dialog.html.erb.22940~ +38 -0
- data/app/views/will_filter/exporter/.tmp_index.html.erb.13538~ +47 -0
- data/app/views/will_filter/exporter/.tmp_index.html.erb.23276~ +47 -0
- data/app/views/will_filter/exporter/.tmp_index.html.erb.28308~ +44 -0
- data/app/views/will_filter/exporter/.tmp_index.html.erb.29049~ +44 -0
- data/app/views/will_filter/exporter/index.html.erb +1 -1
- data/app/views/will_filter/filter/.tmp__condition.html.erb.24762~ +28 -0
- data/app/views/will_filter/filter/.tmp__condition.html.erb.27587~ +28 -0
- data/app/views/will_filter/filter/.tmp__condition.html.erb.45362~ +28 -0
- data/app/views/will_filter/filter/.tmp__condition.html.erb.49252~ +28 -0
- data/app/views/will_filter/filter/.tmp__condition.html.erb.58234~ +30 -0
- data/app/views/will_filter/filter/.tmp__condition.html.erb.60688~ +28 -0
- data/app/views/will_filter/filter/.tmp__condition.html.erb.66557~ +28 -0
- data/app/views/will_filter/filter/.tmp__condition.html.erb.68032~ +30 -0
- data/app/views/will_filter/filter/.tmp__condition.html.erb.73740~ +28 -0
- data/app/views/will_filter/filter/.tmp__condition.html.erb.81041~ +30 -0
- data/app/views/will_filter/filter/.tmp__condition.html.erb.98638~ +28 -0
- data/app/views/will_filter/filter/.tmp__conditions.html.erb.23216~ +50 -0
- data/app/views/will_filter/filter/.tmp__conditions.html.erb.53568~ +50 -0
- data/app/views/will_filter/filter/.tmp__conditions.html.erb.5788~ +56 -0
- data/app/views/will_filter/filter/.tmp__conditions.html.erb.79521~ +50 -0
- data/app/views/will_filter/filter/.tmp__conditions.html.erb.92102~ +56 -0
- data/app/views/will_filter/filter/.tmp__conditions.html.erb.97034~ +52 -0
- data/app/views/will_filter/filter/.tmp__container.html.erb.23178~ +30 -0
- data/app/views/will_filter/filter/.tmp__container.html.erb.25113~ +31 -0
- data/app/views/will_filter/filter/.tmp__container.html.erb.29332~ +36 -0
- data/app/views/will_filter/filter/.tmp__container.html.erb.31412~ +32 -0
- data/app/views/will_filter/filter/.tmp__container.html.erb.57958~ +32 -0
- data/app/views/will_filter/filter/.tmp__container.html.erb.80588~ +30 -0
- data/app/views/will_filter/filter/.tmp__container.html.erb.89054~ +30 -0
- data/app/views/will_filter/filter/.tmp__container.html.erb.92260~ +32 -0
- data/app/views/will_filter/filter/.tmp__container.html.erb.92798~ +36 -0
- data/app/views/will_filter/filter/.tmp__filter_conditions.html.erb.70617~ +78 -0
- data/app/views/will_filter/filter/.tmp_calendar.html.erb.30839~ +66 -0
- data/app/views/will_filter/filter/.tmp_calendar.html.erb.52766~ +66 -0
- data/app/views/will_filter/filter/.tmp_calendar.html.erb.83182~ +66 -0
- data/app/views/will_filter/filter/.tmp_export_data.html.erb.50322~ +44 -0
- data/app/views/will_filter/filter/.tmp_index.html.erb.40957~ +4 -0
- data/app/views/will_filter/filter/_condition.html.erb +5 -5
- data/app/views/will_filter/filter/_conditions.html.erb +4 -7
- data/app/views/will_filter/filter/_container.html.erb +5 -5
- data/app/views/will_filter/filter/containers/_boolean.html.erb +2 -2
- data/app/views/will_filter/filter/containers/_date.html.erb +3 -5
- data/app/views/will_filter/filter/containers/_date_range.html.erb +5 -9
- data/app/views/will_filter/filter/containers/_date_time.html.erb +3 -5
- data/app/views/will_filter/filter/containers/_date_time_range.html.erb +5 -9
- data/app/views/will_filter/filter/containers/_list.html.erb +1 -1
- data/app/views/will_filter/filter/containers/_numeric_range.html.erb +3 -3
- data/app/views/will_filter/filter/containers/_text.html.erb +2 -2
- data/app/views/will_filter/filter/index.html.erb +1 -1
- data/config/routes.rb +39 -17
- data/db/migrate/20110924023807_create_will_filter_filters.rb +15 -0
- data/lib/generators/.DS_Store +0 -0
- data/lib/generators/will_filter/templates/config.yml +0 -28
- data/lib/generators/will_filter/templates/create_will_filter_filters.rb +15 -0
- data/lib/generators/will_filter/will_filter_generator.rb +27 -4
- data/lib/tasks/will_filter_tasks.rake +1 -2
- data/lib/will_filter.rb +26 -1
- data/lib/will_filter/calendar.rb +1 -1
- data/lib/will_filter/config.rb +1 -6
- data/lib/will_filter/containers/filter_list.rb +2 -2
- data/lib/will_filter/engine.rb +23 -17
- data/lib/will_filter/{common_methods.rb → extensions/action_controller_extension.rb} +18 -20
- data/lib/will_filter/extensions/action_view_extension.rb +50 -0
- data/lib/{core_ext/active_record/base.rb → will_filter/extensions/active_record_extension.rb} +22 -17
- data/lib/{core_ext/array.rb → will_filter/extensions/array_extension.rb} +1 -1
- data/lib/{application_helper.rb → will_filter/railtie.rb} +30 -20
- data/{app/helpers/application_helper.rb → lib/will_filter/version.rb} +3 -3
- data/script/rails +6 -0
- data/spec/spec_helper.rb +27 -0
- data/test/.DS_Store +0 -0
- data/test/dummy/.DS_Store +0 -0
- data/test/dummy/.sass-cache/f9cb1ef521115be73f1c61d3d5d64f66c947af63/actions.css.scssc +0 -0
- data/test/dummy/.sass-cache/f9cb1ef521115be73f1c61d3d5d64f66c947af63/buttons.css.scssc +0 -0
- data/test/dummy/.sass-cache/f9cb1ef521115be73f1c61d3d5d64f66c947af63/calendar.css.scssc +0 -0
- data/test/dummy/.sass-cache/f9cb1ef521115be73f1c61d3d5d64f66c947af63/exporter.css.scssc +0 -0
- data/test/dummy/.sass-cache/f9cb1ef521115be73f1c61d3d5d64f66c947af63/filter.css.scssc +0 -0
- data/test/dummy/.sass-cache/f9cb1ef521115be73f1c61d3d5d64f66c947af63/results.css.scssc +0 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/.DS_Store +0 -0
- data/test/dummy/app/assets/javascripts/application.js +7 -0
- data/test/dummy/app/assets/stylesheets/application.css +7 -0
- data/test/dummy/app/assets/stylesheets/kaminari.css +10 -0
- data/test/dummy/app/controllers/advanced_controller.rb +19 -0
- data/test/dummy/app/controllers/application_controller.rb +8 -0
- data/test/dummy/app/controllers/simple_controller.rb +15 -0
- data/test/dummy/app/helpers/application_helper.rb +3 -0
- data/test/dummy/app/mailers/.gitkeep +0 -0
- data/test/dummy/app/models/.gitkeep +0 -0
- data/test/dummy/app/models/event.rb +15 -0
- data/test/dummy/app/models/event_filter.rb +41 -0
- data/test/dummy/app/models/event_user.rb +10 -0
- data/test/dummy/app/models/event_user_filter.rb +40 -0
- data/test/dummy/app/models/user.rb +42 -0
- data/test/dummy/app/models/user_filter.rb +57 -0
- data/test/dummy/app/views/advanced/event_members.html.erb +2 -0
- data/test/dummy/app/views/advanced/events.html.erb +2 -0
- data/test/dummy/app/views/advanced/users.html.erb +2 -0
- data/test/dummy/app/views/advanced/users_with_actions.html.erb +12 -0
- data/test/dummy/app/views/common/_event_members.html.erb +2 -0
- data/test/dummy/app/views/common/_events.html.erb +2 -0
- data/test/dummy/app/views/common/_menu.html.erb +23 -0
- data/test/dummy/app/views/common/_users.html.erb +2 -0
- data/test/dummy/app/views/kaminari/_first_page.html.erb +11 -0
- data/test/dummy/app/views/kaminari/_gap.html.erb +8 -0
- data/test/dummy/app/views/kaminari/_last_page.html.erb +11 -0
- data/test/dummy/app/views/kaminari/_next_page.html.erb +11 -0
- data/test/dummy/app/views/kaminari/_page.html.erb +12 -0
- data/test/dummy/app/views/kaminari/_paginator.html.erb +23 -0
- data/test/dummy/app/views/kaminari/_prev_page.html.erb +11 -0
- data/test/dummy/app/views/layouts/application.html.erb +17 -0
- data/test/dummy/app/views/simple/event_members.html.erb +2 -0
- data/test/dummy/app/views/simple/events.html.erb +3 -0
- data/test/dummy/app/views/simple/users.html.erb +2 -0
- data/test/dummy/config.ru +4 -0
- data/{config → test/dummy/config}/application.rb +11 -10
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/data/female_names.txt +26 -0
- data/test/dummy/config/data/last_names.txt +50 -0
- data/test/dummy/config/data/male_names.txt +25 -0
- data/{config → test/dummy/config}/database.yml +3 -0
- data/test/dummy/config/environment.rb +5 -0
- data/{config → test/dummy/config}/environments/development.rb +8 -4
- data/{config → test/dummy/config}/environments/production.rb +24 -13
- data/{config → test/dummy/config}/environments/test.rb +9 -5
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +10 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +13 -0
- data/test/dummy/config/will_filter/config.yml +97 -0
- data/test/dummy/db/migrate/.DS_Store +0 -0
- data/test/dummy/db/migrate/20090416182137_create_users.rb +15 -0
- data/test/dummy/db/migrate/20090418042757_create_events.rb +20 -0
- data/test/dummy/db/migrate/20090418062225_create_event_users.rb +17 -0
- data/test/dummy/db/schema.rb +61 -0
- data/test/dummy/lib/assets/.gitkeep +0 -0
- data/test/dummy/lib/tasks/dummy.rake +14 -0
- data/test/dummy/log/.gitkeep +0 -0
- data/{public → test/dummy/public}/404.html +0 -0
- data/{public → test/dummy/public}/422.html +0 -0
- data/{public → test/dummy/public}/500.html +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/test/functional/welcome_controller_test.rb +9 -0
- data/test/dummy/test/unit/helpers/welcome_helper_test.rb +4 -0
- data/test/fixtures/will_filter/filters.yml +11 -0
- data/test/functional/will_filter/calendar_controller_test.rb +9 -0
- data/test/functional/will_filter/exporter_controller_test.rb +9 -0
- data/test/functional/will_filter/filter_controller_test.rb +9 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +10 -0
- data/test/unit/helpers/will_filter/calendar_helper_test.rb +6 -0
- data/test/unit/helpers/will_filter/exporter_helper_test.rb +6 -0
- data/test/unit/helpers/will_filter/filter_helper_test.rb +6 -0
- data/test/unit/will_filter/filter_test.rb +9 -0
- data/test/will_filter_test.rb +7 -0
- data/will_filter.gemspec +38 -0
- metadata +446 -45
- data/app/views/layouts/application.html.erb +0 -11
- data/config/boot.rb +0 -6
- data/config/environment.rb +0 -15
- data/lib/core_ext/object.rb +0 -34
- data/lib/generators/will_filter/templates/create_will_filter_tables.rb +0 -19
- data/public/robots.txt +0 -5
- data/public/will_filter/images/results_table_th_active.gif +0 -0
- data/public/will_filter/javascripts/will_filter_prototype_effects.js +0 -15
- data/public/will_filter/stylesheets/will_filter.css +0 -168
data/app/views/.DS_Store
ADDED
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>WillFilter</title>
|
|
5
|
+
<%= stylesheet_link_tag "will_filter/application" %>
|
|
6
|
+
<%= javascript_include_tag "will_filter/application" %>
|
|
7
|
+
<%= csrf_meta_tags %>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
|
|
11
|
+
<%= yield %>
|
|
12
|
+
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
|
Binary file
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
.wf_calendar_title {
|
|
3
|
+
text-align:center;
|
|
4
|
+
border-top:1px solid #ccc;
|
|
5
|
+
border-bottom:1px solid #ccc;
|
|
6
|
+
background: #eee;
|
|
7
|
+
}
|
|
8
|
+
.wf_calendar_cells td {
|
|
9
|
+
padding:2px;
|
|
10
|
+
text-align:center;
|
|
11
|
+
font-size:8px;
|
|
12
|
+
color:black;
|
|
13
|
+
background-color:white;
|
|
14
|
+
cursor:pointer;
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
<table class="wf_calendar_table" cellpadding="0" cellspacing="0">
|
|
18
|
+
<tr>
|
|
19
|
+
<% 0.upto(11) do |m| %>
|
|
20
|
+
|
|
21
|
+
<% if m % 4 == 0 %>
|
|
22
|
+
</tr><tr>
|
|
23
|
+
<% end %>
|
|
24
|
+
|
|
25
|
+
<td valign="top">
|
|
26
|
+
<% next_cal = calendar.move(m.months) %>
|
|
27
|
+
<div class="wf_calendar_title"><%=next_cal.title %></div>
|
|
28
|
+
<%= render :partial => "month", :locals => {:calendar => next_cal} %>
|
|
29
|
+
</td>
|
|
30
|
+
<% end %>
|
|
31
|
+
</tr>
|
|
32
|
+
</table>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<table class="wf_calendar_table" cellpadding="0" cellspacing="0">
|
|
2
|
+
<tr>
|
|
3
|
+
<% 0.upto(11) do |m| %>
|
|
4
|
+
<% if m % 4 == 0 %>
|
|
5
|
+
</tr><tr>
|
|
6
|
+
<% end %>
|
|
7
|
+
<td valign="top">
|
|
8
|
+
<% next_cal = calendar.move(m.months) %>
|
|
9
|
+
<div class="wf_calendar_title"><%=next_cal.title %></div>
|
|
10
|
+
<%= render :partial => "month", :locals => {:calendar => next_cal} %>
|
|
11
|
+
</td>
|
|
12
|
+
<% end %>
|
|
13
|
+
</tr>
|
|
14
|
+
</table>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<table class="wf_calendar_table" cellpadding="0" cellspacing="0">
|
|
2
|
+
<tr>
|
|
3
|
+
<% 0.upto(11) do |m| %>
|
|
4
|
+
<% if m % 4 == 0 %>
|
|
5
|
+
</tr><tr>
|
|
6
|
+
<% end %>
|
|
7
|
+
<td valign="top">
|
|
8
|
+
<% next_cal = calendar.move(m.months) %>
|
|
9
|
+
<div class="wf_calendar_title"><%=next_cal.title %></div>
|
|
10
|
+
<%= render :partial => "month", :locals => {:calendar => next_cal} %>
|
|
11
|
+
</td>
|
|
12
|
+
<% end %>
|
|
13
|
+
</tr>
|
|
14
|
+
</table>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<table class="wf_calendar_table" cellpadding="0" cellspacing="0">
|
|
2
|
+
<tr>
|
|
3
|
+
<% 0.upto(11) do |m| %>
|
|
4
|
+
<% if m % 4 == 0 %>
|
|
5
|
+
</tr><tr>
|
|
6
|
+
<% end %>
|
|
7
|
+
<td valign="top">
|
|
8
|
+
<% next_cal = calendar.move(m.months) %>
|
|
9
|
+
<div class="wf_calendar_title"><%=next_cal.title %></div>
|
|
10
|
+
<%= render :partial => "month", :locals => {:calendar => next_cal} %>
|
|
11
|
+
</td>
|
|
12
|
+
<% end %>
|
|
13
|
+
</tr>
|
|
14
|
+
</table>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
.wf_calendar_title {
|
|
3
|
+
text-align:center;
|
|
4
|
+
border-top:1px solid #ccc;
|
|
5
|
+
border-bottom:1px solid #ccc;
|
|
6
|
+
background: #eee;
|
|
7
|
+
}
|
|
8
|
+
.wf_calendar_cells td {
|
|
9
|
+
padding:2px;
|
|
10
|
+
text-align:center;
|
|
11
|
+
font-size:8px;
|
|
12
|
+
color:black;
|
|
13
|
+
background-color:white;
|
|
14
|
+
cursor:pointer;
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
<table class="wf_calendar_table" cellpadding="0" cellspacing="0">
|
|
18
|
+
<tr>
|
|
19
|
+
<% 0.upto(11) do |m| %>
|
|
20
|
+
|
|
21
|
+
<% if m % 4 == 0 %>
|
|
22
|
+
</tr><tr>
|
|
23
|
+
<% end %>
|
|
24
|
+
|
|
25
|
+
<td valign="top">
|
|
26
|
+
<% next_cal = calendar.move(m.months) %>
|
|
27
|
+
<div class="wf_calendar_title"><%=next_cal.title %></div>
|
|
28
|
+
<%= render :partial => "month", :locals => {:calendar => next_cal} %>
|
|
29
|
+
</td>
|
|
30
|
+
<% end %>
|
|
31
|
+
</tr>
|
|
32
|
+
</table>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<table class="wf_calendar_table" cellpadding="0" cellspacing="0">
|
|
2
|
+
<tr>
|
|
3
|
+
<% 0.upto(11) do |m| %>
|
|
4
|
+
<% if m % 4 == 0 %>
|
|
5
|
+
</tr><tr>
|
|
6
|
+
<% end %>
|
|
7
|
+
<td valign="top">
|
|
8
|
+
<% next_cal = calendar.move(m.months) %>
|
|
9
|
+
<div class="wf_calendar_title"><%=next_cal.title %></div>
|
|
10
|
+
<%= render :partial => "month", :locals => {:calendar => next_cal} %>
|
|
11
|
+
</td>
|
|
12
|
+
<% end %>
|
|
13
|
+
</tr>
|
|
14
|
+
</table>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
.wf_calendar_title {
|
|
3
|
+
text-align:center;
|
|
4
|
+
border-top:1px solid #ccc;
|
|
5
|
+
border-bottom:1px solid #ccc;
|
|
6
|
+
background: #eee;
|
|
7
|
+
}
|
|
8
|
+
.wf_calendar_cells td {
|
|
9
|
+
padding:2px;
|
|
10
|
+
text-align:center;
|
|
11
|
+
font-size:8px;
|
|
12
|
+
color:black;
|
|
13
|
+
background-color:white;
|
|
14
|
+
cursor:pointer;
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
<table class="wf_calendar_table" cellpadding="0" cellspacing="0">
|
|
18
|
+
<tr>
|
|
19
|
+
<% 0.upto(11) do |m| %>
|
|
20
|
+
|
|
21
|
+
<% if m % 4 == 0 %>
|
|
22
|
+
</tr><tr>
|
|
23
|
+
<% end %>
|
|
24
|
+
|
|
25
|
+
<td valign="top">
|
|
26
|
+
<% next_cal = calendar.move(m.months) %>
|
|
27
|
+
<div class="wf_calendar_title"><%=next_cal.title %></div>
|
|
28
|
+
<%= render :partial => "month", :locals => {:calendar => next_cal} %>
|
|
29
|
+
</td>
|
|
30
|
+
<% end %>
|
|
31
|
+
</tr>
|
|
32
|
+
</table>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<table class="wf_calendar_cells" cellpadding="0" cellspacing="0" style="border:1px black #ccc;">
|
|
2
|
+
<tr>
|
|
3
|
+
<% Wf::Calendar.days.each_with_index do |day, index| %>
|
|
4
|
+
<td style="text-align:center;color:grey;font-size:10px;font-weight:bold;">
|
|
5
|
+
<%= day %>
|
|
6
|
+
</td>
|
|
7
|
+
<% end %>
|
|
8
|
+
</tr>
|
|
9
|
+
<tr>
|
|
10
|
+
<% index = 0 %>
|
|
11
|
+
<% current_date = calendar.start_date %>
|
|
12
|
+
|
|
13
|
+
<% while current_date <= calendar.end_date do %>
|
|
14
|
+
<% if current_date.wday == 0 %>
|
|
15
|
+
</tr><tr>
|
|
16
|
+
<% end %>
|
|
17
|
+
|
|
18
|
+
<% 0.upto(6) do |i| %>
|
|
19
|
+
<td style="text-align:center; vertical-align: middle;">
|
|
20
|
+
<% if current_date.wday == i and current_date <= calendar.end_date
|
|
21
|
+
today = (current_date==Date.today) ? "today" : ""
|
|
22
|
+
selected = (current_date == calendar.selected_date.to_date and current_date!=Date.today) ? "selected" : ""
|
|
23
|
+
selected = "" # for now
|
|
24
|
+
|
|
25
|
+
set_date = calendar.show_time? ? "" : "wfCalendar.setDate();"
|
|
26
|
+
%>
|
|
27
|
+
<center>
|
|
28
|
+
<div id="wf_calendar_cell_<%=current_date.year%>_<%=current_date.month%>_<%=current_date.day%>" class="wf_calendar_date_cell <%=today%> <%=selected%>" onClick="wfCalendar.selectDateValue(this, '<%=current_date%>'); <%=set_date%>">
|
|
29
|
+
<%=current_date.day %>
|
|
30
|
+
</div>
|
|
31
|
+
</center>
|
|
32
|
+
<% current_date += 1.day %>
|
|
33
|
+
<% index += 1 %>
|
|
34
|
+
<% end %>
|
|
35
|
+
</td>
|
|
36
|
+
<% end %>
|
|
37
|
+
<% end %>
|
|
38
|
+
</tr>
|
|
39
|
+
</table>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
.wf_calendar_title {
|
|
3
|
+
text-align:center;
|
|
4
|
+
border-top:1px solid #ccc;
|
|
5
|
+
border-bottom:1px solid #ccc;
|
|
6
|
+
background: #eee;
|
|
7
|
+
}
|
|
8
|
+
</style>
|
|
9
|
+
<table class="wf_calendar_table" cellpadding="0" cellspacing="0">
|
|
10
|
+
<tr>
|
|
11
|
+
<% 0.upto(3) do |m| %>
|
|
12
|
+
|
|
13
|
+
<% if m % 2 == 0 %>
|
|
14
|
+
</tr><tr>
|
|
15
|
+
<% end %>
|
|
16
|
+
|
|
17
|
+
<td valign="top">
|
|
18
|
+
<% next_cal = calendar.move(m.months) %>
|
|
19
|
+
<div class="wf_calendar_title"><%=next_cal.title %></div>
|
|
20
|
+
<%= render :partial => "month", :locals => {:calendar => next_cal} %>
|
|
21
|
+
</td>
|
|
22
|
+
<% end %>
|
|
23
|
+
</tr>
|
|
24
|
+
</table>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<div style="font-size:12px;font-weight:bold;">
|
|
2
|
+
<div style="float:right; padding-right:2px;">
|
|
3
|
+
<% if @calendar.mode == 'month' %>
|
|
4
|
+
<%=link_to_function("« expand", "wfCalendar.changeMode('quarter', #{@calendar.show_time?})", :style => "font-size:10px; padding-bottom: 3px")%>
|
|
5
|
+
<% elsif @calendar.mode == 'quarter' %>
|
|
6
|
+
<%=link_to_function("« expand", "wfCalendar.changeMode('annual', #{@calendar.show_time?})", :style => "font-size:10px; padding-bottom: 3px")%>
|
|
7
|
+
<% end %>
|
|
8
|
+
|
|
9
|
+
<%=link_to_function(image_tag("/wf/images/close.gif", :title=>"Close"), "wfCalendar.hide()")%>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
Calendar
|
|
13
|
+
</div>
|
|
14
|
+
<div class="wf_calendar_container">
|
|
15
|
+
<% form_tag({:controller => "/wf/calendar"}, {:method => :get, :id => "wf_calendar_form"}) do %>
|
|
16
|
+
<%= hidden_field_tag :wf_calendar_start_date, @calendar.start_date.strftime("%Y/%m/%d") %>
|
|
17
|
+
<%= hidden_field_tag :wf_calendar_selected_date, @calendar.selected_date.strftime("%Y/%m/%d") %>
|
|
18
|
+
<%= hidden_field_tag :wf_calendar_mode, @calendar.mode %>
|
|
19
|
+
<%= hidden_field_tag :wf_calendar_show_time, @calendar.show_time? %>
|
|
20
|
+
|
|
21
|
+
<div style="padding:5px;text-align:center; margin-bottom:5px; border-bottom: 1px solid #ccc;">
|
|
22
|
+
|
|
23
|
+
<%=link_to_function("«", "wfCalendar.goToStartDate('#{@calendar.previous_start_date}')", :style=>"font-size:16px;")%>
|
|
24
|
+
|
|
25
|
+
<% if @calendar.mode != 'annual' %>
|
|
26
|
+
<%= select_tag("month", options_for_select(Wf::Calendar.month_options, @calendar.month), {:id => "wf_calendar_month", :onChange=>"wfCalendar.goToStartDate('')"}) %>
|
|
27
|
+
<% end %>
|
|
28
|
+
<%= select_tag("year", options_for_select(Wf::Calendar.year_options, @calendar.year), {:id => "wf_calendar_year",:onChange=>"wfCalendar.goToStartDate('')"}) %>
|
|
29
|
+
|
|
30
|
+
<%=link_to_function("»", "wfCalendar.goToStartDate('#{@calendar.next_start_date}')", :style=>"font-size:16px;")%>
|
|
31
|
+
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<%= render :partial => @calendar.mode, :locals => {:calendar => @calendar} %>
|
|
35
|
+
|
|
36
|
+
<% if @calendar.show_time? %>
|
|
37
|
+
<div style="text-align:center; margin-top:10px; padding:5px; border-top:1px solid #ccc;">
|
|
38
|
+
<div style="margin:5px;">
|
|
39
|
+
Time:
|
|
40
|
+
<%= select_tag("wf_calendar_hour", options_for_select(Wf::Calendar.hour_options, @calendar.hour)) %>
|
|
41
|
+
:
|
|
42
|
+
<%= select_tag("wf_calendar_minute", options_for_select(Wf::Calendar.minute_options, @calendar.minute)) %>
|
|
43
|
+
:
|
|
44
|
+
<%= select_tag("wf_calendar_second", options_for_select(Wf::Calendar.second_options, @calendar.second)) %>
|
|
45
|
+
</div>
|
|
46
|
+
<%=link_to_function("<span>Set Date and Time</span>", "wfCalendar.setDateTime()", :class => "wf_grey_button wf_pcb") %>
|
|
47
|
+
<%=link_to_function("<span>Cancel</span>", "wfCalendar.hide()", :class => "wf_grey_button wf_pcb") %>
|
|
48
|
+
</div>
|
|
49
|
+
<% end %>
|
|
50
|
+
|
|
51
|
+
<% end %>
|
|
52
|
+
</div>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<div style="font-size:12px;font-weight:bold;">
|
|
2
|
+
<div style="float:right; padding-right:2px;">
|
|
3
|
+
<% if @calendar.mode == 'month' %>
|
|
4
|
+
<%=link_to_function("« expand", "wfCalendar.changeMode('quarter', #{@calendar.show_time?})", :style => "font-size:10px; padding-bottom: 3px")%>
|
|
5
|
+
<% elsif @calendar.mode == 'quarter' %>
|
|
6
|
+
<%=link_to_function("« expand", "wfCalendar.changeMode('annual', #{@calendar.show_time?})", :style => "font-size:10px; padding-bottom: 3px")%>
|
|
7
|
+
<% end %>
|
|
8
|
+
|
|
9
|
+
<%=link_to_function(image_tag("/wf/images/close.gif", :title=>"Close"), "wfCalendar.hide()")%>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
Calendar
|
|
13
|
+
</div>
|
|
14
|
+
<div class="wf_calendar_container">
|
|
15
|
+
<% form_tag({:controller => "/wf/calendar"}, {:method => :get, :id => "wf_calendar_form"}) do %>
|
|
16
|
+
<%= hidden_field_tag :wf_calendar_start_date, @calendar.start_date.strftime("%Y/%m/%d") %>
|
|
17
|
+
<%= hidden_field_tag :wf_calendar_selected_date, @calendar.selected_date.strftime("%Y/%m/%d") %>
|
|
18
|
+
<%= hidden_field_tag :wf_calendar_mode, @calendar.mode %>
|
|
19
|
+
<%= hidden_field_tag :wf_calendar_show_time, @calendar.show_time? %>
|
|
20
|
+
|
|
21
|
+
<div style="padding:5px;text-align:center; margin-bottom:5px; border-bottom: 1px solid #ccc;">
|
|
22
|
+
|
|
23
|
+
<%=link_to_function("«", "wfCalendar.goToStartDate('#{@calendar.previous_start_date}')", :style=>"font-size:16px;")%>
|
|
24
|
+
|
|
25
|
+
<% if @calendar.mode != 'annual' %>
|
|
26
|
+
<%= select_tag("month", options_for_select(Wf::Calendar.month_options, @calendar.month), {:id => "wf_calendar_month", :onChange=>"wfCalendar.goToStartDate('')"}) %>
|
|
27
|
+
<% end %>
|
|
28
|
+
<%= select_tag("year", options_for_select(Wf::Calendar.year_options, @calendar.year), {:id => "wf_calendar_year",:onChange=>"wfCalendar.goToStartDate('')"}) %>
|
|
29
|
+
|
|
30
|
+
<%=link_to_function("»", "wfCalendar.goToStartDate('#{@calendar.next_start_date}')", :style=>"font-size:16px;")%>
|
|
31
|
+
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<%= render :partial => @calendar.mode, :locals => {:calendar => @calendar} %>
|
|
35
|
+
|
|
36
|
+
<% if @calendar.show_time? %>
|
|
37
|
+
<div style="text-align:center; margin-top:10px; padding:5px; border-top:1px solid #ccc;">
|
|
38
|
+
<div style="margin:5px;">
|
|
39
|
+
Time:
|
|
40
|
+
<%= select_tag("wf_calendar_hour", options_for_select(Wf::Calendar.hour_options, @calendar.hour)) %>
|
|
41
|
+
:
|
|
42
|
+
<%= select_tag("wf_calendar_minute", options_for_select(Wf::Calendar.minute_options, @calendar.minute)) %>
|
|
43
|
+
:
|
|
44
|
+
<%= select_tag("wf_calendar_second", options_for_select(Wf::Calendar.second_options, @calendar.second)) %>
|
|
45
|
+
</div>
|
|
46
|
+
<%=link_to_function("<span>Set Date and Time</span>", "wfCalendar.setDateTime()", :class => "wf_grey_button wf_pcb") %>
|
|
47
|
+
<%=link_to_function("<span>Cancel</span>", "wfCalendar.hide()", :class => "wf_grey_button wf_pcb") %>
|
|
48
|
+
</div>
|
|
49
|
+
<% end %>
|
|
50
|
+
|
|
51
|
+
<% end %>
|
|
52
|
+
</div>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<% form_tag(:action => :calendar) do %>
|
|
2
|
+
<%=hidden_field_tag :wf_selected_date, @date %>
|
|
3
|
+
<center>
|
|
4
|
+
|
|
5
|
+
<%=link_to_function("«", "wfCalendar.goToDate('#{@prev_month}', #{(@show_time==true)})", :style=>"font-size:16px;")%>
|
|
6
|
+
|
|
7
|
+
<%= select_tag("month", options_for_select(@month_options, @month), {:id => "wf_cal_month", :onChange=>"wfCalendar.goToDate('', #{(@show_time==true)})"}) %>
|
|
8
|
+
<%= select_tag("year", options_for_select(@year_options, @year), {:id => "wf_cal_year",:onChange=>"wfCalendar.goToDate('', #{(@show_time==true)})"}) %>
|
|
9
|
+
|
|
10
|
+
<%=link_to_function("»", "wfCalendar.goToDate('#{@next_month}', #{(@show_time==true)})", :style=>"font-size:16px;")%>
|
|
11
|
+
|
|
12
|
+
</center>
|
|
13
|
+
<br>
|
|
14
|
+
<table class="calendar_cells">
|
|
15
|
+
<tr>
|
|
16
|
+
<% @days.each_with_index do |day, index| %>
|
|
17
|
+
<td style="text-align:center;color:grey;font-size:10px;">
|
|
18
|
+
<b><%= day %></b>
|
|
19
|
+
</td>
|
|
20
|
+
<% end %>
|
|
21
|
+
</tr>
|
|
22
|
+
<tr>
|
|
23
|
+
<% index = 0 %>
|
|
24
|
+
<% while @start_date <= @end_date do %>
|
|
25
|
+
<% if @start_date.wday == 0 %>
|
|
26
|
+
</tr><tr>
|
|
27
|
+
<% end %>
|
|
28
|
+
|
|
29
|
+
<% 0.upto(6) do |i| %>
|
|
30
|
+
<td valign="top" style="width:100px;border:1px solid #ccc;">
|
|
31
|
+
<% if @start_date.wday == i and @start_date <= @end_date %>
|
|
32
|
+
<% today = (@start_date==Date.today) ? "today" : "" %>
|
|
33
|
+
<% selected = (@start_date == @date and params[:skip_date].blank?) ? "selected" : "" %>
|
|
34
|
+
<% set_date = @show_time ? "" : "setDate();" %>
|
|
35
|
+
<table cellpadding="0px" cellspacing="0px" style="width:100%; background-color:white;">
|
|
36
|
+
<tr>
|
|
37
|
+
<td id="wf_cal_cell_<%=index%>" class="date_cell <%=today%> <%=selected%>" onClick="wfCalendar.selectDateValue('<%=index%>', '<%=@start_date%>'); <%=set_date%>">
|
|
38
|
+
<%=@start_date.day %>
|
|
39
|
+
</td>
|
|
40
|
+
</tr>
|
|
41
|
+
</table>
|
|
42
|
+
<% @start_date = @start_date + 1.day %>
|
|
43
|
+
<% index += 1 %>
|
|
44
|
+
<% end %>
|
|
45
|
+
</td>
|
|
46
|
+
<% end %>
|
|
47
|
+
<% end %>
|
|
48
|
+
</tr>
|
|
49
|
+
</table>
|
|
50
|
+
|
|
51
|
+
<% if @show_time %>
|
|
52
|
+
<center>
|
|
53
|
+
<br>
|
|
54
|
+
Time:
|
|
55
|
+
<%= select_tag("wf_cal_hour", options_for_select(@hour_options, @hour)) %>
|
|
56
|
+
:
|
|
57
|
+
<%= select_tag("wf_cal_minute", options_for_select(@minute_options, @minute)) %>
|
|
58
|
+
:
|
|
59
|
+
<%= select_tag("wf_cal_second", options_for_select(@second_options, @second)) %>
|
|
60
|
+
<br><br>
|
|
61
|
+
<%=link_to_function "SET", "wfCalendar.setDateTime();", :style => "font-size:14px;" %>
|
|
62
|
+
<br>
|
|
63
|
+
</center>
|
|
64
|
+
<% end %>
|
|
65
|
+
|
|
66
|
+
<% end %>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<div class="wf_calendar_container">
|
|
2
|
+
<% form_tag(:action => :calendar) do %>
|
|
3
|
+
<%=hidden_field_tag :wf_selected_date, @date %>
|
|
4
|
+
|
|
5
|
+
<center>
|
|
6
|
+
|
|
7
|
+
<%=link_to_function("«", "wfCalendar.goToDate('#{@prev_month}', #{(@show_time==true)})", :style=>"font-size:16px;")%>
|
|
8
|
+
|
|
9
|
+
<%= select_tag("month", options_for_select(@month_options, @month), {:id => "wf_cal_month", :onChange=>"wfCalendar.goToDate('', #{(@show_time==true)})"}) %>
|
|
10
|
+
<%= select_tag("year", options_for_select(@year_options, @year), {:id => "wf_cal_year",:onChange=>"wfCalendar.goToDate('', #{(@show_time==true)})"}) %>
|
|
11
|
+
|
|
12
|
+
<%=link_to_function("»", "wfCalendar.goToDate('#{@next_month}', #{(@show_time==true)})", :style=>"font-size:16px;")%>
|
|
13
|
+
|
|
14
|
+
</center>
|
|
15
|
+
|
|
16
|
+
<br>
|
|
17
|
+
<table class="calendar_cells">
|
|
18
|
+
<tr>
|
|
19
|
+
<% @days.each_with_index do |day, index| %>
|
|
20
|
+
<td style="text-align:center;color:grey;font-size:10px;">
|
|
21
|
+
<b><%= day %></b>
|
|
22
|
+
</td>
|
|
23
|
+
<% end %>
|
|
24
|
+
</tr>
|
|
25
|
+
<tr>
|
|
26
|
+
<% index = 0 %>
|
|
27
|
+
<% while @start_date <= @end_date do %>
|
|
28
|
+
<% if @start_date.wday == 0 %>
|
|
29
|
+
</tr><tr>
|
|
30
|
+
<% end %>
|
|
31
|
+
|
|
32
|
+
<% 0.upto(6) do |i| %>
|
|
33
|
+
<td valign="top" style="width:100px;border:1px solid #ccc;">
|
|
34
|
+
<% if @start_date.wday == i and @start_date <= @end_date %>
|
|
35
|
+
<% today = (@start_date==Date.today) ? "today" : "" %>
|
|
36
|
+
<% selected = (@start_date == @date and params[:skip_date].blank?) ? "selected" : "" %>
|
|
37
|
+
<% set_date = @show_time ? "" : "wfCalendar.setDate();" %>
|
|
38
|
+
<table cellpadding="0px" cellspacing="0px" style="width:100%; background-color:white;">
|
|
39
|
+
<tr>
|
|
40
|
+
<td id="wf_cal_cell_<%=index%>" class="date_cell <%=today%> <%=selected%>" onClick="wfCalendar.selectDateValue('<%=index%>', '<%=@start_date%>'); <%=set_date%>">
|
|
41
|
+
<%=@start_date.day %>
|
|
42
|
+
</td>
|
|
43
|
+
</tr>
|
|
44
|
+
</table>
|
|
45
|
+
<% @start_date = @start_date + 1.day %>
|
|
46
|
+
<% index += 1 %>
|
|
47
|
+
<% end %>
|
|
48
|
+
</td>
|
|
49
|
+
<% end %>
|
|
50
|
+
<% end %>
|
|
51
|
+
</tr>
|
|
52
|
+
</table>
|
|
53
|
+
|
|
54
|
+
<% if @show_time %>
|
|
55
|
+
<center>
|
|
56
|
+
<br>
|
|
57
|
+
Time:
|
|
58
|
+
<%= select_tag("wf_cal_hour", options_for_select(@hour_options, @hour)) %>
|
|
59
|
+
:
|
|
60
|
+
<%= select_tag("wf_cal_minute", options_for_select(@minute_options, @minute)) %>
|
|
61
|
+
:
|
|
62
|
+
<%= select_tag("wf_cal_second", options_for_select(@second_options, @second)) %>
|
|
63
|
+
<br><br>
|
|
64
|
+
<%=link_to_function "SET", "wfCalendar.setDateTime();", :style => "font-size:14px;" %>
|
|
65
|
+
<br>
|
|
66
|
+
</center>
|
|
67
|
+
<% end %>
|
|
68
|
+
|
|
69
|
+
<% end %>
|
|
70
|
+
</div>
|