thecore_ui_rails_admin 2.2.11 → 2.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c049fd18249c95ae65ebacca02863af1a4ff3ddcf074d4a7ebf701069a1fe53
4
- data.tar.gz: 7f2f10ba790e5cf44dba969871c914fad5083c2b3ad19af114cc30e4e388a8cf
3
+ metadata.gz: db2d96f8f1d2219dc6430071c22a8689e6976fabddf950e8272feb449de22c80
4
+ data.tar.gz: c7eb8894672f1fd8644dccf82506959a2fa6c9b66c8e42e4b1a943716c4626fd
5
5
  SHA512:
6
- metadata.gz: f3684f63f42653f3bb43a325241dec76422576fcb114e51c2e453234d9f33d781d9c2616229e1c5fda90ea0f0ebbf2e667a7a45f18bb45bd11ff5f6e8dd2af0a
7
- data.tar.gz: c0400520ce4a94a39852b2b206d814ba1fb906b0a17ac3fbb32a7ddb2738e82d3d39edee7814f7ae32097cc97321dc93fdf344054d3134d75995ecf57c848800
6
+ metadata.gz: a3912353c3cd7d2c7a3c4dbd5c0078cc33e50bc00d03edd857624a17f4a4145e26b55afc061326f736607a59fe6e08e98e0405a551faf80b2362b31627595bb5
7
+ data.tar.gz: 5b912555b9e6b0011d905e6eec13d9b91986214dbcff68cdc17bc78d5778b91a5a45eac39b4e236e637cbe528d827cc860e65fc87e68585f43faf8135dece98a
@@ -0,0 +1,4 @@
1
+ %style{media: "screen"}
2
+ div#sidebar-wrapper div.sidebar-nav li.dropdown-header {padding-left: 0px}
3
+ div.sub-menu-container li.sub-menu a.pjax {padding-left: 0px}
4
+ div#wrapper div#sidebar-wrapper {overflow: hidden}
@@ -0,0 +1 @@
1
+ -# Placeholder to be overridden for special CSS needs, like using interpolation
@@ -7,11 +7,9 @@
7
7
  %meta{name: "viewport", content: "width=device-width, initial-scale=1"}
8
8
  %meta{content: "NONE,NOARCHIVE", name: "robots"}
9
9
  = csrf_meta_tag
10
- %style{media: "screen"}
11
- div#sidebar-wrapper div.sidebar-nav li.dropdown-header { padding-left: 0px }
12
- div.sub-menu-container li.sub-menu a.pjax { padding-left: 0px }
13
- div#wrapper div#sidebar-wrapper { overflow: hidden }
14
10
 
11
+ = render "layouts/rails_admin/style_common"
12
+ = render "layouts/rails_admin/style_override"
15
13
 
16
14
  = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => 'reload'
17
15
  = javascript_pack_tag 'application', 'data-turbolinks-track' => 'reload'
@@ -17,8 +17,10 @@
17
17
  = breadcrumb
18
18
  .well.well-sm
19
19
  %ul.nav.nav-pills#action-menu
20
- = menu_for((@abstract_model ? (@object.try(:persisted?) ? :member : :collection) : :root), @abstract_model, @object)
20
+ = content_for :search_form
21
+ = content_for :action_links
21
22
  = content_for :contextual_tabs
23
+
22
24
  .well.well-sm
23
25
  = yield
24
26
  - else
@@ -0,0 +1,9 @@
1
+ - @abstract_models.each do |abstract_model|
2
+ - index_path = index_path(model_name: abstract_model.to_param)
3
+ - if authorized?(:index, abstract_model)
4
+ .col-sm-4
5
+ %a.box.pjax{href: index_path}
6
+ %i{class: "icon-bg #{abstract_model.config.navigation_icon.present? ? abstract_model.config.navigation_icon : 'file' }"}
7
+ .text-center
8
+ %p.model= capitalize_first_letter(abstract_model.config.label_plural)
9
+ %strong.count= @count[abstract_model.model.name].to_s
@@ -19,15 +19,7 @@
19
19
 
20
20
  - if @abstract_models
21
21
  .row
22
- - @abstract_models.each do |abstract_model|
23
- - index_path = index_path(model_name: abstract_model.to_param)
24
- - if authorized?(:index, abstract_model)
25
- .col-sm-4
26
- %a.box.pjax{href: index_path}
27
- %i{class: "icon-bg #{abstract_model.config.navigation_icon.present? ? abstract_model.config.navigation_icon : 'file' }"}
28
- .text-center
29
- %p.model= capitalize_first_letter(abstract_model.config.label_plural)
30
- %strong.count= @count[abstract_model.model.name].to_s
22
+ = render partial: 'rails_admin/main/dashboard_block'
31
23
 
32
24
  - if @auditing_adapter && authorized?(:history_index)
33
25
  #block-tables.block
@@ -8,6 +8,7 @@
8
8
  params.delete(:sort) if params[:sort] == @model_config.list.sort_by.to_s
9
9
  export_action = RailsAdmin::Config::Actions.find(:export, { controller: self.controller, abstract_model: @abstract_model })
10
10
  export_action = nil unless export_action && authorized?(export_action.authorization_key, @abstract_model)
11
+ bulk_delete_action = actions(:bulkable, @abstract_model).select { |action| action.action_name.to_s == "bulk_delete" }.first
11
12
  description = RailsAdmin.config(@abstract_model.model_name).description
12
13
  properties = @model_config.list.with(controller: self.controller, view: self, object: @abstract_model.model.new).visible_fields
13
14
  checkboxes = @model_config.list.checkboxes?
@@ -19,23 +20,55 @@
19
20
  other_right = sets[params[:set].to_i + 1].present?
20
21
  end
21
22
 
23
+ - content_for :action_links do
24
+ - parent = (@abstract_model ? (@object.try(:persisted?) ? :member : :collection) : :root)
25
+ - actions = actions(parent, @abstract_model, @object).select { |a| a.http_methods.include?(:get) && a.show_in_menu && a.action_name.to_s != "export"}
26
+ - actions.collect do |action|
27
+ - wording = wording_for(:link, action)
28
+ %li{title: wording, rel: "tooltip", class: "icon #{action.key}_#{parent}_link #{'active' if current_action?(action)}", style: "float:right"}
29
+ %a{class: "#{action.pjax? ? 'pjax' : ''}", href: rails_admin.url_for(action: action.action_name, controller: 'rails_admin/main', model_name: @abstract_model.try(:to_param), id: (@object.try(:persisted?) && @object.try(:id) || nil))}
30
+ %i{class: action.link_icon}
31
+
32
+ - content_for :search_form do
33
+ %li.filer-search-form
34
+ = form_tag(index_path(params.except(*%w[page f query])), method: :get, class: "pjax-form form-inline") do
35
+ %span#filters_box{data: {options: ordered_filter_options.to_json}}
36
+ %hr.filters_box{style: "display:#{ordered_filters.blank? ? 'none' : 'block'}"}
37
+ .input-group#search-for-filter
38
+ %input.form-control.input-small{name: "query", type: "search", value: query, placeholder: t("admin.misc.filter")}
39
+ %span.input-group-btn
40
+ %button.btn.btn-primary{type: 'submit', :'data-disable-with' => '<i class="icon-white icon-refresh"></i> '.html_safe + t('admin.misc.refresh')}
41
+ %i.icon-white.icon-refresh
42
+ - if filterable_fields.present?
43
+ %button.btn.dropdown-toggle#filters-menu{ :'data-toggle' => "dropdown", :'aria-haspopup'=>"true", :'aria-expanded'=>"true"}
44
+ %i.icon-white.icon-filter
45
+ %b.caret
46
+ %ul.dropdown-menu#filters{style: 'left:auto; right:0;', :'aria-labelledby'=>"filters-menu"}
47
+ - filterable_fields.each do |field|
48
+ - field_options = case field.type
49
+ - when :enum
50
+ - options_for_select(field.with(object: @abstract_model.model.new).enum)
51
+ - else
52
+ - ''
53
+ %li
54
+ %a{href: '#', :"data-field-label" => field.label, :"data-field-name" => field.name, :"data-field-options" => field_options.html_safe, :"data-field-type" => field.type, :"data-field-value" => "", :"data-field-datetimepicker-format" => (field.try(:parser) && field.parser.to_momentjs)}= capitalize_first_letter(field.label)
55
+ %button#remove_filter.btn.btn-info{title: "Reset filters"}
56
+ %i.icon-white.icon-remove
57
+
22
58
  - content_for :contextual_tabs do
23
- - if checkboxes
24
- = bulk_menu
25
- - if filterable_fields.present?
26
- %li.dropdown{style: 'float:right'}
27
- %a.dropdown-toggle#filters-menu{ :'data-toggle' => "dropdown", :'aria-haspopup'=>"true", :'aria-expanded'=>"true"}
28
- = t('admin.misc.add_filter')
59
+ - if checkboxes && bulk_delete_action
60
+ %li.icon{style: "float:right", title: t(:delete_selected)}
61
+ = link_to '<i class="fa fa-trash"></i>'.html_safe, '#', class: 'bulk-link', data: {action: "bulk_delete"}
62
+ - if export_action
63
+ %li.dropdown{style: "float:right", title: t(:export)}
64
+ %a.pjax.dropdown-toggle#exporters-menu{ :'data-toggle' => "dropdown", :'aria-haspopup'=>"true", :'aria-expanded'=>"true", style: "float: right;"}
65
+ %i.fa.fa-external-link
29
66
  %b.caret
30
- %ul.dropdown-menu#filters{style: 'left:auto; right:0;', :'aria-labelledby'=>"filters-menu"}
31
- - filterable_fields.each do |field|
32
- - field_options = case field.type
33
- - when :enum
34
- - options_for_select(field.with(object: @abstract_model.model.new).enum)
35
- - else
36
- - ''
37
- %li
38
- %a{href: '#', :"data-field-label" => field.label, :"data-field-name" => field.name, :"data-field-options" => field_options.html_safe, :"data-field-type" => field.type, :"data-field-value" => "", :"data-field-datetimepicker-format" => (field.try(:parser) && field.parser.to_momentjs)}= capitalize_first_letter(field.label)
67
+ %ul.dropdown-menu#exporters{style: 'left:auto; right:0;', :'aria-labelledby'=>"exporters-menu"}
68
+ %li= link_to t(:export_all).html_safe, rails_admin.url_for(action: "export", controller: 'rails_admin/main', model_name: @abstract_model.try(:to_param), id: (@object.try(:persisted?) && @object.try(:id) || nil)), class: "pjax"
69
+ %li= link_to t(:export_found).html_safe, export_path(params.except('set').except('page')), class: 'pjax'
70
+ %li= link_to t(:export_selected).html_safe, '#', class: 'bulk-link pjax', data: {action: "bulk_export"}
71
+
39
72
 
40
73
  %style
41
74
  - properties.select{ |p| p.column_width.present? }.each do |property|
@@ -43,20 +76,6 @@
43
76
  = "#list td.#{property.css_class} { max-width: #{property.column_width}px; }"
44
77
 
45
78
  #list
46
- = form_tag(index_path(params.except(*%w[page f query])), method: :get, class: "pjax-form form-inline") do
47
- %span#filters_box{data: {options: ordered_filter_options.to_json}}
48
- %hr.filters_box{style: "display:#{ordered_filters.blank? ? 'none' : 'block'}"}
49
- .input-group
50
- %input.form-control.input-small{name: "query", type: "search", value: query, placeholder: t("admin.misc.filter")}
51
- %span.input-group-btn
52
- %button.btn.btn-primary{type: 'submit', :'data-disable-with' => '<i class="icon-white icon-refresh"></i> '.html_safe + t('admin.misc.refresh')}
53
- %i.icon-white.icon-refresh
54
- = t('admin.misc.refresh')
55
- %button#remove_filter.btn.btn-info{title: "Reset filters"}
56
- %i.icon-white.icon-remove
57
- - if export_action
58
- %span{style: 'float:right'}= link_to wording_for(:link, export_action), export_path(params.except('set').except('page')), class: 'btn btn-info'
59
-
60
79
  - unless @model_config.list.scopes.blank?
61
80
  %ul.nav.nav-tabs.nav-justified#scope_selector
62
81
  - @model_config.list.scopes.each do |scope|
@@ -45,6 +45,11 @@ RailsAdmin.config do |config|
45
45
  config.model "ActiveStorage::VariantRecord" do
46
46
  visible false
47
47
  end
48
+
49
+ # action_mailbox~inbound_email
50
+ config.model "ActionMailbox::InboundEmail" do
51
+ visible false
52
+ end
48
53
 
49
54
  ## == Devise ==
50
55
  config.authenticate_with do
@@ -11,6 +11,7 @@ Rails.application.configure do
11
11
  RailsAdmin::Config::Actions::BulkDelete.send(:include, BulkDeleteConcern)
12
12
  RailsAdminSettings::Setting.send(:include, RailsAdminSettings::RailsAdminExtensionConfig)
13
13
  User.send(:include, ThecoreUiRailsAdminUser)
14
+ UsedToken.send(:include, ThecoreUiRailsAdminUsedToken)
14
15
  Role.send(:include, ThecoreUiRailsAdminRole)
15
16
  Permission.send(:include, ThecoreUiRailsAdminPermission)
16
17
  end
@@ -1,10 +1,24 @@
1
1
  it:
2
+ export: Esporta
3
+ export_all: Esporta Tutti
4
+ export_found: Esporta i Filtrati
5
+ export_selected: Esporta i Selezionati
6
+ delete_selected: Elimina i Selezionati
2
7
  yes: Si
3
8
  no: Annulla
4
9
  error: Errore
5
10
  question: Domanda
6
11
  root_actions: "Operazioni"
7
12
  admin:
13
+ flash:
14
+ error: "Impossibile eseguire l'azione %{action} (%{name})"
15
+ model_not_found: Impossibile trovare il modello '%{model}'
16
+ noaction: Impossibile eseguire l'azione
17
+ object_not_found: "Impossibile trovare il modello %{model} con id '%{id}'"
18
+ successful: "Azione eseguita con successo: %{action} (%{name})"
19
+ actions:
20
+ index:
21
+ link: Mostra tutti gli Elementi
8
22
  label: "Impostazioni"
9
23
  advanced:
10
24
  label: Avanzate
@@ -0,0 +1,11 @@
1
+ require 'active_support/concern'
2
+
3
+ module ThecoreUiRailsAdminUsedToken
4
+ extend ActiveSupport::Concern
5
+
6
+ included do
7
+ rails_admin do
8
+ visible false
9
+ end
10
+ end
11
+ end
@@ -29,6 +29,16 @@ module ThecoreUiRailsAdminUser
29
29
  end
30
30
  end
31
31
  field :roles#, :selectize
32
+ field :access_token do
33
+ pretty_value do
34
+ "#{ENV['FRONTEND_URL']}?atoken=#{value}"
35
+ end
36
+ # export_value do
37
+ # # used in exports, where no html/data is allowed
38
+ # "#{ENV['FRONTEND_URL']}?atoken=#{value}"
39
+ # end
40
+ read_only true
41
+ end
32
42
  # include UserRailsAdminConcern
33
43
 
34
44
  # Fields only in lists and forms
@@ -15,6 +15,7 @@ require 'jquery-ui-rails'
15
15
  require 'bootstrap-sass'
16
16
 
17
17
  require 'concerns/thecore_ui_rails_admin_user'
18
+ require 'concerns/thecore_ui_rails_admin_used_token'
18
19
  require 'concerns/thecore_ui_rails_admin_role'
19
20
  require 'concerns/thecore_ui_rails_admin_permission'
20
21
  require 'concerns/thecore_rails_admin_export_concern'
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.2.11
4
+ version: 2.3.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-03-29 00:00:00.000000000 Z
11
+ date: 2021-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore_ui_commons
@@ -180,10 +180,13 @@ files:
180
180
  - app/views/layouts/rails_admin/_navigation.html.haml
181
181
  - app/views/layouts/rails_admin/_secondary_navigation.html.haml
182
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
183
185
  - app/views/layouts/rails_admin/_user_navigation.html.haml
184
186
  - app/views/layouts/rails_admin/application.html.haml
185
187
  - app/views/layouts/rails_admin/pjax.html.haml
186
188
  - app/views/rails_admin/main/_card.html.haml
189
+ - app/views/rails_admin/main/_dashboard_block.html.haml
187
190
  - app/views/rails_admin/main/_modal_interaction.html.erb
188
191
  - app/views/rails_admin/main/dashboard.html.haml
189
192
  - app/views/rails_admin/main/index.html.haml
@@ -208,6 +211,7 @@ files:
208
211
  - lib/concerns/thecore_rails_admin_export_concern.rb
209
212
  - lib/concerns/thecore_ui_rails_admin_permission.rb
210
213
  - lib/concerns/thecore_ui_rails_admin_role.rb
214
+ - lib/concerns/thecore_ui_rails_admin_used_token.rb
211
215
  - lib/concerns/thecore_ui_rails_admin_user.rb
212
216
  - lib/tasks/thecore_ui_rails_admin_tasks.rake
213
217
  - lib/thecore_ui_rails_admin.rb
@@ -233,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
237
  - !ruby/object:Gem::Version
234
238
  version: '0'
235
239
  requirements: []
236
- rubygems_version: 3.0.3
240
+ rubygems_version: 3.0.3.1
237
241
  signing_key:
238
242
  specification_version: 4
239
243
  summary: Thecore2 Backend UI based on Rails Admin.