o2webappizer 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab1a4fa3674bfa43ae35eb560db464d19371027e
4
- data.tar.gz: d5e86d08b61d5b6f7aca102d6bc0c7b395d203a8
3
+ metadata.gz: 5d99640247d93c260ca512c2912da9e05ebf8a15
4
+ data.tar.gz: c4b10eafe8e8fd643f8ad71d13029ee5680d12a1
5
5
  SHA512:
6
- metadata.gz: 4fa74e95e26c3a6541e71cff35e2a9e9df22b036e5984ca082554f9b817a1795f0c97b4981c30273efff3139a5031e6cea8555e274f91ab9ed1898e1567aad9a
7
- data.tar.gz: 438e60282aa914f3105c5ea6daa5660a78b69a050eac801876dcaec21fe0a64045e3d073227bcd0bffcf355290ac26ea297095b4d02a0c71431de51c69989752
6
+ metadata.gz: 1527f0af4281503d4e00b0b28d3d70df407a62bb4cebe38d4e21defddf22aeb79646fb0ef2460bed2ead2738b8f0b8efe332b6bcbf574b46d3bd647eb2f25a5f
7
+ data.tar.gz: 10d2608ced424b2618c66d44efaf114d4ad78e82c1e453c12aaefc4118c25e7640d59aea91ecc5832030bc645ba4bbc64ed1d54d23f6988bf34ce35cea728a26
@@ -22,11 +22,13 @@ module O2webappizer
22
22
  keep_file 'controllers/concerns'
23
23
  directory 'helpers'
24
24
  directory 'mailers'
25
+ directory 'models'
25
26
  keep_file 'models/concerns'
26
27
  keep_file 'overrides' if options.solidus?
27
28
  empty_directory 'views'
28
29
 
29
30
  inside 'views' do
31
+ directory 'cms'
30
32
  directory 'layouts'
31
33
  directory 'spree' if options.solidus?
32
34
  end
@@ -84,7 +86,10 @@ module O2webappizer
84
86
  inside 'vendor/assets' do
85
87
  copy_file 'javascripts/jquery.lazyload.js'
86
88
  copy_file 'javascripts/modernizr.js'
89
+ directory 'javascripts/rails_admin'
87
90
  copy_file 'stylesheets/nprogress-variables.sass'
91
+ directory 'stylesheets/rails_admin'
92
+ directory 'stylesheets/rich'
88
93
  if options.solidus?
89
94
  directory 'javascripts/spree'
90
95
  directory 'stylesheets/spree'
@@ -1,5 +1,5 @@
1
1
  module O2webappizer
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  RUBY_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip
4
4
  RAILS_VERSION = "4.2"
5
5
  end
data/templates/Gemfile.tt CHANGED
@@ -38,7 +38,7 @@ group :development, :test do
38
38
  gem 'spring', '~> 1.3.6'
39
39
 
40
40
  # gem 'web-console', '~> 3.0'
41
- gem 'xray-rails'
41
+ gem 'xray-rails', github: 'mattbrictson/xray-rails', branch: 'sprockets-rails-3'
42
42
  gem 'quiet_assets'
43
43
  gem 'coffee-rails-source-paths', github: 'Machiaweliczny/coffee-rails-source-paths'
44
44
  gem 'sass-rails-source-maps', github: 'inopinatus/sass-rails-source-maps'
@@ -0,0 +1,20 @@
1
+ module Form
2
+ class Contact < Static::Object # < Static::Base
3
+ include Admin::Form::Static::Object
4
+
5
+ include Static::Email
6
+ include Static::Attachment
7
+
8
+ # has_attachments :letter, :resume
9
+ has_collections :periods
10
+
11
+ attribute :name, :string
12
+ attribute :email, :string
13
+ attribute :periods, :text
14
+
15
+ with_options presence: true do
16
+ validates :name
17
+ validates :email, email: true
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,13 @@
1
+ <%
2
+ text = cms_text
3
+ image = cms_image
4
+ links = cms_link(0, 2)
5
+ -%>
6
+
7
+ <%= text.html %>
8
+ <%= text.edit_link %>
9
+
10
+ <%= image_tag image.path %>
11
+ <%= image.edit_link %>
12
+
13
+ <%= links.ul_sortable_tag { links.menu } %>
@@ -0,0 +1,23 @@
1
+ <% cms_cache do
2
+ select = cms_select(1, Float::INFINITY)
3
+ -%>
4
+
5
+ <%= cms_form_for do |f| %>
6
+ <%= f.input :name, input_html: cms_validate_presence %>
7
+ <%= f.input :email, input_html: cms_validate_email %>
8
+ <%= f.input :periods, as: :check_boxes, collection: select.options, input_html: cms_validates(check_boxes: true) %>
9
+ <%= select.edit_links(:value) %>
10
+
11
+ <%# cms_form_instance.fields.each do |field| %>
12
+ <%#= f.input field.column_key,
13
+ as: field.input_type,
14
+ required: field.required?,
15
+ label: field.label,
16
+ input_html: cms_validates(field.input_type => field.required?)
17
+ -%>
18
+ <%# end %>
19
+
20
+ <%= f.submit cms_form_send, cms_form_sending %>
21
+ <% end %>
22
+
23
+ <% end %>
@@ -0,0 +1,24 @@
1
+ <%# view = cms_form %>
2
+
3
+ <% cms_cache('top') do
4
+ text = cms_text('top')
5
+ -%>
6
+
7
+ <%#= view.edit_link %>
8
+ <%#= view.add_link %>
9
+
10
+ <%= text.html %>
11
+ <%= text.edit_link %>
12
+
13
+ <% end %>
14
+
15
+ <%= render cms_form_partial %>
16
+
17
+ <% cms_cache('bottom') do
18
+ text = cms_text('bottom')
19
+ -%>
20
+
21
+ <%= text.html %>
22
+ <%= text.edit_link %>
23
+
24
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <%= @form.name %>
2
+ <%= @form.email %>
3
+
4
+ <%# @form.labelled_values.each do |label, value| %>
5
+ <%#= label %>: <%#= value %>
6
+ <%# end %>
@@ -0,0 +1,6 @@
1
+ <%= @form.name %>
2
+ <%= @form.email %>
3
+
4
+ <%# @form.labelled_values.each do |label, value| %>
5
+ <%#= label %>: <%#= value %>
6
+ <%# end %>
@@ -0,0 +1,29 @@
1
+ <%# view = cms_page %>
2
+
3
+ <% cms_cache do
4
+ menu = cms_link(0, Float::INFINITY)
5
+ image = cms_image
6
+ blocks = cms_example(1, 4)
7
+ # view_image = cms_view_image
8
+ # view_block = cms_view_example
9
+ -%>
10
+
11
+ <%#= view.edit_link %>
12
+ <%#= view.add_link %>
13
+
14
+ <%= menu.ul_sortable_tag do %>
15
+ <% menu.each do |link| %>
16
+ <%= link.li_link_to_with_edit %>
17
+ <% end %>
18
+ <% end %>
19
+ <%= menu.add_link %>
20
+
21
+ <%= image_tag image.path %>
22
+ <%= image.edit_link %>
23
+
24
+ <% blocks.each do |block| %>
25
+ <%= block.render %>
26
+ <% end %>
27
+ <%= blocks.edit_links(:position) %>
28
+
29
+ <% end %>
@@ -1,3 +1,4 @@
1
1
  en:
2
2
  routes:
3
3
  page: page
4
+ contact: contact
@@ -2,6 +2,8 @@ Rails.application.routes.draw do
2
2
  mount Rich::Engine => 'rich', as: 'rich'
3
3
  mount RailsAdmin::Engine => 'admin/dashboard', as: 'rails_admin'
4
4
 
5
+ root to: "cms/pages#show", format: false, defaults: { cms_view_type: 'page', cms_body_class: 'page', locale: I18n.default_locale }
6
+
5
7
  <% if options.solidus? -%>
6
8
  # This line mounts Spree's routes at the root of your application.
7
9
  # This means, any requests to URLs such as /products, will go to Spree::ProductsController.
@@ -0,0 +1 @@
1
+ #= require rich/base
@@ -0,0 +1 @@
1
+ //= require rich/editor
@@ -0,0 +1,20 @@
1
+ /*
2
+ This file defines the default set of CSS styles available in the Rich editor
3
+ */
4
+
5
+ p.caption {
6
+ font-style: italic;
7
+ color: grey;
8
+ }
9
+
10
+ span.highlight {
11
+ background: yellow;
12
+ }
13
+
14
+ img.left {
15
+ float: left;
16
+ }
17
+
18
+ img.right {
19
+ float: right;
20
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: o2webappizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrice Lebel
@@ -98,6 +98,13 @@ files:
98
98
  - templates/app/helpers/application_helper.rb
99
99
  - templates/app/helpers/spree/frontend_helper_decorator.rb
100
100
  - templates/app/mailers/application_mailer.rb
101
+ - templates/app/models/form/contact.rb
102
+ - templates/app/views/cms/blocks/_example.html.erb
103
+ - templates/app/views/cms/forms/contact/_form.html.erb
104
+ - templates/app/views/cms/forms/contact/new.html.erb
105
+ - templates/app/views/cms/forms_mailer/contact.html.erb
106
+ - templates/app/views/cms/forms_mailer/contact.text.erb
107
+ - templates/app/views/cms/pages/page.html.erb
101
108
  - templates/app/views/layouts/application.html.erb.tt
102
109
  - templates/app/views/layouts/mailer.html.erb
103
110
  - templates/app/views/layouts/mailer.text.erb
@@ -136,9 +143,14 @@ files:
136
143
  - templates/public/robots.txt.tt
137
144
  - templates/vendor/assets/javascripts/jquery.lazyload.js
138
145
  - templates/vendor/assets/javascripts/modernizr.js
146
+ - templates/vendor/assets/javascripts/rails_admin/custom/ui.js.coffee
139
147
  - templates/vendor/assets/javascripts/spree/backend/all.js
140
148
  - templates/vendor/assets/javascripts/spree/frontend/all.js
141
149
  - templates/vendor/assets/stylesheets/nprogress-variables.sass
150
+ - templates/vendor/assets/stylesheets/rails_admin/custom/mixins.sass
151
+ - templates/vendor/assets/stylesheets/rails_admin/custom/theming.sass
152
+ - templates/vendor/assets/stylesheets/rails_admin/custom/variables.sass
153
+ - templates/vendor/assets/stylesheets/rich/editor.css
142
154
  - templates/vendor/assets/stylesheets/spree/backend/all.css
143
155
  - templates/vendor/assets/stylesheets/spree/frontend/all.css
144
156
  homepage: https://github.com/o2web/o2webappizer