katalyst-koi 4.18.1 → 5.0.0.alpha.1
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.
- checksums.yaml +4 -4
- data/app/assets/images/koi/icons/add.svg +3 -0
- data/app/assets/images/koi/icons/close.svg +1 -0
- data/app/assets/images/koi/koi.png +0 -0
- data/app/assets/javascripts/koi/controllers/file_field_controller.js +2 -2
- data/app/assets/javascripts/koi/controllers/index.js +0 -3
- data/app/assets/javascripts/koi/controllers/koi/modal_controller.js +40 -0
- data/app/assets/javascripts/koi/controllers/navigation_controller.js +14 -21
- data/app/assets/javascripts/koi/controllers/webauthn_registration_controller.js +4 -1
- data/app/assets/stylesheets/koi/blocks/actions.css +8 -0
- data/app/assets/stylesheets/koi/blocks/application-header.css +15 -0
- data/app/assets/stylesheets/koi/blocks/application-navigation.css +54 -0
- data/app/assets/stylesheets/koi/blocks/button.css +90 -0
- data/app/assets/stylesheets/koi/blocks/flash.css +19 -0
- data/app/assets/stylesheets/koi/blocks/icon.css +15 -0
- data/app/assets/stylesheets/koi/blocks/index.css +13 -0
- data/app/assets/stylesheets/koi/blocks/modal.css +26 -0
- data/app/assets/stylesheets/koi/blocks/navigation.css +23 -0
- data/app/assets/stylesheets/koi/blocks/page-header.css +31 -0
- data/app/assets/stylesheets/koi/blocks/pagy.css +82 -0
- data/app/assets/stylesheets/koi/blocks/prose.css +37 -0
- data/app/assets/stylesheets/koi/blocks/tables/index.css +4 -0
- data/app/assets/stylesheets/koi/{components/_query.scss → blocks/tables/query.css} +13 -13
- data/app/assets/stylesheets/koi/{base/_tables.scss → blocks/tables/table.css} +11 -59
- data/app/assets/stylesheets/koi/compositions/cover.css +17 -0
- data/app/assets/stylesheets/koi/{base/_flow.scss → compositions/flow.css} +1 -1
- data/app/assets/stylesheets/koi/compositions/index.css +4 -0
- data/app/assets/stylesheets/koi/compositions/wrapper.css +11 -0
- data/app/assets/stylesheets/koi/forms/caption.css +22 -0
- data/app/assets/stylesheets/koi/forms/checkboxes.css +153 -0
- data/app/assets/stylesheets/koi/forms/date-input.css +12 -0
- data/app/assets/stylesheets/koi/{components/_document-field.scss → forms/document-field.css} +20 -15
- data/app/assets/stylesheets/koi/forms/errors.css +38 -0
- data/app/assets/stylesheets/koi/forms/fieldset.css +73 -0
- data/app/assets/stylesheets/koi/forms/file-upload.css +20 -0
- data/app/assets/stylesheets/koi/forms/form-group.css +19 -0
- data/app/assets/stylesheets/koi/forms/hint.css +11 -0
- data/app/assets/stylesheets/koi/forms/image-field.css +96 -0
- data/app/assets/stylesheets/koi/forms/index.css +44 -0
- data/app/assets/stylesheets/koi/forms/input.css +194 -0
- data/app/assets/stylesheets/koi/forms/label.css +43 -0
- data/app/assets/stylesheets/koi/forms/password.css +18 -0
- data/app/assets/stylesheets/koi/forms/radios.css +162 -0
- data/app/assets/stylesheets/koi/forms/select.css +18 -0
- data/app/assets/stylesheets/koi/forms/textarea.css +3 -0
- data/app/assets/stylesheets/koi/forms/trix.css +33 -0
- data/app/assets/stylesheets/koi/global/fonts.css +22 -0
- data/app/assets/stylesheets/koi/global/global-styles.css +297 -0
- data/app/assets/stylesheets/koi/global/reset.css +98 -0
- data/app/assets/stylesheets/koi/global/variables.css +97 -0
- data/app/assets/stylesheets/koi/icons.css +14 -0
- data/app/assets/stylesheets/koi/{admin.scss → index.css} +16 -7
- data/app/assets/stylesheets/koi/login.css +26 -0
- data/app/assets/stylesheets/koi/themes/_index.scss +0 -1
- data/app/assets/stylesheets/koi/utilities/index.css +1 -0
- data/app/assets/stylesheets/koi/utilities/visually-hidden.css +18 -0
- data/app/components/concerns/koi/tables/cells.rb +3 -3
- data/app/components/koi/header_component.html.erb +12 -11
- data/app/components/koi/header_component.rb +2 -0
- data/app/components/koi/table_component.rb +8 -0
- data/app/controllers/admin/admin_users_controller.rb +24 -18
- data/app/controllers/admin/application_controller.rb +1 -3
- data/app/controllers/admin/credentials_controller.rb +18 -14
- data/app/controllers/admin/otps_controller.rb +15 -13
- data/app/controllers/admin/sessions_controller.rb +12 -1
- data/app/controllers/admin/url_rewrites_controller.rb +19 -17
- data/app/controllers/admin/well_knowns_controller.rb +20 -18
- data/app/controllers/concerns/koi/controller.rb +37 -0
- data/app/helpers/koi/form_helper.rb +18 -0
- data/app/helpers/koi/header_helper.rb +122 -0
- data/app/helpers/koi/index_actions_helper.rb +3 -2
- data/app/helpers/koi/modal_helper.rb +71 -0
- data/app/models/admin/user.rb +7 -1
- data/app/models/url_rewrite.rb +1 -9
- data/app/views/admin/admin_users/_form.html+self.erb +8 -0
- data/app/views/admin/admin_users/_form.html.erb +8 -0
- data/app/views/admin/admin_users/archived.html.erb +7 -4
- data/app/views/admin/admin_users/edit.html+self.erb +12 -0
- data/app/views/admin/admin_users/edit.html.erb +13 -8
- data/app/views/admin/admin_users/index.html.erb +10 -5
- data/app/views/admin/admin_users/new.html.erb +8 -8
- data/app/views/admin/admin_users/show.html+self.erb +26 -14
- data/app/views/admin/admin_users/show.html.erb +22 -20
- data/app/views/admin/credentials/_credentials.html+self.erb +8 -6
- data/app/views/admin/credentials/_credentials.html.erb +3 -1
- data/app/views/admin/credentials/create.turbo_stream.erb +4 -3
- data/app/views/admin/credentials/destroy.turbo_stream.erb +4 -2
- data/app/views/admin/credentials/new.html.erb +42 -36
- data/app/views/admin/dashboards/show.html.erb +13 -1
- data/app/views/admin/otps/_form.html.erb +7 -7
- data/app/views/admin/otps/create.turbo_stream.erb +3 -3
- data/app/views/admin/otps/new.html.erb +5 -3
- data/app/views/admin/sessions/new.html.erb +2 -3
- data/app/views/admin/sessions/otp.html.erb +1 -3
- data/app/views/admin/sessions/password.html.erb +1 -3
- data/app/views/admin/tokens/show.html.erb +4 -6
- data/app/views/admin/url_rewrites/_form.html.erb +9 -0
- data/app/views/admin/url_rewrites/edit.html.erb +13 -9
- data/app/views/admin/url_rewrites/index.html.erb +10 -7
- data/app/views/admin/url_rewrites/new.html.erb +8 -8
- data/app/views/admin/url_rewrites/show.html.erb +17 -12
- data/app/views/admin/well_knowns/_form.html.erb +9 -0
- data/app/views/admin/well_knowns/edit.html.erb +13 -9
- data/app/views/admin/well_knowns/index.html.erb +8 -5
- data/app/views/admin/well_knowns/new.html.erb +8 -8
- data/app/views/admin/well_knowns/show.html.erb +14 -13
- data/app/views/katalyst/content/asides/_aside.html+form.erb +6 -4
- data/app/views/katalyst/content/columns/_column.html+form.erb +5 -3
- data/app/views/katalyst/content/contents/_content.html+form.erb +8 -6
- data/app/views/katalyst/content/figures/_figure.html+form.erb +8 -5
- data/app/views/katalyst/content/groups/_group.html+form.erb +5 -3
- data/app/views/katalyst/content/items/_item.html+form.erb +5 -3
- data/app/views/katalyst/content/sections/_section.html+form.erb +5 -3
- data/app/views/katalyst/content/tables/_table.html+form.erb +16 -11
- data/app/views/katalyst/navigation/items/_button.html.erb +6 -12
- data/app/views/katalyst/navigation/items/_heading.html.erb +3 -10
- data/app/views/katalyst/navigation/items/_link.html.erb +6 -11
- data/app/views/katalyst/navigation/menus/edit.html.erb +10 -6
- data/app/views/katalyst/navigation/menus/index.html.erb +4 -2
- data/app/views/katalyst/navigation/menus/new.html.erb +5 -3
- data/app/views/katalyst/navigation/menus/show.html.erb +8 -7
- data/app/views/layouts/koi/_application_header.html.erb +20 -0
- data/app/views/layouts/koi/_application_navigation.html.erb +34 -0
- data/app/views/layouts/koi/_flash.html.erb +6 -3
- data/app/views/layouts/koi/_navigation_header.html.erb +0 -2
- data/app/views/layouts/koi/application.html.erb +22 -27
- data/app/views/layouts/koi/frame.html.erb +1 -3
- data/app/views/layouts/koi/login.html.erb +12 -5
- data/config/locales/koi.en.yml +9 -1
- data/config/routes.rb +1 -1
- data/lib/generators/koi/admin/admin_generator.rb +3 -12
- data/lib/generators/koi/admin_controller/admin_controller_generator.rb +6 -16
- data/lib/generators/koi/admin_controller/templates/controller.rb.tt +82 -18
- data/lib/generators/koi/admin_controller/templates/controller_spec.rb.tt +113 -47
- data/lib/generators/koi/admin_route/admin_route_generator.rb +60 -6
- data/lib/generators/koi/admin_views/USAGE +18 -7
- data/lib/generators/koi/admin_views/admin_views_generator.rb +19 -11
- data/lib/generators/koi/admin_views/templates/_form.html.erb.tt +8 -0
- data/lib/generators/koi/admin_views/templates/archived.html.erb.tt +33 -0
- data/lib/generators/koi/admin_views/templates/edit.html.erb.tt +17 -9
- data/lib/generators/koi/admin_views/templates/index.html.erb.tt +31 -3
- data/lib/generators/koi/admin_views/templates/new.html.erb.tt +8 -8
- data/lib/generators/koi/admin_views/templates/show.html.erb.tt +15 -18
- data/lib/generators/koi/helpers/attribute_helpers.rb +147 -0
- data/lib/generators/koi/helpers/attribute_types.rb +218 -0
- data/lib/generators/koi/helpers/resource_helpers.rb +121 -0
- data/lib/generators/koi/{active_record/active_record_generator.rb → model/model_generator.rb} +1 -1
- data/lib/koi/config.rb +3 -1
- data/lib/koi/engine.rb +0 -9
- data/lib/koi/form/builder.rb +4 -4
- data/lib/koi/form/content.rb +55 -0
- data/lib/koi/form/elements/document.rb +1 -1
- data/lib/koi/form/elements/image.rb +1 -1
- data/lib/koi/form_builder.rb +1 -0
- data/lib/koi/menu.rb +14 -1
- data/spec/factories/admins.rb +1 -1
- metadata +90 -99
- data/app/assets/builds/koi/admin.css +0 -1
- data/app/assets/stylesheets/koi/base/_button.scss +0 -122
- data/app/assets/stylesheets/koi/base/_icon.scss +0 -29
- data/app/assets/stylesheets/koi/base/_index.scss +0 -21
- data/app/assets/stylesheets/koi/base/_input.scss +0 -19
- data/app/assets/stylesheets/koi/base/_link.scss +0 -26
- data/app/assets/stylesheets/koi/base/_list.scss +0 -11
- data/app/assets/stylesheets/koi/base/_typography.scss +0 -160
- data/app/assets/stylesheets/koi/components/_actions-group.scss +0 -7
- data/app/assets/stylesheets/koi/components/_image-field.scss +0 -95
- data/app/assets/stylesheets/koi/components/_index.scss +0 -9
- data/app/assets/stylesheets/koi/components/_pagy.scss +0 -29
- data/app/assets/stylesheets/koi/components/_summary-list.scss +0 -40
- data/app/assets/stylesheets/koi/layouts/_banner.scss +0 -7
- data/app/assets/stylesheets/koi/layouts/_content.scss +0 -40
- data/app/assets/stylesheets/koi/layouts/_flash.scss +0 -41
- data/app/assets/stylesheets/koi/layouts/_header.scss +0 -61
- data/app/assets/stylesheets/koi/layouts/_index.scss +0 -48
- data/app/assets/stylesheets/koi/layouts/_main.scss +0 -23
- data/app/assets/stylesheets/koi/layouts/_navigation.scss +0 -180
- data/app/assets/stylesheets/koi/layouts/_stack.scss +0 -13
- data/app/assets/stylesheets/koi/pages/_index.scss +0 -1
- data/app/assets/stylesheets/koi/pages/_login.scss +0 -46
- data/app/assets/stylesheets/koi/themes/_govuk.scss +0 -56
- data/app/assets/stylesheets/koi/themes/_kpop.scss +0 -5
- data/app/assets/stylesheets/koi/utils/_breakpoints.scss +0 -13
- data/app/assets/stylesheets/koi/utils/_hide.scss +0 -11
- data/app/assets/stylesheets/koi/utils/_index.scss +0 -2
- data/app/assets/stylesheets/koi/utils/_typography.scss +0 -42
- data/app/components/koi/content/editor/item_form_component.html.erb +0 -11
- data/app/components/koi/content/editor/item_form_component.rb +0 -94
- data/app/components/koi/summary_list/attachment_component.rb +0 -47
- data/app/components/koi/summary_list/base.rb +0 -59
- data/app/components/koi/summary_list/boolean_component.rb +0 -15
- data/app/components/koi/summary_list/date_component.rb +0 -17
- data/app/components/koi/summary_list/datetime_component.rb +0 -17
- data/app/components/koi/summary_list/item_component.rb +0 -26
- data/app/components/koi/summary_list/number_component.rb +0 -21
- data/app/components/koi/summary_list/rich_text_component.rb +0 -8
- data/app/components/koi/summary_list/text_component.rb +0 -8
- data/app/components/koi/summary_list_component.html.erb +0 -5
- data/app/components/koi/summary_list_component.rb +0 -75
- data/app/controllers/concerns/koi/controller/is_admin_controller.rb +0 -66
- data/app/helpers/koi/application_helper.rb +0 -7
- data/app/helpers/koi/date_helper.rb +0 -26
- data/app/helpers/koi/definition_list_helper.rb +0 -10
- data/app/views/admin/admin_users/_fields.html+self.erb +0 -3
- data/app/views/admin/admin_users/_fields.html.erb +0 -3
- data/app/views/admin/url_rewrites/_fields.html.erb +0 -4
- data/app/views/admin/well_knowns/_fields.html.erb +0 -6
- data/app/views/layouts/koi/_environment.html.erb +0 -4
- data/app/views/layouts/koi/_header.html.erb +0 -11
- data/app/views/layouts/koi/_navigation.html.erb +0 -23
- data/app/views/layouts/koi/_navigation_collapse.html.erb +0 -3
- data/lib/generators/koi/admin_views/templates/_fields.html.erb.tt +0 -3
- data/lib/generators/koi/helpers/admin_generator_attributes.rb +0 -66
- data/lib/koi/extensions/dartsass.rb +0 -23
- /data/app/assets/stylesheets/koi/{components/_clipboard.scss → blocks/clipboard.css} +0 -0
- /data/app/assets/stylesheets/koi/{components/_index-actions.scss → blocks/index-actions.css} +0 -0
- /data/app/assets/stylesheets/koi/{components/_toolbar.scss → blocks/toolbar.css} +0 -0
- /data/app/assets/stylesheets/koi/{base/_repel.scss → compositions/repel.css} +0 -0
@@ -1,12 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<%
|
1
|
+
<%# locals: (url_rewrite:) %>
|
2
|
+
|
3
|
+
<% content_for(:header) do %>
|
4
|
+
<%= breadcrumb_list do %>
|
5
|
+
<li><%= link_to("Url Rewrites", admin_url_rewrites_path) %></li>
|
6
|
+
<li><%= link_to(url_rewrite, admin_url_rewrite_path(url_rewrite)) %></li>
|
7
|
+
<% end %>
|
4
8
|
|
5
|
-
|
6
|
-
<%= render "fields", form: %>
|
9
|
+
<h1>Edit url rewrite</h1>
|
7
10
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
</div>
|
11
|
+
<%= actions_list do %>
|
12
|
+
<li><%= link_to_delete(url_rewrite) %></li>
|
13
|
+
<% end %>
|
12
14
|
<% end %>
|
15
|
+
|
16
|
+
<%= render("form", url_rewrite:) %>
|
@@ -1,16 +1,19 @@
|
|
1
|
-
<%# locals:
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<%# locals: (collection:) %>
|
2
|
+
|
3
|
+
<% content_for(:header) do %>
|
4
|
+
<h1>Url Rewrites</h1>
|
5
|
+
|
6
|
+
<%= actions_list do %>
|
7
|
+
<li><%= link_to("New", new_admin_url_rewrite_path) %></li>
|
5
8
|
<% end %>
|
6
9
|
<% end %>
|
7
10
|
|
8
11
|
<%= table_query_with(collection:) %>
|
9
12
|
|
10
13
|
<%= table_with(collection:) do |row, url_rewrite| %>
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
+
<% row.link :from %>
|
15
|
+
<% row.text :to %>
|
16
|
+
<% row.boolean :active %>
|
14
17
|
<% end %>
|
15
18
|
|
16
19
|
<%= table_pagination_with(collection:) %>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
|
2
|
-
<%= render Koi::Header::NewComponent.new(model: UrlRewrite) %>
|
3
|
-
<% end %>
|
1
|
+
<%# locals: (url_rewrite:) %>
|
4
2
|
|
5
|
-
|
6
|
-
<%=
|
3
|
+
<% content_for(:header) do %>
|
4
|
+
<%= breadcrumb_list do %>
|
5
|
+
<li><%= link_to("Url Rewrites", admin_url_rewrites_path) %></li>
|
6
|
+
<% end %>
|
7
7
|
|
8
|
-
<
|
9
|
-
<%= form.admin_save %>
|
10
|
-
</div>
|
8
|
+
<h1>New url rewrite</h1>
|
11
9
|
<% end %>
|
10
|
+
|
11
|
+
<%= render("form", url_rewrite:) %>
|
@@ -1,16 +1,21 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
<%# locals: (url_rewrite:) %>
|
2
|
+
|
3
|
+
<% content_for(:header) do %>
|
4
|
+
<%= breadcrumb_list do %>
|
5
|
+
<li><%= link_to("Url Rewrites", admin_url_rewrites_path) %></li>
|
4
6
|
<% end %>
|
5
|
-
<% end %>
|
6
7
|
|
7
|
-
|
8
|
-
|
8
|
+
<h1><%= url_rewrite %></h1>
|
9
|
+
|
10
|
+
<%= actions_list do %>
|
11
|
+
<li><%= link_to("Edit", edit_admin_url_rewrite_path(url_rewrite)) %></li>
|
12
|
+
<li><%= link_to("Preview", url_rewrite.to, rel: "noopener", target: "_blank") %></li>
|
13
|
+
<% end %>
|
9
14
|
<% end %>
|
10
15
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
16
|
+
<%= summary_table_with(model: url_rewrite) do |row| %>
|
17
|
+
<% row.text :from %>
|
18
|
+
<% row.text :to %>
|
19
|
+
<% row.boolean :active %>
|
20
|
+
<% row.enum :status_code %>
|
21
|
+
<% end %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%# locals: (well_known:) %>
|
2
|
+
|
3
|
+
<%= form_with(model: well_known) do |form| %>
|
4
|
+
<%= form.govuk_text_field :name %>
|
5
|
+
<%= form.govuk_text_field :purpose %>
|
6
|
+
<%= form.govuk_enum_select :content_type %>
|
7
|
+
<%= form.govuk_text_field :content %>
|
8
|
+
<%= form.button(type: :submit, class: "button") %>
|
9
|
+
<% end %>
|
@@ -1,12 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<%
|
1
|
+
<%# locals: (well_known:) %>
|
2
|
+
|
3
|
+
<% content_for(:header) do %>
|
4
|
+
<%= breadcrumb_list do %>
|
5
|
+
<li><%= link_to("Well Knowns", admin_well_knowns_path) %></li>
|
6
|
+
<li><%= link_to(well_known, admin_well_known_path(well_known)) %></li>
|
7
|
+
<% end %>
|
4
8
|
|
5
|
-
|
6
|
-
<%= render "fields", form: %>
|
9
|
+
<h1>Edit well known</h1>
|
7
10
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
</div>
|
11
|
+
<%= actions_list do %>
|
12
|
+
<li><%= link_to_delete(well_known) %></li>
|
13
|
+
<% end %>
|
12
14
|
<% end %>
|
15
|
+
|
16
|
+
<%= render("form", well_known:) %>
|
@@ -1,13 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
<%# locals: (collection:) %>
|
2
|
+
|
3
|
+
<% content_for(:header) do %>
|
4
|
+
<h1>Well Knowns</h1>
|
5
|
+
|
6
|
+
<%= actions_list do %>
|
7
|
+
<li><%= link_to("New", new_admin_well_known_path) %></li>
|
4
8
|
<% end %>
|
5
9
|
<% end %>
|
6
10
|
|
7
11
|
<%= table_query_with(collection:) %>
|
8
12
|
|
9
|
-
<%= table_with(collection:) do |row| %>
|
10
|
-
<% row.select %>
|
13
|
+
<%= table_with(collection:) do |row, well_known| %>
|
11
14
|
<% row.link :name %>
|
12
15
|
<% row.text :purpose %>
|
13
16
|
<% end %>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
|
2
|
-
<%= render(Koi::Header::NewComponent.new(model: WellKnown)) %>
|
3
|
-
<% end %>
|
1
|
+
<%# locals: (well_known:) %>
|
4
2
|
|
5
|
-
|
6
|
-
<%=
|
3
|
+
<% content_for(:header) do %>
|
4
|
+
<%= breadcrumb_list do %>
|
5
|
+
<li><%= link_to("Well Knowns", admin_well_knowns_path) %></li>
|
6
|
+
<% end %>
|
7
7
|
|
8
|
-
<
|
9
|
-
<%= form.admin_save %>
|
10
|
-
</div>
|
8
|
+
<h1>New well known</h1>
|
11
9
|
<% end %>
|
10
|
+
|
11
|
+
<%= render("form", well_known:) %>
|
@@ -1,19 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<%
|
1
|
+
<%# locals: (well_known:) %>
|
2
|
+
|
3
|
+
<% content_for(:header) do %>
|
4
|
+
<%= breadcrumb_list do %>
|
5
|
+
<li><%= link_to("Well Knowns", admin_well_knowns_path) %></li>
|
6
|
+
<% end %>
|
4
7
|
|
5
|
-
<
|
8
|
+
<h1><%= well_known %></h1>
|
9
|
+
|
10
|
+
<%= actions_list do %>
|
11
|
+
<li><%= link_to("Edit", edit_admin_well_known_path(well_known)) %></li>
|
12
|
+
<% end %>
|
13
|
+
<% end %>
|
6
14
|
|
7
15
|
<%= summary_table_with(model: well_known) do |row| %>
|
8
|
-
<% row.
|
16
|
+
<% row.text :name %>
|
9
17
|
<% row.text :purpose %>
|
10
|
-
<% row.
|
18
|
+
<% row.enum :content_type %>
|
11
19
|
<% row.text :content %>
|
12
20
|
<% end %>
|
13
|
-
|
14
|
-
<div class="actions">
|
15
|
-
<%= button_to "Delete", admin_well_known_path(well_known),
|
16
|
-
class: "button button--secondary",
|
17
|
-
method: :delete,
|
18
|
-
form: { data: { turbo_confirm: "Are you sure?" } } %>
|
19
|
-
</div>
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<%# locals: (form:, aside:) %>
|
2
|
+
|
3
|
+
<%= form.content_heading_fieldset %>
|
4
|
+
<%= form.govuk_check_box_field(:reverse, label: { text: "Show aside before content on mobile" }) %>
|
5
|
+
<%= form.content_theme_field %>
|
6
|
+
<%= form.content_visible_field %>
|
@@ -1,3 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
<%# locals: (form:, column:) %>
|
2
|
+
|
3
|
+
<%= form.content_heading_fieldset %>
|
4
|
+
<%= form.content_theme_field %>
|
5
|
+
<%= form.content_visible_field %>
|
@@ -1,6 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
<%# locals: (form:, content:) %>
|
2
|
+
|
3
|
+
<%= form.content_heading_fieldset %>
|
4
|
+
<%= form.govuk_rich_text_area(:content,
|
5
|
+
label: { size: "s" },
|
6
|
+
class: "content") %>
|
7
|
+
<%= form.content_theme_field %>
|
8
|
+
<%= form.content_visible_field %>
|
@@ -1,6 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<%# locals: (form:, figure:) %>
|
2
|
+
|
3
|
+
<%= form.govuk_image_field(:image, label: { size: "s" }) do %>
|
4
|
+
<%= form.govuk_text_field(:heading, label: { text: "Alternate text" }) %>
|
5
|
+
<%= form.govuk_text_field(:caption, label: { text: "Caption (optional)" }, optional: true) %>
|
6
6
|
<% end %>
|
7
|
+
|
8
|
+
<%= form.content_theme_field %>
|
9
|
+
<%= form.content_visible_field %>
|
@@ -1,3 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
<%# locals: (form:, group:) %>
|
2
|
+
|
3
|
+
<%= form.content_heading_fieldset %>
|
4
|
+
<%= form.content_theme_field %>
|
5
|
+
<%= form.content_visible_field %>
|
@@ -1,3 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
<%# locals: (form:, item:) %>
|
2
|
+
|
3
|
+
<%= form.content_heading_fieldset %>
|
4
|
+
<%= form.content_theme_field %>
|
5
|
+
<%= form.content_visible_field %>
|
@@ -1,3 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
<%# locals: (form:, section:) %>
|
2
|
+
|
3
|
+
<%= form.content_heading_fieldset %>
|
4
|
+
<%= form.content_theme_field %>
|
5
|
+
<%= form.content_visible_field %>
|
@@ -1,31 +1,36 @@
|
|
1
|
-
|
1
|
+
<%# locals: (form:, table:) %>
|
2
|
+
|
3
|
+
<div class="flow" data-controller="content--editor--table">
|
2
4
|
<%= form.content_heading_fieldset %>
|
3
5
|
|
4
6
|
<% content = sanitize_content_table(normalize_content_table(form.object, heading: false)) %>
|
5
|
-
<%= form.govuk_text_area
|
7
|
+
<%= form.govuk_text_area(:content, value: content, data: { content__editor__table_target: "input" }) %>
|
6
8
|
|
7
9
|
<%# hidden button to receive <Enter> events (HTML-default is to click first button in form) %>
|
8
|
-
<%= form.button
|
10
|
+
<%= form.button("Save", hidden: "") %>
|
9
11
|
|
10
12
|
<%# hidden button to submit the table for re-rendering %>
|
11
|
-
<%= form.button
|
12
|
-
formaction: table.persisted? ? content_routes.table_path : content_routes.tables_path,
|
13
|
+
<%= form.button("Update",
|
13
14
|
hidden: "",
|
14
|
-
|
15
|
+
formaction: table.persisted? ? katalyst_content.table_path : katalyst_content.tables_path,
|
16
|
+
data: { content__editor__table_target: "update" }) %>
|
15
17
|
|
16
|
-
<%= form.govuk_number_field
|
18
|
+
<%= form.govuk_number_field(:heading_rows,
|
17
19
|
label: { text: "Heading rows" },
|
18
20
|
width: 2,
|
19
21
|
placeholder: 0,
|
20
22
|
min: 0,
|
21
23
|
data: { content__editor__table_target: "headerRows",
|
22
|
-
action: "input->content--editor--table#update" } %>
|
24
|
+
action: "input->content--editor--table#update" }) %>
|
23
25
|
|
24
|
-
<%= form.govuk_number_field
|
26
|
+
<%= form.govuk_number_field(:heading_columns,
|
25
27
|
label: { text: "Heading columns" },
|
26
28
|
width: 2,
|
27
29
|
placeholder: 0,
|
28
30
|
min: 0,
|
29
31
|
data: { content__editor__table_target: "headerColumns",
|
30
|
-
action: "input->content--editor--table#update" } %>
|
31
|
-
|
32
|
+
action: "input->content--editor--table#update" }) %>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<%= form.content_theme_field %>
|
36
|
+
<%= form.content_visible_field %>
|
@@ -1,15 +1,9 @@
|
|
1
|
-
|
2
|
-
<%= form.hidden_field :type %>
|
3
|
-
<%= form.govuk_text_field :title %>
|
4
|
-
<%= form.govuk_text_field :url %>
|
1
|
+
<%# locals: (form:) %>
|
5
2
|
|
6
|
-
|
3
|
+
<%= form.govuk_text_field :title %>
|
4
|
+
<%= form.govuk_text_field :url %>
|
7
5
|
|
8
|
-
|
9
|
-
<%= form.govuk_select :target, Katalyst::Navigation::Button::TARGETS %>
|
6
|
+
<%= form.govuk_check_box_field :visible, small: true, label: { text: "Visible?" } %>
|
10
7
|
|
11
|
-
|
12
|
-
|
13
|
-
<%= form.admin_discard %>
|
14
|
-
</div>
|
15
|
-
<% end %>
|
8
|
+
<%= form.govuk_select :http_method, Katalyst::Navigation::Button::HTTP_METHODS, label: { text: "HTTP Method" } %>
|
9
|
+
<%= form.govuk_select :target, Katalyst::Navigation::Button::TARGETS %>
|
@@ -1,11 +1,4 @@
|
|
1
|
-
|
2
|
-
<%= form.hidden_field :type %>
|
3
|
-
<%= form.govuk_text_field :title %>
|
1
|
+
<%# locals: (form:) %>
|
4
2
|
|
5
|
-
|
6
|
-
|
7
|
-
<div class="actions">
|
8
|
-
<%= form.admin_save "Done" %>
|
9
|
-
<%= form.admin_discard %>
|
10
|
-
</div>
|
11
|
-
<% end %>
|
3
|
+
<%= form.govuk_text_field :title %>
|
4
|
+
<%= form.govuk_check_box_field :visible, small: true, label: { text: "Visible?" } %>
|
@@ -1,13 +1,8 @@
|
|
1
|
-
|
2
|
-
<%= form.hidden_field :type %>
|
3
|
-
<%= form.govuk_text_field :title %>
|
4
|
-
<%= form.govuk_text_field :url %>
|
1
|
+
<%# locals: (form:) %>
|
5
2
|
|
6
|
-
|
7
|
-
|
3
|
+
<%= form.govuk_text_field :title %>
|
4
|
+
<%= form.govuk_text_field :url %>
|
8
5
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
</div>
|
13
|
-
<% end %>
|
6
|
+
<%= form.govuk_check_box_field :visible, small: true, label: { text: "Visible?" } %>
|
7
|
+
|
8
|
+
<%= form.govuk_select :target, Katalyst::Navigation::Link::TARGETS %>
|
@@ -1,7 +1,13 @@
|
|
1
1
|
<% content_for :header do %>
|
2
|
-
<%=
|
3
|
-
|
4
|
-
|
2
|
+
<%= breadcrumb_list do %>
|
3
|
+
<li><%= link_to "Navigations", katalyst_navigation.menus_path %></li>
|
4
|
+
<li><%= link_to menu.title, katalyst_navigation.menu_path(menu) %></li>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<h1>Edit navigation</h1>
|
8
|
+
|
9
|
+
<%= actions_list do %>
|
10
|
+
<li><%= link_to_delete(menu, url: katalyst_navigation.menu_path(menu)) %></li>
|
5
11
|
<% end %>
|
6
12
|
<% end %>
|
7
13
|
|
@@ -9,7 +15,5 @@
|
|
9
15
|
<%= form.govuk_text_field :title %>
|
10
16
|
<%= form.govuk_text_field :slug %>
|
11
17
|
<%= form.govuk_text_field :depth %>
|
12
|
-
|
13
|
-
<%= form.admin_save %>
|
14
|
-
</div>
|
18
|
+
<%= form.button(type: :submit, class: "button") %>
|
15
19
|
<% end %>
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<% content_for :header do %>
|
2
|
-
|
3
|
-
|
2
|
+
<h1>Navigation</h1>
|
3
|
+
|
4
|
+
<%= actions_list do %>
|
5
|
+
<li><%= link_to "New", katalyst_navigation.new_menu_path %>
|
4
6
|
<% end %>
|
5
7
|
<% end %>
|
6
8
|
|
@@ -1,12 +1,14 @@
|
|
1
1
|
<% content_for :header do %>
|
2
|
-
<%=
|
3
|
-
|
2
|
+
<%= breadcrumb_list do %>
|
3
|
+
<li><%= link_to "Navigations", katalyst_navigation.menus_path %></li>
|
4
4
|
<% end %>
|
5
|
+
|
6
|
+
<h1>New navigation</h1>
|
5
7
|
<% end %>
|
6
8
|
|
7
9
|
<%= form_with model: menu, url: katalyst_navigation.menus_path do |form| %>
|
8
10
|
<%= form.govuk_text_field :title %>
|
9
11
|
<%= form.govuk_text_field :slug %>
|
10
12
|
<%= form.govuk_text_field :depth %>
|
11
|
-
<%= form.
|
13
|
+
<%= form.button(type: :submit, class: "button") %>
|
12
14
|
<% end %>
|
@@ -1,13 +1,14 @@
|
|
1
1
|
<% content_for :header do %>
|
2
|
-
<%=
|
3
|
-
|
4
|
-
|
2
|
+
<%= breadcrumb_list do %>
|
3
|
+
<li><%= link_to "Navigations", katalyst_navigation.menus_path %></li>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<h1><%= menu.title %></h1>
|
7
|
+
|
8
|
+
<%= actions_list do %>
|
9
|
+
<li><%= link_to("Edit", katalyst_navigation.edit_menu_path(menu)) %></li>
|
5
10
|
<% end %>
|
6
11
|
<% end %>
|
7
12
|
|
8
13
|
<%= render editor.status_bar %>
|
9
14
|
<%= render editor %>
|
10
|
-
|
11
|
-
<%= content_for :sidebar do %>
|
12
|
-
<%= render editor.new_items %>
|
13
|
-
<% end %>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<header data-environment="<%= Rails.env %>" class="application-header">
|
2
|
+
<div class="repel wrapper">
|
3
|
+
<%= link_to(main_app.admin_dashboard_path, class: "brand") do %>
|
4
|
+
<icon aria-hidden="true" class="icon" data-icon="koi"> </icon>
|
5
|
+
Koi
|
6
|
+
<% end %>
|
7
|
+
<div>
|
8
|
+
<span class="environment"><%= Rails.env.capitalize %></span>
|
9
|
+
<span class="release">(<%= Koi::Release.version %>)</span>
|
10
|
+
</div>
|
11
|
+
<%= tag.button(class: "button",
|
12
|
+
data: {
|
13
|
+
controller: "navigation-toggle",
|
14
|
+
action: "navigation-toggle#trigger",
|
15
|
+
text_button: "",
|
16
|
+
}) do %>
|
17
|
+
Menu <kbd>G</kbd>
|
18
|
+
<% end %>
|
19
|
+
</div>
|
20
|
+
</header>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<dialog class="application-navigation"
|
2
|
+
data-controller="navigation"
|
3
|
+
data-action="shortcut:go@document->navigation#toggle
|
4
|
+
navigation:toggle@document->navigation#toggle
|
5
|
+
shortcut:nav-toggle@document->navigation#toggle
|
6
|
+
turbo:before-morph-attribute->navigation#onMorphAttribute
|
7
|
+
click->navigation#click">
|
8
|
+
<nav aria-label="Main menu" role="navigation" class="flow">
|
9
|
+
<div class="filter">
|
10
|
+
<input type="search" placeholder="Filter menu" autocomplete="off" autofocus
|
11
|
+
data-navigation-target="filter"
|
12
|
+
data-action="input->navigation#filter change->navigation#filter
|
13
|
+
keydown.enter->navigation#go keydown.esc->navigation#clear">
|
14
|
+
</div>
|
15
|
+
<ul class="navigation-group | flow" role="list">
|
16
|
+
<li>
|
17
|
+
<span><%= current_admin_user.name %></span>
|
18
|
+
<ul class="navigation-list | flow" role="list">
|
19
|
+
<li><%= link_to("Profile", main_app.admin_admin_user_path(current_admin_user)) %></li>
|
20
|
+
<li><%= link_to("Log out", main_app.admin_session_path, data: { turbo_method: :delete }) %></li>
|
21
|
+
</ul>
|
22
|
+
</li>
|
23
|
+
</ul>
|
24
|
+
<%= navigation_menu_with(
|
25
|
+
menu: Koi::Menu.admin_menu(self),
|
26
|
+
list: {
|
27
|
+
class: "navigation-list | flow",
|
28
|
+
role: "list",
|
29
|
+
},
|
30
|
+
class: "navigation-group | flow",
|
31
|
+
role: "list",
|
32
|
+
) %>
|
33
|
+
</nav>
|
34
|
+
</dialog>
|
@@ -1,8 +1,11 @@
|
|
1
|
-
<ul
|
1
|
+
<ul aria-label="Notifications" data-controller="flash" class="flash | flow" role="list">
|
2
2
|
<% flash.each do |type, message| %>
|
3
|
-
<%= tag.li
|
3
|
+
<%= tag.li(role: "alertdialog", class: "flash | wrapper", data: { flash_type: type }) do %>
|
4
4
|
<%= message %>
|
5
|
-
<%= tag.button
|
5
|
+
<%= tag.button("Dismiss",
|
6
|
+
aria: { label: "Dismiss" },
|
7
|
+
class: "button",
|
8
|
+
data: { action: "flash#close", ghost_button: "" }) %>
|
6
9
|
<% end %>
|
7
10
|
<% end %>
|
8
11
|
</ul>
|