super 0.0.5 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +4 -1
- data/CONTRIBUTING.md +56 -0
- data/README.md +68 -38
- data/STABILITY.md +50 -0
- data/app/assets/javascripts/super/application.js +1170 -359
- data/app/assets/stylesheets/super/application.css +78105 -50441
- data/app/controllers/super/application_controller.rb +44 -52
- data/app/helpers/super/form_builder_helper.rb +23 -0
- data/app/views/layouts/super/application.html.erb +26 -6
- data/app/views/super/application/{_resources_header.html.erb → _collection_header.html.erb} +5 -6
- data/app/views/super/application/_display_rich_text.html.erb +1 -0
- data/app/views/super/application/_filter.html.erb +14 -0
- data/app/views/super/application/_filter_type_select.html.erb +18 -0
- data/app/views/super/application/_filter_type_text.html.erb +16 -0
- data/app/views/super/application/_filter_type_timestamp.html.erb +23 -0
- data/app/views/super/application/_flash.html.erb +13 -13
- data/app/views/super/application/_form_field__destroy.html.erb +1 -9
- data/app/views/super/application/_form_field_checkbox.html.erb +1 -0
- data/app/views/super/application/_form_field_rich_text_area.html.erb +1 -0
- data/app/views/super/application/_form_field_select.html.erb +1 -23
- data/app/views/super/application/_form_field_text.html.erb +1 -13
- data/app/views/super/application/_form_has_many.html.erb +1 -1
- data/app/views/super/application/{_resource_header.html.erb → _member_header.html.erb} +6 -6
- data/app/views/super/application/_super_layout.html.erb +12 -17
- data/app/views/super/application/_super_pagination.html.erb +16 -0
- data/app/views/super/application/_super_panel.html.erb +3 -7
- data/app/views/super/application/_super_schema_display_actions.html.erb +5 -0
- data/app/views/super/application/_super_schema_display_index.html.erb +24 -0
- data/app/views/super/application/_super_schema_display_show.html.erb +8 -0
- data/app/views/super/application/_super_schema_form.html.erb +15 -0
- data/app/views/super/application/edit.html.erb +2 -6
- data/app/views/super/application/index.html.erb +2 -6
- data/app/views/super/application/new.html.erb +2 -6
- data/app/views/super/application/show.html.erb +2 -6
- data/app/views/super/feather/{_chevron_down.svg → _chevron_down.html} +0 -0
- data/config/locales/en.yml +5 -0
- data/docs/README.md +4 -2
- data/docs/action_text.md +48 -0
- data/docs/cheat.md +41 -0
- data/docs/faq.md +3 -3
- data/docs/installation.md +21 -0
- data/docs/quick_start.md +1 -16
- data/docs/webpacker.md +13 -5
- data/frontend/super-frontend/dist/application.css +78105 -50441
- data/frontend/super-frontend/dist/application.js +1170 -359
- data/lib/generators/super/action_text/USAGE +23 -0
- data/lib/generators/super/action_text/action_text_generator.rb +30 -0
- data/lib/generators/super/action_text/templates/pack_super_action_text.css +23 -0
- data/lib/generators/super/action_text/templates/pack_super_action_text.js +4 -0
- data/lib/generators/super/install/install_generator.rb +16 -0
- data/lib/generators/super/resource/templates/resources_controller.rb.tt +1 -31
- data/lib/generators/super/webpacker/USAGE +5 -4
- data/lib/generators/super/webpacker/webpacker_generator.rb +3 -2
- data/lib/super.rb +21 -3
- data/lib/super/action_inquirer.rb +2 -2
- data/lib/super/assets.rb +112 -38
- data/lib/super/client_error.rb +43 -0
- data/lib/super/compatibility.rb +13 -1
- data/lib/super/configuration.rb +21 -69
- data/lib/super/controls.rb +9 -116
- data/lib/super/controls/optional.rb +79 -0
- data/lib/super/controls/required.rb +13 -0
- data/lib/super/controls/steps.rb +114 -0
- data/lib/super/display.rb +66 -3
- data/lib/super/display/guesser.rb +34 -0
- data/lib/super/display/schema_types.rb +61 -25
- data/lib/super/engine.rb +9 -1
- data/lib/super/error.rb +17 -9
- data/lib/super/filter.rb +12 -0
- data/lib/super/filter/form_object.rb +97 -0
- data/lib/super/filter/guesser.rb +30 -0
- data/lib/super/filter/operator.rb +103 -0
- data/lib/super/filter/plugin.rb +47 -0
- data/lib/super/filter/schema_types.rb +112 -0
- data/lib/super/form.rb +35 -0
- data/lib/super/form/builder.rb +204 -0
- data/lib/super/form/guesser.rb +27 -0
- data/lib/super/form/inline_errors.rb +26 -0
- data/lib/super/form/schema_types.rb +29 -22
- data/lib/super/form/strong_params.rb +29 -0
- data/lib/super/layout.rb +28 -0
- data/lib/super/link.rb +55 -32
- data/lib/super/pagination.rb +55 -0
- data/lib/super/panel.rb +13 -0
- data/lib/super/partial.rb +12 -0
- data/lib/super/partial/resolving.rb +24 -0
- data/lib/super/plugin.rb +34 -63
- data/lib/super/schema.rb +12 -22
- data/lib/super/schema/common.rb +25 -0
- data/lib/super/schema/guesser.rb +77 -0
- data/lib/super/version.rb +1 -1
- data/lib/super/view_helper.rb +1 -20
- metadata +90 -33
- data/app/helpers/super/application_helper.rb +0 -32
- data/app/views/super/application/_form.html.erb +0 -17
- data/app/views/super/application/_form_inline_errors.html.erb +0 -10
- data/app/views/super/application/_index.html.erb +0 -45
- data/app/views/super/application/_show.html.erb +0 -10
- data/docs/controls.md +0 -39
- data/frontend/super-frontend/build.js +0 -36
- data/frontend/super-frontend/package.json +0 -21
- data/frontend/super-frontend/postcss.config.js +0 -6
- data/frontend/super-frontend/src/javascripts/super/application.ts +0 -18
- data/frontend/super-frontend/src/javascripts/super/apply_template_controller.ts +0 -21
- data/frontend/super-frontend/src/javascripts/super/rails__ujs.d.ts +0 -1
- data/frontend/super-frontend/src/javascripts/super/toggle_pending_destruction_controller.ts +0 -15
- data/frontend/super-frontend/src/stylesheets/super/application.css +0 -77
- data/frontend/super-frontend/tailwind.config.js +0 -9
- data/frontend/super-frontend/tsconfig.json +0 -13
- data/frontend/super-frontend/yarn.lock +0 -5540
- data/lib/super/step.rb +0 -36
- data/lib/tasks/super_tasks.rake +0 -4
@@ -1,102 +1,94 @@
|
|
1
1
|
module Super
|
2
2
|
# Provides a default implementation for each of the resourceful actions
|
3
3
|
class ApplicationController < ActionController::Base
|
4
|
-
include
|
4
|
+
include ClientError::Handling
|
5
5
|
|
6
6
|
helper_method :action_inquirer
|
7
7
|
helper_method :controls
|
8
8
|
|
9
|
-
|
10
|
-
code, default_message =
|
11
|
-
case exception
|
12
|
-
when Error::UnprocessableEntity
|
13
|
-
[422, "Unprocessable entity"]
|
14
|
-
when Error::NotFound
|
15
|
-
[404, "Not found"]
|
16
|
-
when Error::Forbidden
|
17
|
-
[403, "Forbidden"]
|
18
|
-
when Error::Unauthorized
|
19
|
-
[401, "Unauthorized"]
|
20
|
-
when Error::BadRequest, Error::ClientError
|
21
|
-
[400, "Bad request"]
|
22
|
-
end
|
23
|
-
|
24
|
-
flash.now.alert =
|
25
|
-
if exception.message == exception.class.name.to_s
|
26
|
-
default_message
|
27
|
-
else
|
28
|
-
exception.message
|
29
|
-
end
|
30
|
-
|
31
|
-
render "nothing", status: code
|
32
|
-
end
|
33
|
-
|
9
|
+
# Displays a list of records to the user
|
34
10
|
def index
|
35
|
-
@
|
36
|
-
@
|
37
|
-
@
|
11
|
+
@records = controls.load_records(action: action_inquirer, params: params)
|
12
|
+
@display = controls.display_schema(action: action_inquirer)
|
13
|
+
@view = controls.build_index_view
|
38
14
|
end
|
39
15
|
|
16
|
+
# Displays a specific record to the user
|
40
17
|
def show
|
41
|
-
@
|
18
|
+
@record = controls.load_record(action: action_inquirer, params: params)
|
19
|
+
@display = controls.display_schema(action: action_inquirer)
|
20
|
+
@view = controls.build_show_view
|
42
21
|
end
|
43
22
|
|
23
|
+
# Displays a form to allow the user to create a new record
|
44
24
|
def new
|
45
|
-
@
|
25
|
+
@record = controls.build_record(action: action_inquirer)
|
26
|
+
@form = controls.form_schema(action: action_inquirer)
|
27
|
+
@view = controls.build_new_view
|
46
28
|
end
|
47
29
|
|
30
|
+
# Creates a record, or shows the validation errors
|
48
31
|
def create
|
49
|
-
@
|
32
|
+
@record = controls.build_record_with_params(action: action_inquirer, params: params)
|
50
33
|
|
51
|
-
if @
|
52
|
-
redirect_to polymorphic_path(Super.configuration.path_parts(@
|
34
|
+
if controls.save_record(action: action_inquirer, record: @record, params: params)
|
35
|
+
redirect_to polymorphic_path(Super.configuration.path_parts(@record))
|
53
36
|
else
|
37
|
+
@form = controls.form_schema(action: action_inquirer_for("new"))
|
38
|
+
@view = controls.build_new_view
|
54
39
|
render :new, status: :bad_request
|
55
40
|
end
|
56
41
|
end
|
57
42
|
|
43
|
+
# Displays a form to allow the user to update an existing record
|
58
44
|
def edit
|
59
|
-
@
|
45
|
+
@record = controls.load_record(action: action_inquirer, params: params)
|
46
|
+
@form = controls.form_schema(action: action_inquirer)
|
47
|
+
@view = controls.build_edit_view
|
60
48
|
end
|
61
49
|
|
50
|
+
# Updates a record, or shows validation errors
|
62
51
|
def update
|
63
|
-
@
|
52
|
+
@record = controls.load_record(action: action_inquirer, params: params)
|
64
53
|
|
65
|
-
if
|
66
|
-
redirect_to polymorphic_path(Super.configuration.path_parts(@
|
54
|
+
if controls.update_record(action: action_inquirer, record: @record, params: params)
|
55
|
+
redirect_to polymorphic_path(Super.configuration.path_parts(@record))
|
67
56
|
else
|
57
|
+
@form = controls.form_schema(action: action_inquirer_for("edit"))
|
58
|
+
@view = controls.build_edit_view
|
68
59
|
render :edit, status: :bad_request
|
69
60
|
end
|
70
61
|
end
|
71
62
|
|
63
|
+
# Deletes a record, or shows validation errors
|
72
64
|
def destroy
|
73
|
-
@
|
65
|
+
@record = controls.load_record(action: action_inquirer, params: params)
|
74
66
|
|
75
|
-
if @
|
67
|
+
if controls.destroy_record(action: action_inquirer, record: @record, params: params)
|
76
68
|
redirect_to polymorphic_path(Super.configuration.path_parts(controls.model))
|
77
69
|
else
|
78
|
-
|
70
|
+
flash.alert = "Couldn't delete record"
|
71
|
+
redirect_to polymorphic_path(Super.configuration.path_parts(@record))
|
79
72
|
end
|
73
|
+
rescue ActiveRecord::InvalidForeignKey => e
|
74
|
+
flash.alert = "Couldn't delete record: #{e.class}"
|
75
|
+
redirect_to polymorphic_path(Super.configuration.path_parts(@record))
|
80
76
|
end
|
81
77
|
|
82
78
|
private
|
83
79
|
|
84
80
|
def controls
|
85
|
-
|
81
|
+
@controls ||= new_controls
|
86
82
|
end
|
87
83
|
|
88
|
-
def
|
89
|
-
|
90
|
-
end
|
91
|
-
|
92
|
-
def update_permitted_params
|
93
|
-
controls.permitted_params(params, action: action_inquirer)
|
84
|
+
def action_inquirer
|
85
|
+
@action_inquirer ||= action_inquirer_for(params[:action])
|
94
86
|
end
|
95
87
|
|
96
|
-
def
|
97
|
-
|
98
|
-
ActionInquirer.
|
99
|
-
|
88
|
+
def action_inquirer_for(action)
|
89
|
+
ActionInquirer.new(
|
90
|
+
ActionInquirer.default_for_resources,
|
91
|
+
action
|
100
92
|
)
|
101
93
|
end
|
102
94
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Super
|
2
|
+
module FormBuilderHelper
|
3
|
+
def super_form_for(record, options = {}, &block)
|
4
|
+
original = ActionView::Base.field_error_proc
|
5
|
+
ActionView::Base.field_error_proc = Form::Builder::FIELD_ERROR_PROC
|
6
|
+
|
7
|
+
options[:builder] ||= Form::Builder
|
8
|
+
return form_for(record, options, &block)
|
9
|
+
ensure
|
10
|
+
ActionView::Base.field_error_proc = original
|
11
|
+
end
|
12
|
+
|
13
|
+
def super_form_with(**options, &block)
|
14
|
+
original = ActionView::Base.field_error_proc
|
15
|
+
ActionView::Base.field_error_proc = Form::Builder::FIELD_ERROR_PROC
|
16
|
+
|
17
|
+
options[:builder] ||= Form::Builder
|
18
|
+
return form_with(**options, &block)
|
19
|
+
ensure
|
20
|
+
ActionView::Base.field_error_proc = original
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -9,12 +9,28 @@
|
|
9
9
|
|
10
10
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
11
11
|
|
12
|
-
<%
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
<% Super.configuration.stylesheets.each do |stylesheet| %>
|
13
|
+
<% if stylesheet.handler.sprockets? %>
|
14
|
+
<%= stylesheet_link_tag(stylesheet.path, **stylesheet.arguments) %>
|
15
|
+
<% elsif stylesheet.handler.webpacker? %>
|
16
|
+
<% if Gem::Dependency.new("webpacker", "> 5.99", "< 7").matching_specs.any? %>
|
17
|
+
<%= stylesheet_packs_with_chunks_tag(stylesheet.path) %>
|
18
|
+
<% else %>
|
19
|
+
<%= stylesheet_pack_tag(stylesheet.path, **stylesheet.arguments) %>
|
20
|
+
<% end %>
|
21
|
+
<% end %>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
<% Super.configuration.javascripts.each do |javascript| %>
|
25
|
+
<% if javascript.handler.sprockets? %>
|
26
|
+
<%= javascript_include_tag(javascript.path) %>
|
27
|
+
<% elsif javascript.handler.webpacker? %>
|
28
|
+
<% if Gem::Dependency.new("webpacker", "> 5.99", "< 7").matching_specs.any? %>
|
29
|
+
<%= javascript_packs_with_chunks_tag(javascript.path) %>
|
30
|
+
<% else %>
|
31
|
+
<%= javascript_pack_tag(javascript.path) %>
|
32
|
+
<% end %>
|
33
|
+
<% end %>
|
18
34
|
<% end %>
|
19
35
|
</head>
|
20
36
|
|
@@ -34,6 +50,10 @@
|
|
34
50
|
<div class="pt-4"></div>
|
35
51
|
|
36
52
|
<%= yield %>
|
53
|
+
|
54
|
+
<div class="pt-8 text-sm text-gray-800">
|
55
|
+
<%= t("super.layout.powered_by", env: Rails.env.capitalize, version: Super::VERSION) %>
|
56
|
+
</div>
|
37
57
|
</div>
|
38
58
|
</body>
|
39
59
|
</html>
|
@@ -3,13 +3,12 @@
|
|
3
3
|
<%= controls.title %>
|
4
4
|
</h1>
|
5
5
|
<div>
|
6
|
-
<% controls.
|
7
|
-
<%=
|
8
|
-
|
9
|
-
link.href,
|
10
|
-
link.options.reverse_merge(
|
6
|
+
<% controls.collection_actions(action: action_inquirer).each do |link| %>
|
7
|
+
<%= link.to_s(
|
8
|
+
default_options: {
|
11
9
|
class: "super-button super-button--border-blue super-button-sm inline-block ml-2"
|
12
|
-
|
10
|
+
},
|
11
|
+
params: params
|
13
12
|
) %>
|
14
13
|
<% end %>
|
15
14
|
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= rich_text %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<%= render(Super::Panel.new) do %>
|
2
|
+
<h1 class="text-xl">Filters</h1>
|
3
|
+
<%= super_form_for(filter, url: filter.url, method: :get, as: :q, html: { class: "mt-4" }) do |form| %>
|
4
|
+
<% filter.each_field do |filter_field| %>
|
5
|
+
<div class="mt-4">
|
6
|
+
<%= render(filter_field, form: form) %>
|
7
|
+
</div>
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
<div>
|
11
|
+
<%= form.super.submit "Filter", class: "super-button--border-gray mt-6" %>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
14
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<div class="super-field-group">
|
2
|
+
<%= form.fields_for(filter_type_select.field_name, filter_type_select) do |form_field| %>
|
3
|
+
<%= form_field.label(:q, filter_type_select.humanized_field_name) %>
|
4
|
+
<div class="relative inline-block">
|
5
|
+
<%= form_field.super.select(
|
6
|
+
:op,
|
7
|
+
filter_type_select.operators,
|
8
|
+
{ include_blank: false },
|
9
|
+
) %>
|
10
|
+
</div>
|
11
|
+
<div class="mt-3">
|
12
|
+
<%= form_field.super.select(
|
13
|
+
:q,
|
14
|
+
filter_type_select.field_type.collection,
|
15
|
+
) %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<div class="super-field-group">
|
2
|
+
<%= form.fields_for(filter_type_text.field_name, filter_type_text) do |form_field| %>
|
3
|
+
<%= form_field.label(:q, filter_type_text.humanized_field_name) %>
|
4
|
+
<div class="relative inline-block">
|
5
|
+
<%= form_field.super.select(
|
6
|
+
:op,
|
7
|
+
filter_type_text.operators,
|
8
|
+
{ include_blank: false }
|
9
|
+
) %>
|
10
|
+
</div>
|
11
|
+
<%= form_field.super.text_field(
|
12
|
+
:q,
|
13
|
+
class: "mt-3"
|
14
|
+
) %>
|
15
|
+
<% end %>
|
16
|
+
</div>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<div class="super-field-group">
|
2
|
+
<%= form.fields_for(filter_type_timestamp.field_name, filter_type_timestamp) do |form_field| %>
|
3
|
+
<%= form_field.label(:q0, filter_type_timestamp.humanized_field_name) %>
|
4
|
+
<div class="relative inline-block mt-2">
|
5
|
+
<%= form_field.super.select(
|
6
|
+
:op,
|
7
|
+
filter_type_timestamp.operators,
|
8
|
+
{ include_blank: false}
|
9
|
+
) %>
|
10
|
+
</div>
|
11
|
+
<div class="flex items-center mt-3">
|
12
|
+
<div class="flex-initial">
|
13
|
+
<%= form_field.super.text_field(:q0) %>
|
14
|
+
</div>
|
15
|
+
<div class="flex-initial px-2">
|
16
|
+
–
|
17
|
+
</div>
|
18
|
+
<div class="flex-initial">
|
19
|
+
<%= form_field.super.text_field(:q1) %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
23
|
+
</div>
|
@@ -1,17 +1,17 @@
|
|
1
|
-
<%
|
2
|
-
colors = {
|
1
|
+
<% if flash.any? %>
|
2
|
+
<% colors = {
|
3
3
|
"notice" => { bg: "bg-blue-100", fg: "text-blue-400", border: "border-blue-600" },
|
4
4
|
"alert" => { bg: "bg-red-100", fg: "text-red-400", border: "border-red-600" },
|
5
|
-
}
|
6
|
-
%>
|
5
|
+
} %>
|
7
6
|
|
8
|
-
<div
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
7
|
+
<div class="mt-8">
|
8
|
+
<% flash.each do |level, messages| %>
|
9
|
+
<% Array(messages).each do |message| %>
|
10
|
+
<% color = colors[level.to_s] || colors["notice"] %>
|
11
|
+
<div class="<%= "%<bg>s %<fg>s border-l-4 %<border>s p-4 mt-2" % color %>">
|
12
|
+
<%= message %>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
15
15
|
<% end %>
|
16
|
-
|
17
|
-
|
16
|
+
</div>
|
17
|
+
<% end %>
|
@@ -1,9 +1 @@
|
|
1
|
-
|
2
|
-
<div class="super-field-group">
|
3
|
-
<% end %>
|
4
|
-
<%= form.check_box(column, data: { action: "toggle-pending-destruction#call" }) %>
|
5
|
-
<%= form.label(column) %>
|
6
|
-
<%= render "form_inline_errors", form: form, column: column %>
|
7
|
-
<% if !local_assigns[:ungrouped] %>
|
8
|
-
</div>
|
9
|
-
<% end %>
|
1
|
+
<%= form.super.check_box!(column, field: { data: { action: "toggle-pending-destruction#call" } }) %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= form.super.check_box!(column) %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= form.super.rich_text_area!(column) %>
|
@@ -1,23 +1 @@
|
|
1
|
-
|
2
|
-
<div class="super-field-group">
|
3
|
-
<% end %>
|
4
|
-
<% if !local_assigns[:hide_label] %>
|
5
|
-
<%= form.label(column, class: "block") %>
|
6
|
-
<% end %>
|
7
|
-
<div class="<%= Super::ViewHelper.classes("super-input-select", ["mt-1", !local_assigns[:hide_label]]) %>">
|
8
|
-
<%= form.select(
|
9
|
-
column,
|
10
|
-
form_field_select[:collection],
|
11
|
-
{ include_blank: true }.merge(form_field_select[:options] || {}),
|
12
|
-
{ class: "super-input super-input-select-field" }
|
13
|
-
) %>
|
14
|
-
<div class="super-input-select-icon text-gray-700">
|
15
|
-
<span class="h-4 w-4">
|
16
|
-
<%= render "super/feather/chevron_down.svg" %>
|
17
|
-
</span>
|
18
|
-
</div>
|
19
|
-
</div>
|
20
|
-
<%= render "form_inline_errors", form: form, column: column %>
|
21
|
-
<% if !local_assigns[:ungrouped] %>
|
22
|
-
</div>
|
23
|
-
<% end %>
|
1
|
+
<%= form.super.select!(column, form_field_select[:collection]) %>
|
@@ -1,13 +1 @@
|
|
1
|
-
|
2
|
-
<div class="super-field-group">
|
3
|
-
<% end %>
|
4
|
-
<% if !local_assigns[:hide_label] %>
|
5
|
-
<%= form.label(column, class: "block") %>
|
6
|
-
<% end %>
|
7
|
-
<div class="<%= Super::ViewHelper.classes(["mt-1", !local_assigns[:hide_label]]) %>">
|
8
|
-
<%= form.text_field(column, class: "super-input w-full") %>
|
9
|
-
<%= render "form_inline_errors", form: form, column: column %>
|
10
|
-
</div>
|
11
|
-
<% if !local_assigns[:ungrouped] %>
|
12
|
-
</div>
|
13
|
-
<% end %>
|
1
|
+
<%= form.super.text_field!(column) %>
|
@@ -3,13 +3,13 @@
|
|
3
3
|
<%= controls.title %>
|
4
4
|
</h1>
|
5
5
|
<div>
|
6
|
-
<% controls.
|
7
|
-
<%=
|
8
|
-
|
9
|
-
link.href,
|
10
|
-
link.options.reverse_merge(
|
6
|
+
<% controls.member_actions(action: action_inquirer).each do |link| %>
|
7
|
+
<%= link.to_s(
|
8
|
+
default_options: {
|
11
9
|
class: "super-button super-button--border-blue super-button-sm inline-block ml-2"
|
12
|
-
|
10
|
+
},
|
11
|
+
record: @record,
|
12
|
+
params: params
|
13
13
|
) %>
|
14
14
|
<% end %>
|
15
15
|
</div>
|
@@ -1,34 +1,29 @@
|
|
1
|
-
<%
|
2
|
-
super_layout_headers = super_resolve_list_for_rendering(super_layout.headers)
|
3
|
-
super_layout_asides = super_resolve_list_for_rendering(super_layout.asides)
|
4
|
-
super_layout_mains = super_resolve_list_for_rendering(super_layout.mains)
|
5
|
-
super_layout_footers = super_resolve_list_for_rendering(super_layout.footers)
|
6
|
-
%>
|
1
|
+
<% super_layout.resolve(self) %>
|
7
2
|
|
8
|
-
<%
|
9
|
-
<%=
|
3
|
+
<% super_layout.resolved_headers.each do |partial| %>
|
4
|
+
<%= Super::Partial.render(partial, template: self) %>
|
10
5
|
<% end %>
|
11
6
|
|
12
|
-
<% if
|
13
|
-
<%
|
14
|
-
<%=
|
7
|
+
<% if super_layout.resolved_asides.empty? %>
|
8
|
+
<% super_layout.resolved_mains.each do |partial| %>
|
9
|
+
<%= Super::Partial.render(partial, template: self) %>
|
15
10
|
<% end %>
|
16
11
|
<% else %>
|
17
12
|
<div class="clearfix -mx-2">
|
18
13
|
<div class="md:float-left md:w-9/12 px-2">
|
19
|
-
<%
|
20
|
-
<%=
|
14
|
+
<% super_layout.resolved_mains.each do |partial| %>
|
15
|
+
<%= Super::Partial.render(partial, template: self) %>
|
21
16
|
<% end %>
|
22
17
|
</div>
|
23
18
|
|
24
19
|
<div class="md:float-right md:w-3/12 px-2">
|
25
|
-
<%
|
26
|
-
<%=
|
20
|
+
<% super_layout.resolved_asides.each do |partial| %>
|
21
|
+
<%= Super::Partial.render(partial, template: self) %>
|
27
22
|
<% end %>
|
28
23
|
</div>
|
29
24
|
</div>
|
30
25
|
<% end %>
|
31
26
|
|
32
|
-
<%
|
33
|
-
<%=
|
27
|
+
<% super_layout.resolved_footers.each do |partial| %>
|
28
|
+
<%= Super::Partial.render(partial, template: self) %>
|
34
29
|
<% end %>
|