o2webappizer 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/o2webappizer/app_builder.rb +5 -0
- data/lib/o2webappizer/version.rb +1 -1
- data/templates/Gemfile.tt +1 -1
- data/templates/app/models/form/contact.rb +20 -0
- data/templates/app/views/cms/blocks/_example.html.erb +13 -0
- data/templates/app/views/cms/forms/contact/_form.html.erb +23 -0
- data/templates/app/views/cms/forms/contact/new.html.erb +24 -0
- data/templates/app/views/cms/forms_mailer/contact.html.erb +6 -0
- data/templates/app/views/cms/forms_mailer/contact.text.erb +6 -0
- data/templates/app/views/cms/pages/page.html.erb +29 -0
- data/templates/config/locales/routes.en.yml +1 -0
- data/templates/config/routes.rb.tt +2 -0
- data/templates/vendor/assets/javascripts/rails_admin/custom/ui.js.coffee +1 -0
- data/templates/vendor/assets/stylesheets/rails_admin/custom/mixins.sass +0 -0
- data/templates/vendor/assets/stylesheets/rails_admin/custom/theming.sass +1 -0
- data/templates/vendor/assets/stylesheets/rails_admin/custom/variables.sass +0 -0
- data/templates/vendor/assets/stylesheets/rich/editor.css +20 -0
- metadata +13 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d99640247d93c260ca512c2912da9e05ebf8a15
|
4
|
+
data.tar.gz: c4b10eafe8e8fd643f8ad71d13029ee5680d12a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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'
|
data/lib/o2webappizer/version.rb
CHANGED
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,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,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 %>
|
@@ -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
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require rich/editor
|
File without changes
|
@@ -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.
|
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
|