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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47ff5804b53b29c5fb19d47c48eafda1dc44339e
|
4
|
+
data.tar.gz: 1e3de86ecfd4119670ba0321454505ab62d95601
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 ||=
|
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
|
-
|
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
|
-
|
5
|
-
<%=
|
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 %>
|
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.
|
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:
|
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.
|
109
|
+
rubygems_version: 2.2.2
|
110
110
|
signing_key:
|
111
111
|
specification_version: 4
|
112
112
|
summary: Scrivito CRM Event Widget
|