super 0.0.5 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +4 -1
  3. data/CONTRIBUTING.md +56 -0
  4. data/README.md +68 -38
  5. data/STABILITY.md +50 -0
  6. data/app/assets/javascripts/super/application.js +1170 -359
  7. data/app/assets/stylesheets/super/application.css +78105 -50441
  8. data/app/controllers/super/application_controller.rb +44 -52
  9. data/app/helpers/super/form_builder_helper.rb +23 -0
  10. data/app/views/layouts/super/application.html.erb +26 -6
  11. data/app/views/super/application/{_resources_header.html.erb → _collection_header.html.erb} +5 -6
  12. data/app/views/super/application/_display_rich_text.html.erb +1 -0
  13. data/app/views/super/application/_filter.html.erb +14 -0
  14. data/app/views/super/application/_filter_type_select.html.erb +18 -0
  15. data/app/views/super/application/_filter_type_text.html.erb +16 -0
  16. data/app/views/super/application/_filter_type_timestamp.html.erb +23 -0
  17. data/app/views/super/application/_flash.html.erb +13 -13
  18. data/app/views/super/application/_form_field__destroy.html.erb +1 -9
  19. data/app/views/super/application/_form_field_checkbox.html.erb +1 -0
  20. data/app/views/super/application/_form_field_rich_text_area.html.erb +1 -0
  21. data/app/views/super/application/_form_field_select.html.erb +1 -23
  22. data/app/views/super/application/_form_field_text.html.erb +1 -13
  23. data/app/views/super/application/_form_has_many.html.erb +1 -1
  24. data/app/views/super/application/{_resource_header.html.erb → _member_header.html.erb} +6 -6
  25. data/app/views/super/application/_super_layout.html.erb +12 -17
  26. data/app/views/super/application/_super_pagination.html.erb +16 -0
  27. data/app/views/super/application/_super_panel.html.erb +3 -7
  28. data/app/views/super/application/_super_schema_display_actions.html.erb +5 -0
  29. data/app/views/super/application/_super_schema_display_index.html.erb +24 -0
  30. data/app/views/super/application/_super_schema_display_show.html.erb +8 -0
  31. data/app/views/super/application/_super_schema_form.html.erb +15 -0
  32. data/app/views/super/application/edit.html.erb +2 -6
  33. data/app/views/super/application/index.html.erb +2 -6
  34. data/app/views/super/application/new.html.erb +2 -6
  35. data/app/views/super/application/show.html.erb +2 -6
  36. data/app/views/super/feather/{_chevron_down.svg → _chevron_down.html} +0 -0
  37. data/config/locales/en.yml +5 -0
  38. data/docs/README.md +4 -2
  39. data/docs/action_text.md +48 -0
  40. data/docs/cheat.md +41 -0
  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/frontend/super-frontend/dist/application.css +78105 -50441
  46. data/frontend/super-frontend/dist/application.js +1170 -359
  47. data/lib/generators/super/action_text/USAGE +23 -0
  48. data/lib/generators/super/action_text/action_text_generator.rb +30 -0
  49. data/lib/generators/super/action_text/templates/pack_super_action_text.css +23 -0
  50. data/lib/generators/super/action_text/templates/pack_super_action_text.js +4 -0
  51. data/lib/generators/super/install/install_generator.rb +16 -0
  52. data/lib/generators/super/resource/templates/resources_controller.rb.tt +1 -31
  53. data/lib/generators/super/webpacker/USAGE +5 -4
  54. data/lib/generators/super/webpacker/webpacker_generator.rb +3 -2
  55. data/lib/super.rb +21 -3
  56. data/lib/super/action_inquirer.rb +2 -2
  57. data/lib/super/assets.rb +112 -38
  58. data/lib/super/client_error.rb +43 -0
  59. data/lib/super/compatibility.rb +13 -1
  60. data/lib/super/configuration.rb +21 -69
  61. data/lib/super/controls.rb +9 -116
  62. data/lib/super/controls/optional.rb +79 -0
  63. data/lib/super/controls/required.rb +13 -0
  64. data/lib/super/controls/steps.rb +114 -0
  65. data/lib/super/display.rb +66 -3
  66. data/lib/super/display/guesser.rb +34 -0
  67. data/lib/super/display/schema_types.rb +61 -25
  68. data/lib/super/engine.rb +9 -1
  69. data/lib/super/error.rb +17 -9
  70. data/lib/super/filter.rb +12 -0
  71. data/lib/super/filter/form_object.rb +97 -0
  72. data/lib/super/filter/guesser.rb +30 -0
  73. data/lib/super/filter/operator.rb +103 -0
  74. data/lib/super/filter/plugin.rb +47 -0
  75. data/lib/super/filter/schema_types.rb +112 -0
  76. data/lib/super/form.rb +35 -0
  77. data/lib/super/form/builder.rb +204 -0
  78. data/lib/super/form/guesser.rb +27 -0
  79. data/lib/super/form/inline_errors.rb +26 -0
  80. data/lib/super/form/schema_types.rb +29 -22
  81. data/lib/super/form/strong_params.rb +29 -0
  82. data/lib/super/layout.rb +28 -0
  83. data/lib/super/link.rb +55 -32
  84. data/lib/super/pagination.rb +55 -0
  85. data/lib/super/panel.rb +13 -0
  86. data/lib/super/partial.rb +12 -0
  87. data/lib/super/partial/resolving.rb +24 -0
  88. data/lib/super/plugin.rb +34 -63
  89. data/lib/super/schema.rb +12 -22
  90. data/lib/super/schema/common.rb +25 -0
  91. data/lib/super/schema/guesser.rb +77 -0
  92. data/lib/super/version.rb +1 -1
  93. data/lib/super/view_helper.rb +1 -20
  94. metadata +90 -33
  95. data/app/helpers/super/application_helper.rb +0 -32
  96. data/app/views/super/application/_form.html.erb +0 -17
  97. data/app/views/super/application/_form_inline_errors.html.erb +0 -10
  98. data/app/views/super/application/_index.html.erb +0 -45
  99. data/app/views/super/application/_show.html.erb +0 -10
  100. data/docs/controls.md +0 -39
  101. data/frontend/super-frontend/build.js +0 -36
  102. data/frontend/super-frontend/package.json +0 -21
  103. data/frontend/super-frontend/postcss.config.js +0 -6
  104. data/frontend/super-frontend/src/javascripts/super/application.ts +0 -18
  105. data/frontend/super-frontend/src/javascripts/super/apply_template_controller.ts +0 -21
  106. data/frontend/super-frontend/src/javascripts/super/rails__ujs.d.ts +0 -1
  107. data/frontend/super-frontend/src/javascripts/super/toggle_pending_destruction_controller.ts +0 -15
  108. data/frontend/super-frontend/src/stylesheets/super/application.css +0 -77
  109. data/frontend/super-frontend/tailwind.config.js +0 -9
  110. data/frontend/super-frontend/tsconfig.json +0 -13
  111. data/frontend/super-frontend/yarn.lock +0 -5540
  112. data/lib/super/step.rb +0 -36
  113. 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 Pluggable.new(:super_application_controller)
4
+ include ClientError::Handling
5
5
 
6
6
  helper_method :action_inquirer
7
7
  helper_method :controls
8
8
 
9
- rescue_from Error::ClientError do |exception|
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
- @resources = Step.load_resources(controls, params, action_inquirer)
36
- @pagination = Step.initialize_pagination(@resources, request.GET)
37
- @resources = Step.paginate_resources(@resources, @pagination)
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
- @resource = Step.load_resource(controls, params, action_inquirer)
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
- @resource = Step.build_resource(controls, action_inquirer)
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
- @resource = Step.build_resource_with_params(controls, action_inquirer, create_permitted_params)
32
+ @record = controls.build_record_with_params(action: action_inquirer, params: params)
50
33
 
51
- if @resource.save
52
- 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))
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
- @resource = Step.load_resource(controls, params, action_inquirer)
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
- @resource = Step.load_resource(controls, params, action_inquirer)
52
+ @record = controls.load_record(action: action_inquirer, params: params)
64
53
 
65
- if @resource.update(update_permitted_params)
66
- redirect_to polymorphic_path(Super.configuration.path_parts(@resource))
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
- @resource = Step.load_resource(controls, params, action_inquirer)
65
+ @record = controls.load_record(action: action_inquirer, params: params)
74
66
 
75
- if @resource.destroy
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
- redirect_to polymorphic_path(Super.configuration.path_parts(@resource))
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
- Super::Controls.new(new_controls)
81
+ @controls ||= new_controls
86
82
  end
87
83
 
88
- def create_permitted_params
89
- controls.permitted_params(params, action: action_inquirer)
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 action_inquirer
97
- @action_inquirer ||= ActionInquirer.new(
98
- ActionInquirer.default_resources,
99
- params[:action]
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
- <% 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
 
@@ -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.resources_actions(params: params, action: action_inquirer).each do |link| %>
7
- <%= link_to(
8
- link.text,
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,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
+ &ndash;
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 data-flash="anchor">
9
- <% flash.each do |level, messages| %>
10
- <% Array(messages).each do |message| %>
11
- <% color = colors[level.to_s] || colors["notice"] %>
12
- <div class="<%= "%<bg>s %<fg>s border-l-4 %<border>s p-4 mt-2" % color %>">
13
- <%= message %>
14
- </div>
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
- <% end %>
17
- </div>
16
+ </div>
17
+ <% end %>
@@ -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.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
- <% 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) %>
@@ -10,7 +10,7 @@
10
10
  child_index: "TEMPLATEINDEX"
11
11
  ) do |ff|
12
12
  %>
13
- <template data-target="apply-template.template">
13
+ <template data-apply-template-target="template">
14
14
  <%= render "form_fieldset", form_fieldset: form_has_many, form: ff %>
15
15
  </template>
16
16
  <% end %>
@@ -3,13 +3,13 @@
3
3
  <%= controls.title %>
4
4
  </h1>
5
5
  <div>
6
- <% controls.resource_actions(@resource, params: params, action: action_inquirer).each do |link| %>
7
- <%= link_to(
8
- link.text,
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
- <% super_layout_headers.each do |partial| %>
9
- <%= super_render_partialish(partial) %>
3
+ <% super_layout.resolved_headers.each do |partial| %>
4
+ <%= Super::Partial.render(partial, template: self) %>
10
5
  <% end %>
11
6
 
12
- <% if super_layout_asides.empty? %>
13
- <% super_layout_mains.each do |partial| %>
14
- <%= super_render_partialish(partial) %>
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
- <% super_layout_mains.each do |partial| %>
20
- <%= super_render_partialish(partial) %>
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
- <% super_layout_asides.each do |partial| %>
26
- <%= super_render_partialish(partial) %>
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
- <% super_layout_footers.each do |partial| %>
33
- <%= super_render_partialish(partial) %>
27
+ <% super_layout.resolved_footers.each do |partial| %>
28
+ <%= Super::Partial.render(partial, template: self) %>
34
29
  <% end %>