concerto_template_scheduling 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +13 -0
  3. data/README.md +24 -0
  4. data/Rakefile +34 -0
  5. data/app/assets/javascripts/concerto_template_scheduling/application.js +13 -0
  6. data/app/assets/javascripts/concerto_template_scheduling/schedules.js +25 -0
  7. data/app/assets/stylesheets/concerto_template_scheduling/application.css +13 -0
  8. data/app/assets/stylesheets/concerto_template_scheduling/schedules.css +4 -0
  9. data/app/assets/stylesheets/scaffold.css +56 -0
  10. data/app/controllers/concerto_template_scheduling/application_controller.rb +4 -0
  11. data/app/controllers/concerto_template_scheduling/schedules_controller.rb +106 -0
  12. data/app/helpers/concerto_template_scheduling/application_helper.rb +4 -0
  13. data/app/helpers/concerto_template_scheduling/schedules_helper.rb +4 -0
  14. data/app/models/concerto_template_scheduling/schedule.rb +181 -0
  15. data/app/views/concerto_template_scheduling/schedules/_form.html.erb +118 -0
  16. data/app/views/concerto_template_scheduling/schedules/edit.html.erb +8 -0
  17. data/app/views/concerto_template_scheduling/schedules/index.html.erb +82 -0
  18. data/app/views/concerto_template_scheduling/schedules/new.html.erb +8 -0
  19. data/app/views/concerto_template_scheduling/schedules/show.html.erb +54 -0
  20. data/app/views/concerto_template_scheduling/screens/_screen_link.html.erb +66 -0
  21. data/app/views/concerto_template_scheduling/templates/_in_use_by.html.erb +11 -0
  22. data/config/locales/en.yml +62 -0
  23. data/config/routes.rb +5 -0
  24. data/db/migrate/20140118205731_create_concerto_template_scheduling_schedules.rb +13 -0
  25. data/lib/concerto_template_scheduling.rb +4 -0
  26. data/lib/concerto_template_scheduling/engine.rb +69 -0
  27. data/lib/concerto_template_scheduling/version.rb +3 -0
  28. data/lib/tasks/concerto_template_scheduling_tasks.rake +4 -0
  29. data/test/concerto_template_scheduling_test.rb +7 -0
  30. data/test/dummy/README.rdoc +28 -0
  31. data/test/dummy/Rakefile +6 -0
  32. data/test/dummy/app/assets/javascripts/application.js +13 -0
  33. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  34. data/test/dummy/app/controllers/application_controller.rb +5 -0
  35. data/test/dummy/app/helpers/application_helper.rb +2 -0
  36. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  37. data/test/dummy/bin/bundle +3 -0
  38. data/test/dummy/bin/rails +4 -0
  39. data/test/dummy/bin/rake +4 -0
  40. data/test/dummy/config.ru +4 -0
  41. data/test/dummy/config/application.rb +23 -0
  42. data/test/dummy/config/boot.rb +5 -0
  43. data/test/dummy/config/database.yml +25 -0
  44. data/test/dummy/config/environment.rb +5 -0
  45. data/test/dummy/config/environments/development.rb +29 -0
  46. data/test/dummy/config/environments/production.rb +80 -0
  47. data/test/dummy/config/environments/test.rb +36 -0
  48. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  49. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  50. data/test/dummy/config/initializers/inflections.rb +16 -0
  51. data/test/dummy/config/initializers/mime_types.rb +5 -0
  52. data/test/dummy/config/initializers/secret_token.rb +12 -0
  53. data/test/dummy/config/initializers/session_store.rb +3 -0
  54. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  55. data/test/dummy/config/locales/en.yml +23 -0
  56. data/test/dummy/config/routes.rb +4 -0
  57. data/test/dummy/public/404.html +58 -0
  58. data/test/dummy/public/422.html +58 -0
  59. data/test/dummy/public/500.html +57 -0
  60. data/test/dummy/public/favicon.ico +0 -0
  61. data/test/fixtures/concerto_template_scheduling/schedules.yml +11 -0
  62. data/test/functional/concerto_template_scheduling/schedules_controller_test.rb +51 -0
  63. data/test/integration/navigation_test.rb +10 -0
  64. data/test/test_helper.rb +15 -0
  65. data/test/unit/concerto_template_scheduling/schedule_test.rb +9 -0
  66. data/test/unit/helpers/concerto_template_scheduling/schedules_helper_test.rb +6 -0
  67. metadata +202 -0
@@ -0,0 +1,118 @@
1
+ <%= javascript_include_tag "concerto_template_scheduling/application" %>
2
+
3
+ <%= form_for(@schedule) do |f| %>
4
+ <%= render :partial => "layouts/errors", :object => @schedule %>
5
+
6
+ <fieldset>
7
+ <legend><span><%= t('.provide_details') %></span></legend>
8
+
9
+ <%= f.hidden_field :screen_id %>
10
+
11
+ <div class="row-fluid">
12
+ <div class="span6">
13
+ <div class="row-fluid">
14
+ <div class="span6">
15
+ <div class="clearfix datetime">
16
+ <%= label_tooltip "schedule", :start_time, t('.valid_from'), :tip => t('.valid_tip') %>
17
+ <div class="input">
18
+ <div class="input-prepend cursor-pointer" style="margin-bottom: 6px;">
19
+ <span class="add-on"><i class="icon-calendar"></i></span>
20
+ <%= f.text_field("start_time[date]", :id => "start_time_date", :maxlength => 20, :class => "datefield input-small", :value => @schedule.start_time.strftime("%m/%d/%Y")) %>
21
+ </div>
22
+ <p>&nbsp;<a class="event-toggleTimeSelects" href="#"><%= t('.set_specific_times') %></a></p>
23
+ <div class="event-timeSelectDiv">
24
+ <div class="input-prepend">
25
+ <span class="add-on"><%= t(:at) %></span>
26
+ <%= f.text_field("start_time[time]", :id => "start_time_time", :maxlength => 20, :class => "timefield input-small", :value => @schedule.start_time.strftime("%l:%M%P")) %>
27
+ </div>
28
+ </div>
29
+ </div>
30
+ </div>
31
+ </div>
32
+ <div class="span6">
33
+ <div class="clearfix datetime">
34
+ <%= f.label :end_time, t('.valid_until') %>
35
+ <div class="input">
36
+ <div class="input-prepend cursor-pointer" style="margin-bottom: 6px;">
37
+ <span class="add-on"><i class="icon-calendar"></i></span>
38
+ <%= f.text_field("end_time[date]", :id => "end_time_date", :maxlength => 20, :class => "datefield input-small", :value => @schedule.end_time.strftime("%m/%d/%Y")) %>
39
+ </div>
40
+ <div class="event-timeSelectDiv">
41
+ <div class="input-prepend">
42
+ <span class="add-on"><%= t(:at) %></span>
43
+ <%= f.text_field("end_time[time]", :id => "end_time_time", :maxlength => 20, :class => "timefield input-small", :value => @schedule.end_time.strftime("%l:%M%P")) %>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ </div>
52
+
53
+ <%= f.fields_for :config do |config| %>
54
+ <div class="clearfix">
55
+ <%= label_tooltip "schedule", 'config_display_when', ConcertoTemplateScheduling::Schedule.human_attribute_name(:display_when), :tip => t('.display_when_tip') %>
56
+ <div class="input">
57
+ <%= config.select :display_when, options_for_select(ConcertoTemplateScheduling::Schedule::DISPLAY_WHEN, @schedule.config['display_when']) %>
58
+ </div>
59
+ </div>
60
+
61
+ <div class="clearfix" id="feed_selection">
62
+ <%= config.label :feed_id %>
63
+ <div class="input">
64
+ <%= config.select :feed_id, options_from_collection_for_select(@schedule.selectable_feeds, :id, :name, @schedule.config['feed_id']) %>
65
+ </div>
66
+ </div>
67
+
68
+ <div class="clearfix" id="scheduling_criteria">
69
+ <%= config.label :scheduling_criteria, ConcertoTemplateScheduling::Schedule.human_attribute_name(:scheduling_criteria) %>
70
+ <div class="input">
71
+ <%
72
+ rules = []
73
+ if @schedule.config.has_key?('scheduling_criteria')
74
+ if !@schedule.config['scheduling_criteria'].empty?
75
+ rules << RecurringSelect.dirty_hash_to_rule(@schedule.config['scheduling_criteria'])
76
+ end
77
+ end
78
+ %>
79
+ <%= config.select_recurring :scheduling_criteria, rules %>
80
+ </div>
81
+ </div>
82
+
83
+ <div class="row-fluid">
84
+ <div class="span6">
85
+ <div class="row-fluid">
86
+ <div class="span6">
87
+ <div class="clearfix datetime">
88
+ <%= label_tooltip "schedule", :from_time, ConcertoTemplateScheduling::Schedule.human_attribute_name(:from_time), :tip => t('.times_tip') %>
89
+ <div class="input-prepend">
90
+ <span class="add-on"><%= t(:at) %></span>
91
+ <%= config.text_field(:from_time, :maxlength => 20, :class => "timefield input-small", :value => @schedule.config['from_time']) %>
92
+ </div>
93
+ </div>
94
+ </div>
95
+ <div class="span6">
96
+ <div class="clearfix datetime">
97
+ <%= f.label :to_time %>
98
+ <div class="input-prepend">
99
+ <span class="add-on"><%= t(:at) %></span>
100
+ <%= config.text_field(:to_time, :maxlength => 20, :class => "timefield input-small", :value => @schedule.config['to_time']) %>
101
+ </div>
102
+ </div>
103
+ </div>
104
+ </div>
105
+ </div>
106
+ </div>
107
+ <% end %>
108
+ </fieldset>
109
+
110
+ <%= render :partial => 'screens/template_selection', :locals => { :f => f } %>
111
+
112
+ <div class="submit_bar actions">
113
+ <%= f.submit button_text, :class => "btn btn-primary" %>
114
+ <%= link_to t(:cancel), (@schedule.persisted? ? schedule_path : schedules_path), :class => "btn" %>
115
+ </div>
116
+
117
+ <% end %>
118
+
@@ -0,0 +1,8 @@
1
+ <section class="viewblock">
2
+ <header class="viewblock-header">
3
+ <h1 class="default-padding"><%= t('.header', :screen => "#{@schedule.screen.name if !@schedule.screen.nil?}") %></h1>
4
+ </header>
5
+ <div class="viewblock-cont">
6
+ <%= render :partial => 'form', :locals => { :button_text => t(:update_model, :model => ConcertoTemplateScheduling::Schedule.model_name.human) } %>
7
+ </div>
8
+ </section>
@@ -0,0 +1,82 @@
1
+ <section class="viewblock">
2
+ <header class="viewblock-header">
3
+ <div class="viewblock-header_right">
4
+ <div class="button-padding">
5
+ </div>
6
+ </div>
7
+ <h1 class="default-padding">
8
+ <%= t(:all_model, :model => ConcertoTemplateScheduling::Schedule.model_name.human.pluralize) %>
9
+ </h1>
10
+ </header>
11
+ <div class="viewblock-cont">
12
+ <% if !@schedules.empty? %>
13
+ <table>
14
+ <thead>
15
+ <tr>
16
+ <th><%= ConcertoTemplateScheduling::Schedule.human_attribute_name(:screen_id)%></th>
17
+ <th><%= ConcertoTemplateScheduling::Schedule.human_attribute_name(:template_id)%></th>
18
+ <th><%= t('.display')%></th>
19
+ <th><%= ConcertoTemplateScheduling::Schedule.human_attribute_name(:data)%></th>
20
+ <th></th>
21
+ </tr>
22
+ </thead>
23
+
24
+ <tbody>
25
+ <% @schedules.each do |schedule| %>
26
+ <tr>
27
+ <td><%= link_to schedule.screen.name, main_app.screen_path(schedule.screen) %></td>
28
+ <td>
29
+ <% if can?(:read, schedule.template) %>
30
+ <%= link_to schedule.template.name, main_app.template_path(schedule.template) %>
31
+ <% else %>
32
+ <%= schedule.template.name %>
33
+ <% end %><br/>
34
+ <%= image_tag main_app.preview_template_path(schedule.template, :height => 60, :format => :png), :style => "margin: 0px;" %>
35
+ </td>
36
+ <td>
37
+ <%= ConcertoTemplateScheduling::Schedule.human_attribute_name(:start_time)%>: <%= l(schedule.start_time, :format => :long) %><br/>
38
+ <%= ConcertoTemplateScheduling::Schedule.human_attribute_name(:end_time)%>: <%= l(schedule.end_time, :format => :long) %><br/>
39
+ <%= t('concerto_template_scheduling.effective') %>: <b><%= schedule.is_effective? ? t(:yes) : t(:no) %></b>
40
+ </td>
41
+ <td>
42
+ <b><%= ConcertoTemplateScheduling::Schedule::DISPLAY_WHEN.key(schedule.config['display_when'].to_i) %></b><br/>
43
+ <% if schedule.config['display_when'].to_i == ConcertoTemplateScheduling::Schedule::DISPLAY_CONTENT_EXISTS %>
44
+ <% if can? :read, schedule.feed %>
45
+ <%= link_to schedule.feed.name, main_app.feed_path(schedule.feed) %><br/>
46
+ <% else %>
47
+ <%= schedule.feed.name %><br/>
48
+ <% end %>
49
+ <% elsif schedule.config['display_when'].to_i == ConcertoTemplateScheduling::Schedule::DISPLAY_AS_SCHEDULED %>
50
+ <%= schedule.schedule_in_words %><br/>
51
+ <% end %>
52
+
53
+ <% if schedule.config['display_when'].to_i != ConcertoTemplateScheduling::Schedule::DISPLAY_NEVER %>
54
+ <%= schedule.config['from_time'] %> - <%= schedule.config['to_time'] %><br/>
55
+ <% end %>
56
+ </td>
57
+ <td>
58
+ <% if can? :read, schedule %>
59
+ <%= link_to t(:show, :model => ConcertoTemplateScheduling::Schedule.model_name.human), schedule, :class => "btn" %>
60
+ <% end %>
61
+ <% if can? :edit, schedule %>
62
+ <%= link_to t(:edit, :model => ConcertoTemplateScheduling::Schedule.model_name.human), edit_schedule_path(schedule), :class => "btn" %>
63
+ <% end %>
64
+ <% if can? :delete, schedule %>
65
+ <%= link_to t(:destroy, :model => ConcertoTemplateScheduling::Schedule), schedule,
66
+ :data => { :confirm => t('concerto_template_scheduling.are_you_sure_delete', :template => schedule.template.name, :screen => schedule.screen.name) }, :method => :delete, :class => "btn" %>
67
+ <% end %>
68
+ </td>
69
+ </tr>
70
+ <% end %>
71
+ </tbody>
72
+ </table>
73
+ <% else %>
74
+ <div class="default-padding">
75
+ <div class="alert alert-block alert-zero">
76
+ <p class="alert-heading"><%= t('.no_templates_scheduled_header') %></p>
77
+ <p><%= t('.no_templates_scheduled_msg') %></p>
78
+ </div>
79
+ </div>
80
+ <%end %>
81
+ </div>
82
+ </section>
@@ -0,0 +1,8 @@
1
+ <section class="viewblock">
2
+ <header class="viewblock-header">
3
+ <h1 class="default-padding"><%= t('.header', :screen => "#{@schedule.screen.name if !@schedule.screen.nil?}") %></h1>
4
+ </header>
5
+ <div class="viewblock-cont">
6
+ <%= render :partial => 'form', :locals => { :button_text => t(:create_model, :model => ConcertoTemplateScheduling::Schedule.model_name.human) } %>
7
+ </div>
8
+ </section>
@@ -0,0 +1,54 @@
1
+ <section class="viewblock">
2
+ <header class="viewblock-header">
3
+
4
+ <div class="viewblock-header_right">
5
+ <div class="button-padding">
6
+ <% if can? :update, @schedule %>
7
+ <%= link_to t(:edit_model, :model => ConcertoTemplateScheduling::Schedule.model_name.human), edit_schedule_path(@schedule), :class => "btn" %>
8
+ <% end %>
9
+ <% if can? :delete, @schedule %>
10
+ <%= link_to t(:destroy_model, :model => ConcertoTemplateScheduling::Schedule.model_name.human), @schedule, :data => { :confirm => t('concerto_template_scheduling.are_you_sure_delete',
11
+ :template => @schedule.template.name, :screen => @schedule.screen.name) },
12
+ :method => :delete, :class => "btn" %>
13
+ <% end %>
14
+ </div>
15
+ </div>
16
+
17
+ <div class="default-padding">
18
+ <h1>
19
+ <%= link_to t(:all_model, :model => ConcertoTemplateScheduling::Schedule.model_name.human.pluralize), schedules_path %> &gt;
20
+ <%= t('.template_for_screen', :template => @schedule.template.name, :screen =>@schedule.screen.name) %>
21
+ </h1>
22
+ </div>
23
+
24
+ </header>
25
+ <div class="viewblock-cont">
26
+
27
+ <div class="row-fluid">
28
+ <div class="span12">
29
+ <div class="default-padding">
30
+ <div class="subblock">
31
+ <div class="default-padding clearfix">
32
+ <%= image_tag main_app.preview_template_path(@schedule.template, :height => 200, :format => :png), :style => "margin: 0px 1em 0px 0px;" %>
33
+
34
+ <p><%= ConcertoTemplateScheduling::Schedule.human_attribute_name(:start_time)%>: <%= l(@schedule.start_time, :format => :long) %></p>
35
+ <p><%= ConcertoTemplateScheduling::Schedule.human_attribute_name(:end_time)%>: <%= l(@schedule.end_time, :format => :long) %></p>
36
+ <p><%= t('concerto_template_scheduling.when')%>: <b><%= ConcertoTemplateScheduling::Schedule::DISPLAY_WHEN.key(@schedule.config['display_when'].to_i) %></b></p>
37
+ <% if @schedule.config['display_when'].to_i == ConcertoTemplateScheduling::Schedule::DISPLAY_CONTENT_EXISTS %>
38
+ <% feed = Feed.find(@schedule.config['feed_id'].to_i)
39
+ feed_name = (feed.blank? ? 'Invalid Feed' : feed.name)
40
+ %>
41
+ <p><%= t(:feed) %>: <%= feed_name %></p>
42
+ <% elsif @schedule.config['display_when'].to_i == ConcertoTemplateScheduling::Schedule::DISPLAY_AS_SCHEDULED %>
43
+ <p><%=@schedule.schedule_in_words %></p>
44
+ <% end %>
45
+ <p><%= ConcertoTemplateScheduling::Schedule.human_attribute_name(:from_time)%>: <%= @schedule.config['from_time'] %></p>
46
+ <p><%= ConcertoTemplateScheduling::Schedule.human_attribute_name(:to_time)%>: <%= @schedule.config['to_time'] %></p>
47
+
48
+ </div>
49
+ </div>
50
+ </div>
51
+ </div>
52
+ </div>
53
+ </div>
54
+ </section>
@@ -0,0 +1,66 @@
1
+ <section class="viewblock">
2
+ <header class="viewblock-header">
3
+ <div class="viewblock-header_right">
4
+ <div class="button-padding">
5
+ <% if can? :update, @screen %>
6
+ <%= link_to t('.add_schedule'), template_scheduling.new_schedule_path(:screen_id => @screen.id), :class => "btn" %>
7
+ <% end %>
8
+ </div>
9
+ </div>
10
+
11
+ <div class="default-padding">
12
+ <h1><%= t('.scheduled_templates') %></h1>
13
+ </div>
14
+ </header>
15
+ <div class="viewblock-cont">
16
+ <% if @schedules.empty? %>
17
+ <div class="default-padding">
18
+ <div class="alert alert-block alert-zero">
19
+ <p class="alert-heading"><%= t('.no_templates_scheduled_header') %></p>
20
+ <p><%= t('.no_templates_scheduled_msg') %></p>
21
+ </div>
22
+ </div>
23
+ <% else %>
24
+ <ul class="list-stacked">
25
+ <% @schedules.each do |schedule| %>
26
+ <% if can? :read, schedule.screen %>
27
+ <li class="clearfix">
28
+ <% if can? :update, schedule.screen %>
29
+ <%= link_to t('.edit_schedule'), template_scheduling.edit_schedule_path(schedule), :class => "btn btn-small pull-right" %>
30
+ <% end %>
31
+ <p class="uppercase"><small><b><%= schedule.template.name %></b></small></p>
32
+ <div>
33
+ <%= image_tag main_app.preview_template_path(schedule.template, :height => 60, :format => :png), :style => "margin: 0px 1em 0px 0px;", :class => 'pull-left' %>
34
+ <p>
35
+ <%= link_to(template_scheduling.schedule_path(schedule)) do %>
36
+ <%= l(schedule.start_time.to_date, :format => :short) %> - <%= l(schedule.end_time.to_date, :format => :short) %>
37
+ <% end %> <b><%= schedule.is_effective? ? t(:active) : '' %></b>
38
+ </p>
39
+ <p><%= schedule.config['from_time'] %> - <%= schedule.config['to_time'] %></p>
40
+ <p><%= t('concerto_template_scheduling.when')%>: <b><%= ConcertoTemplateScheduling::Schedule::DISPLAY_WHEN.key(schedule.config['display_when'].to_i) %></b></p>
41
+
42
+ <% if schedule.config['display_when'].to_i == ConcertoTemplateScheduling::Schedule::DISPLAY_CONTENT_EXISTS %>
43
+ <p>
44
+ <% if can? :read, schedule.feed %>
45
+ <%= link_to schedule.feed.name, main_app.feed_path(schedule.feed) %>
46
+ <% else %>
47
+ <%= schedule.feed.name %>
48
+ <% end %>
49
+ </p>
50
+ <% elsif schedule.config['display_when'].to_i == ConcertoTemplateScheduling::Schedule::DISPLAY_AS_SCHEDULED %>
51
+ <p><%= schedule.schedule_in_words %></p>
52
+ <% end %>
53
+ </div>
54
+ </li>
55
+ <% end %>
56
+ <% end %>
57
+ </ul>
58
+ <div class="default-padding">
59
+ <p><%= t('.footer') %></p>
60
+ </div>
61
+ <% end %>
62
+ </div>
63
+ </section>
64
+ <!-- TODO:
65
+ allow previewing the screen with a selected template
66
+ -->
@@ -0,0 +1,11 @@
1
+ <% if !@schedules.empty? %>
2
+ <p><%= t('scheduled_for_the_following_screens') %>:
3
+ <ul>
4
+ <% @schedules.each do |schedule| %>
5
+ <% if can? :read, schedule.screen %>
6
+ <li><%= link_to schedule.screen.name, main_app.screen_path(schedule.screen) %></li>
7
+ <% end %>
8
+ <% end %>
9
+ </ul>
10
+ </p>
11
+ <% end %>
@@ -0,0 +1,62 @@
1
+ en:
2
+ activerecord:
3
+ models:
4
+ concerto_template_scheduling/schedule: 'Schedule'
5
+ attributes:
6
+ concerto_template_scheduling/schedule:
7
+ start_time: 'Active From'
8
+ end_time: 'Active Until'
9
+ data: 'Schedule'
10
+ screen_id: 'Screen'
11
+ template_id: 'Template'
12
+ display_when: 'Use Template When'
13
+ from_time: 'From Time'
14
+ to_time: 'Until Time'
15
+ scheduling_criteria: 'Scheduling Criteria'
16
+
17
+ concerto_template_scheduling:
18
+ always: 'Everyday'
19
+ are_you_sure_delete: 'Are you sure you want to delete the scheduled template %{template} for the %{screen} screen?'
20
+ as_scheduled: 'As Scheduled'
21
+ content_exists: 'Content Exists on Feed'
22
+ effective: 'Currently in Effect? '
23
+ never: 'Never'
24
+ from_time_must_precede_to_time: "'From Time' must precede 'To Time'"
25
+ must_be_selected: 'must be selected'
26
+ valid: 'Active'
27
+ when: 'When'
28
+ schedule_must_be_defined: 'Scheduling Criteria must be defined when "Use Template When" is "As Scheduled"'
29
+
30
+ schedules:
31
+ edit:
32
+ header: 'Edit Template Schedule for %{screen}'
33
+ form:
34
+ display_when_tip: 'You can specify that the template will never be used (effectively turning it "off"), will be used every day, will be used on the dates specified by the scheduling criteria (yet to be implemented), or will be used when content has been detected on a specific feed.'
35
+ provide_details: 'Provide Details'
36
+ set_specific_times: 'Set specific times'
37
+ times_tip: "This is the window during each qualified day that the template will be shown."
38
+ valid_from: 'Active From'
39
+ valid_until: 'Active Until'
40
+ valid_tip: "Active dates determine when a template could be displayed, providing that the 'Use Template When' criteria is met."
41
+ index:
42
+ no_templates_scheduled_header: 'No Templates Have Been Scheduled For Any Screens'
43
+ no_templates_scheduled_msg: "Templates can be scheduled from each screen's detail page."
44
+ new:
45
+ header: 'New Template Schedule for %{screen}'
46
+ show:
47
+ template_for_screen: '%{template} Template for %{screen} Screen'
48
+
49
+ screens:
50
+ screen_link:
51
+ add_schedule: 'Add'
52
+ add_schedule_msg: 'Schedule a template for this screen.'
53
+ display: 'Display'
54
+ edit_schedule: 'Edit'
55
+ footer: 'Scheduled templates will prevail over the default template assigned to the screen. If multiple scheduled templates are active at the same time one will be arbitrarily chosen.'
56
+ no_templates_scheduled_header: 'No Templates Scheduled'
57
+ no_templates_scheduled_msg: 'No templates have been scheduled for this screen. The template assigned to the screen will be used.'
58
+ scheduled_templates: 'Scheduled Templates'
59
+
60
+ templates:
61
+ in_use_by:
62
+ scheduled_for_the_following_screens: 'Scheduled for the following screens'
data/config/routes.rb ADDED
@@ -0,0 +1,5 @@
1
+ ConcertoTemplateScheduling::Engine.routes.draw do
2
+ resources :schedules
3
+
4
+
5
+ end
@@ -0,0 +1,13 @@
1
+ class CreateConcertoTemplateSchedulingSchedules < ActiveRecord::Migration
2
+ def change
3
+ create_table :concerto_template_scheduling_schedules do |t|
4
+ t.integer :screen_id
5
+ t.integer :template_id
6
+ t.datetime :start_time
7
+ t.datetime :end_time
8
+ t.text :data
9
+
10
+ t.timestamps
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,4 @@
1
+ require "concerto_template_scheduling/engine"
2
+
3
+ module ConcertoTemplateScheduling
4
+ end