tiny_admin 0.10.0 → 0.10.1

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: 748ac60bbfef74485795f95728033866510e728572d391b2a3f381fde88434f6
4
- data.tar.gz: 59c0a78183a960e28cb1670d4484be18e368ec48cf622bd8034087192385b7dd
3
+ metadata.gz: 78ceeba34bc5a1b4fffa887569b3ac5100a0465c5acad499a0c6ffd2c400694b
4
+ data.tar.gz: dc60d171c117f7f480895838e4b70b89439d7ab650c15ed27425c08468f92f79
5
5
  SHA512:
6
- metadata.gz: 8ba6531f80fbaab695c59a309e7249f071a1f4491fd7800edb2562571beb352d3f4faff625876cf6dc87e9cdcbf8d12d002f343076446c8ad82653c8d488ce78
7
- data.tar.gz: 162637202396ce2106c9ad9c2117a22becc3ad99c3a4e0f72f850624089cb110e2eda4ae39aa66e6c4897bb6c5ad0789003d10711c94ba74f28616afa3e5e82a
6
+ metadata.gz: 2d1c6fd794ae0e1662cfc6dbe8a5d2c6881213681755fabccc52a88b74ac8109c74d72db5bb172e22f530523f2ec151c998f628c2c53d59163c429fde83af9ee
7
+ data.tar.gz: 0f3fb8db4c1dda2cac93f3bda4fa2cbbac3fa0b8ee4b7b31cd09b2ce0ccbe8ed25f8d2e55315673973a9d6e8fc25571ad30eba70bfbdc13aff51f41ed12d981e
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/tiny_admin.svg)](https://badge.fury.io/rb/tiny_admin)
4
4
  [![Gem Downloads](https://badgen.net/rubygems/dt/tiny_admin)](https://rubygems.org/gems/tiny_admin)
5
5
  [![Linters](https://github.com/blocknotes/tiny_admin/actions/workflows/linters.yml/badge.svg)](https://github.com/blocknotes/tiny_admin/actions/workflows/linters.yml)
6
- [![Specs](https://github.com/blocknotes/tiny_admin/actions/workflows/specs.yml/badge.svg)](https://github.com/blocknotes/tiny_admin/actions/workflows/specs.yml)
6
+ [![Specs](https://github.com/blocknotes/tiny_admin/actions/workflows/tests.yml/badge.svg)](https://github.com/blocknotes/tiny_admin/actions/workflows/tests.yml)
7
7
 
8
8
  A compact and composable dashboard component for Ruby.
9
9
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TinyAdmin
4
- VERSION = '0.10.0'
4
+ VERSION = '0.10.1'
5
5
  end
@@ -13,7 +13,7 @@ module TinyAdmin
13
13
  :records,
14
14
  :slug
15
15
 
16
- def template
16
+ def view_template
17
17
  super do
18
18
  div(class: 'index') {
19
19
  div(class: 'row') {
@@ -11,7 +11,7 @@ module TinyAdmin
11
11
  :reference,
12
12
  :slug
13
13
 
14
- def template
14
+ def view_template
15
15
  super do
16
16
  div(class: 'show') {
17
17
  div(class: 'row') {
@@ -12,7 +12,7 @@ module TinyAdmin
12
12
  @record = record
13
13
  end
14
14
 
15
- def template
15
+ def view_template
16
16
  translated_value = field.translate_value(value)
17
17
  value_class = field.options[:options]&.include?('value_class') ? "value-#{value}" : nil
18
18
  if field.options[:link_to]
@@ -6,7 +6,7 @@ module TinyAdmin
6
6
  class FiltersForm < BasicComponent
7
7
  attr_accessor :filters, :section_path
8
8
 
9
- def template
9
+ def view_template
10
10
  form(class: 'form_filters', method: 'get') {
11
11
  filters.each do |field, filter|
12
12
  name = field.name
@@ -6,7 +6,7 @@ module TinyAdmin
6
6
  class Flash < BasicComponent
7
7
  attr_accessor :messages
8
8
 
9
- def template
9
+ def view_template
10
10
  @messages ||= {}
11
11
  notices = messages[:notices]
12
12
  warnings = messages[:warnings]
@@ -6,7 +6,7 @@ module TinyAdmin
6
6
  class Head < BasicComponent
7
7
  attr_accessor :extra_styles, :page_title, :style_links
8
8
 
9
- def template
9
+ def view_template
10
10
  head {
11
11
  meta charset: 'utf-8'
12
12
  meta name: 'viewport', content: 'width=device-width, initial-scale=1'
@@ -6,7 +6,7 @@ module TinyAdmin
6
6
  class Navbar < BasicComponent
7
7
  attr_accessor :current_slug, :items, :root_path, :root_title
8
8
 
9
- def template
9
+ def view_template
10
10
  nav(class: 'navbar navbar-expand-lg') {
11
11
  div(class: 'container') {
12
12
  a(class: 'navbar-brand', href: root_path) { root_title }
@@ -6,7 +6,7 @@ module TinyAdmin
6
6
  class Pagination < BasicComponent
7
7
  attr_accessor :current, :pages, :query_string, :total_count
8
8
 
9
- def template
9
+ def view_template
10
10
  div(class: 'container') {
11
11
  div(class: 'row') {
12
12
  div(class: 'col total-count') {
@@ -8,7 +8,7 @@ module TinyAdmin
8
8
  @widgets = widgets
9
9
  end
10
10
 
11
- def template
11
+ def view_template
12
12
  return if @widgets.nil? || @widgets.empty?
13
13
 
14
14
  div(class: 'container widgets') {
@@ -5,7 +5,7 @@ module TinyAdmin
5
5
  class DefaultLayout < BasicLayout
6
6
  attr_accessor :flash_component, :head_component, :messages, :navbar_component, :options, :title
7
7
 
8
- def template(&block)
8
+ def view_template(&block)
9
9
  extra_styles = TinyAdmin.settings.extra_styles
10
10
  flash_component&.messages = messages
11
11
  head_component&.update_attributes(page_title: title, style_links: style_links, extra_styles: extra_styles)
@@ -4,7 +4,7 @@ module TinyAdmin
4
4
  module Views
5
5
  module Pages
6
6
  class Content < DefaultLayout
7
- def template
7
+ def view_template
8
8
  super do
9
9
  div(class: 'content') {
10
10
  div(class: 'content-data') {
@@ -4,7 +4,7 @@ module TinyAdmin
4
4
  module Views
5
5
  module Pages
6
6
  class PageNotAllowed < DefaultLayout
7
- def template
7
+ def view_template
8
8
  super do
9
9
  div(class: 'page_not_allowed') {
10
10
  h1(class: 'title') { title }
@@ -4,7 +4,7 @@ module TinyAdmin
4
4
  module Views
5
5
  module Pages
6
6
  class PageNotFound < DefaultLayout
7
- def template
7
+ def view_template
8
8
  super do
9
9
  div(class: 'page_not_found') {
10
10
  h1(class: 'title') { title }
@@ -4,7 +4,7 @@ module TinyAdmin
4
4
  module Views
5
5
  module Pages
6
6
  class RecordNotFound < DefaultLayout
7
- def template
7
+ def view_template
8
8
  super do
9
9
  div(class: 'record_not_found') {
10
10
  h1(class: 'title') { title }
@@ -4,7 +4,7 @@ module TinyAdmin
4
4
  module Views
5
5
  module Pages
6
6
  class Root < DefaultLayout
7
- def template
7
+ def view_template
8
8
  super do
9
9
  div(class: 'root') {
10
10
  render TinyAdmin::Views::Components::Widgets.new(widgets)
@@ -4,7 +4,7 @@ module TinyAdmin
4
4
  module Views
5
5
  module Pages
6
6
  class SimpleAuthLogin < DefaultLayout
7
- def template
7
+ def view_template
8
8
  super do
9
9
  div(class: 'simple_auth_login') {
10
10
  h1(class: 'title') { title }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiny_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mattia Roccoberton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-18 00:00:00.000000000 Z
11
+ date: 2024-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: phlex
@@ -17,6 +17,9 @@ dependencies:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.10.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,6 +27,9 @@ dependencies:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
29
  version: '1'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 1.10.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: roda
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -136,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
142
  - !ruby/object:Gem::Version
137
143
  version: '0'
138
144
  requirements: []
139
- rubygems_version: 3.4.10
145
+ rubygems_version: 3.4.19
140
146
  signing_key:
141
147
  specification_version: 4
142
148
  summary: Tiny Admin