scrivito_crm_event_widget 1.0.2 → 1.0.3

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: d8fb6fb31681775a37906825c72c554cdf9a0400
4
- data.tar.gz: b327740dd469c7cdf102e7d5b57d30075cd62b27
3
+ metadata.gz: 47ff5804b53b29c5fb19d47c48eafda1dc44339e
4
+ data.tar.gz: 1e3de86ecfd4119670ba0321454505ab62d95601
5
5
  SHA512:
6
- metadata.gz: b4ae2ae6ad2050cbf56542e679c0903c03e7404f94ba4d56fedb28d51412d092680d56a21bd4fd7064b11245fa70835f2c46f143229e0701ffc9188c6f790539
7
- data.tar.gz: f88258b5de51ea12b5d1499cfc2da6d3ac511ba36900c4e8fb9439d7e646793d565a29dc7c452ad6c78f0825efb846c54407b686d5024f3d26efc321ef545a55
6
+ metadata.gz: 19efb5678b780fd78a523f6ac30c455f26a7de980ee1bc44fafaeccc5e2668d51bc0a2628e497960c24877492ed3c75f40cf7af7d1121213db7b22b014ae90d8
7
+ data.tar.gz: bc85260f9385a604d81908dde91f8860942d6448020b0144c79a57fc2877ecc64a387245d90dd8642273ce9419c76e2f9dd186a71386ce41af6214bd3856a2c0
@@ -1,4 +1,6 @@
1
1
  class CrmEventWidget < Widget
2
+ attribute :event, :string
3
+ attribute :overwrite_title, :string
2
4
 
3
5
  def crm_event
4
6
  self.event
@@ -8,8 +10,12 @@ class CrmEventWidget < Widget
8
10
  self.overwrite_title ? self.overwrite_title : crm_event_obj.title
9
11
  end
10
12
 
13
+ def self.events
14
+ Crm::Event.all.to_a
15
+ end
16
+
11
17
  def crm_event_obj
12
- @event ||= Infopark::Crm::Event.find(crm_event)
18
+ @event ||= Crm::Event.find(crm_event)
13
19
  rescue # no crm event found or no event set
14
20
  nil
15
21
  end
@@ -1,5 +1,11 @@
1
- <h4>Title of Event to overwrite Title from CRM if needed</h4>
2
- <%= scrivito_tag(:div, widget, :overwrite_title) %>
1
+ <%= scrivito_details_for 'Title of Event to overwrite Title from CRM if needed' do %>
2
+ <%= scrivito_tag(:div, widget, :overwrite_title) %>
3
+ <% end %>
3
4
 
4
- <h4>Event ID from CRM</h4>
5
- <%= scrivito_tag(:div, widget, :event) %>
5
+ <%= scrivito_details_for 'Event ID from CRM' do %>
6
+ <%= scrivito_toggle_button_editor widget, :event_id, CrmFormWidget.events do |event|
7
+ scrivito_tag(:button, widget, :event, data: {editor: 'scrivito-toggle-button', content: event.id}) do
8
+ event.title
9
+ end
10
+ end %>
11
+ <% end %>
@@ -1,3 +1,3 @@
1
1
  module ScrivitoCrmEventWidget
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrivito_crm_event_widget
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scrivito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-19 00:00:00.000000000 Z
11
+ date: 2015-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  requirements: []
108
108
  rubyforge_project:
109
- rubygems_version: 2.3.0
109
+ rubygems_version: 2.2.2
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: Scrivito CRM Event Widget