madmin 2.1.1 → 2.1.2

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: 67db829bf99130d9746ef0d3bd416f0c38e9ecaf70530db4c4066a60032e934d
4
+ data.tar.gz: 91694aac3e2db7fad14918af8be8ab97029ca542848e6ccc1f36d493d2bd4f1e
5
5
  SHA512:
6
- metadata.gz: a369a69825063d843569625485adf3f46102b31697195abcdb68bc674e23bff86a0208957e502061742947809236da0ae9a2628324aee4f91c9c5a410618d32d
7
- data.tar.gz: a7e3acacc31d419440774347c2d571a84e4ff182b1a6e885e73437ec01d76cbe92bb5b7ddf1c66393f4fde6d03c1cc7bfdf819aae7898bda3601e4d1e2de7689
6
+ metadata.gz: bfa374d40d58292a97885e238681bd6bfb91dbe2618f501bda0e25ada1b5490fa8a69b5e80b86cf7262fce44a501a1e1935b672bb6b46a5456e322b11939f93d
7
+ data.tar.gz: 2cf03a691fcda333691547743b7879495bb2de3ed8fc992761a505c154d92d81cb47d994209cca501bcf7b91f26343ccc9b9f007441f641a71440164864b80e4
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>
@@ -41,7 +41,8 @@ module Madmin
41
41
  request = {
42
42
  query: {
43
43
  "#{attribute_name}_page" => [params[page_key].to_i, 1].max
44
- }
44
+ },
45
+ params: params
45
46
  }
46
47
  pagy value(record), page_key: page_key, request: request
47
48
  rescue Pagy::OptionError
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.2"
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.2
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: []