inline_forms 8.1.44 → 8.1.46
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 +4 -4
- data/CHANGELOG.md +28 -0
- data/app/views/inline_forms/_generic_search.html.erb +16 -0
- data/app/views/inline_forms/_model_top_bar.html.erb +39 -0
- data/app/views/layouts/inline_forms.html.erb +1 -1
- data/lib/generators/inline_forms_addto_generator.rb +8 -4
- data/lib/generators/inline_forms_generator.rb +1 -5
- data/lib/generators/templates/application_record.rb +2 -6
- data/lib/inline_forms/searchable.rb +32 -0
- data/lib/inline_forms/version.rb +1 -1
- data/lib/inline_forms.rb +1 -0
- data/test/dummy/app/controllers/stats_controller.rb +10 -0
- data/test/dummy/app/models/application_record.rb +2 -1
- data/test/dummy/app/models/widget.rb +1 -1
- data/test/dummy/app/views/_gizmos_search.html.erb +3 -0
- data/test/dummy/app/views/stats/show.html.erb +1 -0
- data/test/dummy/config/routes.rb +2 -0
- data/test/inline_forms_generator_test.rb +1 -1
- data/test/integration/model_top_bar_test.rb +56 -0
- metadata +12 -4
- data/lib/generators/templates/_inline_forms_tabs.html.erb +0 -40
- data/test/dummy/app/views/_inline_forms_tabs.html.erb +0 -40
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 01deab33ac621116f150d6b9cb8b8fed5fe2ee6118a53699c383c08751d9c041
|
|
4
|
+
data.tar.gz: 433f57953fa315079be2d5c2c8900885b6010478f360719e8aebd319c025cc90
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3366ebb49776ef4307ab2b64b6eb5b43c6d7f1cf8d2986bf5e5c747b6c67b8e7065bdc40ffa446241a56d8f3bdc845d6f79f49f9cab911e3e952a7d14fdda6e6
|
|
7
|
+
data.tar.gz: f9d4ee91abb242c4ebbf8b13048922cc0da3641c4cf8610b6a48aefeca5071474a605295f4605bce9ce9cbd9d5140434cc8dfa35396e170c636b491fa6f19e32
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,34 @@ All notable changes to this project are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [8.1.46] - 2026-07-24
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **Model top bar no longer crashes when `@Klass` is nil.** Bespoke admin pages that render `layouts/inline_forms` from a non-`InlineFormsController` (e.g. a Stats/report controller) now show title-only chrome instead of raising on `new__path` / `link_to_new_record`. The new-record link is guarded with `<% if @Klass %>` as the per-app header did before 8.1.45.
|
|
12
|
+
|
|
13
|
+
### Lockstep
|
|
14
|
+
|
|
15
|
+
- validation_hints 8.1.46, inline_forms_installer 8.1.46, inline_forms_schema_edit 8.1.46.
|
|
16
|
+
|
|
17
|
+
## [8.1.45] - 2026-07-24
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- **Engine-owned model top bar** (`app/views/inline_forms/_model_top_bar.html.erb`): title, new-record button, and optional search region ship from the gem instead of a per-app `_inline_forms_tabs.html.erb` copy. The layout now renders `inline_forms/model_top_bar`; apps can still override via `app/views/inline_forms/_model_top_bar.html.erb`.
|
|
22
|
+
- **`inline_forms_search_on :col, …` macro** (`InlineForms::Searchable`): declarative opt-in for list search — defines `scope :inline_forms_search` and `inline_forms_searchable?`. Only searchable models get the engine's generic single-field search box (`_generic_search.html.erb`); apps can supply a bespoke `app/views/_<model>_search.html.erb` partial instead (bespoke wins).
|
|
23
|
+
- **`+ field` schema link** in the engine top bar when `inline_forms_schema_new_path` is available (replaces installer injection into the retired `_inline_forms_tabs` partial).
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- **Retired per-app `_inline_forms_tabs.html.erb` scaffolding.** The generator no longer copies `lib/generators/templates/_inline_forms_tabs.html.erb` into new apps. Existing apps must delete their copy and move any bespoke search markup to `_<model>_search.html.erb` (see `stuff/2026-07-24-default-model-top-bar-and-search.md`).
|
|
28
|
+
- **`ApplicationRecord` template:** removed the no-op `scope :inline_forms_search, ->(_q) { all }`; models opt in via `inline_forms_search_on`. `_list_search:<col>` in `rails g inline_forms` / `inline_forms_addto` now emits `inline_forms_search_on :col`.
|
|
29
|
+
- **Installer user model** uses `inline_forms_search_on :name, :email` instead of a hand-written search scope.
|
|
30
|
+
|
|
31
|
+
### Lockstep
|
|
32
|
+
|
|
33
|
+
- validation_hints 8.1.45, inline_forms_installer 8.1.45, inline_forms_schema_edit 8.1.45.
|
|
34
|
+
|
|
7
35
|
## [8.1.44] - 2026-07-24
|
|
8
36
|
|
|
9
37
|
### Fixed
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<%= form_tag request.path, method: :get do %>
|
|
2
|
+
<div class="row collapse">
|
|
3
|
+
<div class="large-1 small-1 columns">
|
|
4
|
+
<%= link_to "<i class='fi-x'></i>".html_safe, request.path, title: "reset", class: "button expanded inline_forms_model_top_bar_buttons" %>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="large-6 small-6 columns">
|
|
7
|
+
<%= text_field_tag :search, params[:search], placeholder: "zoek op naam...", id: "input_search" %>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="large-3 small-3 columns">
|
|
10
|
+
<%= submit_tag "zoek", class: "button expanded inline_forms_model_top_bar_buttons" %>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="large-2 small-2 columns">
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
<% end %>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<div class="contain-to-grid fixed" id="inline_forms_model_top_bar_container">
|
|
2
|
+
<nav id="inline_forms_model_top_bar" class="top-bar">
|
|
3
|
+
<div class="top-bar-left">
|
|
4
|
+
<ul class="menu">
|
|
5
|
+
<li class="menu-text" id="inline_forms_menu">
|
|
6
|
+
<h1 style="margin: 0; font-size: inherit;">
|
|
7
|
+
<a>
|
|
8
|
+
<%= t(controller_name) %>
|
|
9
|
+
</a>
|
|
10
|
+
</h1>
|
|
11
|
+
</li>
|
|
12
|
+
<% if respond_to?(:inline_forms_schema_new_path) %>
|
|
13
|
+
<li class="menu-text">
|
|
14
|
+
<%= link_to "+ field", inline_forms_schema_new_path, data: { turbo: false }, title: "Add a field to a model (dev only)" %>
|
|
15
|
+
</li>
|
|
16
|
+
<% end %>
|
|
17
|
+
</ul>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="top-bar-right">
|
|
20
|
+
<ul class="menu">
|
|
21
|
+
<% search_partial = "#{controller_name}_search" %>
|
|
22
|
+
<% if lookup_context.exists?(search_partial, [], true) %>
|
|
23
|
+
<li>
|
|
24
|
+
<%= render partial: "/#{search_partial}" %>
|
|
25
|
+
</li>
|
|
26
|
+
<% elsif @Klass.respond_to?(:inline_forms_searchable?) && @Klass.inline_forms_searchable? %>
|
|
27
|
+
<li>
|
|
28
|
+
<%= render "inline_forms/generic_search" %>
|
|
29
|
+
</li>
|
|
30
|
+
<% end %>
|
|
31
|
+
<% if @Klass %>
|
|
32
|
+
<li>
|
|
33
|
+
<%= link_to_new_record(@Klass, "new_#{@Klass.to_s.singularize.underscore}_path", @Klass.to_s.pluralize.downcase + "_list") %>
|
|
34
|
+
</li>
|
|
35
|
+
<% end %>
|
|
36
|
+
</ul>
|
|
37
|
+
</div>
|
|
38
|
+
</nav>
|
|
39
|
+
</div>
|
|
@@ -444,11 +444,15 @@ class InlineFormsAddtoGenerator < Rails::Generators::NamedBase
|
|
|
444
444
|
end
|
|
445
445
|
when "_list_search"
|
|
446
446
|
col = attribute.type
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
447
|
+
new_line = " inline_forms_search_on :#{col}\n"
|
|
448
|
+
path = File.join(destination_root, model_file_path)
|
|
449
|
+
content = File.read(path)
|
|
450
|
+
if content.match?(/inline_forms_search_on\b/)
|
|
451
|
+
gsub_file model_file_path, / inline_forms_search_on[^\n]*\n/, new_line
|
|
452
|
+
elsif content.match?(/scope :inline_forms_search\b/)
|
|
453
|
+
gsub_file model_file_path, / scope :inline_forms_search, ->.*\n/, new_line
|
|
450
454
|
else
|
|
451
|
-
inject_into_class model_file_path, model_class_name,
|
|
455
|
+
inject_into_class model_file_path, model_class_name, new_line
|
|
452
456
|
end
|
|
453
457
|
end
|
|
454
458
|
end
|
|
@@ -116,7 +116,7 @@ module InlineForms
|
|
|
116
116
|
@list_scopes << " scope :inline_forms_list, -> { order(:#{attribute.type}, :id) }\n"
|
|
117
117
|
end
|
|
118
118
|
if attribute.name == '_list_search'
|
|
119
|
-
@list_scopes << "
|
|
119
|
+
@list_scopes << " inline_forms_search_on :#{attribute.type}\n"
|
|
120
120
|
end
|
|
121
121
|
if attribute.attribute?
|
|
122
122
|
attribute.attribute_type == :unknown ? commenter = '#' : commenter = ' '
|
|
@@ -196,10 +196,6 @@ module InlineForms
|
|
|
196
196
|
end
|
|
197
197
|
end
|
|
198
198
|
|
|
199
|
-
def add_second_top_bar
|
|
200
|
-
copy_file "_inline_forms_tabs.html.erb", "app/views/_inline_forms_tabs.html.erb" unless File.exist?('app/views/_inline_forms_tabs.html.erb')
|
|
201
|
-
end
|
|
202
|
-
|
|
203
199
|
def add_tab
|
|
204
200
|
return if @flag_not_accessible_through_html
|
|
205
201
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
class ApplicationRecord < ActiveRecord::Base
|
|
2
2
|
self.abstract_class = true
|
|
3
3
|
|
|
4
|
+
include InlineForms::Searchable
|
|
5
|
+
|
|
4
6
|
# PaperTrail 16 defaults to `on: [:create, :update, :destroy, :touch]`.
|
|
5
7
|
# ActionText's `belongs_to :record, polymorphic: true, touch: true` (set by
|
|
6
8
|
# `has_rich_text`) calls `parent.touch` on every rich-text save, which
|
|
@@ -24,12 +26,6 @@ class ApplicationRecord < ActiveRecord::Base
|
|
|
24
26
|
# `unscope`/`reorder` cleanly.
|
|
25
27
|
scope :inline_forms_list, -> { all }
|
|
26
28
|
|
|
27
|
-
# Default list search; no-op so the gem's search box is inert until a model
|
|
28
|
-
# opts in via
|
|
29
|
-
# scope :inline_forms_search, ->(q) { where("col LIKE ?", "%#{q}%") }
|
|
30
|
-
# (emitted by `_list_search:<col>` in the generator).
|
|
31
|
-
scope :inline_forms_search, ->(_q) { all }
|
|
32
|
-
|
|
33
29
|
# Wrapper for @model.human_attribute_name -> Model.human_attribute_name
|
|
34
30
|
def human_attribute_name(*args)
|
|
35
31
|
self.class.human_attribute_name(*args)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module InlineForms
|
|
4
|
+
# Opt-in list search for inline_forms index views. Models declare searchable
|
|
5
|
+
# columns with `inline_forms_search_on :col, …`; only those models get the
|
|
6
|
+
# engine's generic search box (or a bespoke `_<model>_search` partial).
|
|
7
|
+
module Searchable
|
|
8
|
+
extend ActiveSupport::Concern
|
|
9
|
+
|
|
10
|
+
class_methods do
|
|
11
|
+
def inline_forms_searchable?
|
|
12
|
+
@inline_forms_searchable == true
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def inline_forms_search_on(*columns)
|
|
16
|
+
cols = columns.flatten.map(&:to_s)
|
|
17
|
+
if cols.empty?
|
|
18
|
+
raise ArgumentError, "inline_forms_search_on requires at least one column"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
@inline_forms_searchable = true
|
|
22
|
+
table = table_name
|
|
23
|
+
clause = cols.map { |c|
|
|
24
|
+
"#{connection.quote_table_name(table)}.#{connection.quote_column_name(c)} LIKE :q"
|
|
25
|
+
}.join(" OR ")
|
|
26
|
+
scope :inline_forms_search, ->(q) {
|
|
27
|
+
where(clause, q: "%#{sanitize_sql_like(q.to_s)}%")
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
data/lib/inline_forms/version.rb
CHANGED
data/lib/inline_forms.rb
CHANGED
|
@@ -7,6 +7,7 @@ require "inline_forms/schema_preview"
|
|
|
7
7
|
require "inline_forms/schema_apply"
|
|
8
8
|
require "inline_forms/schema_label"
|
|
9
9
|
require "inline_forms/form_element_from_callee"
|
|
10
|
+
require "inline_forms/searchable"
|
|
10
11
|
require "inline_forms/archived_form_elements"
|
|
11
12
|
require "inline_forms/form_element_registry"
|
|
12
13
|
require "inline_forms/form_elements"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Bespoke report page: uses the inline_forms admin layout but is not an
|
|
4
|
+
# InlineFormsController, so @Klass is never set (mirrors StProject Stats).
|
|
5
|
+
class StatsController < ApplicationController
|
|
6
|
+
layout "inline_forms"
|
|
7
|
+
|
|
8
|
+
def show
|
|
9
|
+
end
|
|
10
|
+
end
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
class ApplicationRecord < ActiveRecord::Base
|
|
8
8
|
self.abstract_class = true
|
|
9
9
|
|
|
10
|
+
include InlineForms::Searchable
|
|
11
|
+
|
|
10
12
|
has_paper_trail on: [ :create, :update, :destroy ]
|
|
11
13
|
|
|
12
14
|
attr_writer :inline_forms_attribute_list
|
|
@@ -14,7 +16,6 @@ class ApplicationRecord < ActiveRecord::Base
|
|
|
14
16
|
self.per_page = 7
|
|
15
17
|
|
|
16
18
|
scope :inline_forms_list, -> { all }
|
|
17
|
-
scope :inline_forms_search, ->(_q) { all }
|
|
18
19
|
|
|
19
20
|
def human_attribute_name(*args)
|
|
20
21
|
self.class.human_attribute_name(*args)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<p id="stats_report">Stats report</p>
|
data/test/dummy/config/routes.rb
CHANGED
|
@@ -25,6 +25,8 @@ Rails.application.routes.draw do
|
|
|
25
25
|
get "list_versions", on: :member
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
+
get "stats", to: "stats#show"
|
|
29
|
+
|
|
28
30
|
# Schema-change GUI (opt-in in real installs; routed here for the engine's
|
|
29
31
|
# fast test suite). One line, so gem upgrades can add routes freely.
|
|
30
32
|
InlineFormsSchemaEdit.draw_routes(self)
|
|
@@ -155,7 +155,7 @@ class InlineFormsGeneratorTest < Minitest::Test
|
|
|
155
155
|
|
|
156
156
|
model = read("app/models/apartment.rb")
|
|
157
157
|
assert_includes(model, "scope :inline_forms_list, -> { order(:name, :id) }")
|
|
158
|
-
assert_includes(model, "
|
|
158
|
+
assert_includes(model, "inline_forms_search_on :name")
|
|
159
159
|
migration = read_single_migration_for("apartments")
|
|
160
160
|
refute_includes(migration, "_list_order")
|
|
161
161
|
refute_includes(migration, "_list_search")
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "../integration_test_helper"
|
|
4
|
+
|
|
5
|
+
# Engine-owned model top bar: title + new-record + optional search region.
|
|
6
|
+
class ModelTopBarTest < InlineFormsIntegrationTestCase
|
|
7
|
+
setup do
|
|
8
|
+
@widget = Widget.create!(name: "Alpha")
|
|
9
|
+
@machine = Machine.create!(name: "Press")
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
test "searchable model renders the engine generic search box" do
|
|
13
|
+
get widgets_path
|
|
14
|
+
|
|
15
|
+
assert_response :success
|
|
16
|
+
assert_includes response.body, %(id="input_search")
|
|
17
|
+
assert_includes response.body, %(id="inline_forms_model_top_bar")
|
|
18
|
+
refute_includes response.body, "bespoke gizmo search"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
test "non-searchable model renders no search box" do
|
|
22
|
+
get machines_path
|
|
23
|
+
|
|
24
|
+
assert_response :success
|
|
25
|
+
assert_includes response.body, %(id="inline_forms_model_top_bar")
|
|
26
|
+
refute_includes response.body, %(id="input_search")
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
test "bespoke _<model>_search partial wins over generic search" do
|
|
30
|
+
get gizmos_path
|
|
31
|
+
|
|
32
|
+
assert_response :success
|
|
33
|
+
assert_includes response.body, %(id="bespoke_gizmo_search")
|
|
34
|
+
refute_includes response.body, %(id="input_search")
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
test "generic search box filters the list via inline_forms_search_on" do
|
|
38
|
+
Widget.create!(name: "Beta")
|
|
39
|
+
|
|
40
|
+
get widgets_path(search: "Alp")
|
|
41
|
+
|
|
42
|
+
assert_response :success
|
|
43
|
+
assert_includes response.body, "Alpha"
|
|
44
|
+
refute_includes response.body, "Beta"
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
test "non-model page with no @Klass renders title only, no new-record link" do
|
|
48
|
+
get stats_path
|
|
49
|
+
|
|
50
|
+
assert_response :success
|
|
51
|
+
assert_includes response.body, %(id="inline_forms_model_top_bar")
|
|
52
|
+
assert_includes response.body, %(id="stats_report")
|
|
53
|
+
refute_includes response.body, "new_button"
|
|
54
|
+
refute_includes response.body, %(id="input_search")
|
|
55
|
+
end
|
|
56
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: inline_forms
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 8.1.
|
|
4
|
+
version: 8.1.46
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ace Suares
|
|
@@ -148,8 +148,10 @@ files:
|
|
|
148
148
|
- app/views/inline_forms/_close.html.erb
|
|
149
149
|
- app/views/inline_forms/_edit.html.erb
|
|
150
150
|
- app/views/inline_forms/_flash.html.erb
|
|
151
|
+
- app/views/inline_forms/_generic_search.html.erb
|
|
151
152
|
- app/views/inline_forms/_header.html.erb
|
|
152
153
|
- app/views/inline_forms/_list.html.erb
|
|
154
|
+
- app/views/inline_forms/_model_top_bar.html.erb
|
|
153
155
|
- app/views/inline_forms/_new.html.erb
|
|
154
156
|
- app/views/inline_forms/_new_nested.html.erb
|
|
155
157
|
- app/views/inline_forms/_pending_migration_row.html.erb
|
|
@@ -202,7 +204,6 @@ files:
|
|
|
202
204
|
- lib/generators/inline_forms_addto_generator.rb
|
|
203
205
|
- lib/generators/inline_forms_attribute_overrides.rb
|
|
204
206
|
- lib/generators/inline_forms_generator.rb
|
|
205
|
-
- lib/generators/templates/_inline_forms_tabs.html.erb
|
|
206
207
|
- lib/generators/templates/application_record.rb
|
|
207
208
|
- lib/generators/templates/controller.erb
|
|
208
209
|
- lib/generators/templates/migration.erb
|
|
@@ -254,6 +255,7 @@ files:
|
|
|
254
255
|
- lib/inline_forms/schema_intent.rb
|
|
255
256
|
- lib/inline_forms/schema_label.rb
|
|
256
257
|
- lib/inline_forms/schema_preview.rb
|
|
258
|
+
- lib/inline_forms/searchable.rb
|
|
257
259
|
- lib/inline_forms/tabs.rb
|
|
258
260
|
- lib/inline_forms/turbo_tabs_builder.rb
|
|
259
261
|
- lib/inline_forms/version.rb
|
|
@@ -270,6 +272,7 @@ files:
|
|
|
270
272
|
- test/dummy/app/controllers/gizmos_controller.rb
|
|
271
273
|
- test/dummy/app/controllers/machines_controller.rb
|
|
272
274
|
- test/dummy/app/controllers/parts_controller.rb
|
|
275
|
+
- test/dummy/app/controllers/stats_controller.rb
|
|
273
276
|
- test/dummy/app/controllers/widgets_controller.rb
|
|
274
277
|
- test/dummy/app/helpers/application_helper.rb
|
|
275
278
|
- test/dummy/app/models/application_record.rb
|
|
@@ -278,7 +281,8 @@ files:
|
|
|
278
281
|
- test/dummy/app/models/machine.rb
|
|
279
282
|
- test/dummy/app/models/part.rb
|
|
280
283
|
- test/dummy/app/models/widget.rb
|
|
281
|
-
- test/dummy/app/views/
|
|
284
|
+
- test/dummy/app/views/_gizmos_search.html.erb
|
|
285
|
+
- test/dummy/app/views/stats/show.html.erb
|
|
282
286
|
- test/dummy/config/application.rb
|
|
283
287
|
- test/dummy/config/database.yml
|
|
284
288
|
- test/dummy/config/environment.rb
|
|
@@ -291,6 +295,7 @@ files:
|
|
|
291
295
|
- test/inline_forms_generator_test.rb
|
|
292
296
|
- test/integration/inline_forms_crud_test.rb
|
|
293
297
|
- test/integration/legacy_elements_test.rb
|
|
298
|
+
- test/integration/model_top_bar_test.rb
|
|
294
299
|
- test/integration/native_inputs_test.rb
|
|
295
300
|
- test/integration/open_after_create_test.rb
|
|
296
301
|
- test/integration/pending_migration_gate_test.rb
|
|
@@ -338,6 +343,7 @@ test_files:
|
|
|
338
343
|
- test/dummy/app/controllers/gizmos_controller.rb
|
|
339
344
|
- test/dummy/app/controllers/machines_controller.rb
|
|
340
345
|
- test/dummy/app/controllers/parts_controller.rb
|
|
346
|
+
- test/dummy/app/controllers/stats_controller.rb
|
|
341
347
|
- test/dummy/app/controllers/widgets_controller.rb
|
|
342
348
|
- test/dummy/app/helpers/application_helper.rb
|
|
343
349
|
- test/dummy/app/models/application_record.rb
|
|
@@ -346,7 +352,8 @@ test_files:
|
|
|
346
352
|
- test/dummy/app/models/machine.rb
|
|
347
353
|
- test/dummy/app/models/part.rb
|
|
348
354
|
- test/dummy/app/models/widget.rb
|
|
349
|
-
- test/dummy/app/views/
|
|
355
|
+
- test/dummy/app/views/_gizmos_search.html.erb
|
|
356
|
+
- test/dummy/app/views/stats/show.html.erb
|
|
350
357
|
- test/dummy/config/application.rb
|
|
351
358
|
- test/dummy/config/database.yml
|
|
352
359
|
- test/dummy/config/environment.rb
|
|
@@ -359,6 +366,7 @@ test_files:
|
|
|
359
366
|
- test/inline_forms_generator_test.rb
|
|
360
367
|
- test/integration/inline_forms_crud_test.rb
|
|
361
368
|
- test/integration/legacy_elements_test.rb
|
|
369
|
+
- test/integration/model_top_bar_test.rb
|
|
362
370
|
- test/integration/native_inputs_test.rb
|
|
363
371
|
- test/integration/open_after_create_test.rb
|
|
364
372
|
- test/integration/pending_migration_gate_test.rb
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<div class="contain-to-grid fixed" id="inline_forms_model_top_bar_container">
|
|
2
|
-
<nav id="inline_forms_model_top_bar" class="top-bar">
|
|
3
|
-
<div class="top-bar-left">
|
|
4
|
-
<ul class="menu">
|
|
5
|
-
<li class="menu-text" id="inline_forms_menu">
|
|
6
|
-
<h1 style="margin: 0; font-size: inherit;">
|
|
7
|
-
<a>
|
|
8
|
-
<%= t(controller_name) %>
|
|
9
|
-
</a>
|
|
10
|
-
</h1>
|
|
11
|
-
</li>
|
|
12
|
-
</ul>
|
|
13
|
-
</div>
|
|
14
|
-
<div class="top-bar-right">
|
|
15
|
-
<ul class="menu">
|
|
16
|
-
<li>
|
|
17
|
-
<%= form_tag request.path, :method => 'get' do %>
|
|
18
|
-
<div class="row collapse">
|
|
19
|
-
<div class="large-1 small-1 columns">
|
|
20
|
-
<%= link_to "<i class='fi-x'></i>".html_safe, request.path, :title => 'reset', :class => "button expanded inline_forms_model_top_bar_buttons" %>
|
|
21
|
-
</div>
|
|
22
|
-
<div class="large-6 small-6 columns">
|
|
23
|
-
<%= text_field_tag :search, params[:search], :placeholder => 'zoek op naam...', :id => 'input_search' %>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="large-3 small-3 columns">
|
|
26
|
-
<%= submit_tag 'zoek', :class => "button expanded inline_forms_model_top_bar_buttons" %>
|
|
27
|
-
</div>
|
|
28
|
-
<div class="large-2 small-2 columns">
|
|
29
|
-
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
<% end %>
|
|
33
|
-
</li>
|
|
34
|
-
<li>
|
|
35
|
-
<%= link_to_new_record(@Klass, "new_#{@Klass.to_s.singularize.underscore}_path", @Klass.to_s.pluralize.downcase + '_list') %>
|
|
36
|
-
</li>
|
|
37
|
-
</ul>
|
|
38
|
-
</div>
|
|
39
|
-
</nav>
|
|
40
|
-
</div>
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<div class="contain-to-grid fixed" id="inline_forms_model_top_bar_container">
|
|
2
|
-
<nav id="inline_forms_model_top_bar" class="top-bar">
|
|
3
|
-
<div class="top-bar-left">
|
|
4
|
-
<ul class="menu">
|
|
5
|
-
<li class="menu-text" id="inline_forms_menu">
|
|
6
|
-
<h1 style="margin: 0; font-size: inherit;">
|
|
7
|
-
<a>
|
|
8
|
-
<%= t(controller_name) %>
|
|
9
|
-
</a>
|
|
10
|
-
</h1>
|
|
11
|
-
</li>
|
|
12
|
-
</ul>
|
|
13
|
-
</div>
|
|
14
|
-
<div class="top-bar-right">
|
|
15
|
-
<ul class="menu">
|
|
16
|
-
<li>
|
|
17
|
-
<%= form_tag request.path, :method => 'get' do %>
|
|
18
|
-
<div class="row collapse">
|
|
19
|
-
<div class="large-1 small-1 columns">
|
|
20
|
-
<%= link_to "<i class='fi-x'></i>".html_safe, request.path, :title => 'reset', :class => "button expanded inline_forms_model_top_bar_buttons" %>
|
|
21
|
-
</div>
|
|
22
|
-
<div class="large-6 small-6 columns">
|
|
23
|
-
<%= text_field_tag :search, params[:search], :placeholder => 'zoek op naam...', :id => 'input_search' %>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="large-3 small-3 columns">
|
|
26
|
-
<%= submit_tag 'zoek', :class => "button expanded inline_forms_model_top_bar_buttons" %>
|
|
27
|
-
</div>
|
|
28
|
-
<div class="large-2 small-2 columns">
|
|
29
|
-
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
<% end %>
|
|
33
|
-
</li>
|
|
34
|
-
<li>
|
|
35
|
-
<%= link_to_new_record(@Klass, "new_#{@Klass.to_s.singularize.underscore}_path", @Klass.to_s.pluralize.downcase + '_list') %>
|
|
36
|
-
</li>
|
|
37
|
-
</ul>
|
|
38
|
-
</div>
|
|
39
|
-
</nav>
|
|
40
|
-
</div>
|