thecore_ui_rails_admin 2.3.2 → 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: 21fde51d33d465f84313ae56c053c3a29d1150602fdd070dfb1879798b776747
4
- data.tar.gz: 49b7e7fd4e644eb0800b68f80ede6bbb2aa26bf6dc9fd444abe4312a9f19a11e
3
+ metadata.gz: db2d96f8f1d2219dc6430071c22a8689e6976fabddf950e8272feb449de22c80
4
+ data.tar.gz: c7eb8894672f1fd8644dccf82506959a2fa6c9b66c8e42e4b1a943716c4626fd
5
5
  SHA512:
6
- metadata.gz: c859caeda5832694b057a29d9733169c071ae96b521965e3953eae6081aa88c8e6ff35a5149e57aea1d2191a526aba214c93b6bbe4e1ae5303b902c9be24446a
7
- data.tar.gz: 82600ed9c2565484ec9a571773ec9c43b121048c6f8d69666bfadb630d3b6693d45340bf15ded31e530433c56370651a72a5a966aa607b2b373f3a0743c03d4b
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|
@@ -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
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.2
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-06-23 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