super 0.0.1 → 0.0.6

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.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +11 -0
  3. data/README.md +64 -78
  4. data/Rakefile +3 -1
  5. data/app/assets/config/super_manifest.js +2 -1
  6. data/app/assets/javascripts/super/application.js +1252 -316
  7. data/app/assets/stylesheets/super/application.css +102704 -17321
  8. data/app/controllers/super/application_controller.rb +50 -42
  9. data/app/helpers/super/application_helper.rb +39 -0
  10. data/app/views/layouts/super/application.html.erb +11 -7
  11. data/app/views/super/application/_collection_header.html.erb +15 -0
  12. data/app/views/super/application/_flash.html.erb +17 -0
  13. data/app/views/super/application/_form_field__destroy.html.erb +9 -0
  14. data/app/views/super/application/_form_field_select.html.erb +23 -0
  15. data/app/views/super/application/_form_field_text.html.erb +13 -0
  16. data/app/views/super/application/_form_fieldset.html.erb +8 -0
  17. data/app/views/super/application/_form_has_many.html.erb +21 -0
  18. data/app/views/super/application/_form_has_one.html.erb +11 -0
  19. data/app/views/super/application/_form_inline_errors.html.erb +10 -0
  20. data/app/views/super/application/_member_header.html.erb +16 -0
  21. data/app/views/super/application/_super_layout.html.erb +29 -0
  22. data/app/views/super/application/_super_panel.html.erb +7 -0
  23. data/app/views/super/application/_super_schema_display_actions.html.erb +5 -0
  24. data/app/views/super/application/_super_schema_display_index.html.erb +39 -0
  25. data/app/views/super/application/_super_schema_display_show.html.erb +8 -0
  26. data/app/views/super/application/_super_schema_form.html.erb +15 -0
  27. data/app/views/super/application/edit.html.erb +4 -5
  28. data/app/views/super/application/index.html.erb +6 -1
  29. data/app/views/super/application/new.html.erb +4 -5
  30. data/app/views/super/application/nothing.html.erb +0 -0
  31. data/app/views/super/application/show.html.erb +6 -10
  32. data/app/views/super/feather/{_chevron_down.svg → _chevron_down.html} +0 -0
  33. data/config/locales/en.yml +5 -0
  34. data/docs/README.md +6 -0
  35. data/docs/cheat.md +41 -0
  36. data/docs/faq.md +44 -0
  37. data/docs/quick_start.md +45 -0
  38. data/docs/webpacker.md +17 -0
  39. data/docs/yard_customizations.rb +41 -0
  40. data/frontend/super-frontend/build.js +14 -12
  41. data/frontend/super-frontend/dist/application.css +102704 -17321
  42. data/frontend/super-frontend/dist/application.js +1252 -316
  43. data/frontend/super-frontend/package.json +11 -4
  44. data/frontend/super-frontend/postcss.config.js +4 -4
  45. data/frontend/super-frontend/src/javascripts/super/application.ts +18 -0
  46. data/frontend/super-frontend/src/javascripts/super/apply_template_controller.ts +19 -0
  47. data/frontend/super-frontend/src/javascripts/super/rails__ujs.d.ts +1 -0
  48. data/frontend/super-frontend/src/javascripts/super/toggle_pending_destruction_controller.ts +15 -0
  49. data/frontend/super-frontend/src/stylesheets/super/application.css +63 -0
  50. data/frontend/super-frontend/tailwind.config.js +12 -4
  51. data/frontend/super-frontend/tsconfig.json +13 -0
  52. data/frontend/super-frontend/yarn.lock +1891 -1798
  53. data/lib/generators/super/install/USAGE +4 -2
  54. data/lib/generators/super/install/install_generator.rb +18 -3
  55. data/lib/generators/super/resource/USAGE +1 -2
  56. data/lib/generators/super/resource/resource_generator.rb +0 -2
  57. data/lib/generators/super/resource/templates/resources_controller.rb.tt +38 -2
  58. data/lib/generators/super/webpacker/webpacker_generator.rb +8 -0
  59. data/lib/super.rb +10 -5
  60. data/lib/super/action_inquirer.rb +101 -0
  61. data/lib/super/assets.rb +1 -0
  62. data/lib/super/client_error.rb +43 -0
  63. data/lib/super/compatibility.rb +13 -0
  64. data/lib/super/configuration.rb +60 -45
  65. data/lib/super/controls.rb +26 -15
  66. data/lib/super/controls/optional.rb +65 -0
  67. data/lib/super/controls/required.rb +41 -0
  68. data/lib/super/controls/steps.rb +115 -0
  69. data/lib/super/display/schema_types.rb +60 -18
  70. data/lib/super/engine.rb +1 -0
  71. data/lib/super/error.rb +10 -1
  72. data/lib/super/form.rb +48 -0
  73. data/lib/super/form/schema_types.rb +96 -21
  74. data/lib/super/layout.rb +47 -0
  75. data/lib/super/link.rb +110 -0
  76. data/lib/super/navigation/automatic.rb +2 -0
  77. data/lib/super/pagination.rb +19 -8
  78. data/lib/super/panel.rb +30 -0
  79. data/lib/super/partial.rb +11 -0
  80. data/lib/super/partial/resolving.rb +24 -0
  81. data/lib/super/schema.rb +64 -1
  82. data/lib/super/version.rb +1 -1
  83. data/lib/super/view_helper.rb +43 -0
  84. metadata +145 -38
  85. data/app/views/super/application/_form.html.erb +0 -13
  86. data/app/views/super/application/_form_field.html.erb +0 -7
  87. data/app/views/super/application/_form_generic_select.html.erb +0 -19
  88. data/app/views/super/application/_form_generic_text.html.erb +0 -7
  89. data/app/views/super/application/_index.html.erb +0 -58
  90. data/frontend/super-frontend/src/javascripts/super/application.js +0 -11
  91. data/lib/generators/super/resource/templates/resource_dashboard.rb.tt +0 -65
  92. data/lib/super/display.rb +0 -9
  93. data/lib/super/inline_callback.rb +0 -82
  94. data/lib/super/test_support/fixtures/members.yml +0 -336
  95. data/lib/super/test_support/fixtures/ships.yml +0 -10
  96. data/lib/super/test_support/setup.rb +0 -79
  97. data/lib/super/test_support/starfleet_seeder.rb +0 -49
  98. data/lib/super/test_support/templates/20190216224956_create_members.rb +0 -11
  99. data/lib/super/test_support/templates/20190803143320_create_ships.rb +0 -11
  100. data/lib/super/test_support/templates/20190806014121_add_ship_to_members.rb +0 -5
  101. data/lib/super/test_support/templates/admin/members_controller.rb +0 -9
  102. data/lib/super/test_support/templates/admin/ships_controller.rb +0 -9
  103. data/lib/super/test_support/templates/admin_controller.rb +0 -2
  104. data/lib/super/test_support/templates/member.rb +0 -16
  105. data/lib/super/test_support/templates/member_dashboard.rb +0 -90
  106. data/lib/super/test_support/templates/routes.rb +0 -10
  107. data/lib/super/test_support/templates/seeds.rb +0 -2
  108. data/lib/super/test_support/templates/ship.rb +0 -3
  109. data/lib/super/test_support/templates/ship_dashboard.rb +0 -79
  110. data/lib/super/view.rb +0 -25
  111. data/lib/tasks/super_tasks.rake +0 -4
@@ -1,84 +1,92 @@
1
1
  module Super
2
+ # Provides a default implementation for each of the resourceful actions
2
3
  class ApplicationController < ActionController::Base
3
- include Super::InlineCallback
4
+ include ClientError::Handling
4
5
  include Pluggable.new(:super_application_controller)
5
6
 
6
- register_inline_callback(:index_paginate, on: :index, after: :yield)
7
-
7
+ helper_method :action_inquirer
8
8
  helper_method :controls
9
9
 
10
+ # Displays a list of records to the user
10
11
  def index
11
- with_inline_callbacks do
12
- @resources = controls.index_scope
13
- end
12
+ @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)
16
+ end
17
+
18
+ # Displays a specific record to the user
19
+ def show
20
+ @record = controls.load_record(action: action_inquirer, params: params)
21
+ @display = controls.display_schema(action: action_inquirer)
14
22
  end
15
23
 
24
+ # Displays a form to allow the user to create a new record
25
+ def new
26
+ @record = controls.build_record(action: action_inquirer)
27
+ @form = controls.form_schema(action: action_inquirer)
28
+ end
29
+
30
+ # Creates a record, or shows the validation errors
16
31
  def create
17
- @resource = controls.create_scope.build(create_permitted_params)
32
+ @record = controls.build_record_with_params(action: action_inquirer, params: params)
18
33
 
19
- if @resource.save
20
- redirect_to polymorphic_path(Super.configuration.path_parts(@resource))
34
+ if controls.save_record(action: action_inquirer, record: @record, params: params)
35
+ redirect_to polymorphic_path(Super.configuration.path_parts(@record))
21
36
  else
37
+ @form = controls.form_schema(action: action_inquirer_for("new"))
22
38
  render :new, status: :bad_request
23
39
  end
24
40
  end
25
41
 
26
- def new
27
- @resource = controls.new_scope.build
28
- end
29
-
42
+ # Displays a form to allow the user to update an existing record
30
43
  def edit
31
- @resource = controls.edit_scope.find(params[:id])
32
- end
33
-
34
- def show
35
- @resource = controls.show_scope.find(params[:id])
44
+ @record = controls.load_record(action: action_inquirer, params: params)
45
+ @form = controls.form_schema(action: action_inquirer)
36
46
  end
37
47
 
48
+ # Updates a record, or shows validation errors
38
49
  def update
39
- @resource = controls.update_scope.find(params[:id])
50
+ @record = controls.load_record(action: action_inquirer, params: params)
40
51
 
41
- if @resource.update(update_permitted_params)
42
- redirect_to polymorphic_path(Super.configuration.path_parts(@resource))
52
+ if controls.update_record(action: action_inquirer, record: @record, params: params)
53
+ redirect_to polymorphic_path(Super.configuration.path_parts(@record))
43
54
  else
55
+ @form = controls.form_schema(action: action_inquirer_for("edit"))
44
56
  render :edit, status: :bad_request
45
57
  end
46
58
  end
47
59
 
60
+ # Deletes a record, or shows validation errors
48
61
  def destroy
49
- @resource = controls.destroy_scope.find(params[:id])
50
- if @resource.destroy
62
+ @record = controls.load_record(action: action_inquirer, params: params)
63
+
64
+ if controls.destroy_record(action: action_inquirer, record: @record, params: params)
51
65
  redirect_to polymorphic_path(Super.configuration.path_parts(controls.model))
52
66
  else
53
- redirect_to polymorphic_path(Super.configuration.path_parts(@resource))
67
+ flash.alert = "Couldn't delete record"
68
+ redirect_to polymorphic_path(Super.configuration.path_parts(@record))
54
69
  end
70
+ rescue ActiveRecord::InvalidForeignKey => e
71
+ flash.alert = "Couldn't delete record: #{e.class}"
72
+ redirect_to polymorphic_path(Super.configuration.path_parts(@record))
55
73
  end
56
74
 
57
75
  private
58
76
 
59
- def index_paginate
60
- @pagination = Pagination.new(
61
- total_count: @resources.size,
62
- limit: Super.configuration.index_resources_per_page,
63
- query_params: request.GET,
64
- page_query_param: :page
65
- )
66
-
67
- @resources = @resources
68
- .limit(@pagination.limit)
69
- .offset(@pagination.offset)
70
- end
71
-
72
77
  def controls
73
- Controls.new(dashboard)
78
+ Super::Controls.new(new_controls)
74
79
  end
75
80
 
76
- def create_permitted_params
77
- controls.create_permitted_params(params)
81
+ def action_inquirer
82
+ @action_inquirer ||= action_inquirer_for(params[:action])
78
83
  end
79
84
 
80
- def update_permitted_params
81
- controls.update_permitted_params(params)
85
+ def action_inquirer_for(action)
86
+ ActionInquirer.new(
87
+ ActionInquirer.default_for_resources,
88
+ action
89
+ )
82
90
  end
83
91
  end
84
92
  end
@@ -0,0 +1,39 @@
1
+ module Super
2
+ # View helpers, available within views
3
+ module ApplicationHelper
4
+ def super_render_partialish(partialish)
5
+ if partialish.respond_to?(:to_partial_path)
6
+ if partialish.is_a?(Super::Partial)
7
+ render(partialish, partialish.locals)
8
+ else
9
+ render(partialish)
10
+ end
11
+ else
12
+ partialish
13
+ end
14
+ end
15
+
16
+ def super_format_for_display(schema, record, column)
17
+ formatter = schema.fields[column]
18
+
19
+ formatted =
20
+ if formatter.real?
21
+ value = record.public_send(column)
22
+ formatter.present(value)
23
+ else
24
+ formatter.present
25
+ end
26
+
27
+ if formatted.respond_to?(:to_partial_path)
28
+ if formatted.respond_to?(:locals)
29
+ formatted.locals[:record] ||= record
30
+ render(formatted, formatted.locals)
31
+ else
32
+ render(formatted)
33
+ end
34
+ else
35
+ formatted
36
+ end
37
+ end
38
+ end
39
+ end
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html class="bg-white">
2
+ <html class="bg-gray-100">
3
3
  <head>
4
4
  <title><%= Super.configuration.title %></title>
5
5
  <%= csrf_meta_tags %>
@@ -7,6 +7,8 @@
7
7
  <%= csp_meta_tag %>
8
8
  <% end -%>
9
9
 
10
+ <meta name="viewport" content="width=device-width, initial-scale=1">
11
+
10
12
  <% if Super.configuration.asset_handler.sprockets? %>
11
13
  <%= stylesheet_link_tag "super/application", media: "all" %>
12
14
  <%= javascript_include_tag "super/application" %>
@@ -16,10 +18,10 @@
16
18
  <% end %>
17
19
  </head>
18
20
 
19
- <body class="font-sans bg-white">
21
+ <body class="font-sans pb-4">
20
22
  <div class="px-4">
21
23
  <header class="pt-4">
22
- <h1 class="text-base font-bold mr-6"><%= Super.configuration.title %></h1>
24
+ <h1 class="text-lg font-bold mr-6 mb-1"><%= Super.configuration.title %></h1>
23
25
  <%
24
26
  route_namespace = Super.configuration.route_namespace.map(&:to_s).join("/")
25
27
  Super::Navigation::Automatic.new(route_namespace: route_namespace).each do |text, href| %>
@@ -27,13 +29,15 @@
27
29
  <% end %>
28
30
  </header>
29
31
 
30
- <div class="pt-8"></div>
32
+ <%= render "flash" %>
31
33
 
32
- <% if content_for?(:header) %>
33
- <%= yield :header %>
34
- <% end %>
34
+ <div class="pt-4"></div>
35
35
 
36
36
  <%= yield %>
37
+
38
+ <div class="pt-8 text-sm text-gray-800">
39
+ <%= t("super.layout.powered_by", env: Rails.env.capitalize, version: Super::VERSION) %>
40
+ </div>
37
41
  </div>
38
42
  </body>
39
43
  </html>
@@ -0,0 +1,15 @@
1
+ <header class="flex justify-between content-end">
2
+ <h1 class="text-xl">
3
+ <%= controls.title %>
4
+ </h1>
5
+ <div>
6
+ <% controls.collection_actions(action: action_inquirer).each do |link| %>
7
+ <%= link.to_s(
8
+ default_options: {
9
+ class: "super-button super-button--border-blue super-button-sm inline-block ml-2"
10
+ },
11
+ params: params
12
+ ) %>
13
+ <% end %>
14
+ </div>
15
+ </header>
@@ -0,0 +1,17 @@
1
+ <% if flash.any? %>
2
+ <% colors = {
3
+ "notice" => { bg: "bg-blue-100", fg: "text-blue-400", border: "border-blue-600" },
4
+ "alert" => { bg: "bg-red-100", fg: "text-red-400", border: "border-red-600" },
5
+ } %>
6
+
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
+ <% end %>
16
+ </div>
17
+ <% end %>
@@ -0,0 +1,9 @@
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 %>
@@ -0,0 +1,23 @@
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 %>
@@ -0,0 +1,13 @@
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 %>
@@ -0,0 +1,8 @@
1
+ <fieldset class="border border-gray-300 rounded pb-4 px-4 mt-4 shadow" data-controller="toggle-pending-destruction">
2
+ <% if form_fieldset.label.present? %>
3
+ <legend class="bg-white p-1 -mx-1"><%= form_fieldset.label %></legend>
4
+ <% end %>
5
+ <% form_fieldset.nested_fields.each do |field, type| %>
6
+ <%= render(type, form: form, column: field) %>
7
+ <% end %>
8
+ </fieldset>
@@ -0,0 +1,21 @@
1
+ <div data-controller="apply-template">
2
+ <%= form.fields_for(form_has_many.reader) do |ff| %>
3
+ <%= render "form_fieldset", form_fieldset: form_has_many, form: ff %>
4
+ <% end %>
5
+
6
+ <%=
7
+ form.fields_for(
8
+ form_has_many.reader,
9
+ form.object.public_send(form_has_many.reader).build,
10
+ child_index: "TEMPLATEINDEX"
11
+ ) do |ff|
12
+ %>
13
+ <template data-apply-template-target="template">
14
+ <%= render "form_fieldset", form_fieldset: form_has_many, form: ff %>
15
+ </template>
16
+ <% end %>
17
+
18
+ <a href="#" data-action="apply-template#call" class="super-button super-button--fill-blue mt-2 inline-block">
19
+ Add <%= form_has_many.label %>
20
+ </a>
21
+ </div>
@@ -0,0 +1,11 @@
1
+ <div>
2
+ <%
3
+ if form.object.public_send(form_has_one.reader).nil?
4
+ form.object.public_send("build_" + form_has_one.reader.to_s)
5
+ end
6
+ %>
7
+
8
+ <%= form.fields_for(form_has_one.reader) do |ff| %>
9
+ <%= render "form_fieldset", form_fieldset: form_has_one, form: ff %>
10
+ <% end %>
11
+ </div>
@@ -0,0 +1,10 @@
1
+ <% if form.object %>
2
+ <% Super::ViewHelper.errors_accounting_for_reflections(form.object, column).each do |error_message| %>
3
+ <p class="text-red-400 text-xs italic pt-1"><%= error_message %></p>
4
+ <% end %>
5
+ <% else %>
6
+ <p class="text-red-400 text-xs italic pt-1">
7
+ This form doesn't have an object, so something is probably wrong.
8
+ Maybe <code>accepts_nested_attributes_for</code> isn't set up?
9
+ </p>
10
+ <% end %>
@@ -0,0 +1,16 @@
1
+ <header class="flex justify-between content-end">
2
+ <h1 class="text-xl">
3
+ <%= controls.title %>
4
+ </h1>
5
+ <div>
6
+ <% controls.member_actions(action: action_inquirer).each do |link| %>
7
+ <%= link.to_s(
8
+ default_options: {
9
+ class: "super-button super-button--border-blue super-button-sm inline-block ml-2"
10
+ },
11
+ record: @record,
12
+ params: params
13
+ ) %>
14
+ <% end %>
15
+ </div>
16
+ </header>
@@ -0,0 +1,29 @@
1
+ <% super_layout.resolve(self) %>
2
+
3
+ <% super_layout.resolved_headers.each do |partial| %>
4
+ <%= super_render_partialish(partial) %>
5
+ <% end %>
6
+
7
+ <% if super_layout.resolved_asides.empty? %>
8
+ <% super_layout.resolved_mains.each do |partial| %>
9
+ <%= super_render_partialish(partial) %>
10
+ <% end %>
11
+ <% else %>
12
+ <div class="clearfix -mx-2">
13
+ <div class="md:float-left md:w-9/12 px-2">
14
+ <% super_layout.resolved_mains.each do |partial| %>
15
+ <%= super_render_partialish(partial) %>
16
+ <% end %>
17
+ </div>
18
+
19
+ <div class="md:float-right md:w-3/12 px-2">
20
+ <% super_layout.resolved_asides.each do |partial| %>
21
+ <%= super_render_partialish(partial) %>
22
+ <% end %>
23
+ </div>
24
+ </div>
25
+ <% end %>
26
+
27
+ <% super_layout.resolved_footers.each do |partial| %>
28
+ <%= super_render_partialish(partial) %>
29
+ <% end %>
@@ -0,0 +1,7 @@
1
+ <% if super_panel.resolve(self, block_given? ? Proc.new : nil).resolved_parts.any? %>
2
+ <div class="border rounded shadow border-gray-400 bg-white px-5 pt-4 pb-8 mt-6">
3
+ <% super_panel.resolved_parts.each do |partial| %>
4
+ <%= super_render_partialish(partial) %>
5
+ <% end %>
6
+ </div>
7
+ <% end %>
@@ -0,0 +1,5 @@
1
+ <div>
2
+ <% controls.member_actions(action: action_inquirer).each do |link| %>
3
+ <span class="pr-2 last:pr-0"><%= link.to_s(record: record, params: params) %></span>
4
+ <% end %>
5
+ </div>
@@ -0,0 +1,39 @@
1
+ <div class="mt-4 overflow-x-auto">
2
+ <table class="w-full border-separate" cellspacing="0" cellpadding="0">
3
+ <thead>
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>
7
+ <% end %>
8
+ </tr>
9
+ </thead>
10
+ <tbody class="">
11
+ <% @records.each.with_index do |record, row_index| %>
12
+ <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) %>
16
+ </td>
17
+ <% end %>
18
+ </tr>
19
+ <% end %>
20
+ </tbody>
21
+ </table>
22
+ </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 %>