concerto_template_scheduling 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1671432ba95646459fd39f3cd5560d32997e33c
4
- data.tar.gz: 73973e1c52d452cd42afd07be0c61ed11987188d
3
+ metadata.gz: f5c7c04f07217590b080132754d21fe5cafeac4a
4
+ data.tar.gz: 0deb0cda5c77652123da91d07fefad3ea3b48ff0
5
5
  SHA512:
6
- metadata.gz: 0f149b6f566baa2caa01da99013f38137d69e7a23325e46b3a2b9a95a14ef22e3a124ef7ffe87375a91f5108980807f91126593979c913251198ae015f276d61
7
- data.tar.gz: 2be7e85debbf625d1c7ab4206574d06e704ab0659d662ec7df270c09b16cfbf800d122148ff4df4536e1fb2841acc2942590f344a673702532579c7619045c9e
6
+ metadata.gz: 8c4de17db8e34ee8e5812e576baa84a61f773f777d36a44b7d1fcfc6533a3d4876382219f551393f5007049d2a576c495247c95dc929e00ba5d6fca6b9a55e0e
7
+ data.tar.gz: d44439625bd89b78004a8ebcc54ea064cd0a9a446fc49f8254d6270f5aa16f2a1b5ca7fa2c122ba75decb32ca3829262c834287d5df3608b327b01c137381b62
data/README.md CHANGED
@@ -19,6 +19,3 @@ rails generate concerto_template_scheduling
19
19
 
20
20
  ## Security
21
21
  If a user can update a screen, they have the ability to manage the scheduled templates for that screen.
22
-
23
- ## Requirements
24
- `start_time` and `end_time` setters (in the model) don't work well with ruby 1.8.7.
@@ -37,14 +37,22 @@ module ConcertoTemplateScheduling
37
37
  add_view_hook "TemplatesController", :template_details, :partial => "concerto_template_scheduling/templates/in_use_by"
38
38
 
39
39
  # influence which template is the effective template for a screen
40
+ # prepend these so that the EMS plugin can override them
40
41
 
41
- add_controller_hook "Screen", :frontend_display, :before do
42
+ add_controller_hook "Screen", :frontend_display, [:before, :prepend => true] do
42
43
  # sets the template to the "effective" template
43
44
  schedules = Schedule.active.where(:screen_id => self.id)
44
45
  schedules.reject! {|s| !s.is_effective? }
45
46
  self.template = schedules.first.template if !schedules.empty?
46
47
  end
47
48
 
49
+ add_controller_hook "Frontend::ContentsController", :index, [:after, :prepend => true] do
50
+ # sets the template to the "effective" template
51
+ schedules = Schedule.active.where(:screen_id => @screen.id)
52
+ schedules.reject! {|s| !s.is_effective? }
53
+ @screen.template = schedules.first.template if !schedules.empty?
54
+ end
55
+
48
56
  # delete schedules when a screen is deleted
49
57
 
50
58
  add_controller_hook "ScreensController", :destroy, :after do
@@ -1,3 +1,3 @@
1
1
  module ConcertoTemplateScheduling
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: concerto_template_scheduling
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marvin Frederickson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-14 00:00:00.000000000 Z
11
+ date: 2014-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -141,7 +141,7 @@ files:
141
141
  - test/test_helper.rb
142
142
  - test/unit/concerto_template_scheduling/schedule_test.rb
143
143
  - test/unit/helpers/concerto_template_scheduling/schedules_helper_test.rb
144
- homepage: ''
144
+ homepage: https://github.com/concerto/concerto_template_scheduling
145
145
  licenses: []
146
146
  metadata: {}
147
147
  post_install_message:
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  version: '0'
161
161
  requirements: []
162
162
  rubyforge_project:
163
- rubygems_version: 2.0.14
163
+ rubygems_version: 2.0.3
164
164
  signing_key:
165
165
  specification_version: 4
166
166
  summary: Scheduling of Templates for Screens