mautic 2.3.8 → 2.5.0

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
  SHA256:
3
- metadata.gz: ffa1c03fd57447ef4b33050b2fea5150a9c4b2665675fdb0894f1a914c7e24af
4
- data.tar.gz: 05be7f0b16e1a3e0a9f3c3adc0e89c3e3b1c0554afd122777fce06ec2ab1dad9
3
+ metadata.gz: eb4e903dff064ccd272c769b31a9692b0479cc93f86d6caa7586f73adb0190d6
4
+ data.tar.gz: a96abb5a2f455fb0026bfe56be46640f49d6fdcf89673f27fb59ebae8f66aa42
5
5
  SHA512:
6
- metadata.gz: 20100e7ada6a8715ffefe5d2210c4c4cdd20007e0f410ef9d66a192851deca4a86e4b4fb1e91e25a00ac639641d7210c2bf64cf1f8dec36b9476bc73edfd46cb
7
- data.tar.gz: 9f6e8a2abcb4ac1e067420e88e1691a6fb0f63cc1ddb3ffaa1a0be8043985dd072735b2e1316c8e0a413dcde474e743c446ed65d2b815dc29da140866a820245
6
+ metadata.gz: 49997f77ce24fa44c9a3ec96a785b31d0ae382ccd754e9c3c89b1adabf33869b31dc3fbc0aaf25f38b3d988192cafa6ccc7d617b7c90a53ae516a6f218b8fa38
7
+ data.tar.gz: ab3974fd38ba6ce83c8b489634bce1a637b18effdddbcb779b98e5531d865cf4bd6363c899b57927a9374a409b35cc0f27865cffca7086963954bbfad9aa9828
data/README.md CHANGED
@@ -32,13 +32,40 @@ Mautic.configure do |config|
32
32
  # OR it can be Proc
33
33
  # *optional* This is your default mautic URL - used in form helper
34
34
  config.mautic_url = "https://mautic.my.app"
35
+ # Set authorize condition for manage Mautic::Connections
36
+ config.authorize_mautic_connections = ->(controller) { false }
35
37
  end
36
38
  ```
39
+ ### Manage mautic connections
40
+ You can use builtin Mautic:ConnectionsController:
37
41
 
38
42
  add to `config/routes.rb`
39
43
  ```ruby
40
44
  mount Mautic::Engine => "/mautic"
41
45
  ```
46
+ note: Make sure that you have some user authorization. There is builtin mechanism, in `Mautic.config.authorize_mautic_connections` = which return `false` to prevent all access by default (see: app/controllers/mautic/connections_controller.rb:3). For change this, you need add to `config/initializers/mautic.rb`:
47
+ ```ruby
48
+ Mautic.config.authorize_mautic_connections = ->(controller) { current_user.admin? }
49
+ ```
50
+
51
+ OR use your own controller, by including concern
52
+ ```ruby
53
+ class MyOwnController < ApplicationController
54
+ before_action :authorize_user
55
+
56
+ include Mautic::ConnectionsControllerConcern
57
+ end
58
+ ```
59
+ Concern require additional routes (authorize and oauth2) in `routes.rb`
60
+ ```ruby
61
+ resources :my_resources do
62
+ member do
63
+ get :authorize
64
+ get :oauth2
65
+ end
66
+ end
67
+ ```
68
+
42
69
  ### Create mautic connection
43
70
 
44
71
  1. In your mautic, create new
@@ -67,11 +94,11 @@ mount Mautic::Engine => "/mautic"
67
94
  ```
68
95
  Get specify contact:
69
96
  ```ruby
70
- contact = m.contact.find(1) # => #<Mautic::Contact id=1 ...>
97
+ contact = m.contact.find(1) # => #<Mautic::Contact id=1 ...>
71
98
  ```
72
99
  Collections of contacts:
73
100
  ```ruby
74
- m.contacts.where("gmail").each do |contact|
101
+ m.contacts.where(search: "gmail").each do |contact|
75
102
  #<Mautic::Contact id=12 ...>
76
103
  #<Mautic::Contact id=21 ...>
77
104
  #<Mautic::Contact id=99 ...>
@@ -88,7 +115,7 @@ mount Mautic::Engine => "/mautic"
88
115
  contact.save # => false
89
116
  contact.errors # => [{"code"=>400, "message"=>"email: This field is required.", "details"=>{"email"=>["This field is required."]}}]
90
117
  ```
91
- Do not contact
118
+ #### Do not contact
92
119
  ```ruby
93
120
  contact.do_not_contact? # => false
94
121
  contact.do_not_contact! message: "Some reason"
@@ -100,6 +127,18 @@ mount Mautic::Engine => "/mautic"
100
127
  contact.remove_do_not_contact!
101
128
  contact.do_not_contact? # => false
102
129
  ```
130
+ #### Campaigns
131
+ list of contacts campaigns (where contact is a member) and remove it from one
132
+ ```ruby
133
+ contact.campaigns #=> [Mautic::Campaign, ...]
134
+ campaign = contact.campaigns.find { |campaign| campaign.name == "Newsletter" }
135
+ campaign.remove_contact! contact.id
136
+ ```
137
+ or add contact back
138
+ ```ruby
139
+ campaign = connection.campaigns.where(search: "Newsletter").first
140
+ campaign.add_contact! contact.id
141
+ ```
103
142
  Of course you can use more than contact: `assets`, `emails`, `companies`, `forms`, `points` ...
104
143
  ### Gem provides simple Mautic form submit
105
144
  There are two options of usage:
@@ -85,12 +85,12 @@ module Mautic
85
85
  # ==--==--==--==--
86
86
 
87
87
  def authorize
88
- redirect_to @mautic_connection.authorize
88
+ redirect_to @mautic_connection.authorize(self)
89
89
  end
90
90
 
91
91
  def oauth2
92
92
  begin
93
- response = @mautic_connection.get_code(params.require(:code))
93
+ response = @mautic_connection.get_code(params.require(:code), self)
94
94
  @mautic_connection.update(token: response.token, refresh_token: response.refresh_token)
95
95
  return render plain: t('mautic.text_mautic_authorize_successfully')
96
96
  rescue OAuth2::Error => e
@@ -1,5 +1,15 @@
1
1
  module Mautic
2
2
  class ConnectionsController < ApplicationController
3
+ before_action :authorize_me
3
4
  include ::Mautic::ConnectionsControllerConcern
5
+
6
+ private
7
+
8
+ def authorize_me
9
+ unless Mautic.config.authorize_mautic_connections.call(self)
10
+ logger.warn "Mautic::ConnectionsController unauthorized, you can change this by Mautic.config.authorize_mautic_connections. See: lib/mautic.rb:77"
11
+ render plain: "Unauthorized", status: 403
12
+ end
13
+ end
4
14
  end
5
15
  end
@@ -0,0 +1,22 @@
1
+ module Mautic
2
+ class Campaign < Model
3
+
4
+ # @see https://developer.mautic.org/#add-contact-to-a-campaign
5
+ # @param [Integer] id of Mautic::Contact
6
+ def add_contact!(id)
7
+ json = @connection.request(:post, "api/campaigns/#{self.id}/contact/#{id}/add")
8
+ json["success"]
9
+ rescue RequestError => _e
10
+ false
11
+ end
12
+
13
+ # @see https://developer.mautic.org/#remove-contact-from-a-campaign
14
+ # @param [Integer] id of Mautic::Contact
15
+ def remove_contact!(id)
16
+ json = @connection.request(:post, "api/campaigns/#{self.id}/contact/#{id}/remove")
17
+ json["success"]
18
+ rescue RequestError => _e
19
+ false
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,11 @@
1
+ module Mautic
2
+ class CompanyField < Model
3
+ def self.endpoint
4
+ "fields/company"
5
+ end
6
+
7
+ def self.in(connection)
8
+ Proxy.new(connection, endpoint, klass: name, data_name: "field")
9
+ end
10
+ end
11
+ end
@@ -17,11 +17,11 @@ module Mautic
17
17
  raise NotImplementedError
18
18
  end
19
19
 
20
- def authorize
20
+ def authorize(context)
21
21
  raise NotImplementedError
22
22
  end
23
23
 
24
- def get_code(code)
24
+ def get_code(code, context)
25
25
  raise NotImplementedError
26
26
  end
27
27
 
@@ -55,7 +55,7 @@ module Mautic
55
55
 
56
56
  private
57
57
 
58
- def callback_url
58
+ def callback_url(context)
59
59
  if (conf = Mautic.config.base_url).is_a?(Proc)
60
60
  conf = conf.call(self)
61
61
  end
@@ -11,12 +11,12 @@ module Mautic
11
11
  })
12
12
  end
13
13
 
14
- def authorize
15
- client.auth_code.authorize_url(redirect_uri: callback_url)
14
+ def authorize(context)
15
+ client.auth_code.authorize_url(redirect_uri: callback_url(context))
16
16
  end
17
17
 
18
- def get_code(code)
19
- client.auth_code.get_token(code, redirect_uri: callback_url)
18
+ def get_code(code, context)
19
+ client.auth_code.get_token(code, redirect_uri: callback_url(context))
20
20
  end
21
21
 
22
22
  def connection
@@ -37,9 +37,10 @@ module Mautic
37
37
 
38
38
  private
39
39
 
40
- def callback_url
40
+ def callback_url(context)
41
41
  uri = super
42
- uri.path = Mautic::Engine.routes.url_helpers.oauth2_connection_path(self)
42
+ # uri.path = Mautic::Engine.routes.url_helpers.oauth2_connection_path(self)
43
+ uri.path = context.url_for(action: "oauth2", id: self , only_path: true)
43
44
  uri.to_s
44
45
  end
45
46
 
@@ -41,8 +41,9 @@ module Mautic
41
41
 
42
42
  if source
43
43
  self.owner = source['owner'] || {}
44
+ tags = (source['tags'] || []).map { |t| Mautic::Tag.new(self, t) }.sort_by(&:name)
44
45
  self.attributes = {
45
- tags: (source['tags'] || []).collect { |t| Mautic::Tag.new(@connection, t) }.sort_by(&:name),
46
+ tags: Tag::Collection.new(self, *tags),
46
47
  doNotContact: source['doNotContact'] || [],
47
48
  owner: owner['id'],
48
49
  }
@@ -51,7 +52,6 @@ module Mautic
51
52
 
52
53
  def to_mautic(data = @table)
53
54
  data.delete(:doNotContact)
54
- data.delete(:tags)
55
55
  super(data)
56
56
  end
57
57
 
@@ -96,7 +96,7 @@ module Mautic
96
96
  self.errors = e.errors
97
97
  end
98
98
 
99
- self.errors.blank?
99
+ errors.blank?
100
100
  end
101
101
 
102
102
  alias add_dnc do_not_contact!
@@ -117,6 +117,23 @@ module Mautic
117
117
 
118
118
  # !endgroup
119
119
 
120
+ # @!group Campaigns
121
+
122
+ # @return [Array<Mautic::Campaign>]
123
+ def campaigns
124
+ return @campaigns if @campaigns
125
+
126
+ json = @connection.request(:get, "api/contacts/#{id}/campaigns")
127
+
128
+ @campaigns = json["campaigns"].collect do |_campaign_id, campaign_attributes|
129
+ Mautic::Campaign.new @connection, campaign_attributes
130
+ end
131
+ rescue RequestError => _e
132
+ []
133
+ end
134
+
135
+ # !endgroup
136
+
120
137
  private
121
138
 
122
139
  def clear_change
@@ -0,0 +1,11 @@
1
+ module Mautic
2
+ class ContactField < Model
3
+ def self.endpoint
4
+ "fields/contact"
5
+ end
6
+
7
+ def self.in(connection)
8
+ Proxy.new(connection, endpoint, klass: name, data_name: "field")
9
+ end
10
+ end
11
+ end
@@ -5,5 +5,34 @@ module Mautic
5
5
  self.attributes = { name: source['name'], fields: source['fields'] } if source.is_a? Hash
6
6
  end
7
7
 
8
+ # @param [Integer] submission_id
9
+ # @return Mautic::Submissions::Form
10
+ # @see https://developer.mautic.org/#get-form-submission
11
+ def submission(submission_id)
12
+ json = @connection.request(:get, "api/forms/#{id}/submissions/#{submission_id}")
13
+ Mautic::Submissions::Form.new @connection, json["submission"]
14
+ rescue Mautic::RecordNotFound => _e
15
+ nil
16
+ end
17
+
18
+ # @see https://developer.mautic.org/#list-form-submissions
19
+ # @param [Hash] options
20
+ # @option options [String] :search String or search command to filter entities by.
21
+ # @option options [String] :start Starting row for the entities returned. Defaults to 0.
22
+ # @option options [String] :limit Limit number of entities to return. Defaults to the system configuration for pagination (30).
23
+ # @option options [String] :orderBy Column to sort by. Can use any column listed in the response, also can use column of joined table with prefix. Sort by submitted date is s.date_submitted
24
+ # @option options [String] :orderByDir Sort direction: asc or desc.
25
+ # @option options [String] :publishedOnly Only return currently published entities.
26
+ # @option options [String] :minimal Return only array of entities without additional lists in it.
27
+ # @return Array[Mautic::Submissions::Form]
28
+ def submissions(**options)
29
+ json = @connection.request(:get, "api/forms/#{id}/submissions", params: options)
30
+ @submissions = json["submissions"].collect do |attributes|
31
+ Mautic::Submissions::Form.new @connection, attributes
32
+ end
33
+ rescue RequestError => _e
34
+ []
35
+ end
36
+
8
37
  end
9
- end
38
+ end
@@ -1,6 +1,34 @@
1
1
  module Mautic
2
2
  class Tag < Model
3
3
 
4
+ class Collection < Array
5
+ attr_reader :model
6
+
7
+ # @param [Mautic::Model] model
8
+ def initialize(model, *several_variants)
9
+ @model = model
10
+ @tags_to_remove = []
11
+ super(several_variants)
12
+ end
13
+
14
+ def <<(item)
15
+ @model.changed = true
16
+ item = Tag.new(@model, { tag: item }) if item.is_a?(String)
17
+ super(item)
18
+ end
19
+
20
+ def remove(item)
21
+ @model.changed = true
22
+ item = detect { |t| t.name == item } if item.is_a?(String)
23
+ @tags_to_remove << "-#{item}"
24
+ delete item
25
+ end
26
+
27
+ def to_mautic
28
+ map(&:name) + @tags_to_remove
29
+ end
30
+ end
31
+
4
32
  # alias for attribute :tag
5
33
  def name
6
34
  tag
@@ -12,10 +12,10 @@ module Mautic
12
12
 
13
13
  def form_submissions
14
14
  @forms ||= Array.wrap(@params.require("mautic.form_on_submit")).collect do |data|
15
- p = data.permit(submission: [:id, form: {}, lead: {}, results: {}]).to_h
15
+ p = data.permit(submission: [:id, :referer, form: {}, lead: {}, results: {}]).to_h
16
16
  ::Mautic::Submissions::Form.new(@connection, p["submission"]) if p["submission"]
17
17
  end.compact
18
18
  end
19
19
 
20
20
  end
21
- end
21
+ end
@@ -2,8 +2,6 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>Mautic</title>
5
- <%= stylesheet_link_tag "mautic/application", media: "all" %>
6
- <%= javascript_include_tag "mautic/application" %>
7
5
  <%= csrf_meta_tags %>
8
6
  </head>
9
7
  <body>
@@ -24,7 +24,7 @@
24
24
  <% if form.object.persisted? %>
25
25
  <div class="field">
26
26
  <label>Now generate pair of tokens with this callback url:</label>
27
- <pre><%= @mautic_connection.send :callback_url %></pre>
27
+ <pre><%= @mautic_connection.send :callback_url, controller %></pre>
28
28
  </div>
29
29
 
30
30
  <div class="field">
@@ -3,8 +3,6 @@ Mautic::Engine.routes.draw do
3
3
  member do
4
4
  get :authorize
5
5
  get :oauth2
6
-
7
6
  end
8
- # post "webhook/:mautic_connection_id", action: "webhook", on: :collection
9
7
  end
10
8
  end
@@ -67,10 +67,14 @@ module Mautic
67
67
  end
68
68
 
69
69
  configure do |config|
70
- # This is URL your application - its for oauth callbacks
70
+ # This is URL of your application - its for oauth callbacks
71
71
  config.base_url = "http://localhost:3000"
72
+
72
73
  # *optional* This is your default mautic URL - used in form helper
73
74
  config.mautic_url = "https://mautic.my.app"
75
+
76
+ # Set authorize condition for manage Mautic::Connections
77
+ config.authorize_mautic_connections = ->(controller) { false }
74
78
  end
75
79
  # Your code goes here...
76
80
 
@@ -39,6 +39,7 @@ module Mautic
39
39
 
40
40
  attr_reader :connection
41
41
  attr_accessor :errors
42
+ attr_writer :changed
42
43
 
43
44
  # @param [Mautic::Connection] connection
44
45
  def initialize(connection, hash = nil)
@@ -58,7 +59,7 @@ module Mautic
58
59
  end
59
60
 
60
61
  def update(force = false)
61
- return false if changes.blank?
62
+ return false unless changed?
62
63
 
63
64
  begin
64
65
  json = @connection.request((force && :put || :patch), "api/#{endpoint}/#{id}/edit", body: to_mautic)
@@ -68,7 +69,7 @@ module Mautic
68
69
  self.errors = e.errors
69
70
  end
70
71
 
71
- self.errors.blank?
72
+ errors.blank?
72
73
  end
73
74
 
74
75
  def update_columns(attributes = {})
@@ -88,7 +89,7 @@ module Mautic
88
89
  self.errors = e.errors
89
90
  end
90
91
 
91
- self.errors.blank?
92
+ errors.blank?
92
93
  end
93
94
 
94
95
  def destroy
@@ -105,6 +106,12 @@ module Mautic
105
106
  @table.changes
106
107
  end
107
108
 
109
+ def changed?
110
+ return @changed unless @changed.nil?
111
+
112
+ @changed = !changes.empty?
113
+ end
114
+
108
115
  def attributes
109
116
  @table.to_h
110
117
  end
@@ -118,13 +125,20 @@ module Mautic
118
125
 
119
126
  def to_mautic(data = @table)
120
127
  data.each_with_object({}) do |(key, val), mem|
121
- mem[key] = val.is_a?(Array) ? val.join("|") : val
128
+ mem[key] = if val.respond_to?(:to_mautic)
129
+ val.to_mautic
130
+ elsif val.is_a?(Array)
131
+ val.join("|")
132
+ else
133
+ val
134
+ end
122
135
  end
123
136
  end
124
137
 
125
138
  private
126
139
 
127
140
  def clear_changes
141
+ @changed = nil
128
142
  @table.instance_variable_set(:@changes, nil)
129
143
  end
130
144
 
@@ -14,7 +14,7 @@ module Mautic
14
14
  end
15
15
 
16
16
  def data_name
17
- @endpoint.split("/").last
17
+ @options[:data_name] || @endpoint.split("/").last
18
18
  end
19
19
 
20
20
  def build_instance(data)
@@ -79,4 +79,4 @@ module Mautic
79
79
  end
80
80
 
81
81
  end
82
- end
82
+ end
@@ -1,5 +1,6 @@
1
1
  module Mautic
2
2
  module Submissions
3
+ # @see https://developer.mautic.org/#get-form-submissions
3
4
  class Form
4
5
  attr_reader :id
5
6
 
@@ -30,6 +31,17 @@ module Mautic
30
31
  def contact
31
32
  @contact ||= @connection.contacts.new(@raw["lead"])
32
33
  end
34
+
35
+ # @return [String]
36
+ def referer
37
+ @raw["referer"].to_s
38
+ end
39
+
40
+ # @return [Hash]
41
+ def results
42
+ @raw["results"]
43
+ end
44
+
33
45
  end
34
46
  end
35
- end
47
+ end
@@ -1,3 +1,3 @@
1
1
  module Mautic
2
- VERSION = '2.3.8'
2
+ VERSION = '2.5.0'
3
3
  end
@@ -46,6 +46,9 @@ RSpec.configure do |config|
46
46
 
47
47
  config.before(:each) do
48
48
  DatabaseCleaner.strategy = :transaction
49
+ Mautic.configure do |config|
50
+ config.authorize_mautic_connections = ->(controller) { true }
51
+ end
49
52
  end
50
53
 
51
54
  config.before(:each) do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mautic
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.8
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukáš Pokorný
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-25 00:00:00.000000000 Z
11
+ date: 2020-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -160,12 +160,6 @@ files:
160
160
  - MIT-LICENSE
161
161
  - README.md
162
162
  - Rakefile
163
- - app/assets/config/mautic_manifest.js
164
- - app/assets/javascripts/mautic/application.js
165
- - app/assets/javascripts/mautic/mautic_connections.js
166
- - app/assets/stylesheets/mautic/application.css
167
- - app/assets/stylesheets/mautic/mautic_connections.css
168
- - app/assets/stylesheets/scaffold.css
169
163
  - app/controllers/concerns/mautic/connections_controller_concern.rb
170
164
  - app/controllers/concerns/mautic/receive_web_hooks.rb
171
165
  - app/controllers/mautic/application_controller.rb
@@ -174,9 +168,12 @@ files:
174
168
  - app/jobs/mautic/application_job.rb
175
169
  - app/mailers/mautic/application_mailer.rb
176
170
  - app/models/mautic/application_record.rb
171
+ - app/models/mautic/campaign.rb
172
+ - app/models/mautic/company_field.rb
177
173
  - app/models/mautic/connection.rb
178
174
  - app/models/mautic/connections/oauth2.rb
179
175
  - app/models/mautic/contact.rb
176
+ - app/models/mautic/contact_field.rb
180
177
  - app/models/mautic/event.rb
181
178
  - app/models/mautic/form.rb
182
179
  - app/models/mautic/tag.rb
@@ -207,7 +204,7 @@ licenses:
207
204
  - MIT
208
205
  metadata:
209
206
  allowed_push_host: https://rubygems.org
210
- post_install_message:
207
+ post_install_message:
211
208
  rdoc_options: []
212
209
  require_paths:
213
210
  - lib
@@ -222,8 +219,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
219
  - !ruby/object:Gem::Version
223
220
  version: '0'
224
221
  requirements: []
225
- rubygems_version: 3.0.8
226
- signing_key:
222
+ rubygems_version: 3.1.4
223
+ signing_key:
227
224
  specification_version: 4
228
225
  summary: Ruby on Rails Mautic integration
229
226
  test_files:
@@ -1,2 +0,0 @@
1
- //= link_directory ../javascripts/mautic .js
2
- //= link_directory ../stylesheets/mautic .css
@@ -1,14 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file. JavaScript code in this file should be added after the last require_* statement.
9
- //
10
- // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- // require rails-ujs
14
- //= require_tree .
@@ -1,2 +0,0 @@
1
- // Place all the behaviors and hooks related to the matching controller here.
2
- // All this logic will automatically be available in application.js.
@@ -1,15 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
- * files in this directory. Styles in this file should be added after the last require_* statement.
11
- * It is generally better to create a new file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
@@ -1,4 +0,0 @@
1
- /*
2
- Place all the styles related to the matching controller here.
3
- They will automatically be included in application.css.
4
- */
@@ -1,80 +0,0 @@
1
- body {
2
- background-color: #fff;
3
- color: #333;
4
- margin: 33px;
5
- }
6
-
7
- body, p, ol, ul, td {
8
- font-family: verdana, arial, helvetica, sans-serif;
9
- font-size: 13px;
10
- line-height: 18px;
11
- }
12
-
13
- pre {
14
- background-color: #eee;
15
- padding: 10px;
16
- font-size: 11px;
17
- }
18
-
19
- a {
20
- color: #000;
21
- }
22
-
23
- a:visited {
24
- color: #666;
25
- }
26
-
27
- a:hover {
28
- color: #fff;
29
- background-color: #000;
30
- }
31
-
32
- th {
33
- padding-bottom: 5px;
34
- }
35
-
36
- td {
37
- padding: 0 5px 7px;
38
- }
39
-
40
- div.field,
41
- div.actions {
42
- margin-bottom: 10px;
43
- }
44
-
45
- #notice {
46
- color: green;
47
- }
48
-
49
- .field_with_errors {
50
- padding: 2px;
51
- background-color: red;
52
- display: table;
53
- }
54
-
55
- #error_explanation {
56
- width: 450px;
57
- border: 2px solid red;
58
- padding: 7px 7px 0;
59
- margin-bottom: 20px;
60
- background-color: #f0f0f0;
61
- }
62
-
63
- #error_explanation h2 {
64
- text-align: left;
65
- font-weight: bold;
66
- padding: 5px 5px 5px 15px;
67
- font-size: 12px;
68
- margin: -7px -7px 0;
69
- background-color: #c00;
70
- color: #fff;
71
- }
72
-
73
- #error_explanation ul li {
74
- font-size: 12px;
75
- list-style: square;
76
- }
77
-
78
- label {
79
- display: block;
80
- }