super 0.0.6 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -0
  3. data/CONTRIBUTING.md +56 -0
  4. data/README.md +55 -57
  5. data/Rakefile +16 -14
  6. data/STABILITY.md +50 -0
  7. data/app/assets/javascripts/super/application.js +297 -97
  8. data/app/assets/stylesheets/super/application.css +5600 -0
  9. data/app/controllers/super/application_controller.rb +15 -6
  10. data/app/helpers/super/form_builder_helper.rb +25 -0
  11. data/app/views/layouts/super/application.html.erb +22 -6
  12. data/app/views/super/application/_display_rich_text.html.erb +1 -0
  13. data/app/views/super/application/_filter.html.erb +6 -0
  14. data/app/views/super/application/_filter_type_select.html.erb +21 -0
  15. data/app/views/super/application/_filter_type_text.html.erb +18 -0
  16. data/app/views/super/application/_filter_type_timestamp.html.erb +24 -0
  17. data/app/views/super/application/_form_field__destroy.html.erb +1 -9
  18. data/app/views/super/application/_form_field_checkbox.html.erb +1 -0
  19. data/app/views/super/application/_form_field_rich_text_area.html.erb +1 -0
  20. data/app/views/super/application/_form_field_select.html.erb +1 -23
  21. data/app/views/super/application/_form_field_text.html.erb +1 -13
  22. data/app/views/super/application/_query.html.erb +18 -0
  23. data/app/views/super/application/_sort.html.erb +18 -0
  24. data/app/views/super/application/_sort_expression.html.erb +25 -0
  25. data/app/views/super/application/_super_layout.html.erb +5 -5
  26. data/app/views/super/application/_super_pagination.html.erb +16 -0
  27. data/app/views/super/application/_super_panel.html.erb +2 -2
  28. data/app/views/super/application/_super_schema_display_index.html.erb +9 -24
  29. data/app/views/super/application/_super_schema_display_show.html.erb +4 -4
  30. data/app/views/super/application/_super_schema_form.html.erb +3 -3
  31. data/app/views/super/application/edit.html.erb +2 -6
  32. data/app/views/super/application/index.html.erb +2 -6
  33. data/app/views/super/application/new.html.erb +2 -6
  34. data/app/views/super/application/show.html.erb +2 -6
  35. data/app/views/super/feather/README.md +1 -0
  36. data/app/views/super/feather/_x.html +15 -0
  37. data/config/routes.rb +2 -0
  38. data/docs/README.md +4 -2
  39. data/docs/action_text.md +48 -0
  40. data/docs/cheat.md +8 -8
  41. data/docs/faq.md +3 -3
  42. data/docs/installation.md +21 -0
  43. data/docs/quick_start.md +1 -16
  44. data/docs/webpacker.md +13 -5
  45. data/docs/yard_customizations.rb +2 -0
  46. data/frontend/super-frontend/dist/application.css +5600 -0
  47. data/frontend/super-frontend/dist/application.js +297 -97
  48. data/lib/generators/super/action_text/USAGE +23 -0
  49. data/lib/generators/super/action_text/action_text_generator.rb +32 -0
  50. data/lib/generators/super/action_text/templates/pack_super_action_text.css +23 -0
  51. data/lib/generators/super/action_text/templates/pack_super_action_text.js +4 -0
  52. data/lib/generators/super/install/install_generator.rb +2 -0
  53. data/lib/generators/super/resource/resource_generator.rb +2 -0
  54. data/lib/generators/super/resource/templates/resources_controller.rb.tt +1 -31
  55. data/lib/generators/super/webpacker/USAGE +5 -4
  56. data/lib/generators/super/webpacker/webpacker_generator.rb +5 -2
  57. data/lib/super.rb +23 -2
  58. data/lib/super/action_inquirer.rb +2 -0
  59. data/lib/super/assets.rb +114 -38
  60. data/lib/super/client_error.rb +2 -0
  61. data/lib/super/compatibility.rb +15 -1
  62. data/lib/super/configuration.rb +22 -69
  63. data/lib/super/controls.rb +6 -25
  64. data/lib/super/controls/optional.rb +71 -24
  65. data/lib/super/controls/required.rb +3 -29
  66. data/lib/super/controls/steps.rb +44 -53
  67. data/lib/super/controls/view.rb +55 -0
  68. data/lib/super/display.rb +80 -0
  69. data/lib/super/display/guesser.rb +36 -0
  70. data/lib/super/display/schema_types.rb +28 -33
  71. data/lib/super/engine.rb +11 -1
  72. data/lib/super/error.rb +14 -0
  73. data/lib/super/filter.rb +14 -0
  74. data/lib/super/filter/form_object.rb +94 -0
  75. data/lib/super/filter/guesser.rb +32 -0
  76. data/lib/super/filter/operator.rb +105 -0
  77. data/lib/super/filter/schema_types.rb +114 -0
  78. data/lib/super/form.rb +29 -40
  79. data/lib/super/form/builder.rb +206 -0
  80. data/lib/super/form/guesser.rb +29 -0
  81. data/lib/super/form/inline_errors.rb +28 -0
  82. data/lib/super/form/schema_types.rb +31 -29
  83. data/lib/super/form/strong_params.rb +31 -0
  84. data/lib/super/layout.rb +2 -0
  85. data/lib/super/link.rb +2 -0
  86. data/lib/super/navigation/automatic.rb +2 -0
  87. data/lib/super/pagination.rb +57 -0
  88. data/lib/super/panel.rb +2 -0
  89. data/lib/super/partial.rb +14 -0
  90. data/lib/super/partial/resolving.rb +2 -0
  91. data/lib/super/plugin.rb +36 -63
  92. data/lib/super/query/form_object.rb +48 -0
  93. data/lib/super/schema.rb +2 -24
  94. data/lib/super/schema/common.rb +27 -0
  95. data/lib/super/schema/guesser.rb +79 -0
  96. data/lib/super/sort.rb +110 -0
  97. data/lib/super/version.rb +3 -1
  98. data/lib/super/view_helper.rb +2 -19
  99. metadata +74 -22
  100. data/app/helpers/super/application_helper.rb +0 -39
  101. data/app/views/super/application/_form_inline_errors.html.erb +0 -10
  102. data/frontend/super-frontend/build.js +0 -36
  103. data/frontend/super-frontend/package.json +0 -21
  104. data/frontend/super-frontend/postcss.config.js +0 -6
  105. data/frontend/super-frontend/src/javascripts/super/application.ts +0 -18
  106. data/frontend/super-frontend/src/javascripts/super/apply_template_controller.ts +0 -19
  107. data/frontend/super-frontend/src/javascripts/super/rails__ujs.d.ts +0 -1
  108. data/frontend/super-frontend/src/javascripts/super/toggle_pending_destruction_controller.ts +0 -15
  109. data/frontend/super-frontend/src/stylesheets/super/application.css +0 -77
  110. data/frontend/super-frontend/tailwind.config.js +0 -15
  111. data/frontend/super-frontend/tsconfig.json +0 -13
  112. data/frontend/super-frontend/yarn.lock +0 -5448
@@ -1,8 +1,9 @@
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
4
6
  include ClientError::Handling
5
- include Pluggable.new(:super_application_controller)
6
7
 
7
8
  helper_method :action_inquirer
8
9
  helper_method :controls
@@ -10,21 +11,26 @@ module Super
10
11
  # Displays a list of records to the user
11
12
  def index
12
13
  @records = controls.load_records(action: action_inquirer, params: params)
13
- @pagination = controls.initialize_pagination(action: action_inquirer, records: @records, query_params: request.GET)
14
- @records = controls.paginate_records(action: action_inquirer, records: @records, pagination: @pagination)
15
- @display = controls.display_schema(action: action_inquirer)
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)
16
20
  end
17
21
 
18
22
  # Displays a specific record to the user
19
23
  def show
20
24
  @record = controls.load_record(action: action_inquirer, params: params)
21
- @display = controls.display_schema(action: action_inquirer)
25
+ @display = controls.display_schema(action: action_inquirer).apply(action: action_inquirer)
26
+ @view = controls.show_view
22
27
  end
23
28
 
24
29
  # Displays a form to allow the user to create a new record
25
30
  def new
26
31
  @record = controls.build_record(action: action_inquirer)
27
32
  @form = controls.form_schema(action: action_inquirer)
33
+ @view = controls.new_view
28
34
  end
29
35
 
30
36
  # Creates a record, or shows the validation errors
@@ -35,6 +41,7 @@ module Super
35
41
  redirect_to polymorphic_path(Super.configuration.path_parts(@record))
36
42
  else
37
43
  @form = controls.form_schema(action: action_inquirer_for("new"))
44
+ @view = controls.new_view
38
45
  render :new, status: :bad_request
39
46
  end
40
47
  end
@@ -43,6 +50,7 @@ module Super
43
50
  def edit
44
51
  @record = controls.load_record(action: action_inquirer, params: params)
45
52
  @form = controls.form_schema(action: action_inquirer)
53
+ @view = controls.edit_view
46
54
  end
47
55
 
48
56
  # Updates a record, or shows validation errors
@@ -53,6 +61,7 @@ module Super
53
61
  redirect_to polymorphic_path(Super.configuration.path_parts(@record))
54
62
  else
55
63
  @form = controls.form_schema(action: action_inquirer_for("edit"))
64
+ @view = controls.edit_view
56
65
  render :edit, status: :bad_request
57
66
  end
58
67
  end
@@ -75,7 +84,7 @@ module Super
75
84
  private
76
85
 
77
86
  def controls
78
- Super::Controls.new(new_controls)
87
+ @controls ||= new_controls
79
88
  end
80
89
 
81
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
- <% if Super.configuration.asset_handler.sprockets? %>
13
- <%= stylesheet_link_tag "super/application", media: "all" %>
14
- <%= javascript_include_tag "super/application" %>
15
- <% elsif Super.configuration.asset_handler.webpacker? %>
16
- <%= stylesheet_pack_tag "super/application", media: "all" %>
17
- <%= javascript_pack_tag "super/application" %>
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
 
@@ -0,0 +1 @@
1
+ <%= rich_text %>
@@ -0,0 +1,6 @@
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>
6
+ <% end %>
@@ -0,0 +1,21 @@
1
+ <div class="super-field-group" data-controller="clean-filter-param">
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
+ data: { clean_filter_param_target: "candidate" }
10
+ ) %>
11
+ </div>
12
+ <div class="mt-3">
13
+ <%= form_field.super.select(
14
+ :q,
15
+ filter_type_select.field_type.collection,
16
+ {},
17
+ data: { clean_filter_param_target: "control candidate" }
18
+ ) %>
19
+ </div>
20
+ <% end %>
21
+ </div>
@@ -0,0 +1,18 @@
1
+ <div class="super-field-group" data-controller="clean-filter-param">
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
+ data: { clean_filter_param_target: "candidate" }
10
+ ) %>
11
+ </div>
12
+ <%= form_field.super.text_field(
13
+ :q,
14
+ class: "mt-3",
15
+ data: { clean_filter_param_target: "control candidate" }
16
+ ) %>
17
+ <% end %>
18
+ </div>
@@ -0,0 +1,24 @@
1
+ <div class="super-field-group" data-controller="clean-filter-param">
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
+ data: { clean_filter_param_target: "candidate" }
10
+ ) %>
11
+ </div>
12
+ <div class="flex items-center mt-3">
13
+ <div class="flex-initial">
14
+ <%= form_field.super.text_field(:q0, data: { clean_filter_param_target: "control candidate" }) %>
15
+ </div>
16
+ <div class="flex-initial px-2">
17
+ &ndash;
18
+ </div>
19
+ <div class="flex-initial">
20
+ <%= form_field.super.text_field(:q1, data: { clean_filter_param_target: "control candidate" }) %>
21
+ </div>
22
+ </div>
23
+ <% end %>
24
+ </div>
@@ -1,9 +1 @@
1
- <% if !local_assigns[:ungrouped] %>
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
- <% if !local_assigns[:ungrouped] %>
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
- <% if !local_assigns[:ungrouped] %>
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) %>
@@ -0,0 +1,18 @@
1
+ <%= render(Super::Panel.new) do %>
2
+ <h1 class="text-xl">Query</h1>
3
+ <%= super_form_for(
4
+ query,
5
+ url: query.path,
6
+ method: :get,
7
+ as: query.namespace,
8
+ html: { class: "mt-4" },
9
+ data: { controller: "clean-filter-params", action: "submit->clean-filter-params#call" }) do |form| %>
10
+ <% query.addons.each do |namespace, addon| %>
11
+ <%= form.fields_for namespace do |addon_form| %>
12
+ <%= render(addon, form: addon_form) %>
13
+ <% end %>
14
+ <% end %>
15
+
16
+ <%= form.super.submit "Apply", class: "super-button--border-gray mt-6" %>
17
+ <% end %>
18
+ <% end %>
@@ -0,0 +1,18 @@
1
+ <h1 class="text-lg mt-6">Sort</h1>
2
+ <div data-controller="apply-template">
3
+ <% sort.exprs.each.with_index do |expr, index| %>
4
+ <%= form.fields_for("exprs[]", expr.with_index(index)) do |expr_fields| %>
5
+ <%= render "sort_expression", expr_fields: expr_fields, sort: sort %>
6
+ <% end %>
7
+ <% end %>
8
+
9
+ <%= form.fields_for("exprs[]", sort.new_expr.with_index("TEMPLATEINDEX")) do |expr_fields| %>
10
+ <template data-apply-template-target="template">
11
+ <%= render "sort_expression", expr_fields: expr_fields, sort: sort %>
12
+ </template>
13
+ <% end %>
14
+
15
+ <a href="#" data-action="apply-template#call" class="block mt-2 text-sm">
16
+ Add
17
+ </a>
18
+ </div>
@@ -0,0 +1,25 @@
1
+ <div data-controller="delete clean-filter-param" class="mt-4">
2
+ <div class="flex items-center">
3
+ <div class="flex-auto">
4
+ <%= expr_fields.super.select(
5
+ :a,
6
+ sort.sortable_columns,
7
+ {},
8
+ {}
9
+ ) %>
10
+ </div>
11
+ <div class="flex-none w-2">
12
+ </div>
13
+ <div class="flex-auto">
14
+ <%= expr_fields.super.select(
15
+ :d,
16
+ sort.class::DIRECTIONS,
17
+ { include_blank: false },
18
+ {}
19
+ ) %>
20
+ </div>
21
+ <div class="flex-none pl-2">
22
+ <a href="#" data-action="delete#call" class="block text-black hover:text-red-600 h-4 w-4"><%= render("super/feather/x") %></a>
23
+ </div>
24
+ </div>
25
+ </div>
@@ -1,29 +1,29 @@
1
1
  <% super_layout.resolve(self) %>
2
2
 
3
3
  <% super_layout.resolved_headers.each do |partial| %>
4
- <%= super_render_partialish(partial) %>
4
+ <%= Super::Partial.render(partial, template: self) %>
5
5
  <% end %>
6
6
 
7
7
  <% if super_layout.resolved_asides.empty? %>
8
8
  <% super_layout.resolved_mains.each do |partial| %>
9
- <%= super_render_partialish(partial) %>
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
  <% super_layout.resolved_mains.each do |partial| %>
15
- <%= super_render_partialish(partial) %>
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
  <% super_layout.resolved_asides.each do |partial| %>
21
- <%= super_render_partialish(partial) %>
21
+ <%= Super::Partial.render(partial, template: self) %>
22
22
  <% end %>
23
23
  </div>
24
24
  </div>
25
25
  <% end %>
26
26
 
27
27
  <% super_layout.resolved_footers.each do |partial| %>
28
- <%= super_render_partialish(partial) %>
28
+ <%= Super::Partial.render(partial, template: self) %>
29
29
  <% end %>
@@ -0,0 +1,16 @@
1
+ <% if @pagination.necessary? %>
2
+ <div class="flex justify-end mr-2">
3
+ <div class="mt-4">
4
+ <% @pagination.each do |page_query_params, is_current_page, display| %>
5
+ <%= link_to(
6
+ display,
7
+ polymorphic_path(
8
+ Super.configuration.path_parts(controls.model),
9
+ page_query_params
10
+ ),
11
+ class: "inline-block ml-2 text-lg #{is_current_page ? " text-gray-900" : ""}"
12
+ ) %>
13
+ <% end %>
14
+ </div>
15
+ </div>
16
+ <% end %>
@@ -1,7 +1,7 @@
1
- <% if super_panel.resolve(self, block_given? ? Proc.new : nil).resolved_parts.any? %>
1
+ <% if super_panel.resolve(self, block_given? ? Proc.new { yield } : nil).resolved_parts.any? %>
2
2
  <div class="border rounded shadow border-gray-400 bg-white px-5 pt-4 pb-8 mt-6">
3
3
  <% super_panel.resolved_parts.each do |partial| %>
4
- <%= super_render_partialish(partial) %>
4
+ <%= Super::Partial.render(partial, template: self) %>
5
5
  <% end %>
6
6
  </div>
7
7
  <% end %>
@@ -1,18 +1,20 @@
1
1
  <div class="mt-4 overflow-x-auto">
2
- <table class="w-full border-separate" cellspacing="0" cellpadding="0">
3
- <thead>
2
+ <table class="w-full border-separate relative" cellspacing="0" cellpadding="0">
3
+ <thead class="">
4
4
  <tr class="">
5
- <% super_schema_display_index.field_keys.each do |column| %>
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"><%= column.to_s.humanize %></th>
5
+ <% super_schema_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
+ </th>
7
9
  <% end %>
8
10
  </tr>
9
11
  </thead>
10
12
  <tbody class="">
11
13
  <% @records.each.with_index do |record, row_index| %>
12
14
  <tr id="record-pk-<%= record.id %>" class="group">
13
- <% super_schema_display_index.field_keys.each do |column| %>
14
- <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 <%= Super::ViewHelper.classes(["bg-gray-100", row_index.odd?]) %>">
15
- <%= super_format_for_display(super_schema_display_index, record, column) %>
15
+ <% super_schema_display_index.each_attribute_name do |attribute_name| %>
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
+ <%= super_schema_display_index.render_field(template: self, record: record, column: attribute_name) %>
16
18
  </td>
17
19
  <% end %>
18
20
  </tr>
@@ -20,20 +22,3 @@
20
22
  </tbody>
21
23
  </table>
22
24
  </div>
23
-
24
- <% if @pagination.necessary? %>
25
- <div class="flex justify-end mr-2">
26
- <div class="mt-4">
27
- <% @pagination.each do |page_query_params, is_current_page, display| %>
28
- <%= link_to(
29
- display,
30
- polymorphic_path(
31
- Super.configuration.path_parts(controls.model),
32
- page_query_params
33
- ),
34
- class: "inline-block ml-2 text-lg #{is_current_page ? " text-gray-900" : ""}"
35
- ) %>
36
- <% end %>
37
- </div>
38
- </div>
39
- <% end %>