thecore_backend_commons 2.2.4 → 2.3.0
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 +4 -4
- data/config/initializers/thecore_backend_commons_app_configs.rb +0 -9
- data/db/migrate/20161227101954_create_rails_admin_settings.rb +25 -0
- data/db/migrate/20161227101956_add_app_name.rb +5 -0
- data/lib/concerns/thecore_backend_commons_user.rb +2 -4
- data/lib/patches/thecore.rb +6 -9
- data/lib/thecore_backend_commons.rb +4 -2
- data/lib/thecore_backend_commons/version.rb +1 -1
- metadata +18 -11
- data/config/locales/en.activerecord.yml +0 -6
- data/config/locales/en.contact_mailer.custom.yml +0 -5
- data/config/locales/en.yml +0 -33
- data/config/locales/it.activerecord.yml +0 -20
- data/config/locales/it.contact_mailer.custom.yml +0 -5
- data/config/locales/it.yml +0 -44
- data/db/migrate/20190920115549_create_active_storage_tables.active_storage.rb +0 -27
- data/lib/patches/thecore_rails_admin_bulk_delete_concern.rb +0 -16
- data/lib/patches/thecore_rails_admin_export_concern.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af21ac8ecea21c9fb0dd78bc5b43e9c7e7bb95a63d2978bf8a962809947789e2
|
4
|
+
data.tar.gz: aadccb0272be1b51ad206400814a76b4c8db0c1b83d54022409635506a8c1833
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7b165974336508398a010ed4dc260c942b01bf4245fa42a9f77bb53b23ae55de1406e0f0974992cfca7b3979feb6dffef8b78563ee3f7dd8a3433e467ac7e1a
|
7
|
+
data.tar.gz: e838fbc23edad3960728d4e1887d237509f6ff06b60aa7f23805a38d50be976c4d7467f9f9971676ee1dff6d481899e005f456b46cdb1ee160f4dfc01dea5c53
|
@@ -11,19 +11,10 @@ Rails.application.configure do
|
|
11
11
|
# AFTER INITIALIZE Good place to load things that must have a bit of initialization
|
12
12
|
# setup on order to work (and not be overrided).
|
13
13
|
config.after_initialize do
|
14
|
-
# In development be sure to load all the namespaces
|
15
|
-
# in order to have working reflection and meta-programming.
|
16
|
-
if Rails.env.development?
|
17
|
-
Rails.configuration.eager_load_namespaces.each(&:eager_load!) if Rails.version.to_i == 5 #Rails 5
|
18
|
-
Zeitwerk::Loader.eager_load_all if Rails.version.to_i >= 6 #Rails 6
|
19
|
-
end
|
20
|
-
|
21
14
|
# include the extensions
|
22
15
|
ActiveRecord::Base.send(:include, ActiveRecordExtensions)
|
23
16
|
Integer.send(:include, FixnumConcern)
|
24
17
|
String.send(:include, StringConcern)
|
25
|
-
RailsAdmin::Config::Actions::Export.send(:include, ExportConcern)
|
26
|
-
RailsAdmin::Config::Actions::BulkDelete.send(:include, BulkDeleteConcern)
|
27
18
|
User.send(:include, ThecoreBackendCommonsUser)
|
28
19
|
end
|
29
20
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
class CreateRailsAdminSettings < ActiveRecord::Migration[5.0]
|
2
|
+
def change
|
3
|
+
create_table :rails_admin_settings do |t|
|
4
|
+
t.boolean :enabled, default: true
|
5
|
+
t.string :kind, null: false, default: 'string'
|
6
|
+
t.string :ns, default: 'main'
|
7
|
+
t.string :key, null: false
|
8
|
+
if Object.const_defined?('Geocoder')
|
9
|
+
t.float :latitude
|
10
|
+
t.float :longitude
|
11
|
+
end
|
12
|
+
t.text :raw
|
13
|
+
t.string :label
|
14
|
+
if defined?(Paperclip)
|
15
|
+
t.attachment :file
|
16
|
+
elsif defined?(CarrierWave)
|
17
|
+
t.string :file
|
18
|
+
end
|
19
|
+
t.timestamps
|
20
|
+
end
|
21
|
+
|
22
|
+
add_index :rails_admin_settings, :key
|
23
|
+
add_index :rails_admin_settings, [:ns, :key], unique: true
|
24
|
+
end
|
25
|
+
end
|
data/lib/patches/thecore.rb
CHANGED
@@ -1,12 +1,9 @@
|
|
1
|
-
require '
|
2
|
-
require 'thecore_rails_admin_bulk_delete_concern'
|
1
|
+
require 'patches/date_format'
|
3
2
|
|
4
|
-
require '
|
3
|
+
require 'patches/string_extensions'
|
4
|
+
require 'patches/integer_extensions'
|
5
|
+
require 'patches/active_record_extensions'
|
5
6
|
|
6
|
-
require '
|
7
|
-
require 'integer_extensions'
|
8
|
-
require 'active_record_extensions'
|
7
|
+
require 'patches/postgresql_drop_replacement'
|
9
8
|
|
10
|
-
require '
|
11
|
-
|
12
|
-
require 'application_record_loader'
|
9
|
+
require 'patches/application_record_loader'
|
@@ -1,11 +1,13 @@
|
|
1
|
-
require "thecore_backend_commons/engine"
|
2
|
-
|
3
1
|
require 'thecore_auth_commons'
|
4
2
|
require 'devise-i18n'
|
5
3
|
require 'http_accept_language'
|
6
4
|
require 'rails-i18n'
|
5
|
+
require 'rails_admin_settings'
|
7
6
|
|
8
7
|
require 'patches/thecore'
|
8
|
+
require 'concerns/thecore_backend_commons_user'
|
9
|
+
|
10
|
+
require "thecore_backend_commons/engine"
|
9
11
|
|
10
12
|
module ThecoreBackendCommons
|
11
13
|
# Your code goes here...
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thecore_backend_commons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
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-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore_auth_commons
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '2.1'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rails_admin_settings
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.5'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.5'
|
69
83
|
description: Wrapper to keep all the common libraries and setups needed by Thecore
|
70
84
|
UI Backend(s).
|
71
85
|
email:
|
@@ -80,16 +94,11 @@ files:
|
|
80
94
|
- app/assets/config/thecore_backend_commons_manifest.js
|
81
95
|
- app/jobs/application_job.rb
|
82
96
|
- config/initializers/thecore_backend_commons_app_configs.rb
|
83
|
-
- config/locales/en.activerecord.yml
|
84
|
-
- config/locales/en.contact_mailer.custom.yml
|
85
97
|
- config/locales/en.devise.custom.yml
|
86
|
-
- config/locales/en.yml
|
87
|
-
- config/locales/it.activerecord.yml
|
88
|
-
- config/locales/it.contact_mailer.custom.yml
|
89
98
|
- config/locales/it.devise.custom.yml
|
90
|
-
- config/locales/it.yml
|
91
99
|
- config/routes.rb
|
92
|
-
- db/migrate/
|
100
|
+
- db/migrate/20161227101954_create_rails_admin_settings.rb
|
101
|
+
- db/migrate/20161227101956_add_app_name.rb
|
93
102
|
- lib/concerns/thecore_backend_commons_user.rb
|
94
103
|
- lib/patches/active_record_extensions.rb
|
95
104
|
- lib/patches/application_record_loader.rb
|
@@ -98,8 +107,6 @@ files:
|
|
98
107
|
- lib/patches/postgresql_drop_replacement.rb
|
99
108
|
- lib/patches/string_extensions.rb
|
100
109
|
- lib/patches/thecore.rb
|
101
|
-
- lib/patches/thecore_rails_admin_bulk_delete_concern.rb
|
102
|
-
- lib/patches/thecore_rails_admin_export_concern.rb
|
103
110
|
- lib/tasks/thecore_backend_commons_tasks.rake
|
104
111
|
- lib/thecore_backend_commons.rb
|
105
112
|
- lib/thecore_backend_commons/engine.rb
|
data/config/locales/en.yml
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
# Files in the config/locales directory are used for internationalization
|
2
|
-
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
-
# than English, add the necessary files in this directory.
|
4
|
-
#
|
5
|
-
# To use the locales, use `I18n.t`:
|
6
|
-
#
|
7
|
-
# I18n.t 'hello'
|
8
|
-
#
|
9
|
-
# In views, this is aliased to just `t`:
|
10
|
-
#
|
11
|
-
# <%= t('hello') %>
|
12
|
-
#
|
13
|
-
# To use a different locale, set it with `I18n.locale`:
|
14
|
-
#
|
15
|
-
# I18n.locale = :es
|
16
|
-
#
|
17
|
-
# This would use the information in config/locales/es.yml.
|
18
|
-
#
|
19
|
-
# To learn more, please read the Rails Internationalization guide
|
20
|
-
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
-
|
22
|
-
en:
|
23
|
-
current_user: Current user
|
24
|
-
hello: "Hello world"
|
25
|
-
dashboard: "Dashboard"
|
26
|
-
contact: "Contact"
|
27
|
-
manage: "Manage"
|
28
|
-
sign_out: "Sign Out"
|
29
|
-
admin:
|
30
|
-
links:
|
31
|
-
label: Links
|
32
|
-
settings:
|
33
|
-
advanced: Advanced
|
@@ -1,20 +0,0 @@
|
|
1
|
-
it:
|
2
|
-
activerecord:
|
3
|
-
models:
|
4
|
-
user:
|
5
|
-
one: Utente
|
6
|
-
other: Utenti
|
7
|
-
attributes:
|
8
|
-
user:
|
9
|
-
email: E-Mail
|
10
|
-
username: Nome Utente
|
11
|
-
code: Codice
|
12
|
-
roles: Ruoli
|
13
|
-
admin: Amministratore?
|
14
|
-
created_at: Data di Creazione
|
15
|
-
locked: Bloccato?
|
16
|
-
third_party: Ente Terzo?
|
17
|
-
password: Password
|
18
|
-
password_confirmation: Conferma Password
|
19
|
-
descriptions:
|
20
|
-
user: In questa sezione dell'applicazione potete cercare nella lista degli utenti in diversi modi usando i filtri o ordinare la lista secondo diversi campi.
|
data/config/locales/it.yml
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
it:
|
2
|
-
current_user: Utente corrente
|
3
|
-
hello: "Ciao Mondo"
|
4
|
-
dashboard: "Pannello di controllo"
|
5
|
-
contact: "Aiutaci a Migliorare"
|
6
|
-
manage: "Gestione"
|
7
|
-
sign_out: "Uscita"
|
8
|
-
advanced: Impostazioni
|
9
|
-
main_records: Anagrafiche
|
10
|
-
errors:
|
11
|
-
messages:
|
12
|
-
invalid: contiene caratteri invalidi
|
13
|
-
tiered_times:
|
14
|
-
dd:
|
15
|
-
zero: "0 Giorni"
|
16
|
-
one: "%{count} Giorno"
|
17
|
-
other: "%{count} Giorni"
|
18
|
-
hh:
|
19
|
-
zero: "0 Ore"
|
20
|
-
one: "%{count} Ora"
|
21
|
-
other: "%{count} Ore"
|
22
|
-
mm:
|
23
|
-
zero: "0 Minuti"
|
24
|
-
one: "%{count} Minuto"
|
25
|
-
other: "%{count} Minuti"
|
26
|
-
ss:
|
27
|
-
zero: "0 Secondi"
|
28
|
-
one: "%{count} Secondo"
|
29
|
-
other: "%{count} Secondi"
|
30
|
-
admin:
|
31
|
-
links:
|
32
|
-
label: Collegamenti
|
33
|
-
tools:
|
34
|
-
label: "Strumenti"
|
35
|
-
settings:
|
36
|
-
label: "Impostazioni"
|
37
|
-
advanced: Avanzate
|
38
|
-
registries: Anagrafiche
|
39
|
-
operations: Operatività
|
40
|
-
actions:
|
41
|
-
charts:
|
42
|
-
menu: Analisi
|
43
|
-
title: Grafici
|
44
|
-
breadcrumb: Grafici
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# This migration comes from active_storage (originally 20170806125915)
|
2
|
-
class CreateActiveStorageTables < ActiveRecord::Migration[5.2]
|
3
|
-
def change
|
4
|
-
create_table :active_storage_blobs do |t|
|
5
|
-
t.string :key, null: false
|
6
|
-
t.string :filename, null: false
|
7
|
-
t.string :content_type
|
8
|
-
t.text :metadata
|
9
|
-
t.bigint :byte_size, null: false
|
10
|
-
t.string :checksum, null: false
|
11
|
-
t.datetime :created_at, null: false
|
12
|
-
|
13
|
-
t.index [ :key ], unique: true
|
14
|
-
end
|
15
|
-
|
16
|
-
create_table :active_storage_attachments do |t|
|
17
|
-
t.string :name, null: false
|
18
|
-
t.references :record, null: false, polymorphic: true, index: false
|
19
|
-
t.references :blob, null: false
|
20
|
-
|
21
|
-
t.datetime :created_at, null: false
|
22
|
-
|
23
|
-
t.index [ :record_type, :record_id, :name, :blob_id ], name: "index_active_storage_attachments_uniqueness", unique: true
|
24
|
-
t.foreign_key :active_storage_blobs, column: :blob_id
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
require 'active_support/concern'
|
2
|
-
|
3
|
-
module BulkDeleteConcern
|
4
|
-
extend ActiveSupport::Concern
|
5
|
-
included do
|
6
|
-
# Should the action be visible
|
7
|
-
# Edit By taris, it shows the button only if there are records displayed
|
8
|
-
register_instance_option :visible? do
|
9
|
-
# If not in index, then return true,
|
10
|
-
# otherwise it wont' be added to the list
|
11
|
-
# of all Actions during rails initialization
|
12
|
-
# In index, instead, I show it only if there are records in the current view
|
13
|
-
bindings[:controller].action_name == "index" ? (authorized? && !bindings[:controller].instance_variable_get("@objects").blank?) : true
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
require 'active_support/concern'
|
2
|
-
|
3
|
-
module ExportConcern
|
4
|
-
extend ActiveSupport::Concern
|
5
|
-
included do
|
6
|
-
# Should the action be visible
|
7
|
-
# Edit By taris, it shows the button only if there are records displayed
|
8
|
-
register_instance_option :visible? do
|
9
|
-
# If not in index, then return true,
|
10
|
-
# otherwise it wont' be added to the list
|
11
|
-
# of all Actions during rails initialization
|
12
|
-
# In index, instead, I show it only if there are records in the current view
|
13
|
-
bindings[:controller].action_name == "index" ? (authorized? && !bindings[:controller].instance_variable_get("@objects").blank?) : true
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|