super 0.0.7 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +0 -6
- data/CONTRIBUTING.md +56 -0
- data/README.md +49 -61
- data/Rakefile +16 -14
- data/app/assets/javascripts/super/application.js +297 -97
- data/app/assets/stylesheets/super/application.css +5600 -0
- data/app/controllers/super/application_controller.rb +20 -14
- data/app/helpers/super/form_builder_helper.rb +25 -0
- data/app/views/layouts/super/application.html.erb +23 -9
- data/app/views/super/application/{_super_schema_display_actions.html.erb → _display_actions.html.erb} +0 -0
- data/app/views/super/application/{_super_schema_display_index.html.erb → _display_index.html.erb} +6 -6
- data/app/views/super/application/_display_rich_text.html.erb +1 -0
- data/app/views/super/application/_display_show.html.erb +8 -0
- data/app/views/super/application/_filter.html.erb +5 -13
- data/app/views/super/application/_filter_type_select.html.erb +9 -19
- data/app/views/super/application/_filter_type_text.html.erb +7 -11
- data/app/views/super/application/_filter_type_timestamp.html.erb +6 -17
- data/app/views/super/application/_form.html.erb +15 -0
- 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/{_super_layout.html.erb → _layout.html.erb} +7 -7
- data/app/views/super/application/{_super_pagination.html.erb → _pagination.html.erb} +1 -1
- data/app/views/super/application/{_super_panel.html.erb → _panel.html.erb} +2 -2
- data/app/views/super/application/_query.html.erb +18 -0
- data/app/views/super/application/_sort.html.erb +18 -0
- data/app/views/super/application/_sort_expression.html.erb +25 -0
- data/app/views/super/application/edit.html.erb +1 -0
- data/app/views/super/application/index.html.erb +1 -0
- data/app/views/super/application/new.html.erb +1 -0
- data/app/views/super/application/show.html.erb +1 -0
- data/app/views/super/feather/README.md +1 -0
- data/app/views/super/feather/_x.html +15 -0
- data/config/routes.rb +2 -0
- data/docs/cheat.md +8 -8
- data/frontend/super-frontend/dist/application.css +5600 -0
- data/frontend/super-frontend/dist/application.js +297 -97
- data/lib/generators/super/action_text/USAGE +23 -0
- data/lib/generators/super/action_text/action_text_generator.rb +32 -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 +18 -7
- data/lib/generators/super/install/templates/base_controller.rb.tt +9 -1
- data/lib/generators/super/install/templates/initializer.rb.tt +9 -2
- data/lib/generators/super/resource/resource_generator.rb +107 -30
- data/lib/generators/super/resource/templates/resources_controller.rb.tt +3 -39
- data/lib/generators/super/webpacker/USAGE +5 -4
- data/lib/generators/super/webpacker/webpacker_generator.rb +5 -2
- data/lib/super.rb +17 -0
- data/lib/super/action_inquirer.rb +2 -0
- data/lib/super/assets.rb +114 -38
- data/lib/super/client_error.rb +2 -0
- data/lib/super/compatibility.rb +2 -0
- data/lib/super/configuration.rb +16 -79
- data/lib/super/controls.rb +11 -25
- data/lib/super/controls/optional.rb +75 -16
- data/lib/super/controls/steps.rb +36 -58
- data/lib/super/controls/view.rb +55 -0
- data/lib/super/display.rb +88 -0
- data/lib/super/display/guesser.rb +36 -0
- data/lib/super/display/schema_types.rb +80 -78
- data/lib/super/engine.rb +5 -1
- data/lib/super/error.rb +21 -0
- data/lib/super/filter.rb +7 -130
- data/lib/super/filter/form_object.rb +94 -0
- data/lib/super/filter/guesser.rb +32 -0
- data/lib/super/filter/operator.rb +2 -0
- data/lib/super/filter/schema_types.rb +3 -7
- data/lib/super/form.rb +29 -40
- data/lib/super/form/builder.rb +206 -0
- data/lib/super/form/guesser.rb +29 -0
- data/lib/super/form/inline_errors.rb +28 -0
- data/lib/super/form/schema_types.rb +31 -29
- data/lib/super/form/strong_params.rb +31 -0
- data/lib/super/layout.rb +3 -1
- data/lib/super/link.rb +7 -0
- data/lib/super/navigation/automatic.rb +4 -2
- data/lib/super/pagination.rb +13 -17
- data/lib/super/panel.rb +3 -1
- data/lib/super/partial.rb +2 -0
- data/lib/super/partial/resolving.rb +2 -0
- data/lib/super/plugin.rb +2 -0
- data/lib/super/query/form_object.rb +48 -0
- data/lib/super/schema.rb +2 -25
- data/lib/super/schema/common.rb +27 -0
- data/lib/super/schema/guesser.rb +79 -0
- data/lib/super/sort.rb +110 -0
- data/lib/super/useful/builder.rb +25 -0
- data/lib/super/useful/enum.rb +63 -0
- data/lib/super/version.rb +3 -1
- data/lib/super/view_helper.rb +2 -19
- metadata +63 -34
- data/app/views/super/application/_form_inline_errors.html.erb +0 -10
- data/app/views/super/application/_super_schema_display_show.html.erb +0 -8
- data/app/views/super/application/_super_schema_form.html.erb +0 -15
- data/docs/README.md +0 -6
- data/docs/faq.md +0 -44
- data/docs/quick_start.md +0 -45
- data/docs/webpacker.md +0 -17
- data/docs/yard_customizations.rb +0 -41
- 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 -19
- 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 -15
- data/frontend/super-frontend/tsconfig.json +0 -13
- data/frontend/super-frontend/yarn.lock +0 -5448
- data/lib/super/controls/required.rb +0 -41
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Super
|
2
4
|
# Provides a default implementation for each of the resourceful actions
|
3
5
|
class ApplicationController < ActionController::Base
|
@@ -9,22 +11,26 @@ module Super
|
|
9
11
|
# Displays a list of records to the user
|
10
12
|
def index
|
11
13
|
@records = controls.load_records(action: action_inquirer, params: params)
|
12
|
-
@display = controls.display_schema(action: action_inquirer)
|
13
|
-
@view = controls.
|
14
|
+
@display = controls.display_schema(action: action_inquirer).apply(action: action_inquirer)
|
15
|
+
@view = controls.index_view
|
16
|
+
@query_form = controls.initialize_query_form(params: params, current_path: request.path)
|
17
|
+
controls.initialize_filter_form(query_form: @query_form)
|
18
|
+
controls.initialize_sort_form(query_form: @query_form)
|
19
|
+
@records = controls.apply_queries(query_form: @query_form, records: @records)
|
14
20
|
end
|
15
21
|
|
16
22
|
# Displays a specific record to the user
|
17
23
|
def show
|
18
24
|
@record = controls.load_record(action: action_inquirer, params: params)
|
19
|
-
@display = controls.display_schema(action: action_inquirer)
|
20
|
-
@view = controls.
|
25
|
+
@display = controls.display_schema(action: action_inquirer).apply(action: action_inquirer)
|
26
|
+
@view = controls.show_view
|
21
27
|
end
|
22
28
|
|
23
29
|
# Displays a form to allow the user to create a new record
|
24
30
|
def new
|
25
31
|
@record = controls.build_record(action: action_inquirer)
|
26
32
|
@form = controls.form_schema(action: action_inquirer)
|
27
|
-
@view = controls.
|
33
|
+
@view = controls.new_view
|
28
34
|
end
|
29
35
|
|
30
36
|
# Creates a record, or shows the validation errors
|
@@ -32,10 +38,10 @@ module Super
|
|
32
38
|
@record = controls.build_record_with_params(action: action_inquirer, params: params)
|
33
39
|
|
34
40
|
if controls.save_record(action: action_inquirer, record: @record, params: params)
|
35
|
-
redirect_to polymorphic_path(Super.
|
41
|
+
redirect_to polymorphic_path(Super::Link.polymorphic_parts(@record))
|
36
42
|
else
|
37
43
|
@form = controls.form_schema(action: action_inquirer_for("new"))
|
38
|
-
@view = controls.
|
44
|
+
@view = controls.new_view
|
39
45
|
render :new, status: :bad_request
|
40
46
|
end
|
41
47
|
end
|
@@ -44,7 +50,7 @@ module Super
|
|
44
50
|
def edit
|
45
51
|
@record = controls.load_record(action: action_inquirer, params: params)
|
46
52
|
@form = controls.form_schema(action: action_inquirer)
|
47
|
-
@view = controls.
|
53
|
+
@view = controls.edit_view
|
48
54
|
end
|
49
55
|
|
50
56
|
# Updates a record, or shows validation errors
|
@@ -52,10 +58,10 @@ module Super
|
|
52
58
|
@record = controls.load_record(action: action_inquirer, params: params)
|
53
59
|
|
54
60
|
if controls.update_record(action: action_inquirer, record: @record, params: params)
|
55
|
-
redirect_to polymorphic_path(Super.
|
61
|
+
redirect_to polymorphic_path(Super::Link.polymorphic_parts(@record))
|
56
62
|
else
|
57
63
|
@form = controls.form_schema(action: action_inquirer_for("edit"))
|
58
|
-
@view = controls.
|
64
|
+
@view = controls.edit_view
|
59
65
|
render :edit, status: :bad_request
|
60
66
|
end
|
61
67
|
end
|
@@ -65,20 +71,20 @@ module Super
|
|
65
71
|
@record = controls.load_record(action: action_inquirer, params: params)
|
66
72
|
|
67
73
|
if controls.destroy_record(action: action_inquirer, record: @record, params: params)
|
68
|
-
redirect_to polymorphic_path(Super.
|
74
|
+
redirect_to polymorphic_path(Super::Link.polymorphic_parts(@record))
|
69
75
|
else
|
70
76
|
flash.alert = "Couldn't delete record"
|
71
|
-
redirect_to polymorphic_path(Super.
|
77
|
+
redirect_to polymorphic_path(Super::Link.polymorphic_parts(@record))
|
72
78
|
end
|
73
79
|
rescue ActiveRecord::InvalidForeignKey => e
|
74
80
|
flash.alert = "Couldn't delete record: #{e.class}"
|
75
|
-
redirect_to polymorphic_path(Super.
|
81
|
+
redirect_to polymorphic_path(Super::Link.polymorphic_parts(@record))
|
76
82
|
end
|
77
83
|
|
78
84
|
private
|
79
85
|
|
80
86
|
def controls
|
81
|
-
|
87
|
+
@controls ||= new_controls
|
82
88
|
end
|
83
89
|
|
84
90
|
def action_inquirer
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Super
|
4
|
+
module FormBuilderHelper
|
5
|
+
def super_form_for(record, options = {}, &block)
|
6
|
+
original = ActionView::Base.field_error_proc
|
7
|
+
ActionView::Base.field_error_proc = Form::Builder::FIELD_ERROR_PROC
|
8
|
+
|
9
|
+
options[:builder] ||= Form::Builder
|
10
|
+
return form_for(record, options, &block)
|
11
|
+
ensure
|
12
|
+
ActionView::Base.field_error_proc = original
|
13
|
+
end
|
14
|
+
|
15
|
+
def super_form_with(**options, &block)
|
16
|
+
original = ActionView::Base.field_error_proc
|
17
|
+
ActionView::Base.field_error_proc = Form::Builder::FIELD_ERROR_PROC
|
18
|
+
|
19
|
+
options[:builder] ||= Form::Builder
|
20
|
+
return form_with(**options, &block)
|
21
|
+
ensure
|
22
|
+
ActionView::Base.field_error_proc = original
|
23
|
+
end
|
24
|
+
end
|
25
|
+
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
|
|
@@ -22,9 +38,7 @@
|
|
22
38
|
<div class="px-4">
|
23
39
|
<header class="pt-4">
|
24
40
|
<h1 class="text-lg font-bold mr-6 mb-1"><%= Super.configuration.title %></h1>
|
25
|
-
<%
|
26
|
-
route_namespace = Super.configuration.route_namespace.map(&:to_s).join("/")
|
27
|
-
Super::Navigation::Automatic.new(route_namespace: route_namespace).each do |text, href| %>
|
41
|
+
<% Super::Navigation::Automatic.new.each do |text, href| %>
|
28
42
|
<%= link_to(text, href, class: "inline-block mr-6") %>
|
29
43
|
<% end %>
|
30
44
|
</header>
|
File without changes
|
data/app/views/super/application/{_super_schema_display_index.html.erb → _display_index.html.erb}
RENAMED
@@ -1,10 +1,10 @@
|
|
1
|
-
<div class="mt-4 overflow-x-auto
|
1
|
+
<div class="mt-4 overflow-x-auto">
|
2
2
|
<table class="w-full border-separate relative" cellspacing="0" cellpadding="0">
|
3
3
|
<thead class="">
|
4
4
|
<tr class="">
|
5
|
-
<%
|
6
|
-
<th class="p-2 first:pl-6 border-b border-b-2 border-gray-400 text-gray-600 text-left text-sm font-normal bg-white
|
7
|
-
<%= controls.model.human_attribute_name(
|
5
|
+
<% display_index.each_attribute_name do |attribute_name| %>
|
6
|
+
<th class="p-2 first:pl-6 border-b border-b-2 border-gray-400 text-gray-600 text-left text-sm font-normal bg-white top-0 z-10">
|
7
|
+
<%= controls.model.human_attribute_name(attribute_name) %>
|
8
8
|
</th>
|
9
9
|
<% end %>
|
10
10
|
</tr>
|
@@ -12,9 +12,9 @@
|
|
12
12
|
<tbody class="">
|
13
13
|
<% @records.each.with_index do |record, row_index| %>
|
14
14
|
<tr id="record-pk-<%= record.id %>" class="group">
|
15
|
-
<%
|
15
|
+
<% display_index.each_attribute_name do |attribute_name| %>
|
16
16
|
<td class="py-1 px-2 first:pl-5 border-transparent border-t border-b group-hover:bg-blue-200 first:border-l first:rounded-l-lg last:border-r last:rounded-r-lg bg-white <%= Super::ViewHelper.classes(["bg-gray-100", row_index.odd?]) %>">
|
17
|
-
<%=
|
17
|
+
<%= display_index.render_attribute(template: self, record: record, column: attribute_name) %>
|
18
18
|
</td>
|
19
19
|
<% end %>
|
20
20
|
</tr>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= rich_text %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<table class="max-w-full mt-4">
|
2
|
+
<% display_show.each_attribute_name do |attribute_name| %>
|
3
|
+
<tr>
|
4
|
+
<th class="py-1 align-baseline text-right px-4"><%= controls.model.human_attribute_name(attribute_name) %></th>
|
5
|
+
<td class="py-1 align-baseline"><%= display_show.render_attribute(template: self, record: @record, column: attribute_name) %></td>
|
6
|
+
</tr>
|
7
|
+
<% end %>
|
8
|
+
</table>
|
@@ -1,14 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
<%= render(filter_field, form: form) %>
|
7
|
-
</div>
|
8
|
-
<% end %>
|
9
|
-
|
10
|
-
<div>
|
11
|
-
<%= form.submit "Filter", class: "super-button super-button--border-gray mt-6" %>
|
12
|
-
</div>
|
13
|
-
<% end %>
|
1
|
+
<h1 class="text-lg">Filter</h1>
|
2
|
+
<% filter.each_field do |filter_field| %>
|
3
|
+
<div class="mt-4">
|
4
|
+
<%= render(filter_field, form: form) %>
|
5
|
+
</div>
|
14
6
|
<% end %>
|
@@ -1,31 +1,21 @@
|
|
1
|
-
<div class="super-field-group">
|
1
|
+
<div class="super-field-group" data-controller="clean-filter-param">
|
2
2
|
<%= form.fields_for(filter_type_select.field_name, filter_type_select) do |form_field| %>
|
3
3
|
<%= form_field.label(:q, filter_type_select.humanized_field_name) %>
|
4
|
-
<div class="
|
5
|
-
<%= form_field.select(
|
4
|
+
<div class="relative inline-block">
|
5
|
+
<%= form_field.super.select(
|
6
6
|
:op,
|
7
7
|
filter_type_select.operators,
|
8
|
-
{},
|
9
|
-
{
|
8
|
+
{ include_blank: false },
|
9
|
+
data: { clean_filter_param_target: "candidate" }
|
10
10
|
) %>
|
11
|
-
<div class="super-input-select-icon text-gray-700">
|
12
|
-
<span class="h-4 w-4">
|
13
|
-
<%= render "super/feather/chevron_down" %>
|
14
|
-
</span>
|
15
|
-
</div>
|
16
11
|
</div>
|
17
|
-
<div class="
|
18
|
-
<%= form_field.select(
|
12
|
+
<div class="mt-3">
|
13
|
+
<%= form_field.super.select(
|
19
14
|
:q,
|
20
15
|
filter_type_select.field_type.collection,
|
21
|
-
{
|
22
|
-
{
|
16
|
+
{},
|
17
|
+
data: { clean_filter_param_target: "control candidate" }
|
23
18
|
) %>
|
24
|
-
<div class="super-input-select-icon text-gray-700">
|
25
|
-
<span class="h-4 w-4">
|
26
|
-
<%= render "super/feather/chevron_down" %>
|
27
|
-
</span>
|
28
|
-
</div>
|
29
19
|
</div>
|
30
20
|
<% end %>
|
31
21
|
</div>
|
@@ -1,22 +1,18 @@
|
|
1
|
-
<div class="super-field-group">
|
1
|
+
<div class="super-field-group" data-controller="clean-filter-param">
|
2
2
|
<%= form.fields_for(filter_type_text.field_name, filter_type_text) do |form_field| %>
|
3
3
|
<%= form_field.label(:q, filter_type_text.humanized_field_name) %>
|
4
4
|
<div class="relative inline-block">
|
5
|
-
<%= form_field.select(
|
5
|
+
<%= form_field.super.select(
|
6
6
|
:op,
|
7
7
|
filter_type_text.operators,
|
8
|
-
{},
|
9
|
-
{
|
8
|
+
{ include_blank: false },
|
9
|
+
data: { clean_filter_param_target: "candidate" }
|
10
10
|
) %>
|
11
|
-
<div class="super-input-select-icon text-gray-700">
|
12
|
-
<span class="h-4 w-4">
|
13
|
-
<%= render "super/feather/chevron_down" %>
|
14
|
-
</span>
|
15
|
-
</div>
|
16
11
|
</div>
|
17
|
-
<%= form_field.text_field(
|
12
|
+
<%= form_field.super.text_field(
|
18
13
|
:q,
|
19
|
-
class: "
|
14
|
+
class: "mt-3",
|
15
|
+
data: { clean_filter_param_target: "control candidate" }
|
20
16
|
) %>
|
21
17
|
<% end %>
|
22
18
|
</div>
|
@@ -1,34 +1,23 @@
|
|
1
|
-
<div class="super-field-group">
|
1
|
+
<div class="super-field-group" data-controller="clean-filter-param">
|
2
2
|
<%= form.fields_for(filter_type_timestamp.field_name, filter_type_timestamp) do |form_field| %>
|
3
3
|
<%= form_field.label(:q0, filter_type_timestamp.humanized_field_name) %>
|
4
4
|
<div class="relative inline-block mt-2">
|
5
|
-
<%= form_field.select(
|
5
|
+
<%= form_field.super.select(
|
6
6
|
:op,
|
7
7
|
filter_type_timestamp.operators,
|
8
|
-
{},
|
9
|
-
{
|
8
|
+
{ include_blank: false },
|
9
|
+
data: { clean_filter_param_target: "candidate" }
|
10
10
|
) %>
|
11
|
-
<div class="super-input-select-icon text-gray-700">
|
12
|
-
<span class="h-4 w-4">
|
13
|
-
<%= render "super/feather/chevron_down" %>
|
14
|
-
</span>
|
15
|
-
</div>
|
16
11
|
</div>
|
17
12
|
<div class="flex items-center mt-3">
|
18
13
|
<div class="flex-initial">
|
19
|
-
<%= form_field.text_field(
|
20
|
-
:q0,
|
21
|
-
class: "super-input w-full"
|
22
|
-
) %>
|
14
|
+
<%= form_field.super.text_field(:q0, data: { clean_filter_param_target: "control candidate" }) %>
|
23
15
|
</div>
|
24
16
|
<div class="flex-initial px-2">
|
25
17
|
–
|
26
18
|
</div>
|
27
19
|
<div class="flex-initial">
|
28
|
-
<%= form_field.text_field(
|
29
|
-
:q1,
|
30
|
-
class: "super-input w-full"
|
31
|
-
) %>
|
20
|
+
<%= form_field.super.text_field(:q1, data: { clean_filter_param_target: "control candidate" }) %>
|
32
21
|
</div>
|
33
22
|
</div>
|
34
23
|
<% end %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%= super_form_for(Super::Link.polymorphic_parts(@record), builder: Super::Form::Builder) do |f| %>
|
2
|
+
<div class="max-w-3xl">
|
3
|
+
<% form.each_attribute do |field, type| %>
|
4
|
+
<%= render(
|
5
|
+
type,
|
6
|
+
form: f,
|
7
|
+
column: field
|
8
|
+
) %>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<div>
|
12
|
+
<%= f.super.submit class: "super-button--fill-blue mt-2" %>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
<% 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" %>
|
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) %>
|
@@ -1,29 +1,29 @@
|
|
1
|
-
<%
|
1
|
+
<% layout.resolve(self) %>
|
2
2
|
|
3
|
-
<%
|
3
|
+
<% layout.resolved_headers.each do |partial| %>
|
4
4
|
<%= Super::Partial.render(partial, template: self) %>
|
5
5
|
<% end %>
|
6
6
|
|
7
|
-
<% if
|
8
|
-
<%
|
7
|
+
<% if layout.resolved_asides.empty? %>
|
8
|
+
<% layout.resolved_mains.each do |partial| %>
|
9
9
|
<%= Super::Partial.render(partial, template: self) %>
|
10
10
|
<% end %>
|
11
11
|
<% else %>
|
12
12
|
<div class="clearfix -mx-2">
|
13
13
|
<div class="md:float-left md:w-9/12 px-2">
|
14
|
-
<%
|
14
|
+
<% layout.resolved_mains.each do |partial| %>
|
15
15
|
<%= Super::Partial.render(partial, template: self) %>
|
16
16
|
<% end %>
|
17
17
|
</div>
|
18
18
|
|
19
19
|
<div class="md:float-right md:w-3/12 px-2">
|
20
|
-
<%
|
20
|
+
<% layout.resolved_asides.each do |partial| %>
|
21
21
|
<%= Super::Partial.render(partial, template: self) %>
|
22
22
|
<% end %>
|
23
23
|
</div>
|
24
24
|
</div>
|
25
25
|
<% end %>
|
26
26
|
|
27
|
-
<%
|
27
|
+
<% layout.resolved_footers.each do |partial| %>
|
28
28
|
<%= Super::Partial.render(partial, template: self) %>
|
29
29
|
<% end %>
|