thecore_ui_commons 2.1.4 → 2.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/application_controller.rb +2 -0
- data/app/controllers/pages_controller.rb +43 -0
- data/config/initializers/thecore_ui_commons_application_config.rb +35 -0
- data/config/locales/en.simple_form.yml +31 -0
- data/config/locales/it.simple_form.yml +31 -0
- data/lib/thecore_ui_commons/version.rb +1 -1
- metadata +7 -3
- data/config/initializers/thecore_ui_commons_action_text.rb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99cec478c0d092e7eb5937c8bab72ab2608ae70c1f6823f1cf46423a5b47bf7f
|
4
|
+
data.tar.gz: c777ad6e1871583c6037c05af17ab161b3f5afd6994803aae1d88f8768169045
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c314be23005b9fc76f8276f727551b5c056b5e0d4a29ec486020d09c51954f4ed547807f3b10a82cbb9d79e49d9280866d7b5323befa6f0e9d0945f215544940
|
7
|
+
data.tar.gz: 7c77f02797413a4674760fc7be59ebc8bf2cc427ce23c87bfb4b746615c09a137d9b60908411b55adaec31059a579cf3c60071969729486727ad6e0012191cca
|
@@ -0,0 +1,43 @@
|
|
1
|
+
class PagesController < ApplicationController
|
2
|
+
before_action :authenticate_user!, only: [
|
3
|
+
:inside, :contact
|
4
|
+
]
|
5
|
+
|
6
|
+
# So the static link navigation can be set runtime (yes it's an hack
|
7
|
+
# since I have to set this dynamically at runtime, using a class
|
8
|
+
# continously re-evaluated)
|
9
|
+
RailsAdmin.config do |config|
|
10
|
+
config.navigation_static_label = I18n.t('admin.links.label')
|
11
|
+
end
|
12
|
+
|
13
|
+
def home
|
14
|
+
end
|
15
|
+
|
16
|
+
def inside
|
17
|
+
end
|
18
|
+
|
19
|
+
|
20
|
+
def email
|
21
|
+
@name = params[:name]
|
22
|
+
@email = params[:email]
|
23
|
+
@message = params[:message]
|
24
|
+
|
25
|
+
if @name.blank?
|
26
|
+
flash[:alert] = "Please enter your name before sending your message. Thank you."
|
27
|
+
render :contact
|
28
|
+
elsif @email.blank? || @email.scan(/\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i).size < 1
|
29
|
+
flash[:alert] = "You must provide a valid email address before sending your message. Thank you."
|
30
|
+
render :contact
|
31
|
+
elsif @message.blank? || @message.length < 10
|
32
|
+
flash[:alert] = "Your message is empty. Requires at least 10 characters. Nothing to send."
|
33
|
+
render :contact
|
34
|
+
elsif @message.scan(/<a href=/).size > 0 || @message.scan(/\[url=/).size > 0 || @message.scan(/\[link=/).size > 0 || @message.scan(/http:\/\//).size > 0
|
35
|
+
flash[:alert] = "You can't send links. Thank you for your understanding."
|
36
|
+
render :contact
|
37
|
+
else
|
38
|
+
ContactMailer.contact_message(@name,@email,@message).deliver_now
|
39
|
+
redirect_to root_path, notice: "Your message was sent. Thank you."
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
config.assets.precompile += %w( thecore_ui_commons/index.js thecore_ui_commons/index.css )
|
3
|
+
config.assets.precompile += %w( favicon.ico )
|
4
|
+
config.assets.precompile += %w( apple-touch-icon.png )
|
5
|
+
config.assets.precompile += %w( favicon-32x32.png )
|
6
|
+
config.assets.precompile += %w( favicon-16x16.png )
|
7
|
+
config.assets.precompile += %w( safari-pinned-tab.svg )
|
8
|
+
config.assets.precompile += %w( mstile-150x150.svg )
|
9
|
+
config.assets.precompile += %w( android-chrome-192x192.png )
|
10
|
+
config.assets.precompile += %w( android-chrome-512x512.png )
|
11
|
+
config.assets.precompile += %w( logo.png )
|
12
|
+
config.assets.precompile += %w( up-arrow.png )
|
13
|
+
# mstile-150x150
|
14
|
+
config.assets.precompile += %w( thecore.js )
|
15
|
+
config.assets.precompile += %w( thecore.css )
|
16
|
+
# config.assets.precompile += %w( app_logo.png )
|
17
|
+
# config.assets.precompile += %w( main_app_logo.png )
|
18
|
+
config.assets.precompile += %w( ie.js )
|
19
|
+
config.assets.precompile += %w( manifest.json )
|
20
|
+
config.assets.precompile += %w( browserconfig.xml )
|
21
|
+
|
22
|
+
# config.action_controller.asset_host = if ENV['RAILS_URL'].blank? || ENV['RAILS_RELATIVE_URL_ROOT'].blank?
|
23
|
+
# "http://localhost:3000"
|
24
|
+
# else
|
25
|
+
# "#{ENV['RAILS_URL']}#{ENV['RAILS_RELATIVE_URL_ROOT']}"
|
26
|
+
# end
|
27
|
+
|
28
|
+
config.filter_parameters += [:password]
|
29
|
+
|
30
|
+
config.active_record.raise_in_transactional_callbacks = true
|
31
|
+
|
32
|
+
config.serviceworker.routes.draw do
|
33
|
+
match "/manifest.json"
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
en:
|
2
|
+
simple_form:
|
3
|
+
"yes": 'Yes'
|
4
|
+
"no": 'No'
|
5
|
+
required:
|
6
|
+
# text: 'required'
|
7
|
+
# mark: '*'
|
8
|
+
# You can uncomment the line below if you need to overwrite the whole required html.
|
9
|
+
# When using html, text and mark won't be used.
|
10
|
+
html: '*'
|
11
|
+
error_notification:
|
12
|
+
default_message: "Please review the problems below:"
|
13
|
+
# Examples
|
14
|
+
# labels:
|
15
|
+
# defaults:
|
16
|
+
# password: 'Password'
|
17
|
+
# user:
|
18
|
+
# new:
|
19
|
+
# email: 'E-mail to sign in.'
|
20
|
+
# edit:
|
21
|
+
# email: 'E-mail.'
|
22
|
+
# hints:
|
23
|
+
# defaults:
|
24
|
+
# username: 'User name to sign in.'
|
25
|
+
# password: 'No special characters, please.'
|
26
|
+
# include_blanks:
|
27
|
+
# defaults:
|
28
|
+
# age: 'Rather not say'
|
29
|
+
# prompts:
|
30
|
+
# defaults:
|
31
|
+
# age: 'Select your age'
|
@@ -0,0 +1,31 @@
|
|
1
|
+
it:
|
2
|
+
simple_form:
|
3
|
+
yes: Si
|
4
|
+
no: No
|
5
|
+
required:
|
6
|
+
# text: 'required'
|
7
|
+
# mark: '*'
|
8
|
+
# You can uncomment the line below if you need to overwrite the whole required html.
|
9
|
+
# When using html, text and mark won't be used.
|
10
|
+
html: '*'
|
11
|
+
error_notification:
|
12
|
+
default_message: 'Per piacere, controlli gli errori riportati:'
|
13
|
+
# Examples
|
14
|
+
# labels:
|
15
|
+
# defaults:
|
16
|
+
# password: 'Password'
|
17
|
+
# user:
|
18
|
+
# new:
|
19
|
+
# email: 'E-mail to sign in.'
|
20
|
+
# edit:
|
21
|
+
# email: 'E-mail.'
|
22
|
+
# hints:
|
23
|
+
# defaults:
|
24
|
+
# username: 'User name to sign in.'
|
25
|
+
# password: 'No special characters, please.'
|
26
|
+
# include_blanks:
|
27
|
+
# defaults:
|
28
|
+
# age: 'Rather not say'
|
29
|
+
# prompts:
|
30
|
+
# defaults:
|
31
|
+
# age: 'Select your age'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thecore_ui_commons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore_backend_commons
|
@@ -50,8 +50,12 @@ files:
|
|
50
50
|
- Rakefile
|
51
51
|
- app/assets/config/thecore_ui_commons_manifest.js
|
52
52
|
- app/assets/stylesheets/thecore_ui_commons/actiontext.scss
|
53
|
+
- app/controllers/application_controller.rb
|
54
|
+
- app/controllers/pages_controller.rb
|
53
55
|
- app/views/active_storage/blobs/_blob.html.erb
|
54
|
-
- config/initializers/
|
56
|
+
- config/initializers/thecore_ui_commons_application_config.rb
|
57
|
+
- config/locales/en.simple_form.yml
|
58
|
+
- config/locales/it.simple_form.yml
|
55
59
|
- config/routes.rb
|
56
60
|
- db/migrate/20190920115550_create_action_text_tables.action_text.rb
|
57
61
|
- lib/tasks/thecore_ui_commons_tasks.rake
|
@@ -1 +0,0 @@
|
|
1
|
-
Rails.application.config.assets.precompile += %w( thecore_ui_commons/index.js thecore_ui_commons/index.css )
|