thecore_ui_rails_admin 2.3.7 → 2.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/rails_admin/custom/ui.js +1 -0
  3. data/app/assets/javascripts/thecore_ui_rails_admin/thecore_rails_admin.js +0 -1
  4. data/app/assets/stylesheets/rails_admin/custom/theming.scss +6 -0
  5. data/app/assets/stylesheets/thecore_ui_rails_admin/thecore_rails_admin.scss +2 -2
  6. data/app/views/{layouts → layouts.old}/rails_admin/_navigation.html.haml +0 -0
  7. data/app/views/{layouts → layouts.old}/rails_admin/_secondary_navigation.html.haml +0 -0
  8. data/app/views/{layouts → layouts.old}/rails_admin/_sidebar_navigation.html.haml +0 -0
  9. data/app/views/{layouts → layouts.old}/rails_admin/_style_common.html.haml +0 -0
  10. data/app/views/{layouts → layouts.old}/rails_admin/_style_override.html.haml +0 -0
  11. data/app/views/{layouts → layouts.old}/rails_admin/_user_navigation.html.haml +0 -0
  12. data/app/views/{layouts → layouts.old}/rails_admin/application.html.haml +7 -9
  13. data/app/views/{layouts → layouts.old}/rails_admin/pjax.html.haml +1 -1
  14. data/app/views/{rails_admin → rails_admin.old}/main/_card.html.haml +0 -0
  15. data/app/views/{rails_admin → rails_admin.old}/main/_dashboard_block.html.haml +0 -0
  16. data/app/views/{rails_admin → rails_admin.old}/main/_modal_interaction.html.erb +0 -0
  17. data/app/views/{rails_admin → rails_admin.old}/main/dashboard.html.haml +0 -0
  18. data/app/views/{rails_admin → rails_admin.old}/main/index.html.haml +0 -0
  19. data/config/initializers/thecore_concern.rb +13 -8
  20. data/config/initializers/thecore_ui_rails_admin_app_configs.rb +1 -1
  21. data/lib/abilities/thecore_ui_rails_admin.rb +3 -3
  22. data/lib/concerns/rails_admin_requirements.rb +1 -1
  23. data/lib/thecore_ui_rails_admin.rb +3 -3
  24. metadata +17 -45
  25. data/config/locales/thecore_settings.en.yml +0 -31
  26. data/config/locales/thecore_settings.it.yml +0 -31
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e463c54522828d09b59b3851ea86893698b0d25b14bc0b45aeab27ef5709d79
4
- data.tar.gz: 91e1a2d6ff4d0054d60ba54e6d27bcfa471c1d219c3cd7c4fc65c491cb3c3375
3
+ metadata.gz: f742f063e5493a754e1ed5986469072828eab6b56e4010f47a590b14e53788ea
4
+ data.tar.gz: d294bf1efcc345e73c919d77e2f41683f5b84740516d216e50f04e544a2d5258
5
5
  SHA512:
6
- metadata.gz: 980980371869c46e9e2fb547af383f78f3d97bfd6c7aee47c768960478b7e4e8d5e7aef9dd595c0c4de4e2be2cf8353b010afdde573c2d2782753d1a564681e2
7
- data.tar.gz: 10e802da71db82d2139bcf4796d8413dd50523d24bba7bdbf5d2a717696b4326cc78e1debdfa145534d7a869f874b712df5315c953099dec4338a8511808e004
6
+ metadata.gz: 5b2fe54852594f3896777869d9cd17df703b82d143c3f0351f72a67e2848fe6aff35c4156c3c09d1576e91bbe341ad72c3c3e2b1565138db090eda7aab0044b3
7
+ data.tar.gz: f185205ca2a05e139d8e5b8d4ccb0f22361ac2feb22f4f02000c54bb3b2be57c54cb3034e45da2511e31ac1571602df843c7c0ad0e5ed92a2ade43b1d421eee7
@@ -0,0 +1 @@
1
+ //= require selectize
@@ -1,5 +1,4 @@
1
1
  //= require thecore_ui_commons/thecore
2
- //= require rails_admin/rails_admin
3
2
  //= require selectize
4
3
 
5
4
  $(document).on('ready pjax:success', function(e) {
@@ -0,0 +1,6 @@
1
+ @import 'selectize';
2
+ @import 'selectize.bootstrap3';
3
+
4
+ .form-control.selectize-control {
5
+ width: 62%;
6
+ }
@@ -138,9 +138,9 @@ body.rails_admin .nav.nav-tabs {
138
138
  .content {
139
139
  margin: 0px 0 15px 0;
140
140
  padding: 8px;
141
- background: $background;
141
+ background: transparent;
142
142
  &.dashboard {
143
- background: $background;
143
+ background: transparent;
144
144
  }
145
145
  .page-header {
146
146
  display: none;
@@ -2,17 +2,15 @@
2
2
  %html{lang: I18n.locale}
3
3
  %head
4
4
  %title= Settings.app_name rescue "Thecore"
5
- %meta{content: "IE=edge", "http-equiv" => "X-UA-Compatible"}
6
- %meta{content: "text/html; charset=utf-8", "http-equiv" => "Content-Type"}
7
- %meta{name: "viewport", content: "width=device-width, initial-scale=1"}
8
- %meta{content: "NONE,NOARCHIVE", name: "robots"}
9
- = csrf_meta_tag
5
+
6
+ = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => 'reload'
7
+ = javascript_pack_tag 'application', 'data-turbolinks-track' => 'reload'
8
+
9
+ = render "layouts/rails_admin/head"
10
10
 
11
11
  = render "layouts/rails_admin/style_common"
12
12
  = render "layouts/rails_admin/style_override"
13
13
 
14
- = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => 'reload'
15
- = javascript_pack_tag 'application', 'data-turbolinks-track' => 'reload'
16
14
  / Getting all the assets needed by thecore_ui_rails_admin from all the gems and the application level
17
15
  = get_asset_tags_for("thecore_rails_admin")
18
16
 
@@ -23,8 +21,8 @@
23
21
  %body.rails_admin
24
22
  #admin-js{:'data-i18n-options' => I18n.t("admin.js").to_json}
25
23
  -# Initialize JS simple i18n
26
- :javascript
27
- RailsAdmin.I18n.init('#{I18n.locale}', document.getElementById("admin-js").dataset.i18nOptions);
24
+ -# :javascript
25
+ -# RailsAdmin.I18n.init('#{I18n.locale}', document.getElementById("admin-js").dataset.i18nOptions);
28
26
  #loading.label.label-warning{style: 'display:none; position:fixed; right:20px; bottom:20px; z-index:100000'}= t('admin.loading')
29
27
  -# %nav.navbar.navbar-default.navbar-fixed-top
30
28
  -# = render "layouts/rails_admin/navigation"
@@ -3,7 +3,7 @@
3
3
  $('.nav.nav-pills li[data-model="#{@abstract_model.to_param}"]').addClass('active');
4
4
  $(window).off('keydown');
5
5
 
6
- - # Integration of the rails_admin_settings gem, if not available, it rescues to the normal naming
6
+ - # Integration of the thecore_settings gem, if not available, it rescues to the normal naming
7
7
  %title= "#{(@abstract_model.try(:pretty_name) || @page_name)} | #{Settings.app_name rescue ([_get_plugin_name[0] || 'Rails', _get_plugin_name[1] || 'Admin'].join(' '))}"
8
8
  .page-header
9
9
  %h1= @page_name
@@ -9,7 +9,7 @@ module ThecoreConcern
9
9
  layout 'thecore'
10
10
  protect_from_forgery with: :exception, prepend: true
11
11
  rescue_from CanCan::AccessDenied do |exception|
12
- redirect_to main_app.root_url, :alert => exception.message
12
+ redirect_to main_app.root_url, alert: exception.message
13
13
  end
14
14
  include HttpAcceptLanguage::AutoLocale
15
15
  before_action :store_user_location!, if: :storable_location?
@@ -33,15 +33,16 @@ module ThecoreConcern
33
33
  action = root_actions.collect(&:action_name).first
34
34
  # REDIRECT TO THAT ACTION
35
35
 
36
- puts "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA: Checking redirect path"
37
- if stored_location_for(resource) && can?(resource, :all)
38
- puts "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA: Checking redirect path: I'm in the IF"
39
- return stored_location_for(resource)
36
+ Rails.logger.info "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA: Checking redirect path"
37
+ stored_location = stored_location_for(resource)
38
+ if !stored_location.blank? && can?(resource, :all)
39
+ Rails.logger.info "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA: Checking redirect path: I'm in the IF stored_location_for(resource): #{stored_location}"
40
+ return stored_location
40
41
  elsif action
41
- puts "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA: Checking redirect path: I'm in the ELSIF with action name: #{action}"
42
+ Rails.logger.info "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA: Checking redirect path: I'm in the ELSIF with action name: #{action}"
42
43
  return rails_admin.send("#{action}_path").sub("#{ENV['RAILS_RELATIVE_URL_ROOT']}#{ENV['RAILS_RELATIVE_URL_ROOT']}", "#{ENV['RAILS_RELATIVE_URL_ROOT']}")
43
44
  else
44
- puts "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA: Checking redirect path: I'm in the ELSE with root_path: #{root_path}"
45
+ Rails.logger.info "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA: Checking redirect path: I'm in the ELSE with root_path: #{root_path}"
45
46
  sign_out current_user
46
47
  user_session = nil
47
48
  current_user = nil
@@ -104,7 +105,9 @@ module ThecoreConcern
104
105
 
105
106
  # Auto-sign out locked users
106
107
  def reject_locked!
107
- if current_user && current_user.locked?
108
+ Rails.logger.info "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB reject_locked"
109
+ if !current_user.blank? && current_user.locked?
110
+ Rails.logger.info "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB is locked"
108
111
  sign_out current_user
109
112
  user_session = nil
110
113
  current_user = nil
@@ -112,7 +115,9 @@ module ThecoreConcern
112
115
  flash[:notice] = nil
113
116
  redirect_to root_url
114
117
  end
118
+ Rails.logger.info "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB is not locked = ok"
115
119
  end
120
+
116
121
 
117
122
  # Only permits admin users
118
123
  def require_admin!
@@ -9,7 +9,7 @@ Rails.application.configure do
9
9
  config.after_initialize do
10
10
  RailsAdmin::Config::Actions::Export.send(:include, ExportConcern)
11
11
  RailsAdmin::Config::Actions::BulkDelete.send(:include, BulkDeleteConcern)
12
- RailsAdminSettings::Setting.send(:include, RailsAdminSettings::RailsAdminExtensionConfig)
12
+ ThecoreSettings::Setting.send(:include, ThecoreSettings::RailsAdminExtensionConfig)
13
13
  User.send(:include, ThecoreUiRailsAdminUser)
14
14
  UsedToken.send(:include, ThecoreUiRailsAdminUsedToken)
15
15
  Role.send(:include, ThecoreUiRailsAdminRole)
@@ -4,9 +4,9 @@ module Abilities
4
4
  def initialize user
5
5
  # No one is allowed to add or destroy settings
6
6
  # just list or edit existing
7
- cannot :create, RailsAdminSettings::Setting
8
- cannot :destroy, RailsAdminSettings::Setting
9
- cannot :show, RailsAdminSettings::Setting
7
+ cannot :create, ThecoreSettings::Setting
8
+ cannot :destroy, ThecoreSettings::Setting
9
+ cannot :show, ThecoreSettings::Setting
10
10
  end
11
11
  end
12
12
  end
@@ -1,4 +1,4 @@
1
- module RailsAdminSettings
1
+ module ThecoreSettings
2
2
  module RailsAdminExtensionConfig
3
3
  def self.included(base)
4
4
  # IMPORTANT: To extend rails admin section in model, directly, instead of using concerns, I can
@@ -1,7 +1,7 @@
1
1
  require 'thecore_ui_commons'
2
2
  # Rails Admin
3
- ENV['RAILS_ADMIN_THEME'] ||= 'rollincode'
4
- require 'rails_admin_rollincode'
3
+ # ENV['RAILS_ADMIN_THEME'] ||= 'rollincode'
4
+ # require 'rails_admin_rollincode'
5
5
  require 'rails_admin'
6
6
  require 'rails_admin-i18n'
7
7
  require 'safe_yaml'
@@ -11,7 +11,7 @@ require 'concerns/rails_admin_requirements'
11
11
  # Abilities
12
12
  require 'abilities/thecore_ui_rails_admin'
13
13
  # Rails Admin Buildups
14
- require 'jquery-ui-rails'
14
+ # require 'jquery-ui-rails'
15
15
  require 'bootstrap-sass'
16
16
 
17
17
  require 'concerns/thecore_ui_rails_admin_user'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_ui_rails_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.7
4
+ version: 2.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-05 00:00:00.000000000 Z
11
+ date: 2021-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore_ui_commons
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '5.0'
55
- - !ruby/object:Gem::Dependency
56
- name: rails_admin_rollincode
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '1.3'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '1.3'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: rails_admin
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -136,20 +122,6 @@ dependencies:
136
122
  - - "~>"
137
123
  - !ruby/object:Gem::Version
138
124
  version: '2.0'
139
- - !ruby/object:Gem::Dependency
140
- name: jquery-ui-rails
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: '6.0'
146
- type: :runtime
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: '6.0'
153
125
  description: Holds all base dependencies and configurations to have a thecore integrated
154
126
  with Rails Admin.
155
127
  email:
@@ -162,8 +134,10 @@ files:
162
134
  - README.md
163
135
  - Rakefile
164
136
  - app/assets/config/thecore_ui_rails_admin_manifest.js
137
+ - app/assets/javascripts/rails_admin/custom/ui.js
165
138
  - app/assets/javascripts/rails_admin/ra.widgets.coffee
166
139
  - app/assets/javascripts/thecore_ui_rails_admin/thecore_rails_admin.js
140
+ - app/assets/stylesheets/rails_admin/custom/theming.scss
167
141
  - app/assets/stylesheets/thecore_ui_rails_admin/animate.css
168
142
  - app/assets/stylesheets/thecore_ui_rails_admin/apexcharts.scss
169
143
  - app/assets/stylesheets/thecore_ui_rails_admin/colors.scss
@@ -177,19 +151,19 @@ files:
177
151
  - app/controllers/pages_controller.rb
178
152
  - app/helpers/devise_bootstrap_errors_helper.rb
179
153
  - app/helpers/thecore_helper.rb
180
- - app/views/layouts/rails_admin/_navigation.html.haml
181
- - app/views/layouts/rails_admin/_secondary_navigation.html.haml
182
- - app/views/layouts/rails_admin/_sidebar_navigation.html.haml
183
- - app/views/layouts/rails_admin/_style_common.html.haml
184
- - app/views/layouts/rails_admin/_style_override.html.haml
185
- - app/views/layouts/rails_admin/_user_navigation.html.haml
186
- - app/views/layouts/rails_admin/application.html.haml
187
- - app/views/layouts/rails_admin/pjax.html.haml
188
- - app/views/rails_admin/main/_card.html.haml
189
- - app/views/rails_admin/main/_dashboard_block.html.haml
190
- - app/views/rails_admin/main/_modal_interaction.html.erb
191
- - app/views/rails_admin/main/dashboard.html.haml
192
- - app/views/rails_admin/main/index.html.haml
154
+ - app/views/layouts.old/rails_admin/_navigation.html.haml
155
+ - app/views/layouts.old/rails_admin/_secondary_navigation.html.haml
156
+ - app/views/layouts.old/rails_admin/_sidebar_navigation.html.haml
157
+ - app/views/layouts.old/rails_admin/_style_common.html.haml
158
+ - app/views/layouts.old/rails_admin/_style_override.html.haml
159
+ - app/views/layouts.old/rails_admin/_user_navigation.html.haml
160
+ - app/views/layouts.old/rails_admin/application.html.haml
161
+ - app/views/layouts.old/rails_admin/pjax.html.haml
162
+ - app/views/rails_admin.old/main/_card.html.haml
163
+ - app/views/rails_admin.old/main/_dashboard_block.html.haml
164
+ - app/views/rails_admin.old/main/_modal_interaction.html.erb
165
+ - app/views/rails_admin.old/main/dashboard.html.haml
166
+ - app/views/rails_admin.old/main/index.html.haml
193
167
  - app/views/shared/_flash.html.erb
194
168
  - config/initializers/rails_admin.rb
195
169
  - config/initializers/thecore_concern.rb
@@ -202,8 +176,6 @@ files:
202
176
  - config/locales/it.main.yml
203
177
  - config/locales/it.rails_admin.yml
204
178
  - config/locales/it.rollincode.yml
205
- - config/locales/thecore_settings.en.yml
206
- - config/locales/thecore_settings.it.yml
207
179
  - config/routes.rb
208
180
  - lib/abilities/thecore_ui_rails_admin.rb
209
181
  - lib/concerns/rails_admin_requirements.rb
@@ -1,31 +0,0 @@
1
- en:
2
- settings:
3
- namespaces:
4
- main: Main
5
- names:
6
- app_name: Application Name
7
- admin:
8
- settings:
9
- label: Settings
10
- phone_invalid: Invalid Telephone
11
- phones_invalid: "Invalid Telephones: %{phones}"
12
- email_invalid: Invalid Email
13
- yaml_invalid: Invalid Email
14
- color_invalid: Invalid Color
15
- mongoid: &mongoid
16
- models:
17
- rails_admin_settings/setting: Configurations
18
- attributes:
19
- rails_admin_settings/setting:
20
- c_at: Created
21
- u_at: Modified
22
- enabled: Enabled
23
- ns: Group
24
- name: Name
25
- key: Key
26
- raw: Value
27
- type: Type
28
- kind: Type
29
- label: Label
30
- activerecord:
31
- <<: *mongoid
@@ -1,31 +0,0 @@
1
- it:
2
- settings:
3
- namespaces:
4
- main: Principale
5
- names:
6
- app_name: Nome dell'applicazione
7
- admin:
8
- settings:
9
- label: 'Impostazioni'
10
- phone_invalid: Telefono non valido
11
- phones_invalid: "Telefono non valido: %{phones}"
12
- email_invalid: Email non valida
13
- yaml_invalid: YAML non valido
14
- color_invalid: Colore non valido
15
- mongoid: &mongoid
16
- models:
17
- rails_admin_settings/setting: Configurazioni
18
- attributes:
19
- rails_admin_settings/setting:
20
- c_at: Creato
21
- u_at: Modificato
22
- enabled: Abilitato
23
- ns: Gruppo
24
- name: Nome
25
- key: Chiave
26
- raw: Valore
27
- type: Tipo
28
- kind: Tipo
29
- label: Etichetta
30
- activerecord:
31
- <<: *mongoid