headmin 0.2.5 → 0.3.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/CHANGELOG.md +29 -3
- data/Gemfile.lock +13 -2
- data/README.md +64 -57
- data/app/assets/config/headmin_manifest.js +2 -0
- data/app/assets/javascripts/headmin/config/i18n.js +11 -0
- data/{src/js → app/assets/javascripts}/headmin/controllers/blocks_controller.js +1 -2
- data/app/assets/javascripts/headmin/controllers/date_range_controller.js +32 -0
- data/app/assets/javascripts/headmin/controllers/dropzone_controller.js +33 -0
- data/app/assets/javascripts/headmin/controllers/file_preview_controller.js +244 -0
- data/{src/js → app/assets/javascripts}/headmin/controllers/filter_controller.js +13 -7
- data/{src/js → app/assets/javascripts}/headmin/controllers/filters_controller.js +1 -1
- data/app/assets/javascripts/headmin/controllers/flatpickr_controller.js +39 -0
- data/app/assets/javascripts/headmin/controllers/hello_controller.js +7 -0
- data/app/assets/javascripts/headmin/controllers/notification_controller.js +8 -0
- data/{src/js → app/assets/javascripts}/headmin/controllers/popup_controller.js +1 -2
- data/app/assets/javascripts/headmin/controllers/redactorx_controller.js +13 -0
- data/{src/js → app/assets/javascripts}/headmin/controllers/repeater_controller.js +8 -9
- data/app/assets/javascripts/headmin/controllers/select_controller.js +48 -0
- data/app/assets/javascripts/headmin/controllers/table_actions_controller.js +98 -0
- data/app/assets/javascripts/headmin/controllers/table_controller.js +110 -0
- data/app/assets/javascripts/headmin/index.js +41 -0
- data/app/assets/javascripts/headmin.js +15934 -0
- data/{src/scss → app/assets/stylesheets}/headmin/filter.scss +0 -0
- data/{src/scss → app/assets/stylesheets}/headmin/filters.scss +0 -0
- data/{src/scss → app/assets/stylesheets}/headmin/form.scss +55 -2
- data/{src/scss → app/assets/stylesheets}/headmin/general.scss +0 -0
- data/{src/scss → app/assets/stylesheets}/headmin/layout/body.scss +0 -0
- data/{src/scss → app/assets/stylesheets}/headmin/layout/sidebar.scss +0 -0
- data/{src/scss → app/assets/stylesheets}/headmin/layout.scss +0 -0
- data/{src/scss → app/assets/stylesheets}/headmin/login.scss +0 -0
- data/{src/scss/vendor/bootstrap/variables.scss → app/assets/stylesheets/headmin/overrides/bootstrap.scss} +0 -0
- data/{src/scss/vendor/redactorx/override.css → app/assets/stylesheets/headmin/overrides/redactorx.css} +0 -0
- data/{src/scss → app/assets/stylesheets}/headmin/popup.scss +0 -0
- data/app/assets/stylesheets/headmin/syntax.scss +349 -0
- data/{src/scss → app/assets/stylesheets}/headmin/table.scss +1 -0
- data/app/assets/stylesheets/headmin/thumbnail.scss +20 -0
- data/app/assets/stylesheets/headmin/utilities.scss +68 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_accordion.scss +118 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_alert.scss +57 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_badge.scss +29 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_breadcrumb.scss +28 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_button-group.scss +139 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_buttons.scss +111 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_card.scss +216 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_carousel.scss +229 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_close.scss +40 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_containers.scss +41 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_dropdown.scss +240 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_forms.scss +9 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_functions.scss +302 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_grid.scss +33 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_helpers.scss +9 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_images.scss +42 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_list-group.scss +174 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_mixins.scss +43 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_modal.scss +209 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_nav.scss +139 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_navbar.scss +335 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_offcanvas.scss +83 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_pagination.scss +64 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_placeholders.scss +51 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_popover.scss +158 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_progress.scss +48 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_reboot.scss +625 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_root.scss +54 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_spinners.scss +69 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_tables.scss +155 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_toasts.scss +51 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_tooltip.scss +115 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_transitions.scss +27 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_type.scss +104 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_utilities.scss +630 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/_variables.scss +1641 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/bootstrap-grid.scss +67 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/bootstrap-reboot.scss +13 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/bootstrap-utilities.scss +18 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/bootstrap.scss +53 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/forms/_floating-labels.scss +63 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/forms/_form-check.scss +152 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/forms/_form-control.scss +219 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/forms/_form-range.scss +91 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/forms/_form-select.scss +72 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/forms/_form-text.scss +11 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/forms/_input-group.scss +121 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/forms/_labels.scss +36 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/forms/_validation.scss +12 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/helpers/_clearfix.scss +3 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/helpers/_colored-links.scss +12 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/helpers/_position.scss +30 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/helpers/_ratio.scss +26 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/helpers/_stacks.scss +15 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/helpers/_stretched-link.scss +15 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/helpers/_text-truncation.scss +7 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/helpers/_visually-hidden.scss +8 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/helpers/_vr.scss +8 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_alert.scss +11 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_backdrop.scss +14 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_border-radius.scss +78 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_box-shadow.scss +18 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_breakpoints.scss +127 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_buttons.scss +133 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_caret.scss +64 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_clearfix.scss +9 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_color-scheme.scss +7 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_container.scss +9 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_deprecate.scss +10 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_forms.scss +144 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_gradients.scss +47 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_grid.scss +151 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_image.scss +16 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_list-group.scss +24 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_lists.scss +7 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_pagination.scss +31 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_reset-text.scss +17 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_resize.scss +6 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_table-variants.scss +21 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_text-truncate.scss +8 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_transition.scss +26 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_utilities.scss +89 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/mixins/_visually-hidden.scss +29 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/utilities/_api.scss +47 -0
- data/app/assets/stylesheets/headmin/vendor/bootstrap/scss/vendor/_rfs.scss +354 -0
- data/app/assets/stylesheets/headmin/vendor/flatpickr.css +903 -0
- data/{src/scss/vendor/redactorx → app/assets/stylesheets/headmin/vendor}/redactorx.css +0 -0
- data/app/assets/stylesheets/headmin/vendor/tom-select-bootstrap.css +537 -0
- data/app/assets/stylesheets/headmin.css +13454 -0
- data/app/assets/stylesheets/headmin.scss +65 -0
- data/app/helpers/headmin/admin_helper.rb +4 -59
- data/app/helpers/headmin/bootstrap_helper.rb +31 -0
- data/app/helpers/headmin/documentation_helper.rb +35 -0
- data/app/helpers/headmin/filter_helper.rb +7 -3
- data/app/helpers/headmin/form_helper.rb +40 -0
- data/app/helpers/headmin/request_helper.rb +34 -0
- data/app/models/concerns/headmin/fieldable.rb +3 -1
- data/app/models/headmin/documentation_renderer.rb +32 -0
- data/app/models/headmin/form/base.rb +79 -0
- data/app/models/headmin/form/text.rb +53 -0
- data/app/services/block_service.rb +8 -4
- data/app/views/examples/admin.html.erb +1 -1
- data/app/views/headmin/_blocks.html.erb +2 -2
- data/app/views/headmin/_breadcrumbs.html.erb +1 -1
- data/app/views/headmin/_card.html.erb +10 -6
- data/app/views/headmin/_dropdown.html.erb +1 -1
- data/app/views/headmin/_filters.html.erb +23 -11
- data/app/views/headmin/_form.html.erb +14 -14
- data/app/views/headmin/_heading.html.erb +1 -1
- data/app/views/headmin/_notifications.html.erb +1 -1
- data/app/views/headmin/_pagination.html.erb +3 -2
- data/app/views/headmin/_popup.html.erb +10 -4
- data/app/views/headmin/_table.html.erb +10 -4
- data/app/views/headmin/_thumbnail.html.erb +47 -0
- data/app/views/headmin/dropdown/_devise.html.erb +20 -10
- data/app/views/headmin/dropdown/_list.html.erb +14 -7
- data/app/views/headmin/filters/_date.html.erb +9 -13
- data/app/views/headmin/filters/_flatpickr.html.erb +57 -0
- data/app/views/headmin/filters/_search.html.erb +5 -5
- data/app/views/headmin/filters/_select.html.erb +6 -6
- data/app/views/headmin/filters/filter/_button.html.erb +7 -7
- data/app/views/headmin/filters/filter/_template.html.erb +1 -1
- data/app/views/headmin/forms/_actions.html.erb +1 -1
- data/app/views/headmin/forms/_base.html.erb +100 -46
- data/app/views/headmin/forms/_blocks.html.erb +14 -7
- data/app/views/headmin/forms/_checkbox.html.erb +3 -3
- data/app/views/headmin/forms/_date.html.erb +30 -34
- data/app/views/headmin/forms/_date_range.html.erb +42 -0
- data/app/views/headmin/forms/_email.html.erb +35 -26
- data/app/views/headmin/forms/_file.html.erb +186 -34
- data/app/views/headmin/forms/_flatpickr.html.erb +34 -0
- data/app/views/headmin/forms/_flatpickr_range.html.erb +50 -0
- data/app/views/headmin/forms/_hidden.html.erb +24 -0
- data/app/views/headmin/forms/_image.html.erb +11 -45
- data/app/views/headmin/forms/_label.html.erb +18 -12
- data/app/views/headmin/forms/_number.html.erb +40 -37
- data/app/views/headmin/forms/_password.html.erb +37 -58
- data/app/views/headmin/forms/_redactorx.html.erb +8 -7
- data/app/views/headmin/forms/_repeater.html.erb +11 -14
- data/app/views/headmin/forms/_select.html.erb +43 -45
- data/app/views/headmin/forms/_text.html.erb +94 -59
- data/app/views/headmin/forms/_textarea.html.erb +37 -26
- data/app/views/headmin/forms/_url.html.erb +35 -26
- data/app/views/headmin/forms/_validation.html.erb +3 -3
- data/app/views/headmin/forms/_video.html.erb +21 -0
- data/app/views/headmin/forms/fields/_base.html.erb +3 -3
- data/app/views/headmin/forms/fields/_file.html.erb +2 -2
- data/app/views/headmin/forms/fields/_group.html.erb +3 -3
- data/app/views/headmin/forms/fields/_image.html.erb +2 -2
- data/app/views/headmin/forms/fields/_list.html.erb +3 -3
- data/app/views/headmin/forms/fields/_text.html.erb +2 -2
- data/app/views/headmin/forms/repeater/_row.html.erb +1 -1
- data/app/views/headmin/heading/_title.html.erb +1 -1
- data/app/views/headmin/layout/_body.html.erb +1 -1
- data/app/views/headmin/layout/_content.html.erb +1 -1
- data/app/views/headmin/layout/_footer.html.erb +1 -1
- data/app/views/headmin/layout/_header.html.erb +1 -1
- data/app/views/headmin/layout/_main.html.erb +12 -6
- data/app/views/headmin/layout/_sidebar.html.erb +3 -3
- data/app/views/headmin/layout/sidebar/_bottom.html.erb +1 -1
- data/app/views/headmin/layout/sidebar/_nav.html.erb +1 -1
- data/app/views/headmin/nav/_dropdown.html.erb +34 -0
- data/app/views/headmin/nav/_item.html.erb +22 -13
- data/app/views/headmin/table/_actions.html.erb +35 -11
- data/app/views/headmin/table/_body.html.erb +1 -1
- data/app/views/headmin/table/_foot.html.erb +1 -1
- data/app/views/headmin/table/_footer.html.erb +1 -1
- data/app/views/headmin/table/_head.html.erb +1 -1
- data/app/views/headmin/table/_header.html.erb +1 -1
- data/app/views/headmin/table/actions/_action.html.erb +4 -4
- data/app/views/headmin/table/actions/_delete.html.erb +1 -1
- data/app/views/headmin/table/actions/_export.html.erb +1 -1
- data/app/views/headmin/table/body/_row.html.erb +15 -7
- data/app/views/headmin/views/devise/confirmations/_new.html.erb +1 -1
- data/app/views/headmin/views/devise/passwords/_edit.html.erb +2 -2
- data/app/views/headmin/views/devise/passwords/_new.html.erb +1 -1
- data/app/views/headmin/views/devise/registrations/_edit.html.erb +4 -4
- data/app/views/headmin/views/devise/registrations/_new.html.erb +3 -3
- data/app/views/headmin/views/devise/shared/_links.html.erb +7 -7
- data/app/views/headmin/views/devise/unlocks/_new.html.erb +1 -1
- data/config/importmap.rb +2 -0
- data/config/locales/activerecord/en.yml +9 -0
- data/config/locales/activerecord/nl.yml +9 -0
- data/config/locales/en.yml +0 -3
- data/config/locales/headmin/forms/en.yml +5 -0
- data/config/locales/headmin/forms/nl.yml +5 -0
- data/config/locales/headmin/popup/en.yml +4 -0
- data/config/locales/headmin/popup/nl.yml +4 -0
- data/config/locales/headmin/table/en.yml +5 -1
- data/config/locales/headmin/table/nl.yml +5 -1
- data/config/locales/headmin/thumbnail/en.yml +4 -0
- data/config/locales/headmin/thumbnail/nl.yml +4 -0
- data/config/locales/headmin/views/en.yml +1 -1
- data/config/locales/headmin/views/nl.yml +14 -14
- data/config/locales/nl.yml +0 -3
- data/docs/blocks.md +0 -7
- data/esbuild-css.js +25 -0
- data/esbuild-js.js +11 -0
- data/headmin.gemspec +4 -1
- data/lib/generators/headmin/blocks_generator.rb +4 -1
- data/lib/generators/headmin/devise_generator.rb +5 -1
- data/lib/generators/headmin/fields_generator.rb +4 -1
- data/lib/generators/templates/controllers/auth/confirmations_controller.rb +31 -0
- data/lib/generators/templates/controllers/auth/omniauth_callbacks_controller.rb +31 -0
- data/lib/generators/templates/controllers/auth/passwords_controller.rb +35 -0
- data/lib/generators/templates/controllers/auth/registrations_controller.rb +63 -0
- data/lib/generators/templates/controllers/auth/sessions_controller.rb +28 -0
- data/lib/generators/templates/controllers/auth/unlocks_controller.rb +31 -0
- data/lib/headmin/engine.rb +15 -0
- data/lib/headmin/version.rb +1 -1
- data/lib/headmin.rb +1 -1
- data/package.json +20 -35
- data/src/js/headmin.js +1 -1
- data/src/scss/headmin.scss +1 -61
- data/yarn.lock +443 -5345
- metadata +198 -30
- data/.nvmrc +0 -1
- data/app/controllers/concerns/headmin/ckeditor.rb +0 -27
- data/app/views/headmin/forms/_ckeditor.html.erb +0 -42
- data/dist/css/headmin.css +0 -12313
- data/dist/js/headmin.js +0 -1548
- data/src/js/headmin/controllers/table_actions_controller.js +0 -33
- data/src/js/headmin/controllers/table_controller.js +0 -119
- data/src/js/headmin/headmin.js +0 -141
- data/src/scss/headmin/utilities.scss +0 -19
- data/webpack.config.js +0 -30
@@ -1,7 +1,7 @@
|
|
1
1
|
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: {method: :post}) do |f| %>
|
2
2
|
<%= render "headmin/views/devise/shared/error_messages", resource: resource %>
|
3
3
|
|
4
|
-
<%= render 'headmin/forms/email', form: f, attribute: :email, required: true,
|
4
|
+
<%= render 'headmin/forms/email', form: f, attribute: :email, required: true, float: true %>
|
5
5
|
|
6
6
|
<%= f.submit t('.resend'), class: 'btn btn-lg btn-primary w-100' %>
|
7
7
|
|
@@ -3,8 +3,8 @@
|
|
3
3
|
|
4
4
|
<%= f.hidden_field :reset_password_token %>
|
5
5
|
|
6
|
-
<%= render 'headmin/forms/password', form: f, attribute: :password, required: true,
|
7
|
-
<%= render 'headmin/forms/password', form: f, attribute: :password_confirmation, required: true,
|
6
|
+
<%= render 'headmin/forms/password', form: f, attribute: :password, required: true, float: true %>
|
7
|
+
<%= render 'headmin/forms/password', form: f, attribute: :password_confirmation, required: true, float: true %>
|
8
8
|
|
9
9
|
<%= f.submit t('.change_password'), class: 'btn btn-lg btn-primary w-100' %>
|
10
10
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: {method: :post}) do |f| %>
|
2
2
|
<%= render "headmin/views/devise/shared/error_messages", resource: resource %>
|
3
3
|
|
4
|
-
<%= render 'headmin/forms/email', form: f, attribute: :email, required: true,
|
4
|
+
<%= render 'headmin/forms/email', form: f, attribute: :email, required: true, float: true %>
|
5
5
|
|
6
6
|
<%= f.submit t('.send_instructions'), class: 'btn btn-lg btn-primary w-100' %>
|
7
7
|
|
@@ -2,15 +2,15 @@
|
|
2
2
|
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: {method: :put}) do |f| %>
|
3
3
|
<%= render "headmin/views/devise/shared/error_messages", resource: resource %>
|
4
4
|
|
5
|
-
<%= render 'headmin/forms/email', form: f, attribute: :email, required: true,
|
5
|
+
<%= render 'headmin/forms/email', form: f, attribute: :email, required: true, float: true %>
|
6
6
|
|
7
7
|
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
8
8
|
<div><%= t('.waiting_confirmation', email: resource.unconfirmed_email) %></div>
|
9
9
|
<% end %>
|
10
10
|
|
11
|
-
<%= render 'headmin/forms/password', form: f, attribute: :password, required: true,
|
12
|
-
<%= render 'headmin/forms/password', form: f, attribute: :password_confirmation, required: true,
|
13
|
-
<%= render 'headmin/forms/password', form: f, attribute: :current_password, required: true,
|
11
|
+
<%= render 'headmin/forms/password', form: f, attribute: :password, required: true, float: true %>
|
12
|
+
<%= render 'headmin/forms/password', form: f, attribute: :password_confirmation, required: true, float: true %>
|
13
|
+
<%= render 'headmin/forms/password', form: f, attribute: :current_password, required: true, float: true %>
|
14
14
|
|
15
15
|
<%= f.submit t('.change'), class: 'btn btn-lg btn-primary w-100' %>
|
16
16
|
<% end %>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
2
2
|
<%= render "headmin/views/devise/shared/error_messages", resource: resource %>
|
3
3
|
|
4
|
-
<%= render 'headmin/forms/email', form: f, attribute: :email, required: true,
|
5
|
-
<%= render 'headmin/forms/password', form: f, attribute: :password, required: true,
|
6
|
-
<%= render 'headmin/forms/password', form: f, attribute: :password_confirmation, required: true,
|
4
|
+
<%= render 'headmin/forms/email', form: f, attribute: :email, required: true, float: true %>
|
5
|
+
<%= render 'headmin/forms/password', form: f, attribute: :password, required: true, float: true %>
|
6
|
+
<%= render 'headmin/forms/password', form: f, attribute: :password_confirmation, required: true, float: true %>
|
7
7
|
|
8
8
|
<%= f.submit t('.sign_up'), class: 'btn btn-lg btn-primary w-100' %>
|
9
9
|
|
@@ -1,27 +1,27 @@
|
|
1
|
-
<div class="bg-light mt-5 text-
|
1
|
+
<div class="bg-light mt-5 text-center">
|
2
2
|
<%- if controller_name != 'sessions' %>
|
3
|
-
<%= link_to
|
3
|
+
<%= link_to t('.sign_in'), new_session_path(resource_name) %><br />
|
4
4
|
<% end %>
|
5
5
|
|
6
6
|
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
7
|
-
<%= link_to
|
7
|
+
<%= link_to t('.sign_up'), new_registration_path(resource_name) %><br />
|
8
8
|
<% end %>
|
9
9
|
|
10
10
|
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
11
|
-
<%= link_to
|
11
|
+
<%= link_to t('.forgot_password'), new_password_path(resource_name) %><br />
|
12
12
|
<% end %>
|
13
13
|
|
14
14
|
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
15
|
-
<%= link_to
|
15
|
+
<%= link_to t('.confirmation'), new_confirmation_path(resource_name) %><br />
|
16
16
|
<% end %>
|
17
17
|
|
18
18
|
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
19
|
-
<%= link_to
|
19
|
+
<%= link_to t('.unlock'), new_unlock_path(resource_name) %><br />
|
20
20
|
<% end %>
|
21
21
|
|
22
22
|
<%- if devise_mapping.omniauthable? %>
|
23
23
|
<%- resource_class.omniauth_providers.each do |provider| %>
|
24
|
-
<%= link_to
|
24
|
+
<%= link_to t('.omniauth', provider: OmniAuth::Utils.camelize(provider)), omniauth_authorize_path(resource_name, provider), method: :post %><br />
|
25
25
|
<% end %>
|
26
26
|
<% end %>
|
27
27
|
</div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: {method: :post}) do |f| %>
|
2
2
|
<%= render "headmin/views/devise/shared/error_messages", resource: resource %>
|
3
3
|
|
4
|
-
<%= render 'headmin/forms/email', form: f, attribute: :email, required: true,
|
4
|
+
<%= render 'headmin/forms/email', form: f, attribute: :email, required: true, float: true %>
|
5
5
|
|
6
6
|
<%= f.submit t('.resend'), class: 'btn btn-lg btn-primary w-100' %>
|
7
7
|
|
data/config/importmap.rb
ADDED
data/config/locales/en.yml
CHANGED
@@ -7,26 +7,26 @@ nl:
|
|
7
7
|
resend: Opnieuw verzenden
|
8
8
|
mailers:
|
9
9
|
confirmation_instructions:
|
10
|
-
welcome: Welkom %{email}!
|
10
|
+
welcome: 'Welkom %{email}!'
|
11
11
|
confirm: Account bevestigen
|
12
|
-
confirm_email: Je kan uw account bevestigen door op de onderstaande link te klikken
|
12
|
+
confirm_email: 'Je kan uw account bevestigen door op de onderstaande link te klikken:'
|
13
13
|
email_changed:
|
14
|
-
greeting: Hallo %{email}!
|
15
|
-
email_is_changing_to: We contacteren u om uw te verwittigen dat uw email zal wijzigen naar %{email}.
|
16
|
-
email_has_changed_to: We contacteren u om uw te verwittigen dat uw email gewijzigd is naar %{email}.
|
14
|
+
greeting: 'Hallo %{email}!'
|
15
|
+
email_is_changing_to: 'We contacteren u om uw te verwittigen dat uw email zal wijzigen naar %{email}.'
|
16
|
+
email_has_changed_to: 'We contacteren u om uw te verwittigen dat uw email gewijzigd is naar %{email}.'
|
17
17
|
password_change:
|
18
|
-
greeting: Hallo %{email}!
|
18
|
+
greeting: 'Hallo %{email}!'
|
19
19
|
password_has_changed: We contacteren u om uw te verwittigen dat uw wachtwoord gewijzigd is.
|
20
20
|
reset_password_instructions:
|
21
|
-
greeting: Hallo %{email}!
|
21
|
+
greeting: 'Hallo %{email}!'
|
22
22
|
change: Wachtwoord wijzigen
|
23
23
|
someone_requested: Iemand heeft een link gevraagd om uw wachtwoord te veranderen. Je kan dit doen via onderstaande link.
|
24
24
|
not_requested: Als je dit niet zelf gevraagd heeft, mag u deze email negeren.
|
25
25
|
password_not_changed_until: Je wachtwoord verandert niet totdat je op de link klikt en uw wachtwoord wijzigt.
|
26
26
|
unlock_instructions:
|
27
|
-
greeting: Hallo %{email}!
|
27
|
+
greeting: 'Hallo %{email}!'
|
28
28
|
account_locked: Uw account is vergrendeld door het hoge aantal van mislukte login pogingen.
|
29
|
-
click_link: Klik op de onderstaande link om uw account te ontgrendelen
|
29
|
+
click_link: 'Klik op de onderstaande link om uw account te ontgrendelen:'
|
30
30
|
unlock_account: Ontgrendel mijn account
|
31
31
|
passwords:
|
32
32
|
edit:
|
@@ -35,7 +35,7 @@ nl:
|
|
35
35
|
send_instructions: Verzend reset instructies
|
36
36
|
registrations:
|
37
37
|
edit:
|
38
|
-
waiting_confirmation: Wachten op bevestiging voor
|
38
|
+
waiting_confirmation: 'Wachten op bevestiging voor: %{email}'
|
39
39
|
change: Wijzig mijn profiel
|
40
40
|
unhappy: Niet tevreden?
|
41
41
|
cancel: Verwijder mijn account
|
@@ -49,10 +49,10 @@ nl:
|
|
49
49
|
links:
|
50
50
|
confirmation: Geen bevestigingsmail ontvangen?
|
51
51
|
forgot_password: Wachtwoord vergeten?
|
52
|
-
omniauth:
|
52
|
+
omniauth: 'Registreer met %{provider}'
|
53
53
|
sign_in: Aanmelden
|
54
54
|
sign_up: Registeren
|
55
|
-
unlock: Geen
|
56
|
-
|
55
|
+
unlock: Geen ontgrendelinstructies ontvangen?
|
56
|
+
unlocks:
|
57
57
|
new:
|
58
|
-
resend: Verstuur
|
58
|
+
resend: Verstuur ontgrendelinstructies
|
data/config/locales/nl.yml
CHANGED
data/docs/blocks.md
CHANGED
@@ -30,13 +30,6 @@ A hidden template form will be rendered for all types defined in `allow:`
|
|
30
30
|
```
|
31
31
|
|
32
32
|
For each type of block you want to include, create a template in `views/admin/blocks`.
|
33
|
-
Make sure to include a hidden field to store the name of the block.
|
34
|
-
|
35
|
-
```erb
|
36
|
-
# app/views/admin/blocks/_contact.html.erb
|
37
|
-
<%= form.hidden_field :name, value: :contact %>
|
38
|
-
...
|
39
|
-
```
|
40
33
|
|
41
34
|
### Usage in frontend
|
42
35
|
|
data/esbuild-css.js
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
const esbuild = require("esbuild");
|
2
|
+
const sassPlugin = require("esbuild-sass-plugin").sassPlugin;
|
3
|
+
const watch = process.argv.includes('-w')
|
4
|
+
|
5
|
+
// Used to skip external URLs in scss files
|
6
|
+
const externalUrlPlugin = {
|
7
|
+
name: "custom-resolver",
|
8
|
+
setup(build) {
|
9
|
+
build.onResolve({filter: /^https?:\/\//}, ({path}) => {
|
10
|
+
return {path, external: true, namespace: "provided"};
|
11
|
+
});
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
esbuild.build({
|
16
|
+
entryPoints: ['src/scss/headmin.scss'],
|
17
|
+
outfile: 'app/assets/stylesheets/headmin.css',
|
18
|
+
bundle: true,
|
19
|
+
watch: watch,
|
20
|
+
allowOverwrite: true,
|
21
|
+
plugins: [
|
22
|
+
externalUrlPlugin,
|
23
|
+
sassPlugin()
|
24
|
+
]
|
25
|
+
}).catch((e) => console.error(e.message));
|
data/esbuild-js.js
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
const esbuild = require("esbuild");
|
2
|
+
const watch = process.argv.includes('-w')
|
3
|
+
|
4
|
+
esbuild.build({
|
5
|
+
entryPoints: ['src/js/headmin.js'],
|
6
|
+
outfile: 'app/assets/javascripts/headmin.js',
|
7
|
+
bundle: true,
|
8
|
+
allowOverwrite: true,
|
9
|
+
format: 'esm',
|
10
|
+
watch: watch
|
11
|
+
}).catch((e) => console.error(e.message));
|
data/headmin.gemspec
CHANGED
@@ -29,7 +29,10 @@ Gem::Specification.new do |spec|
|
|
29
29
|
|
30
30
|
# Uncomment to register a new dependency of your gem
|
31
31
|
# spec.add_dependency "example-gem", "~> 1.0"
|
32
|
-
spec.add_runtime_dependency
|
32
|
+
spec.add_runtime_dependency "closure_tree"
|
33
|
+
spec.add_runtime_dependency "inline_svg"
|
34
|
+
spec.add_runtime_dependency "redcarpet"
|
35
|
+
spec.add_runtime_dependency "rouge"
|
33
36
|
|
34
37
|
# For more information and examples about making a new gem, checkout our
|
35
38
|
# guide at: https://bundler.io/guides/creating_gem.html
|
@@ -4,8 +4,11 @@ module Headmin
|
|
4
4
|
|
5
5
|
source_root File.expand_path('../../templates', __FILE__)
|
6
6
|
|
7
|
-
def
|
7
|
+
def copy_models
|
8
8
|
template 'models/block.rb', 'app/models/block.rb'
|
9
|
+
end
|
10
|
+
|
11
|
+
def copy_migrations
|
9
12
|
migration_template 'migrations/create_blocks.rb', 'db/migrate/create_blocks.rb'
|
10
13
|
end
|
11
14
|
|
@@ -4,7 +4,11 @@ module Headmin
|
|
4
4
|
|
5
5
|
source_root File.expand_path('../../templates', __FILE__)
|
6
6
|
|
7
|
-
def
|
7
|
+
def copy_controllers
|
8
|
+
directory 'controllers/auth', 'app/controllers/auth'
|
9
|
+
end
|
10
|
+
|
11
|
+
def copy_views
|
8
12
|
directory 'views/auth', 'app/views/auth'
|
9
13
|
copy_file 'views/layouts/auth.html.erb', 'app/views/layouts/auth.html.erb'
|
10
14
|
end
|
@@ -4,8 +4,11 @@ module Headmin
|
|
4
4
|
|
5
5
|
source_root File.expand_path('../../templates', __FILE__)
|
6
6
|
|
7
|
-
def
|
7
|
+
def copy_models
|
8
8
|
template 'models/field.rb', 'app/models/field.rb'
|
9
|
+
end
|
10
|
+
|
11
|
+
def copy_migrations
|
9
12
|
migration_template 'migrations/create_fields.rb', 'db/migrate/create_fields.rb'
|
10
13
|
migration_template 'migrations/create_field_hierarchies.rb', 'db/migrate/create_field_hierarchies.rb'
|
11
14
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class Auth::ConfirmationsController < Devise::ConfirmationsController
|
4
|
+
layout 'auth'
|
5
|
+
# GET /resource/confirmation/new
|
6
|
+
# def new
|
7
|
+
# super
|
8
|
+
# end
|
9
|
+
|
10
|
+
# POST /resource/confirmation
|
11
|
+
# def create
|
12
|
+
# super
|
13
|
+
# end
|
14
|
+
|
15
|
+
# GET /resource/confirmation?confirmation_token=abcdef
|
16
|
+
# def show
|
17
|
+
# super
|
18
|
+
# end
|
19
|
+
|
20
|
+
# protected
|
21
|
+
|
22
|
+
# The path used after resending confirmation instructions.
|
23
|
+
# def after_resending_confirmation_instructions_path_for(resource_name)
|
24
|
+
# super(resource_name)
|
25
|
+
# end
|
26
|
+
|
27
|
+
# The path used after confirmation.
|
28
|
+
# def after_confirmation_path_for(resource_name, resource)
|
29
|
+
# super(resource_name, resource)
|
30
|
+
# end
|
31
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class Auth::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
4
|
+
layout 'auth'
|
5
|
+
# You should configure your model like this:
|
6
|
+
# devise :omniauthable, omniauth_providers: [:twitter]
|
7
|
+
|
8
|
+
# You should also create an action method in this controller like this:
|
9
|
+
# def twitter
|
10
|
+
# end
|
11
|
+
|
12
|
+
# More info at:
|
13
|
+
# https://github.com/heartcombo/devise#omniauth
|
14
|
+
|
15
|
+
# GET|POST /resource/auth/twitter
|
16
|
+
# def passthru
|
17
|
+
# super
|
18
|
+
# end
|
19
|
+
|
20
|
+
# GET|POST /users/auth/twitter/callback
|
21
|
+
# def failure
|
22
|
+
# super
|
23
|
+
# end
|
24
|
+
|
25
|
+
# protected
|
26
|
+
|
27
|
+
# The path used when OmniAuth fails
|
28
|
+
# def after_omniauth_failure_path_for(scope)
|
29
|
+
# super(scope)
|
30
|
+
# end
|
31
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class Auth::PasswordsController < Devise::PasswordsController
|
4
|
+
layout 'auth'
|
5
|
+
# GET /resource/password/new
|
6
|
+
# def new
|
7
|
+
# super
|
8
|
+
# end
|
9
|
+
|
10
|
+
# POST /resource/password
|
11
|
+
# def create
|
12
|
+
# super
|
13
|
+
# end
|
14
|
+
|
15
|
+
# GET /resource/password/edit?reset_password_token=abcdef
|
16
|
+
# def edit
|
17
|
+
# super
|
18
|
+
# end
|
19
|
+
|
20
|
+
# PUT /resource/password
|
21
|
+
# def update
|
22
|
+
# super
|
23
|
+
# end
|
24
|
+
|
25
|
+
# protected
|
26
|
+
|
27
|
+
# def after_resetting_password_path_for(resource)
|
28
|
+
# super(resource)
|
29
|
+
# end
|
30
|
+
|
31
|
+
# The path used after sending reset password instructions
|
32
|
+
# def after_sending_reset_password_instructions_path_for(resource_name)
|
33
|
+
# super(resource_name)
|
34
|
+
# end
|
35
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class Auth::RegistrationsController < Devise::RegistrationsController
|
4
|
+
layout 'auth'
|
5
|
+
# before_action :configure_sign_up_params, only: [:create]
|
6
|
+
# before_action :configure_account_update_params, only: [:update]
|
7
|
+
|
8
|
+
# GET /resource/sign_up
|
9
|
+
# def new
|
10
|
+
# super
|
11
|
+
# end
|
12
|
+
|
13
|
+
# POST /resource
|
14
|
+
# def create
|
15
|
+
# super
|
16
|
+
# end
|
17
|
+
|
18
|
+
# GET /resource/edit
|
19
|
+
# def edit
|
20
|
+
# super
|
21
|
+
# end
|
22
|
+
|
23
|
+
# PUT /resource
|
24
|
+
# def update
|
25
|
+
# super
|
26
|
+
# end
|
27
|
+
|
28
|
+
# DELETE /resource
|
29
|
+
# def destroy
|
30
|
+
# super
|
31
|
+
# end
|
32
|
+
|
33
|
+
# GET /resource/cancel
|
34
|
+
# Forces the session data which is usually expired after sign
|
35
|
+
# in to be expired now. This is useful if the user wants to
|
36
|
+
# cancel oauth signing in/up in the middle of the process,
|
37
|
+
# removing all OAuth session data.
|
38
|
+
# def cancel
|
39
|
+
# super
|
40
|
+
# end
|
41
|
+
|
42
|
+
# protected
|
43
|
+
|
44
|
+
# If you have extra params to permit, append them to the sanitizer.
|
45
|
+
# def configure_sign_up_params
|
46
|
+
# devise_parameter_sanitizer.permit(:sign_up, keys: [:attribute])
|
47
|
+
# end
|
48
|
+
|
49
|
+
# If you have extra params to permit, append them to the sanitizer.
|
50
|
+
# def configure_account_update_params
|
51
|
+
# devise_parameter_sanitizer.permit(:account_update, keys: [:attribute])
|
52
|
+
# end
|
53
|
+
|
54
|
+
# The path used after sign up.
|
55
|
+
# def after_sign_up_path_for(resource)
|
56
|
+
# super(resource)
|
57
|
+
# end
|
58
|
+
|
59
|
+
# The path used after sign up for inactive accounts.
|
60
|
+
# def after_inactive_sign_up_path_for(resource)
|
61
|
+
# super(resource)
|
62
|
+
# end
|
63
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class Auth::SessionsController < Devise::SessionsController
|
4
|
+
layout 'auth'
|
5
|
+
# before_action :configure_sign_in_params, only: [:create]
|
6
|
+
|
7
|
+
# GET /resource/sign_in
|
8
|
+
# def new
|
9
|
+
# super
|
10
|
+
# end
|
11
|
+
|
12
|
+
# POST /resource/sign_in
|
13
|
+
# def create
|
14
|
+
# super
|
15
|
+
# end
|
16
|
+
|
17
|
+
# DELETE /resource/sign_out
|
18
|
+
# def destroy
|
19
|
+
# super
|
20
|
+
# end
|
21
|
+
|
22
|
+
# protected
|
23
|
+
|
24
|
+
# If you have extra params to permit, append them to the sanitizer.
|
25
|
+
# def configure_sign_in_params
|
26
|
+
# devise_parameter_sanitizer.permit(:sign_in, keys: [:attribute])
|
27
|
+
# end
|
28
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class Auth::UnlocksController < Devise::UnlocksController
|
4
|
+
layout 'auth'
|
5
|
+
# GET /resource/unlock/new
|
6
|
+
# def new
|
7
|
+
# super
|
8
|
+
# end
|
9
|
+
|
10
|
+
# POST /resource/unlock
|
11
|
+
# def create
|
12
|
+
# super
|
13
|
+
# end
|
14
|
+
|
15
|
+
# GET /resource/unlock?unlock_token=abcdef
|
16
|
+
# def show
|
17
|
+
# super
|
18
|
+
# end
|
19
|
+
|
20
|
+
# protected
|
21
|
+
|
22
|
+
# The path used after sending unlock password instructions
|
23
|
+
# def after_sending_unlock_instructions_path_for(resource)
|
24
|
+
# super(resource)
|
25
|
+
# end
|
26
|
+
|
27
|
+
# The path used after unlocking the resource
|
28
|
+
# def after_unlock_path_for(resource)
|
29
|
+
# super(resource)
|
30
|
+
# end
|
31
|
+
end
|