thecore_ui_rails_admin 2.4.0 → 2.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/rails_admin/custom/thecore.js +1 -0
  3. data/app/assets/javascripts/rails_admin/custom/ui.js +2 -0
  4. data/app/assets/javascripts/thecore_ui_rails_admin/thecore_rails_admin.js +0 -1
  5. data/app/assets/stylesheets/rails_admin/custom/theming.scss +6 -0
  6. data/app/assets/stylesheets/{thecore_ui_rails_admin/colors.scss → rails_admin/custom/variables.scss} +0 -0
  7. data/app/assets/stylesheets/thecore_ui_rails_admin/thecore.scss +3 -2
  8. data/app/assets/stylesheets/thecore_ui_rails_admin/thecore_rails_admin.scss +2 -2
  9. data/app/assets/stylesheets/thecore_ui_rails_admin/togglable-sidebar.scss +11 -11
  10. data/app/views/{layouts → layouts.old}/rails_admin/_navigation.html.haml +0 -0
  11. data/app/views/{layouts → layouts.old}/rails_admin/_secondary_navigation.html.haml +0 -0
  12. data/app/views/{layouts → layouts.old}/rails_admin/_sidebar_navigation.html.haml +0 -0
  13. data/app/views/{layouts → layouts.old}/rails_admin/_style_common.html.haml +0 -0
  14. data/app/views/{layouts → layouts.old}/rails_admin/_style_override.html.haml +0 -0
  15. data/app/views/{layouts → layouts.old}/rails_admin/_user_navigation.html.haml +0 -0
  16. data/app/views/{layouts → layouts.old}/rails_admin/application.html.haml +7 -9
  17. data/app/views/{layouts → layouts.old}/rails_admin/pjax.html.haml +1 -1
  18. data/app/views/{rails_admin → rails_admin.old}/main/_card.html.haml +0 -0
  19. data/app/views/{rails_admin → rails_admin.old}/main/_dashboard_block.html.haml +0 -0
  20. data/app/views/{rails_admin → rails_admin.old}/main/_modal_interaction.html.erb +0 -0
  21. data/app/views/{rails_admin → rails_admin.old}/main/dashboard.html.haml +0 -0
  22. data/app/views/{rails_admin → rails_admin.old}/main/index.html.haml +0 -0
  23. data/config/initializers/rails_admin.rb +1 -0
  24. data/config/initializers/thecore_concern.rb +7 -7
  25. data/config/initializers/thecore_ui_rails_admin_app_configs.rb +1 -1
  26. data/lib/abilities/thecore_ui_rails_admin.rb +3 -3
  27. data/lib/concerns/rails_admin_requirements.rb +1 -1
  28. data/lib/thecore_ui_rails_admin.rb +3 -3
  29. metadata +19 -46
  30. data/config/locales/thecore_settings.en.yml +0 -31
  31. data/config/locales/thecore_settings.it.yml +0 -31
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf5ef77b7350f3b3db1ac10329ff211c6912d81af8deb7ccfef64e2a44fb703a
4
- data.tar.gz: 6fc7f5a2c50d3ecdc9520c8b95bf533d520fa5b41b2eb00d392501df2af46b91
3
+ metadata.gz: 5e2ea2b4ecdff581783f0361437eedd3e52f12f57e3278bc2d4b9d2196a61c96
4
+ data.tar.gz: 667b44bf2c4a71709daff4c08861f4480d77241a2739c80c39f8a12b9375e5d8
5
5
  SHA512:
6
- metadata.gz: 4b36f604e772e954819f8661e6788d59e174e95b73a9bc97a5411e85123f69a56dde2f9dd48e93e2c6c7067405d5b8d5b5fdf2b6af3fddf69ef8eff63cd0b41f
7
- data.tar.gz: a97f275432de1a5812d7408612dda0704091079dd3f3703de611359a71674c4d5a4bdf582d2dc07a0c01c52e766e7c8784139fc41f994056a05a6f06d5cb78d3
6
+ metadata.gz: '034695022cad9c9b02a218ce458fcdb31417aa61a405dbcf5c0f66b4654af0b63a0e7e4aaab95a1a1e2cd1020d46504a9c35ae23bffbb87b94e0f4dd7681918b'
7
+ data.tar.gz: 983984c18588850501e2c748a3a928965c59284e6c88c6d49dea9cef29c5a387eec5ddd525640d8666f9de96346d72193f43595878260592ab5b63054f3fff6a
@@ -0,0 +1 @@
1
+ /* Please Override in your application or in a wrapper gem */
@@ -0,0 +1,2 @@
1
+ //= require selectize
2
+ //= require rails_admin/custom/thecore
@@ -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
+ }
@@ -16,8 +16,9 @@
16
16
  *= require rails_admin_selectize/index
17
17
  *= require_self
18
18
  */
19
- @import 'overrides';
20
- @import 'colors';
19
+ @import 'rails_admin/custom/variables';
20
+ @import 'rails_admin/custom/theming';
21
+ @import 'rails_admin/custom/mixins';
21
22
  @import "jquery-ui";
22
23
  @import "jquery-ui/dialog";
23
24
  @import 'bootstrap-sprockets';
@@ -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;
@@ -41,14 +41,14 @@
41
41
  }
42
42
  /* Sidebar Styles */
43
43
 
44
- .sidebar-nav {
45
- position: absolute;
46
- top: 0;
47
- width: 250px;
48
- margin: 0;
49
- padding: 0;
50
- list-style: none;
51
- }
44
+ // .sidebar-nav {
45
+ // position: absolute;
46
+ // top: 0;
47
+ // width: 250px;
48
+ // margin: 0;
49
+ // padding: 0;
50
+ // list-style: none;
51
+ // }
52
52
  .sidebar-nav li {
53
53
  text-indent: 20px;
54
54
  line-height: 40px;
@@ -80,9 +80,9 @@
80
80
  background: none;
81
81
  }
82
82
 
83
- body.rails_admin .sidebar-nav {
84
- top: 0px;
85
- }
83
+ // body.rails_admin .sidebar-nav {
84
+ // top: 0px;
85
+ // }
86
86
 
87
87
  .sub-menu a {
88
88
  padding-left: 20px;
@@ -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
@@ -2,6 +2,7 @@ require 'rails_admin'
2
2
  require 'nested_form/builder_mixin'
3
3
 
4
4
  RailsAdmin.config do |config|
5
+ config.main_app_name = Proc.new { |controller| [ ((ENV["APP_NAME"].presence || Settings.app_name.presence) rescue "Thecore"), "" ] }
5
6
  # Link for background Job
6
7
  (config.navigation_static_links ||= {}).merge! "Background Monitor" => "#{ENV['RAILS_RELATIVE_URL_ROOT']}/app/sidekiq"
7
8
 
@@ -33,16 +33,16 @@ module ThecoreConcern
33
33
  action = root_actions.collect(&:action_name).first
34
34
  # REDIRECT TO THAT ACTION
35
35
 
36
- Rails.logger.info "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA: Checking redirect path"
36
+ # Rails.logger.info "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA: Checking redirect path"
37
37
  stored_location = stored_location_for(resource)
38
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}"
39
+ # Rails.logger.info "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA: Checking redirect path: I'm in the IF stored_location_for(resource): #{stored_location}"
40
40
  return stored_location
41
41
  elsif action
42
- Rails.logger.info "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}"
43
43
  return rails_admin.send("#{action}_path").sub("#{ENV['RAILS_RELATIVE_URL_ROOT']}#{ENV['RAILS_RELATIVE_URL_ROOT']}", "#{ENV['RAILS_RELATIVE_URL_ROOT']}")
44
44
  else
45
- Rails.logger.info "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}"
46
46
  sign_out current_user
47
47
  user_session = nil
48
48
  current_user = nil
@@ -105,9 +105,9 @@ module ThecoreConcern
105
105
 
106
106
  # Auto-sign out locked users
107
107
  def reject_locked!
108
- Rails.logger.info "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB reject_locked"
108
+ # Rails.logger.info "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB reject_locked"
109
109
  if !current_user.blank? && current_user.locked?
110
- Rails.logger.info "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB is locked"
110
+ # Rails.logger.info "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB is locked"
111
111
  sign_out current_user
112
112
  user_session = nil
113
113
  current_user = nil
@@ -115,7 +115,7 @@ module ThecoreConcern
115
115
  flash[:notice] = nil
116
116
  redirect_to root_url
117
117
  end
118
- Rails.logger.info "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB is not locked = ok"
118
+ # Rails.logger.info "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB is not locked = ok"
119
119
  end
120
120
 
121
121
 
@@ -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.4.0
4
+ version: 2.4.4
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-06 00:00:00.000000000 Z
11
+ date: 2021-08-26 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,11 +134,14 @@ 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/thecore.js
138
+ - app/assets/javascripts/rails_admin/custom/ui.js
165
139
  - app/assets/javascripts/rails_admin/ra.widgets.coffee
166
140
  - app/assets/javascripts/thecore_ui_rails_admin/thecore_rails_admin.js
141
+ - app/assets/stylesheets/rails_admin/custom/theming.scss
142
+ - app/assets/stylesheets/rails_admin/custom/variables.scss
167
143
  - app/assets/stylesheets/thecore_ui_rails_admin/animate.css
168
144
  - app/assets/stylesheets/thecore_ui_rails_admin/apexcharts.scss
169
- - app/assets/stylesheets/thecore_ui_rails_admin/colors.scss
170
145
  - app/assets/stylesheets/thecore_ui_rails_admin/common.scss
171
146
  - app/assets/stylesheets/thecore_ui_rails_admin/devise.scss
172
147
  - app/assets/stylesheets/thecore_ui_rails_admin/flashing.scss
@@ -177,19 +152,19 @@ files:
177
152
  - app/controllers/pages_controller.rb
178
153
  - app/helpers/devise_bootstrap_errors_helper.rb
179
154
  - 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
155
+ - app/views/layouts.old/rails_admin/_navigation.html.haml
156
+ - app/views/layouts.old/rails_admin/_secondary_navigation.html.haml
157
+ - app/views/layouts.old/rails_admin/_sidebar_navigation.html.haml
158
+ - app/views/layouts.old/rails_admin/_style_common.html.haml
159
+ - app/views/layouts.old/rails_admin/_style_override.html.haml
160
+ - app/views/layouts.old/rails_admin/_user_navigation.html.haml
161
+ - app/views/layouts.old/rails_admin/application.html.haml
162
+ - app/views/layouts.old/rails_admin/pjax.html.haml
163
+ - app/views/rails_admin.old/main/_card.html.haml
164
+ - app/views/rails_admin.old/main/_dashboard_block.html.haml
165
+ - app/views/rails_admin.old/main/_modal_interaction.html.erb
166
+ - app/views/rails_admin.old/main/dashboard.html.haml
167
+ - app/views/rails_admin.old/main/index.html.haml
193
168
  - app/views/shared/_flash.html.erb
194
169
  - config/initializers/rails_admin.rb
195
170
  - config/initializers/thecore_concern.rb
@@ -202,8 +177,6 @@ files:
202
177
  - config/locales/it.main.yml
203
178
  - config/locales/it.rails_admin.yml
204
179
  - config/locales/it.rollincode.yml
205
- - config/locales/thecore_settings.en.yml
206
- - config/locales/thecore_settings.it.yml
207
180
  - config/routes.rb
208
181
  - lib/abilities/thecore_ui_rails_admin.rb
209
182
  - 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