katalyst-navigation 1.6.0 → 1.7.0

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: 9d105afa8b02f8a188defa654988532ea041cbb437245e53ac3f2a049b0ef9d3
4
- data.tar.gz: c561645ff7f288164f62356d2c9cd847b1a25d73fc44c8950b3e629db318dc42
3
+ metadata.gz: 460acda562ea8be1a100c0c63e41bdf395ce8a169110437bcda6be901262f85b
4
+ data.tar.gz: cfd61b1795bdf01f6c2e34f916b526dba13fe5eea1f26f9f561821c7cfcf0042
5
5
  SHA512:
6
- metadata.gz: 85d9f6b9cb21ab50299a5c8940627424643f905a08a1ad77b8a8f380eae2a85872b8fa8ce43cbd55ea31e14068d0184f1fa16c509e9625c3a1bc1709a0d66f74
7
- data.tar.gz: 4cb2f1cdaec86b3399c5723a26a184cb1832a3d3e0dd1c8207c1335a0cc19f0ac32fab8307b2d4bf5681c6a30b8f49f00730e8088c46142a8fdbcdbf756bafe4
6
+ metadata.gz: 9dd3fc7f185f61d9a7fb4a7aa5ba2bae1b83017c385272022034ca5e3807be627ee7056880e89f22b7f109cac1fad37f9d28f521e6759c66a8cc035c1e868e72
7
+ data.tar.gz: 6eb2ae8ef0bfc1ae09168c49403b1a8d557babca559bd1e53981bff6146f14335aaf6c4f61af39e17ca745e85cbb4c3f2c835ac9440cc9dfcdcc893e9524e28b
@@ -4,8 +4,6 @@ module Katalyst
4
4
  module Navigation
5
5
  module Editor
6
6
  class ErrorsComponent < BaseComponent
7
- include Katalyst::Tables::TurboReplaceable
8
-
9
7
  def id
10
8
  dom_id(menu, :errors)
11
9
  end
@@ -3,19 +3,12 @@
3
3
  module Katalyst
4
4
  module Navigation
5
5
  class MenusController < Katalyst::Navigation.config.base_controller.constantize
6
- include Katalyst::Tables::Backend
6
+ helper Katalyst::Tables::Frontend
7
7
 
8
8
  def index
9
9
  collection = Katalyst::Tables::Collection::Base.new(sorting: :title).with_params(params).apply(Menu.all)
10
- table = Katalyst::Turbo::TableComponent.new(collection:,
11
- id: "index-table",
12
- class: "index-table",
13
- caption: true)
14
-
15
- respond_to do |format|
16
- format.turbo_stream { render(table) } if self_referred?
17
- format.html { render :index, locals: { table: } }
18
- end
10
+
11
+ render locals: { collection: }
19
12
  end
20
13
 
21
14
  def show
@@ -40,7 +33,7 @@ module Katalyst
40
33
  end
41
34
 
42
35
  def create
43
- @menu = Menu.new(menu_params)
36
+ @menu = Menu.new(menu_params)
44
37
  editor = Katalyst::Navigation::EditorComponent.new(menu: @menu)
45
38
 
46
39
  if @menu.save
@@ -54,7 +47,7 @@ module Katalyst
54
47
 
55
48
  # PATCH /admins/navigation_menus/:slug
56
49
  def update
57
- menu = Menu.find(params[:id])
50
+ menu = Menu.find(params[:id])
58
51
  editor = Katalyst::Navigation::EditorComponent.new(menu:)
59
52
 
60
53
  menu.attributes = menu_params
@@ -6,4 +6,9 @@
6
6
  </div>
7
7
  </nav>
8
8
 
9
- <%= render(table) %>
9
+ <%= table_with(collection:) do |row, menu| %>
10
+ <%= row.text :title do |cell| %>
11
+ <%= link_to cell, menu %>
12
+ <% end %>
13
+ <%= row.text :slug %>
14
+ <% end %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katalyst-navigation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katalyst Interactive
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-21 00:00:00.000000000 Z
11
+ date: 2024-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: katalyst-html-attributes
@@ -66,7 +66,7 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description:
69
+ description:
70
70
  email:
71
71
  - developers@katalyst.com.au
72
72
  executables: []
@@ -135,7 +135,6 @@ files:
135
135
  - app/views/katalyst/navigation/items/edit.html.erb
136
136
  - app/views/katalyst/navigation/items/edit.turbo_stream.erb
137
137
  - app/views/katalyst/navigation/items/update.turbo_stream.erb
138
- - app/views/katalyst/navigation/menus/_menu.html+row.erb
139
138
  - app/views/katalyst/navigation/menus/edit.html.erb
140
139
  - app/views/katalyst/navigation/menus/index.html.erb
141
140
  - app/views/katalyst/navigation/menus/new.html.erb
@@ -157,7 +156,7 @@ licenses:
157
156
  - MIT
158
157
  metadata:
159
158
  rubygems_mfa_required: 'true'
160
- post_install_message:
159
+ post_install_message:
161
160
  rdoc_options: []
162
161
  require_paths:
163
162
  - lib
@@ -172,8 +171,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
171
  - !ruby/object:Gem::Version
173
172
  version: '0'
174
173
  requirements: []
175
- rubygems_version: 3.4.19
176
- signing_key:
174
+ rubygems_version: 3.5.9
175
+ signing_key:
177
176
  specification_version: 4
178
177
  summary: Navigation generator and editor
179
178
  test_files: []
@@ -1,4 +0,0 @@
1
- <%= row.cell :title do |cell| %>
2
- <%= link_to cell.value, menu %>
3
- <% end %>
4
- <%= row.cell :slug %>