madmin 2.1.1 → 2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a081ce47d7f266c588a04f1998b1156b859e15526677b5b6ba39e5315efbdf45
4
- data.tar.gz: 8533a2223231ba545b8a4935ea6b29ca06e3043888f41248bc096162b93f8dd3
3
+ metadata.gz: 98cd062a740eb34ed7d97445424c1bc8ed2ca044d5c7a0249ddafb85c1d47696
4
+ data.tar.gz: c5b46f3800e5b950703e09b8b9bc18ea8a87d64fce310e5038d360af1b35b83e
5
5
  SHA512:
6
- metadata.gz: a369a69825063d843569625485adf3f46102b31697195abcdb68bc674e23bff86a0208957e502061742947809236da0ae9a2628324aee4f91c9c5a410618d32d
7
- data.tar.gz: a7e3acacc31d419440774347c2d571a84e4ff182b1a6e885e73437ec01d76cbe92bb5b7ddf1c66393f4fde6d03c1cc7bfdf819aae7898bda3601e4d1e2de7689
6
+ metadata.gz: 0eb8b624193e5832242142b296edffe6a7e071a7ab766554d9c121e4c7d5526b82a6bf7ab46a9af511c8d8858cfd8c3131f83479fc08dba5093b8a95f4f95e6c
7
+ data.tar.gz: d2b68cc4f02941779aeab65676f01e931624e3237a31bbbab189a09ac4293835064f1388f79f8c219ce622d7c07a67600723dff2ca880470cd7e75f7ab41419e
data/Rakefile CHANGED
@@ -20,7 +20,6 @@ require "rake/testtask"
20
20
 
21
21
  APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
22
22
  load "rails/tasks/engine.rake"
23
- load "rails/tasks/statistics.rake"
24
23
 
25
24
  Rake::TestTask.new(:test) do |t|
26
25
  t.libs << "test"
@@ -11,10 +11,17 @@
11
11
  padding-left: 0.75rem;
12
12
  padding-right: 0.75rem;
13
13
 
14
- &:hover {
14
+ &:hover,
15
+ &:focus {
16
+ cursor: pointer;
15
17
  text-decoration: none !important;
16
18
  }
17
19
 
20
+ &:disabled {
21
+ opacity: 60%;
22
+ cursor: not-allowed;
23
+ }
24
+
18
25
  &.btn-primary {
19
26
  background-color: var(--primary-color);
20
27
  color: white;
@@ -22,7 +22,7 @@
22
22
  <button id="hamburger-menu" type="button" data-action="click->mobile-nav#toggle" aria-label="Open menu" aria-expanded="false" aria-controls="sidebar">
23
23
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="size-5"> <path fill-rule="evenodd" d="M2 4.75A.75.75 0 0 1 2.75 4h14.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 4.75ZM2 10a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 10Zm0 5.25a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Z" clip-rule="evenodd" /> </svg>
24
24
  </button>
25
- <%= link_to_if respond_to?(:root_url), Madmin.site_name, root_url, data: {turbo: false} %>
25
+ <%= link_to Madmin.site_name, try(:root_url) || madmin_root_url, data: {turbo: false} %>
26
26
  </div>
27
27
  </header>
28
28
 
@@ -33,7 +33,7 @@
33
33
 
34
34
  <div>
35
35
  <%= yield %>
36
- </div.>
36
+ </div>
37
37
  </main>
38
38
 
39
39
  <div data-mobile-nav-target="overlay" data-action="click->mobile-nav#close" class="mobile-nav-overlay"></div>
@@ -39,7 +39,7 @@ module Madmin
39
39
  def paginated_value(record, params)
40
40
  page_key = "#{attribute_name}_page"
41
41
  request = {
42
- query: {
42
+ params: {
43
43
  "#{attribute_name}_page" => [params[page_key].to_i, 1].max
44
44
  }
45
45
  }
data/lib/madmin/search.rb CHANGED
@@ -42,7 +42,7 @@ module Madmin
42
42
  fields_count = search_attributes.sum do |attr|
43
43
  searchable_fields(attr).count
44
44
  end
45
- ["%#{@query.mb_chars.downcase}%"] * fields_count
45
+ ["%#{@query.downcase}%"] * fields_count
46
46
  end
47
47
 
48
48
  def search_attributes
@@ -1,3 +1,3 @@
1
1
  module Madmin
2
- VERSION = "2.1.1"
2
+ VERSION = "2.1.3"
3
3
  end
@@ -5,6 +5,7 @@ require "madmin/namespace"
5
5
  module Madmin
6
6
  class ViewGenerator < Rails::Generators::Base
7
7
  include Madmin::GeneratorHelpers
8
+
8
9
  class_option :namespace, type: :string, default: "madmin"
9
10
 
10
11
  def self.template_source_path
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: madmin
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Oliver
@@ -257,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
257
257
  - !ruby/object:Gem::Version
258
258
  version: '0'
259
259
  requirements: []
260
- rubygems_version: 3.7.1
260
+ rubygems_version: 3.7.2
261
261
  specification_version: 4
262
262
  summary: A modern admin for Ruby on Rails apps
263
263
  test_files: []