rao-component 0.0.43.pre → 0.0.44.pre

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: eb3a2b46f7c5364e5ce22e2c30dca7a4e9d76c731be7a37e530cab8c0769dedc
4
- data.tar.gz: a86458f84b82280a1289b91e9c5fa83d52cda06f33e3ec6305f324c4df7db497
3
+ metadata.gz: b1cea273ab02260fe2b2bed7736233adfbf4319f3fbbb9f70ad9eef1db1327da
4
+ data.tar.gz: 65d390844d356e5db5b6a440e1199716125d2d9b4164d8ac67b332f6e55b87f4
5
5
  SHA512:
6
- metadata.gz: efc7e828d748ce676a227ebe85b4091ea7529e6977291c476f062f6761979f7ba01e4b556d6b3ba2b38c1b138b982c52d4ed961735fba816d0f9ceee0e638c70
7
- data.tar.gz: af80458043e3cc5a2f487ae527a956ffb10e4af52087c92e276056e4e08e495b7cb3c9bdaad80ef376a8a70f5536f7d7fe248716cf8c3797e04c5491a60f8798
6
+ metadata.gz: 28796942da26154d31fd953e4662c6b4ece5e76e1051bef626c094f234d5e7cb381aa751d56f8688da542d1a1e6f66fd0d769984b43f40c6bcaaeb43a9ed7031
7
+ data.tar.gz: 4d3e2d876c1106cec60c943a05f7f70dc8a860fd634226eeeea0ab5158a4cc3145c02db4378816829aee6894e50c9d46d505bc685590af635649ce5321dddccb
@@ -9,6 +9,7 @@ module Rao
9
9
  #
10
10
  def batch_actions(options = {}, &block)
11
11
  @wrap_in_form = true
12
+ options[:actions] ||= instance_exec(&Rao::Component::Configuration.batch_actions_default_actions)
12
13
  title = @view.render partial: 'rao/component/table/header_cells/batch_actions', locals: { options: options }
13
14
  options.reverse_merge!(render_as: :batch_actions, title: title)
14
15
  column(:batch_actions, options, &block)
@@ -6,13 +6,13 @@
6
6
  %form{ method: 'post', id: 'batch-action-form' }
7
7
  = hidden_field_tag :authenticity_token, form_authenticity_token
8
8
  .dropdown.batch-action-dropdown
9
- %button.btn.btn-default.dropdown-toggle{"aria-expanded" => "true", "aria-haspopup" => "true", "data-toggle" => "dropdown", :type => "button", id: 'batch-action-dropdown' }
10
- = t('.title')
9
+ %button.btn.btn-xs.btn-default.dropdown-toggle{"aria-expanded" => "true", "aria-haspopup" => "true", "data-toggle" => "dropdown", :type => "button", id: 'batch-action-dropdown' }
10
+ /=# t('.title')
11
11
  %span.caret
12
12
  %ul.dropdown-menu{"aria-labelledby" => 'batch-action-dropdown' }
13
13
  - options[:actions].each do |action, target|
14
14
  %li
15
- %a{ href: target, class: 'batch-action-form-submit-link' }= t(".#{action}")
15
+ %a{ href: target, class: 'batch-action-form-submit-link btn btn-xs btn-link' }= t(".#{action}")
16
16
 
17
17
  :javascript
18
18
  $(document).ready(function() {
@@ -23,6 +23,7 @@ de:
23
23
  batch_actions:
24
24
  title: Stapelverarbeitung
25
25
  destroy: Löschen
26
+ destroy_many: Löschen
26
27
  publish: Veröffentlichen
27
28
  unpublish: Zurückziehen
28
29
  date:
@@ -23,6 +23,7 @@ en:
23
23
  batch_actions:
24
24
  title: Batch actions
25
25
  destroy: Delete
26
+ destroy_many: Delete
26
27
  publish: Publish
27
28
  unpublish: Unpublish
28
29
  date:
@@ -13,6 +13,11 @@ module Rao
13
13
  resource: { resize: "320x240" }
14
14
  }
15
15
  }
16
+ mattr_accessor(:batch_actions_default_actions) do
17
+ -> {
18
+ { destroy_many: @view.url_for(action: :destroy_many) }
19
+ }
20
+ end
16
21
  end
17
22
  end
18
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rao-component
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.43.pre
4
+ version: 0.0.44.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-19 00:00:00.000000000 Z
11
+ date: 2020-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails