avo 3.0.1.beta24 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of avo might be problematic. Click here for more details.

Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +5 -5
  3. data/Gemfile.lock +164 -128
  4. data/README.md +19 -27
  5. data/app/components/avo/actions_component.rb +2 -2
  6. data/app/components/avo/fields/belongs_to_field/edit_component.html.erb +122 -104
  7. data/app/components/avo/fields/belongs_to_field/edit_component.rb +11 -0
  8. data/app/components/avo/fields/location_field/edit_component.html.erb +12 -10
  9. data/app/components/avo/index/grid_item_component.html.erb +1 -1
  10. data/app/components/avo/index/resource_table_component.html.erb +2 -2
  11. data/app/components/avo/index/resource_table_component.rb +16 -0
  12. data/app/components/avo/index/table_row_component.html.erb +1 -1
  13. data/app/components/avo/items/panel_component.html.erb +25 -0
  14. data/app/components/avo/items/panel_component.rb +43 -0
  15. data/app/components/avo/items/switcher_component.html.erb +17 -0
  16. data/app/components/avo/items/switcher_component.rb +79 -0
  17. data/app/components/avo/items/visible_items_component.html.erb +10 -0
  18. data/app/components/avo/items/visible_items_component.rb +11 -0
  19. data/app/components/avo/modal_component.html.erb +11 -7
  20. data/app/components/avo/modal_component.rb +21 -0
  21. data/app/components/avo/paginator_component.html.erb +29 -40
  22. data/app/components/avo/paginator_component.rb +18 -0
  23. data/app/components/avo/panel_component.html.erb +2 -2
  24. data/app/components/avo/referrer_params_component.html.erb +1 -0
  25. data/app/components/avo/resource_component.rb +8 -15
  26. data/app/components/avo/resource_sidebar_component.html.erb +11 -18
  27. data/app/components/avo/resource_sidebar_component.rb +4 -2
  28. data/app/components/avo/sidebar_profile_component.html.erb +1 -1
  29. data/app/components/avo/tab_group_component.html.erb +1 -1
  30. data/app/components/avo/views/resource_edit_component.html.erb +15 -32
  31. data/app/components/avo/views/resource_edit_component.rb +18 -6
  32. data/app/components/avo/views/resource_index_component.rb +1 -0
  33. data/app/components/avo/views/resource_show_component.html.erb +14 -33
  34. data/app/components/avo/views/resource_show_component.rb +11 -0
  35. data/app/controllers/avo/actions_controller.rb +6 -4
  36. data/app/controllers/avo/application_controller.rb +2 -33
  37. data/app/controllers/avo/base_controller.rb +25 -16
  38. data/app/helpers/avo/application_helper.rb +4 -0
  39. data/app/javascript/js/controllers/fields/reload_belongs_to_field_controller.js +51 -0
  40. data/app/javascript/js/controllers.js +2 -0
  41. data/app/views/avo/actions/show.html.erb +4 -3
  42. data/app/views/avo/base/_new_via_belongs_to.html.erb +12 -0
  43. data/app/views/avo/base/close_modal_and_reload_field.turbo_stream.erb +8 -0
  44. data/app/views/avo/base/create_fail_action.turbo_stream.erb +13 -0
  45. data/app/views/avo/partials/_flash_alerts.turbo_stream.erb +3 -0
  46. data/config/i18n-tasks.yml +1 -1
  47. data/config/initializers/pagy.rb +2 -0
  48. data/config/master.key +1 -0
  49. data/lib/avo/base_action.rb +44 -38
  50. data/lib/avo/base_resource.rb +7 -8
  51. data/lib/avo/concerns/borrow_items_holder.rb +35 -0
  52. data/lib/avo/concerns/has_items.rb +65 -47
  53. data/lib/avo/concerns/hydration.rb +17 -0
  54. data/lib/avo/concerns/is_resource_item.rb +2 -10
  55. data/lib/avo/concerns/pagination.rb +53 -0
  56. data/lib/avo/concerns/visible_items.rb +7 -30
  57. data/lib/avo/dsl/field_parser.rb +1 -1
  58. data/lib/avo/fields/concerns/is_searchable.rb +3 -1
  59. data/lib/avo/fields/location_field.rb +2 -2
  60. data/lib/avo/filters/base_filter.rb +1 -0
  61. data/lib/avo/html/builder.rb +1 -0
  62. data/lib/avo/licensing/h_q.rb +4 -6
  63. data/lib/avo/licensing/license.rb +4 -0
  64. data/lib/avo/plugin.rb +5 -1
  65. data/lib/avo/resources/items/holder.rb +29 -11
  66. data/lib/avo/resources/items/item_group.rb +4 -9
  67. data/lib/avo/resources/items/main_panel.rb +10 -0
  68. data/lib/avo/resources/items/row.rb +4 -16
  69. data/lib/avo/resources/items/sidebar.rb +9 -10
  70. data/lib/avo/resources/items/tab.rb +3 -9
  71. data/lib/avo/resources/items/tab_group.rb +6 -12
  72. data/lib/avo/version.rb +1 -1
  73. data/lib/generators/avo/templates/locales/avo.ar.yml +7 -6
  74. data/lib/generators/avo/templates/locales/avo.en.yml +2 -0
  75. data/lib/generators/avo/templates/locales/avo.es.yml +127 -0
  76. data/lib/generators/avo/templates/locales/avo.fr.yml +2 -0
  77. data/lib/generators/avo/templates/locales/avo.nb.yml +2 -0
  78. data/lib/generators/avo/templates/locales/avo.nn.yml +2 -0
  79. data/lib/generators/avo/templates/locales/avo.pt-BR.yml +2 -0
  80. data/lib/generators/avo/templates/locales/avo.pt.yml +2 -0
  81. data/lib/generators/avo/templates/locales/avo.ro.yml +2 -0
  82. data/lib/generators/avo/templates/locales/avo.tr.yml +2 -0
  83. data/public/avo-assets/avo.base.css +121 -4
  84. data/public/avo-assets/avo.base.js +86 -86
  85. data/public/avo-assets/avo.base.js.map +3 -3
  86. data/public/avo-assets/avo.css +9744 -0
  87. data/public/avo-assets/avo.js +513 -0
  88. data/public/avo-assets/avo.js.map +7 -0
  89. metadata +23 -8
  90. data/app/components/avo/item_switcher_component.html.erb +0 -27
  91. data/app/components/avo/item_switcher_component.rb +0 -48
  92. data/app/views/avo/actions/keep_modal_open.turbo_stream.erb +0 -5
  93. data/lib/avo/action_model.rb +0 -20
@@ -3,40 +3,17 @@ module Avo
3
3
  module Concerns
4
4
  module VisibleItems
5
5
  extend ActiveSupport::Concern
6
- def items
7
- items_holder&.items || []
8
- end
9
-
10
- def visible_items
11
- items
12
- .select do |item|
13
- if item.respond_to? :hydrate
14
- item.hydrate(view: view, resource: resource)
15
- end
16
-
17
- visible(item)
18
- end
19
- end
20
-
21
- def visible(item)
22
- return item.visible? if !item.is_field?
23
6
 
24
- return false if item.respond_to?(:authorized?) && item.resource.present? && !item.authorized?
25
-
26
- item.visible? && item.visible_in_view?(view: view)
7
+ included do
8
+ include Avo::Concerns::Hydration
27
9
  end
28
10
 
29
11
  def visible?
30
- any_item_visible = visible_items.any?
31
- return any_item_visible if !respond_to?(:visible_on?)
32
-
33
- visible_on?(view) && any_item_visible
34
- end
35
-
36
- def hydrate(view: nil)
37
- @view = view
38
-
39
- self
12
+ if respond_to?(:visible_on?)
13
+ visible_on?(view) && visible_items.any?
14
+ else
15
+ visible_items.any?
16
+ end
40
17
  end
41
18
  end
42
19
  end
@@ -10,7 +10,7 @@ module Avo
10
10
 
11
11
  def initialize(id:, order_index: 0, **args, &block)
12
12
  @id = id
13
- @as = args.fetch(:as, nil)
13
+ @as = args.fetch(:as, :text)
14
14
  @order_index = order_index
15
15
  @args = args
16
16
  @block = block
@@ -5,7 +5,9 @@ module Avo
5
5
  extend ActiveSupport::Concern
6
6
 
7
7
  def is_searchable?
8
- defined?(Avo::Pro) && @searchable && Avo.license.has_with_trial(:searchable_associations)
8
+ return false unless defined?(Avo::Pro)
9
+
10
+ @searchable && Avo.license.has_with_trial(:searchable_associations)
9
11
  end
10
12
  end
11
13
  end
@@ -19,9 +19,9 @@ module Avo
19
19
 
20
20
  def as_lat_long_field_id(get)
21
21
  if get == :lat
22
- "#{id}[#{stored_as.first}]"
22
+ stored_as.first
23
23
  elsif get == :long
24
- "#{id}[#{stored_as.last}]"
24
+ stored_as.last
25
25
  end
26
26
  end
27
27
 
@@ -15,6 +15,7 @@ module Avo
15
15
  delegate :params, to: Avo::Current
16
16
  delegate :request, to: Avo::Current
17
17
  delegate :view_context, to: Avo::Current
18
+
18
19
  def current_user
19
20
  Avo::Current.user
20
21
  end
@@ -22,6 +22,7 @@ class Avo::HTML::Builder
22
22
  delegate :app, to: Avo::Current
23
23
  delegate :root_path, to: :app
24
24
  delegate :params, to: Avo::Current
25
+
25
26
  def current_user
26
27
  Avo::Current.user
27
28
  end
@@ -6,7 +6,7 @@ module Avo
6
6
 
7
7
  ENDPOINT = "https://v3.avohq.io/api/v3/licenses/check".freeze unless const_defined?(:ENDPOINT)
8
8
  REQUEST_TIMEOUT = 5 unless const_defined?(:REQUEST_TIMEOUT) # seconds
9
- CACHE_TIME = 3600 unless const_defined?(:CACHE_TIME) # seconds
9
+ CACHE_TIME = 6.hours.to_i unless const_defined?(:CACHE_TIME) # seconds
10
10
 
11
11
  class << self
12
12
  def cache_key
@@ -35,14 +35,12 @@ module Avo
35
35
 
36
36
  # Some cache stores don't auto-expire their keys and payloads so we need to do it for them
37
37
  def expire_cache_if_overdue
38
- return unless cached_response.present?
39
- return unless cached_response["fetched_at"].present?
38
+ return unless cached_response.present? || cached_response&.fetch(:fetched_at, nil).present?
40
39
 
41
- allowed_time = 1.hour
42
40
  parsed_time = Time.parse(cached_response["fetched_at"].to_s)
43
- time_has_passed = parsed_time < Time.now - allowed_time
41
+ cache_should_expire = parsed_time < Time.now - CACHE_TIME
44
42
 
45
- clear_response if time_has_passed
43
+ clear_response if cache_should_expire
46
44
  end
47
45
 
48
46
  def fresh_response
@@ -25,6 +25,10 @@ module Avo
25
25
  id == "pro"
26
26
  end
27
27
 
28
+ def advanced?
29
+ id == "advanced"
30
+ end
31
+
28
32
  def error
29
33
  @response["error"]
30
34
  end
data/lib/avo/plugin.rb CHANGED
@@ -5,7 +5,9 @@ module Avo
5
5
 
6
6
  class << self
7
7
  def name
8
- gemspec.name
8
+ return gemspec.name if gemspec.present?
9
+
10
+ self.to_s.split("::").first
9
11
  end
10
12
 
11
13
  def version
@@ -23,6 +25,8 @@ module Avo
23
25
  end
24
26
 
25
27
  def gemspec
28
+ return if engine.blank?
29
+
26
30
  gemspec_path = Dir["#{engine.root}/*.gemspec"].first
27
31
 
28
32
  Gem::Specification::load(gemspec_path)
@@ -1,16 +1,24 @@
1
1
  class Avo::Resources::Items::Holder
2
- attr_reader :tools
2
+ attr_reader :tools, :from
3
3
  attr_accessor :items
4
4
  attr_accessor :invalid_fields
5
5
 
6
- def initialize
6
+ def initialize(from: nil, parent: nil)
7
7
  @items = []
8
8
  @items_index = 0
9
9
  @invalid_fields = []
10
+ @from = from
11
+ @parent = parent
10
12
  end
11
13
 
12
14
  # Adds a field to the items_holder
13
15
  def field(field_name, **args, &block)
16
+ # If the field is paresed inside a tab group, add it to the tab
17
+ # This will happen when the field is parsed inside a tab group from a resource method
18
+ if from.present? && from.class == Avo::Resources::Items::TabGroup::Builder
19
+ return from.field(field_name, holder: self, **args, &block)
20
+ end
21
+
14
22
  field_parser = Avo::Dsl::FieldParser.new(id: field_name, order_index: @items_index, **args, &block).parse
15
23
 
16
24
  if field_parser.invalid?
@@ -33,31 +41,35 @@ class Avo::Resources::Items::Holder
33
41
  if tab.present?
34
42
  add_item tab
35
43
  else
36
- add_item Avo::Resources::Items::TabGroup::Builder.parse_block(**kwargs, &block)
44
+ add_item Avo::Resources::Items::TabGroup::Builder.parse_block(parent: @parent, **kwargs, &block)
37
45
  end
38
46
  end
39
47
 
40
48
  def tab(name, **args, &block)
41
- add_item Avo::Resources::Items::Tab::Builder.parse_block(name: name, **args, &block)
49
+ add_item Avo::Resources::Items::Tab::Builder.parse_block(name: name, parent: @parent, **args, &block)
42
50
  end
43
51
 
44
52
  def row(**args, &block)
45
- add_item Avo::Resources::Items::Row::Builder.parse_block(**args, &block)
53
+ add_item Avo::Resources::Items::Row::Builder.parse_block(parent: @parent, **args, &block)
46
54
  end
47
55
 
48
56
  def tool(klass, **args)
49
- instance = klass.new(**args)
50
- add_item instance
57
+ add_item klass.new(**args)
51
58
  end
52
59
 
53
60
  def panel(panel_name = nil, **args, &block)
54
- panel = Avo::Resources::Items::ItemGroup::Builder.parse_block(name: panel_name, **args, &block)
61
+ add_item Avo::Resources::Items::ItemGroup::Builder.parse_block(name: panel_name, parent: @parent, **args, &block)
62
+ end
55
63
 
56
- add_item panel
64
+ # The main panel is the one that also render the header of the resource with the breadcrumbs, the title and the controls.
65
+ def main_panel(**args, &block)
66
+ add_item Avo::Resources::Items::MainPanel::Builder.parse_block(name: "main_panel", parent: @parent, **args, &block)
57
67
  end
58
68
 
59
69
  def sidebar(**args, &block)
60
- add_item Avo::Resources::Items::Sidebar::Builder.parse_block(**args, &block)
70
+ check_sidebar_is_inside_a_panel
71
+
72
+ add_item Avo::Resources::Items::Sidebar::Builder.parse_block(parent: @parent, **args, &block)
61
73
  end
62
74
 
63
75
  def add_item(instance)
@@ -69,10 +81,16 @@ class Avo::Resources::Items::Holder
69
81
  private
70
82
 
71
83
  def add_invalid_field(payload)
72
- @invalid_fields << payload
84
+ invalid_fields << payload
73
85
  end
74
86
 
75
87
  def increment_order_index
76
88
  @items_index += 1
77
89
  end
90
+
91
+ def check_sidebar_is_inside_a_panel
92
+ unless @from.eql?(Avo::Resources::Items::Panel::Builder) || @from.eql?(Avo::Resources::Items::MainPanel::Builder)
93
+ raise "The sidebar must be inside a panel."
94
+ end
95
+ end
78
96
  end
@@ -22,22 +22,17 @@ class Avo::Resources::Items::ItemGroup
22
22
  end
23
23
 
24
24
  class Builder
25
- class << self
26
- def parse_block(**args, &block)
27
- Docile.dsl_eval(new(**args), &block).build
28
- end
29
- end
25
+ include Avo::Concerns::BorrowItemsHolder
30
26
 
31
27
  delegate :heading, to: :items_holder
32
28
  delegate :field, to: :items_holder
33
29
  delegate :row, to: :items_holder
34
30
  delegate :items, to: :items_holder
31
+ delegate :sidebar, to: :items_holder
35
32
 
36
- attr_reader :items_holder
37
-
38
- def initialize(name: nil, **args)
33
+ def initialize(parent:, name: nil, **args)
39
34
  @panel = Avo::Resources::Items::Panel.new(name: name, **args)
40
- @items_holder = Avo::Resources::Items::Holder.new
35
+ @items_holder = Avo::Resources::Items::Holder.new(from: self.class, parent: parent)
41
36
  end
42
37
 
43
38
  # Fetch the tab
@@ -1,2 +1,12 @@
1
1
  class Avo::Resources::Items::MainPanel < Avo::Resources::Items::Panel
2
+ class Builder < Avo::Resources::Items::ItemGroup::Builder
3
+ def initialize(parent: ,**args)
4
+ @panel = Avo::Resources::Items::MainPanel.new(**args)
5
+ @items_holder = Avo::Resources::Items::Holder.new(from: self.class, parent: parent)
6
+ end
7
+ end
8
+
9
+ def visible?
10
+ true
11
+ end
2
12
  end
@@ -3,6 +3,7 @@ class Avo::Resources::Items::Row
3
3
  include Avo::Concerns::HasItems
4
4
  include Avo::Concerns::HasItemType
5
5
  include Avo::Concerns::VisibleItems
6
+ include Avo::Concerns::Hydration
6
7
 
7
8
  class_attribute :item_type, default: :row
8
9
 
@@ -16,33 +17,20 @@ class Avo::Resources::Items::Row
16
17
  @items_holder = Avo::Resources::Items::Holder.new
17
18
  end
18
19
 
19
- def hydrate(view: nil, resource: nil, **args)
20
- @view = Avo::ViewInquirer.new view
21
- @resource = resource
22
-
23
- self
24
- end
25
-
26
20
  def has_items?
27
21
  @items.present?
28
22
  end
29
23
 
30
24
  class Builder
31
- class << self
32
- def parse_block(**args, &block)
33
- Docile.dsl_eval(new(**args), &block).build
34
- end
35
- end
36
-
37
- attr_reader :items_holder
25
+ include Avo::Concerns::BorrowItemsHolder
38
26
 
39
27
  delegate :field, to: :items_holder
40
28
  delegate :tool, to: :items_holder
41
29
  delegate :items, to: :items_holder
42
30
 
43
- def initialize(**args)
31
+ def initialize(parent:, **args)
44
32
  @row = Avo::Resources::Items::Row.new(**args)
45
- @items_holder = Avo::Resources::Items::Holder.new
33
+ @items_holder = Avo::Resources::Items::Holder.new(parent: @parent)
46
34
  end
47
35
 
48
36
  # Fetch the tab
@@ -14,27 +14,27 @@ class Avo::Resources::Items::Sidebar
14
14
  @name = name
15
15
  @items_holder = Avo::Resources::Items::Holder.new
16
16
  @view = Avo::ViewInquirer.new view
17
+ @panel_wrapper = args[:panel_wrapper].nil? ? true : args[:panel_wrapper]
17
18
  @args = args
18
19
 
19
20
  post_initialize if respond_to?(:post_initialize)
20
21
  end
21
22
 
22
- class Builder
23
- class << self
24
- def parse_block(**args, &block)
25
- Docile.dsl_eval(new(**args), &block).build
26
- end
27
- end
23
+ def panel_wrapper?
24
+ @panel_wrapper
25
+ end
28
26
 
29
- attr_reader :items_holder
27
+ class Builder
28
+ include Avo::Concerns::BorrowItemsHolder
30
29
 
31
30
  delegate :field, to: :items_holder
31
+ delegate :tool, to: :items_holder
32
32
  delegate :items, to: :items_holder
33
33
  delegate :heading, to: :items_holder
34
34
 
35
- def initialize(name: nil, **args)
35
+ def initialize(parent: , name: nil, **args)
36
36
  @sidebar = Avo::Resources::Items::Sidebar.new(**args)
37
- @items_holder = Avo::Resources::Items::Holder.new
37
+ @items_holder = Avo::Resources::Items::Holder.new(parent: parent)
38
38
  end
39
39
 
40
40
  # Fetch the sidebar
@@ -43,5 +43,4 @@ class Avo::Resources::Items::Sidebar
43
43
  @sidebar
44
44
  end
45
45
  end
46
-
47
46
  end
@@ -33,22 +33,16 @@ class Avo::Resources::Items::Tab
33
33
  end
34
34
 
35
35
  class Builder
36
- class << self
37
- def parse_block(**args, &block)
38
- Docile.dsl_eval(new(**args), &block).build
39
- end
40
- end
41
-
42
- attr_reader :items_holder
36
+ include Avo::Concerns::BorrowItemsHolder
43
37
 
44
38
  delegate :field, to: :items_holder
45
39
  delegate :tool, to: :items_holder
46
40
  delegate :panel, to: :items_holder
47
41
  delegate :items, to: :items_holder
48
42
 
49
- def initialize(name: nil, **args)
43
+ def initialize(parent:, name: nil, **args)
50
44
  @tab = Avo::Resources::Items::Tab.new(name: name, **args)
51
- @items_holder = Avo::Resources::Items::Holder.new
45
+ @items_holder = Avo::Resources::Items::Holder.new(parent: parent)
52
46
  end
53
47
 
54
48
  # Fetch the tab
@@ -24,21 +24,10 @@ class Avo::Resources::Items::TabGroup
24
24
  end
25
25
 
26
26
  class Builder
27
- class << self
28
- def parse_block(**args, &block)
29
- Docile.dsl_eval(new(**args), &block).build
30
- end
31
- end
32
-
33
- attr_reader :items_holder
27
+ include Avo::Concerns::BorrowItemsHolder
34
28
 
35
29
  delegate :tab, to: :items_holder
36
30
 
37
- def initialize(style: nil)
38
- @group = Avo::Resources::Items::TabGroup.new(style: style)
39
- @items_holder = Avo::Resources::Items::Holder.new
40
- end
41
-
42
31
  def field(field_name, **args, &block)
43
32
  parsed = Avo::Dsl::FieldParser.new(id: field_name, order_index: @items_index, **args, &block).parse
44
33
  field_instance = parsed.instance
@@ -59,6 +48,11 @@ class Avo::Resources::Items::TabGroup
59
48
  @items_holder.tabs tab
60
49
  end
61
50
 
51
+ def initialize(parent: ,style: nil)
52
+ @group = Avo::Resources::Items::TabGroup.new(style: style)
53
+ @items_holder = Avo::Resources::Items::Holder.new(parent: parent, from: self)
54
+ end
55
+
62
56
  # Fetch the tab
63
57
  def build
64
58
  @group.items_holder = @items_holder
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "3.0.1.beta24" unless const_defined?(:VERSION)
2
+ VERSION = "3.0.2" unless const_defined?(:VERSION)
3
3
  end
@@ -1,17 +1,17 @@
1
1
  ---
2
2
  ar:
3
3
  avo:
4
- action_ran_successfully: 'تم تنفيذ الأمر بنجاح!'
4
+ action_ran_successfully: تم تنفيذ الأمر بنجاح!
5
5
  actions: أوامر
6
6
  and_x_other_resources: و %{count} موارد أخرى
7
7
  are_you_sure: هل أنت متأكد؟
8
- are_you_sure_detach_item: هل أنت متأكد أنك تريد فصل هذا الـ٪{item}؟
8
+ are_you_sure_detach_item: هل أنت متأكد أنك تريد فصل هذا الـ%{item}؟
9
9
  are_you_sure_you_want_to_run_this_option: هل أنت متأكد أنك تريد تشغيل هذا الخيار؟
10
10
  attach: ربط
11
11
  attach_and_attach_another: ربط وربط آخر
12
12
  attach_item: ربط %{item}
13
- attachment_class_attached: '%{attachment_class} تم ربط'
14
- attachment_class_detached: '%{attachment_class} تم فصل'
13
+ attachment_class_attached: "%{attachment_class} تم ربط"
14
+ attachment_class_detached: "%{attachment_class} تم فصل"
15
15
  attachment_destroyed: تم حذف المرفق
16
16
  cancel: إلغاء
17
17
  choose_a_country: اختر دولة
@@ -23,6 +23,7 @@ ar:
23
23
  create_new_item: إنشاء %{item} جديد
24
24
  dashboard: لوحة القيادة
25
25
  dashboards: لوحات القيادة
26
+ default_scope: الجميع
26
27
  delete: حذف
27
28
  delete_file: حذف الملف
28
29
  delete_item: حذف %{item}
@@ -80,6 +81,7 @@ ar:
80
81
  to_top: حرك السجل للأعلى بشكل كامل
81
82
  per_page: لكل صفحة
82
83
  prev_page: الصفحة السابقة
84
+ records_selected_from_all_pages_html: جميع السجلات مختارة من جميع الصفحات
83
85
  remove_selection: إزالة التحديد
84
86
  reset_filters: إعادة تعيين الفلاتر
85
87
  resource_created: تم إنشاء السجل
@@ -121,6 +123,5 @@ ar:
121
123
  zero: لا توجد عناصر إضافية
122
124
  x_records_selected_from_a_total_of_x_html: <span class="font-bold text-gray-700">%{selected}</span> السجلات المحددة في هذه الصفحة من إجمالي<span class="font-bold text-gray-700">%{count}</span>
123
125
  x_records_selected_from_all_pages_html: <span class="font-bold text-gray-700">%{count}</span> السجلات المحددة من كل الصفحات
126
+ x_records_selected_from_page_html: <span class="font-bold text-gray-700">%{selected}</span> السجلات المختارة في هذه الصفحة
124
127
  you_missed_something_check_form: ربما نسيت شيئًا، يرجى التحقق من البيانات.
125
-
126
-
@@ -81,6 +81,7 @@ en:
81
81
  to_top: Move record to top
82
82
  per_page: Per page
83
83
  prev_page: Previous page
84
+ records_selected_from_all_pages_html: All records selected from all pages
84
85
  remove_selection: Remove selection
85
86
  reset_filters: Reset filters
86
87
  resource_created: Record created
@@ -122,4 +123,5 @@ en:
122
123
  zero: no more items
123
124
  x_records_selected_from_a_total_of_x_html: <span class="font-bold text-gray-700">%{selected}</span> records selected on this page from a total of <span class="font-bold text-gray-700">%{count}</span>
124
125
  x_records_selected_from_all_pages_html: <span class="font-bold text-gray-700">%{count}</span> records selected from all pages
126
+ x_records_selected_from_page_html: <span class="font-bold text-gray-700">%{selected}</span> records selected on this page
125
127
  you_missed_something_check_form: You might have missed something. Please check the form.
@@ -0,0 +1,127 @@
1
+ ---
2
+ es:
3
+ avo:
4
+ action_ran_successfully: "¡Acción ejecutada con éxito!"
5
+ actions: Acciones
6
+ and_x_other_resources: y %{count} otros recursos
7
+ are_you_sure: "¿Estás seguro?"
8
+ are_you_sure_detach_item: "¿Estás seguro de que quieres separar este/a %{item}?"
9
+ are_you_sure_you_want_to_run_this_option: "¿Estás seguro de que quieres ejectuar esta acción?"
10
+ attach: Adjuntar
11
+ attach_and_attach_another: Adjuntar y adjuntar otro
12
+ attach_item: Adjuntar %{item}
13
+ attachment_class_attached: "%{attachment_class} adjuntado/a."
14
+ attachment_class_detached: "%{attachment_class} adjuntado/a."
15
+ attachment_destroyed: Adjunto eliminado
16
+ cancel: Cancelar
17
+ choose_a_country: Elige un país
18
+ choose_an_option: Elige una opción
19
+ choose_item: Elige %{item}
20
+ clear_value: Borrar el valor
21
+ click_to_reveal_filters: Pulsa para mostrar los filtros
22
+ confirm: Confirmar
23
+ create_new_item: Crear nuevo/a %{item}
24
+ dashboard: Panel
25
+ dashboards: Paneles
26
+ default_scope: Todos
27
+ delete: eliminar
28
+ delete_file: Eliminar fichero
29
+ delete_item: Eliminar %{item}
30
+ detach_item: separar %{item}
31
+ details: detalles
32
+ download: Descargar
33
+ download_file: Descargar fichero
34
+ download_item: Descargar %{item}
35
+ edit: editar
36
+ edit_item: editar %{item}
37
+ empty_dashboard_message: Añadir tarjetas a este panel
38
+ failed: Fallo
39
+ failed_to_find_attachment: No se ha encontrado el archivo adjunto
40
+ failed_to_load: No se ha podido cargar
41
+ field_translations:
42
+ file:
43
+ one: fichero
44
+ other: ficheros
45
+ zero: ficheros
46
+ people:
47
+ one: persona
48
+ other: personas
49
+ zero: personas
50
+ filter_by: Filtrar por
51
+ filters: Filtros
52
+ go_back: Volver
53
+ grid_view: Vista en cuardrícula
54
+ hide_content: Ocultar contenido
55
+ home: Inicio
56
+ key_value_field:
57
+ add_row: Añadir fila
58
+ delete_row: Eliminar fila
59
+ key: Clave
60
+ value: Valor
61
+ list_is_empty: La lista está vacía
62
+ loading: Cargando
63
+ more: Más
64
+ new: nuevo/a
65
+ next_page: Página siguiente
66
+ no_cards_present: No hay tarjetas
67
+ no_item_found: No se ha encontrado ningún elemento
68
+ no_options_available: No hay opciones disponibles
69
+ no_related_item_found: No se ha encontrado ningún elemento relacionado
70
+ not_authorized: No estás autorizado/a a realizar esta acción.
71
+ number_of_items:
72
+ one: un/a %{item}
73
+ other: "%{count} %{item}"
74
+ zero: ningún/a %{item}
75
+ oops_nothing_found: Oops! No se ha encontrado nada...
76
+ order:
77
+ higher: Mover arriba
78
+ lower: Mover abajo
79
+ reorder_record: Reordenar registro
80
+ to_bottom: Mover abajo del todo
81
+ to_top: Mover arriba del todo
82
+ per_page: Por página
83
+ prev_page: Página anterior
84
+ records_selected_from_all_pages_html: Todos los registros seleccionados de todas las páginas.
85
+ remove_selection: Quitar la selección
86
+ reset_filters: Reiniciar filtros
87
+ resource_created: Recurso creado
88
+ resource_destroyed: Recurso eliminado
89
+ resource_translations:
90
+ team_members:
91
+ one: miembro del equipo
92
+ other: miembros del equipo
93
+ zero: miembros del equipo
94
+ user:
95
+ one: usuario/a
96
+ other: usuarios/as
97
+ zero: usuarios/as
98
+ resource_updated: Recurso actualizado
99
+ resources: Recursos
100
+ run: Ejecutar
101
+ save: Guardar
102
+ search:
103
+ cancel_button: Cancelar
104
+ placeholder: Buscar
105
+ select_all: Seleccionar todo
106
+ select_all_matching: Seleccionar todas las coincidencias
107
+ select_item: Selecionar elemento
108
+ show_content: Mostrar contenido
109
+ sign_out: Salir
110
+ switch_to_view: Cambiar a la vista %{view_type}
111
+ table_view: Vista en tabla
112
+ tools: Herramientas
113
+ type_to_search: Escribe para buscar.
114
+ unauthorized: No autorizado
115
+ undo: deshacer
116
+ view: Vista
117
+ view_item: ver %{item}
118
+ was_successfully_created: se ha creado con éxito
119
+ was_successfully_updated: se ha actualizado con éxito
120
+ x_items_more:
121
+ one: un elemento más
122
+ other: "%{count} elementos más"
123
+ zero: ningún elemento más
124
+ x_records_selected_from_a_total_of_x_html: <span class="font-bold text-gray-700">%{selected}</span> registros seleccionados en esta página de un total de <span class="font-bold text-gray-700">%{count}</span>
125
+ x_records_selected_from_all_pages_html: <span class="font-bold text-gray-700">%{count}</span> registros seleccionados en todas las páginas
126
+ x_records_selected_from_page_html: <span class="font-bold text-gray-700">%{selected}</span> registros seleccionados en esta página
127
+ you_missed_something_check_form: Es posible que hayas pasado algo por alto. Comprueba el formulario.
@@ -81,6 +81,7 @@ fr:
81
81
  to_top: Déplacer tout en haut
82
82
  per_page: Par page
83
83
  prev_page: Page précédente
84
+ records_selected_from_all_pages_html: tous les éléments sélectionnés de toutes les pages
84
85
  remove_selection: Supprimer la sélection
85
86
  reset_filters: Réinitialiser les filtres
86
87
  resource_created: Ressource créee
@@ -118,4 +119,5 @@ fr:
118
119
  zero: aucun élément supplémentaire
119
120
  x_records_selected_from_a_total_of_x_html: <span class="font-bold text-gray-700">%{selected}</span> enregistrements sélectionnés sur cette page sur un total de <span class="font-bold text-gray-700">%{count}</span>
120
121
  x_records_selected_from_all_pages_html: <span class="font-bold text-gray-700">%{count}</span> enregistrements sélectionnés dans toutes les pages
122
+ x_records_selected_from_page_html: <span class="font-bold text-gray-700">%{selected}</span> éléments sélectionnés de cette page
121
123
  you_missed_something_check_form: Vous avez peut-être oublié quelque chose. Veuillez vérifier le formulaire
@@ -81,6 +81,7 @@ nb:
81
81
  to_top: Flytt elementet til toppen
82
82
  per_page: Per side
83
83
  prev_page: Forrige side
84
+ records_selected_from_all_pages_html: Alle poster valgt fra alle sider
84
85
  remove_selection: Fjern valg
85
86
  reset_filters: Nullstill filter
86
87
  resource_created: Ressurs generert
@@ -118,4 +119,5 @@ nb:
118
119
  zero: ingen flere elementer
119
120
  x_records_selected_from_a_total_of_x_html: <span class="font-bold text-gray-700">%{selected}</span> poster valgt på denne siden fra totalt <span class="font-bold text-gray-700">%{count}</span>
120
121
  x_records_selected_from_all_pages_html: <span class="font-bold text-gray-700">%{count}</span> poster valgt fra alle sider
122
+ x_records_selected_from_page_html: <span class="font-bold text-gray-700">%{selected}</span> poster valgt på denne siden
121
123
  you_missed_something_check_form: Her mangler du noe. Vennligst sjekk skjemaet.