headmin 0.1.1 → 0.2.2
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/Gemfile +0 -1
- data/Gemfile.lock +24 -2
- data/README.md +8 -43
- data/app/controllers/concerns/headmin/authentication.rb +0 -8
- data/app/controllers/concerns/headmin/pagination.rb +1 -1
- data/app/helpers/headmin/admin_helper.rb +4 -4
- data/app/models/concerns/headmin/block.rb +11 -0
- data/app/models/concerns/headmin/blockable.rb +10 -0
- data/app/models/concerns/headmin/field.rb +17 -0
- data/app/models/concerns/headmin/fieldable.rb +44 -0
- data/app/services/block_service.rb +68 -0
- data/app/views/{layouts → examples}/admin.html.erb +0 -0
- data/app/views/{layouts/admin → examples}/auth.html.erb +0 -0
- data/app/views/headmin/_blocks.html.erb +24 -0
- data/app/views/headmin/_breadcrumbs.html.erb +9 -5
- data/app/views/headmin/_card.html.erb +48 -0
- data/app/views/headmin/_dropdown.html.erb +18 -0
- data/app/views/headmin/_filters.html.erb +56 -34
- data/app/views/headmin/_form.html.erb +60 -6
- data/app/views/headmin/_heading.html.erb +8 -4
- data/app/views/headmin/_index.html.erb +9 -8
- data/app/views/headmin/_notifications.html.erb +8 -0
- data/app/views/headmin/_pagination.html.erb +11 -7
- data/app/views/headmin/_popup.html.erb +26 -0
- data/app/views/headmin/_table.html.erb +11 -4
- data/app/views/headmin/dropdown/_button.html.erb +13 -0
- data/app/views/headmin/dropdown/_devise.html.erb +21 -0
- data/app/views/headmin/{layout/dropdown → dropdown}/_divider.html.erb +1 -1
- data/app/views/headmin/dropdown/_item.html.erb +18 -0
- data/app/views/headmin/dropdown/_list.html.erb +11 -0
- data/app/views/headmin/dropdown/_locale.html.erb +17 -0
- data/app/views/headmin/filters/_date.html.erb +21 -16
- data/app/views/headmin/filters/_search.html.erb +18 -18
- data/app/views/headmin/filters/_select.html.erb +28 -23
- data/app/views/headmin/filters/filter/_button.html.erb +15 -6
- data/app/views/headmin/filters/filter/_menu_item.html.erb +2 -2
- data/app/views/headmin/filters/filter/_template.html.erb +2 -2
- data/app/views/headmin/forms/_actions.html.erb +4 -8
- data/app/views/headmin/forms/_base.html.erb +60 -0
- data/app/views/headmin/forms/_blocks.html.erb +32 -0
- data/app/views/headmin/forms/_checkbox.html.erb +39 -0
- data/app/views/headmin/forms/_ckeditor.html.erb +42 -0
- data/app/views/headmin/forms/_date.html.erb +45 -0
- data/app/views/headmin/forms/_email.html.erb +39 -0
- data/app/views/headmin/forms/_file.html.erb +40 -0
- data/app/views/headmin/forms/_image.html.erb +55 -0
- data/app/views/headmin/forms/_label.html.erb +24 -0
- data/app/views/headmin/forms/_number.html.erb +50 -0
- data/app/views/headmin/forms/_password.html.erb +69 -0
- data/app/views/headmin/forms/_redactorx.html.erb +49 -0
- data/app/views/headmin/forms/_repeater.html.erb +133 -0
- data/app/views/headmin/forms/_select.html.erb +70 -0
- data/app/views/headmin/forms/_text.html.erb +62 -0
- data/app/views/headmin/forms/_textarea.html.erb +39 -0
- data/app/views/headmin/forms/_url.html.erb +39 -0
- data/app/views/headmin/forms/_validation.html.erb +21 -0
- data/app/views/headmin/forms/actions/_destroy.html.erb +13 -0
- data/app/views/headmin/forms/actions/_save.html.erb +12 -0
- data/app/views/headmin/forms/actions/_view.html.erb +15 -0
- data/app/views/headmin/forms/fields/_base.html.erb +25 -0
- data/app/views/headmin/forms/fields/_file.html.erb +15 -22
- data/app/views/headmin/forms/fields/_group.html.erb +38 -0
- data/app/views/headmin/forms/fields/_image.html.erb +15 -35
- data/app/views/headmin/forms/fields/_list.html.erb +26 -0
- data/app/views/headmin/forms/fields/_text.html.erb +15 -37
- data/app/views/headmin/forms/repeater/_row.html.erb +51 -0
- 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 +2 -2
- data/app/views/headmin/layout/_sidebar.html.erb +1 -1
- data/app/views/headmin/layout/sidebar/{_menu.html.erb → _nav.html.erb} +1 -1
- data/app/views/headmin/nav/_item.html.erb +21 -0
- data/app/views/headmin/nav/item/_devise.html.erb +21 -0
- data/app/views/headmin/nav/item/_locale.html.erb +17 -0
- data/app/views/headmin/pagination/_per_page.html.erb +18 -0
- data/app/views/headmin/{kaminari → pagination/kaminari}/_first_page.html.erb +0 -0
- data/app/views/headmin/{kaminari → pagination/kaminari}/_gap.html.erb +0 -0
- data/app/views/headmin/{kaminari → pagination/kaminari}/_last_page.html.erb +0 -0
- data/app/views/headmin/{kaminari → pagination/kaminari}/_next_page.html.erb +0 -0
- data/app/views/headmin/{kaminari → pagination/kaminari}/_page.html.erb +1 -1
- data/app/views/headmin/{kaminari → pagination/kaminari}/_paginator.html.erb +0 -0
- data/app/views/headmin/{kaminari → pagination/kaminari}/_prev_page.html.erb +0 -0
- data/app/views/headmin/table/_actions.html.erb +24 -17
- data/app/views/headmin/table/_body.html.erb +12 -10
- data/app/views/headmin/table/_foot.html.erb +8 -4
- data/app/views/headmin/table/_footer.html.erb +3 -7
- data/app/views/headmin/table/_head.html.erb +3 -1
- data/app/views/headmin/table/_header.html.erb +3 -7
- data/app/views/headmin/table/actions/_action.html.erb +26 -9
- data/app/views/headmin/table/actions/_delete.html.erb +11 -7
- data/app/views/headmin/table/actions/_export.html.erb +11 -7
- data/app/views/headmin/table/body/_association.html.erb +1 -1
- data/app/views/headmin/table/body/_boolean.erb +1 -1
- data/app/views/headmin/table/body/_currency.html.erb +1 -1
- data/app/views/headmin/table/body/_date.html.erb +1 -1
- data/app/views/headmin/table/body/_id.html.erb +2 -2
- data/app/views/headmin/table/body/_row.html.erb +1 -1
- data/app/views/headmin/table/body/_string.html.erb +1 -1
- data/app/views/headmin/table/body/_text.html.erb +1 -1
- data/app/views/headmin/table/foot/_cell.html.erb +1 -1
- data/app/views/headmin/table/foot/_id.html.erb +2 -2
- data/app/views/headmin/table/head/_cell.html.erb +1 -1
- data/app/views/headmin/table/head/_id.html.erb +3 -3
- data/app/views/headmin/views/devise/confirmations/_new.html.erb +9 -0
- data/app/views/headmin/views/devise/passwords/_edit.html.erb +12 -0
- data/app/views/headmin/views/devise/passwords/_new.html.erb +9 -0
- data/app/views/{admin/users/registrations/edit.html.erb → headmin/views/devise/registrations/_edit.html.erb} +5 -5
- data/app/views/headmin/views/devise/registrations/_new.html.erb +11 -0
- data/app/views/headmin/views/devise/sessions/_new.html.erb +13 -0
- data/app/views/{admin/users → headmin/views/devise}/shared/_error_messages.html.erb +0 -0
- data/app/views/{admin/users → headmin/views/devise}/shared/_links.html.erb +0 -0
- data/app/views/headmin/views/devise/unlocks/_new.html.erb +10 -0
- data/config/initializers/customize_input_error.rb +9 -0
- data/config/locales/devise/en.yml +65 -0
- data/config/locales/en.yml +2 -134
- data/config/locales/headmin/filters/en.yml +13 -0
- data/config/locales/headmin/filters/nl.yml +13 -0
- data/config/locales/headmin/forms/en.yml +34 -0
- data/config/locales/headmin/forms/nl.yml +33 -0
- data/config/locales/headmin/heading/en.yml +5 -0
- data/config/locales/headmin/heading/nl.yml +5 -0
- data/config/locales/headmin/layout/en.yml +14 -0
- data/config/locales/headmin/layout/nl.yml +14 -0
- data/config/locales/headmin/pagination/en.yml +21 -0
- data/config/locales/headmin/pagination/nl.yml +21 -0
- data/config/locales/headmin/table/en.yml +23 -0
- data/config/locales/headmin/table/nl.yml +23 -0
- data/config/locales/headmin/views/en.yml +58 -0
- data/config/locales/headmin/views/nl.yml +58 -0
- data/config/locales/nl.yml +2 -135
- data/dist/css/headmin.css +3182 -743
- data/dist/js/headmin.js +729 -33
- data/docs/README.md +2 -1
- data/docs/blocks.md +70 -85
- data/docs/devise.md +1 -60
- data/docs/fields.md +57 -0
- data/headmin.gemspec +1 -0
- data/lib/generators/headmin/blocks_generator.rb +19 -0
- data/lib/generators/headmin/fields_generator.rb +19 -0
- data/lib/generators/templates/migrations/create_blocks.rb +10 -0
- data/lib/generators/templates/migrations/create_fields.rb +13 -0
- data/lib/generators/templates/models/block.rb +3 -0
- data/lib/generators/templates/models/field.rb +3 -0
- data/lib/headmin/version.rb +1 -1
- data/package.json +6 -6
- data/src/js/headmin/controllers/blocks_controller.js +103 -0
- data/src/js/headmin/controllers/filters_controller.js +23 -12
- data/src/js/headmin/controllers/popup_controller.js +68 -0
- data/src/js/headmin/controllers/repeater_controller.js +117 -11
- data/src/js/headmin/controllers/table_actions_controller.js +16 -5
- data/src/js/headmin/controllers/table_controller.js +84 -1
- data/src/js/headmin/headmin.js +29 -56
- data/src/scss/headmin/filters.scss +0 -14
- data/src/scss/headmin/form.scss +43 -3
- data/src/scss/headmin/popup.scss +17 -0
- data/src/scss/headmin/table.scss +9 -6
- data/src/scss/headmin.scss +7 -4
- data/src/scss/vendor/redactorx/override.css +3 -0
- data/src/scss/vendor/redactorx/redactorx.css +1460 -0
- data/yarn.lock +105 -2210
- metadata +108 -62
- data/app/controllers/admin/users/confirmations_controller.rb +0 -31
- data/app/controllers/admin/users/omniauth_callbacks_controller.rb +0 -31
- data/app/controllers/admin/users/passwords_controller.rb +0 -35
- data/app/controllers/admin/users/registrations_controller.rb +0 -63
- data/app/controllers/admin/users/sessions_controller.rb +0 -28
- data/app/controllers/admin/users/unlocks_controller.rb +0 -31
- data/app/views/admin/users/confirmations/new.html.erb +0 -9
- data/app/views/admin/users/mailer/confirmation_instructions.html.erb +0 -5
- data/app/views/admin/users/mailer/email_changed.html.erb +0 -7
- data/app/views/admin/users/mailer/password_change.html.erb +0 -3
- data/app/views/admin/users/mailer/reset_password_instructions.html.erb +0 -8
- data/app/views/admin/users/mailer/unlock_instructions.html.erb +0 -7
- data/app/views/admin/users/passwords/edit.html.erb +0 -12
- data/app/views/admin/users/passwords/new.html.erb +0 -9
- data/app/views/admin/users/registrations/new.html.erb +0 -11
- data/app/views/admin/users/sessions/new.html.erb +0 -13
- data/app/views/admin/users/unlocks/new.html.erb +0 -10
- data/app/views/headmin/forms/_group.html.erb +0 -36
- data/app/views/headmin/forms/fields/_checkbox.html.erb +0 -23
- data/app/views/headmin/forms/fields/_ckeditor.html.erb +0 -28
- data/app/views/headmin/forms/fields/_currency.html.erb +0 -24
- data/app/views/headmin/forms/fields/_date.html.erb +0 -36
- data/app/views/headmin/forms/fields/_email.html.erb +0 -39
- data/app/views/headmin/forms/fields/_label.html.erb +0 -9
- data/app/views/headmin/forms/fields/_multiple_select.html.erb +0 -37
- data/app/views/headmin/forms/fields/_password.html.erb +0 -39
- data/app/views/headmin/forms/fields/_repeater.html.erb +0 -48
- data/app/views/headmin/forms/fields/_select.html.erb +0 -36
- data/app/views/headmin/forms/fields/_select_tags.html.erb +0 -32
- data/app/views/headmin/forms/fields/_textarea.html.erb +0 -29
- data/app/views/headmin/forms/fields/_url.html.erb +0 -38
- data/app/views/headmin/forms/fields/_validation.html.erb +0 -12
- data/app/views/headmin/forms/fields/repeater/_row.html.erb +0 -16
- data/app/views/headmin/layout/dropdown/_item.html.erb +0 -17
- data/app/views/headmin/layout/header/_account.html.erb +0 -25
- data/app/views/headmin/layout/header/_locale.html.erb +0 -19
- data/app/views/headmin/layout/sidebar/menu/_account.html.erb +0 -25
- data/app/views/headmin/layout/sidebar/menu/_item.html.erb +0 -16
- data/app/views/headmin/layout/sidebar/menu/_locale.html.erb +0 -18
- data/src/js/headmin/controllers/index_controller.js +0 -79
- data/src/js/headmin/controllers/repeater_row_controller.js +0 -54
- data/src/scss/vendor/choices/cross-inverse.svg +0 -6
- data/src/scss/vendor/choices/cross.svg +0 -6
- data/src/scss/vendor/choices/custom.scss +0 -28
- data/src/scss/vendor/choices/variables.scss +0 -16
@@ -1,19 +1,26 @@
|
|
1
|
-
|
2
|
-
<
|
3
|
-
|
4
|
-
|
1
|
+
<% content_for :table_actions do %>
|
2
|
+
<th class="h-table-actions d-none" data-controller="table-actions" data-table-target="actions">
|
3
|
+
<form data-table-actions-target="form" method="post">
|
4
|
+
<%= hidden_field_tag :_method, :post, 'data-table-actions-target': 'method' %>
|
5
|
+
<%= hidden_field_tag :authenticity_token, form_authenticity_token %>
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
7
|
+
<template data-table-target="idFieldTemplate">
|
8
|
+
<%= hidden_field_tag('ids[]', 'ID', multiple: true, id: 'ids_ID') %>
|
9
|
+
</template>
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
11
|
+
<div class="row g-1">
|
12
|
+
<div class="col-6 col-sm-auto">
|
13
|
+
<select class="form-select me-1" data-table-actions-target="select" data-action="change->table-actions#update">
|
14
|
+
<option disabled selected="selected"><%= t('.selection') %></option>
|
15
|
+
<%= yield if block_given? %>
|
16
|
+
</select>
|
17
|
+
</div>
|
18
|
+
<div class="col-6 col-sm-auto">
|
19
|
+
<button class="btn h-btn-outline-light w-100" type="submit" data-table-actions-target="button" disabled>
|
20
|
+
<%= t('.apply') %>
|
21
|
+
</button>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
</form>
|
25
|
+
</th>
|
26
|
+
<% end %>
|
@@ -1,19 +1,21 @@
|
|
1
1
|
<%#
|
2
|
-
|
2
|
+
headmin/table/body
|
3
3
|
accepts block: true
|
4
4
|
parameters: none
|
5
5
|
%>
|
6
6
|
|
7
|
+
<% content_for :table_body do %>
|
8
|
+
<%= yield if block_given? %>
|
9
|
+
<% end %>
|
10
|
+
|
7
11
|
<tbody data-table-target="body">
|
8
|
-
<% if
|
9
|
-
|
10
|
-
<%= yield %>
|
12
|
+
<% if content_for(:table_body).present? %>
|
13
|
+
<%= content_for :table_body %>
|
11
14
|
<% else %>
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
15
|
+
<tr>
|
16
|
+
<td colspan="100%">
|
17
|
+
<%= t('.empty') %>
|
18
|
+
</td>
|
19
|
+
</tr>
|
17
20
|
<% end %>
|
18
|
-
<% end %>
|
19
21
|
</tbody>
|
@@ -1,15 +1,19 @@
|
|
1
1
|
<%#
|
2
|
-
|
2
|
+
headmin/table/foot
|
3
3
|
accepts block: true
|
4
4
|
parameters: none
|
5
5
|
%>
|
6
6
|
|
7
|
+
<% content_for :table_foot do %>
|
8
|
+
<%= yield if block_given? %>
|
9
|
+
<% end %>
|
10
|
+
|
7
11
|
<tfoot class="table-light">
|
8
12
|
<tr>
|
9
|
-
<% if
|
10
|
-
<%=
|
13
|
+
<% if content_for(:table_foot).present? %>
|
14
|
+
<%= content_for :table_foot %>
|
11
15
|
<% else %>
|
12
|
-
<%=
|
16
|
+
<%= content_for :table_head %>
|
13
17
|
<% end %>
|
14
18
|
</tr>
|
15
19
|
</tfoot>
|
@@ -1,13 +1,9 @@
|
|
1
1
|
<%#
|
2
|
-
|
2
|
+
headmin/table/footer
|
3
3
|
accepts block: true
|
4
4
|
parameters: none
|
5
5
|
%>
|
6
6
|
|
7
|
-
<div class="
|
8
|
-
|
9
|
-
<%= yield %>
|
10
|
-
<% elsif content_for :table_header %>
|
11
|
-
<%= content_for :table_header %>
|
12
|
-
<% end %>
|
7
|
+
<div class="d-flex flex-column flex-md-row align-content-start align-items-md-center justify-content-md-between">
|
8
|
+
<%= yield if block_given? %>
|
13
9
|
</div>
|
@@ -1,13 +1,9 @@
|
|
1
1
|
<%#
|
2
|
-
|
2
|
+
headmin/table/header
|
3
3
|
accepts block: true
|
4
4
|
parameters: none
|
5
5
|
%>
|
6
6
|
|
7
|
-
<div class="
|
8
|
-
|
9
|
-
<%= yield if block_given? %>
|
10
|
-
<% end %>
|
11
|
-
|
12
|
-
<%= content_for :table_header %>
|
7
|
+
<div class="d-flex flex-column flex-md-row align-content-start align-items-md-center justify-content-md-between">
|
8
|
+
<%= yield if block_given? %>
|
13
9
|
</div>
|
@@ -1,10 +1,27 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
<%
|
2
|
+
# headmin/table/actions/action
|
3
|
+
#
|
4
|
+
# ==== Options
|
5
|
+
# * <tt>name</tt> - Name of the bulk action
|
6
|
+
# * <tt>url</tt> - URL to send the request to
|
7
|
+
# * <tt>method</tt> - HTTP method for the request (defaults to GET)
|
8
|
+
# * <tt>confirm</tt> - Message to show in a confirm dialog. Leave blank if no confirm dialog needs to be shown
|
9
|
+
#
|
10
|
+
# ==== Examples
|
11
|
+
# Basic version.
|
12
|
+
# <%= render "headmin/table/actions/action", name: 'export', url: export_admin_products_path %#>
|
13
|
+
#
|
14
|
+
# Use a different HTTP method
|
15
|
+
# <%= render "headmin/table/actions/action", name: 'export', url: export_admin_products_path, method: :post %#>
|
16
|
+
#
|
17
|
+
# Show a confirm dialog before submitting.
|
18
|
+
# <%= render "headmin/table/actions/action", name: 'delete', url: destroy_admin_products_path, confirm: 'Are you sure you want to delete these products?' %#>
|
19
|
+
|
20
|
+
url = local_assigns.has_key?(:url) ? local_assigns[:url] : request.path
|
21
|
+
method = local_assigns.has_key?(:method) ? local_assigns[:method] : 'GET'
|
22
|
+
confirm = local_assigns.has_key?(:confirm) ? local_assigns[:confirm] : nil
|
7
23
|
%>
|
8
|
-
|
9
|
-
|
10
|
-
|
24
|
+
|
25
|
+
<option value="<%= url %>" data-method="<%= method %>" <% if confirm %>data-confirm="<%= confirm %>"<%end %>>
|
26
|
+
<%= name %>
|
27
|
+
</option>
|
@@ -1,8 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<%
|
2
|
+
# headmin/table/actions/delete
|
3
|
+
#
|
4
|
+
# ==== Options
|
5
|
+
# * <tt>url</tt> - URL to send the request to
|
6
|
+
#
|
7
|
+
# ==== Examples
|
8
|
+
# Basic version.
|
9
|
+
# <%= render "headmin/table/actions/delete", url: delete_admin_products_path %#>
|
6
10
|
%>
|
7
|
-
|
8
|
-
<%= render 'headmin/table/actions/action', name: t('.button'), url:
|
11
|
+
|
12
|
+
<%= render 'headmin/table/actions/action', name: t('.button'), url: url, method: :delete, confirm: t('.confirm') %>
|
@@ -1,8 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<%
|
2
|
+
# headmin/table/actions/export
|
3
|
+
#
|
4
|
+
# ==== Options
|
5
|
+
# * <tt>url</tt> - URL to send the request to
|
6
|
+
#
|
7
|
+
# ==== Examples
|
8
|
+
# Basic version.
|
9
|
+
# <%= render "headmin/table/actions/export", url: export_admin_products_path %#>
|
6
10
|
%>
|
7
|
-
|
8
|
-
<%= render 'headmin/table/actions/action', name: t('.button'), url:
|
11
|
+
|
12
|
+
<%= render 'headmin/table/actions/action', name: t('.button'), url: url %>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<td data-table-target="cell" width="45px"
|
2
|
-
<input type="checkbox" name="id" value="<%= value %>" data-
|
1
|
+
<td data-table-target="cell" width="45px">
|
2
|
+
<input type="checkbox" name="id" value="<%= value %>" data-table-target="idCheckbox" data-action="change->table#toggleId"/>
|
3
3
|
</td>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<%#
|
2
|
-
|
2
|
+
headmin/table/foot/id
|
3
3
|
accepts block: no
|
4
4
|
parameters: none
|
5
5
|
%>
|
6
6
|
|
7
7
|
<th class="d-none d-md-table-cell">
|
8
|
-
<input type="checkbox" value="" data-
|
8
|
+
<input type="checkbox" value="" data-table-target="idsCheckbox" data-action="change->table#toggleIds"/>
|
9
9
|
</th>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<%#
|
2
|
-
|
2
|
+
headmin/table/head/id
|
3
3
|
accepts block: no
|
4
4
|
parameters: none
|
5
5
|
%>
|
6
6
|
|
7
|
-
<th
|
8
|
-
<input type="checkbox" value="" data-
|
7
|
+
<th>
|
8
|
+
<input type="checkbox" value="" data-table-target="idsCheckbox" data-action="change->table#toggleIds"/>
|
9
9
|
</th>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: {method: :post}) do |f| %>
|
2
|
+
<%= render "headmin/views/devise/shared/error_messages", resource: resource %>
|
3
|
+
|
4
|
+
<%= render 'headmin/forms/email', form: f, attribute: :email, required: true, label: :float %>
|
5
|
+
|
6
|
+
<%= f.submit t('.resend'), class: 'btn btn-lg btn-primary w-100' %>
|
7
|
+
|
8
|
+
<%= render "headmin/views/devise/shared/links" %>
|
9
|
+
<% end %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: {method: :put}) do |f| %>
|
2
|
+
<%= render "headmin/views/devise/shared/error_messages", resource: resource %>
|
3
|
+
|
4
|
+
<%= f.hidden_field :reset_password_token %>
|
5
|
+
|
6
|
+
<%= render 'headmin/forms/password', form: f, attribute: :password, required: true, label: :float %>
|
7
|
+
<%= render 'headmin/forms/password', form: f, attribute: :password_confirmation, required: true, label: :float %>
|
8
|
+
|
9
|
+
<%= f.submit t('.change_password'), class: 'btn btn-lg btn-primary w-100' %>
|
10
|
+
|
11
|
+
<%= render "headmin/views/devise/shared/links" %>
|
12
|
+
<% end %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: {method: :post}) do |f| %>
|
2
|
+
<%= render "headmin/views/devise/shared/error_messages", resource: resource %>
|
3
|
+
|
4
|
+
<%= render 'headmin/forms/email', form: f, attribute: :email, required: true, label: :float %>
|
5
|
+
|
6
|
+
<%= f.submit t('.send_instructions'), class: 'btn btn-lg btn-primary w-100' %>
|
7
|
+
|
8
|
+
<%= render "headmin/views/devise/shared/links" %>
|
9
|
+
<% end %>
|
@@ -1,16 +1,16 @@
|
|
1
1
|
<div>
|
2
2
|
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: {method: :put}) do |f| %>
|
3
|
-
<%= render "
|
3
|
+
<%= render "headmin/views/devise/shared/error_messages", resource: resource %>
|
4
4
|
|
5
|
-
<%= render 'headmin/forms/
|
5
|
+
<%= render 'headmin/forms/email', form: f, attribute: :email, required: true, label: :float %>
|
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/
|
12
|
-
<%= render 'headmin/forms/
|
13
|
-
<%= render 'headmin/forms/
|
11
|
+
<%= render 'headmin/forms/password', form: f, attribute: :password, required: true, label: :float %>
|
12
|
+
<%= render 'headmin/forms/password', form: f, attribute: :password_confirmation, required: true, label: :float %>
|
13
|
+
<%= render 'headmin/forms/password', form: f, attribute: :current_password, required: true, label: :float %>
|
14
14
|
|
15
15
|
<%= f.submit t('.change'), class: 'btn btn-lg btn-primary w-100' %>
|
16
16
|
<% end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
2
|
+
<%= render "headmin/views/devise/shared/error_messages", resource: resource %>
|
3
|
+
|
4
|
+
<%= render 'headmin/forms/email', form: f, attribute: :email, required: true, label: :float %>
|
5
|
+
<%= render 'headmin/forms/password', form: f, attribute: :password, required: true, label: :float %>
|
6
|
+
<%= render 'headmin/forms/password', form: f, attribute: :password_confirmation, required: true, label: :float %>
|
7
|
+
|
8
|
+
<%= f.submit t('.sign_up'), class: 'btn btn-lg btn-primary w-100' %>
|
9
|
+
|
10
|
+
<%= render "headmin/views/devise/shared/links" %>
|
11
|
+
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
|
2
|
+
|
3
|
+
<%= render 'headmin/forms/email', form: f, attribute: :email, required: true, float: true %>
|
4
|
+
<%= render 'headmin/forms/password', form: f, attribute: :password, required: true, float: true %>
|
5
|
+
|
6
|
+
<% if devise_mapping.rememberable? %>
|
7
|
+
<%= render 'headmin/forms/checkbox', form: f, attribute: :remember_me %>
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
<%= f.submit t('.login'), class: 'btn btn-lg btn-primary w-100' %>
|
11
|
+
|
12
|
+
<%= render "headmin/views/devise/shared/links" %>
|
13
|
+
<% end %>
|
File without changes
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: {method: :post}) do |f| %>
|
2
|
+
<%= render "headmin/views/devise/shared/error_messages", resource: resource %>
|
3
|
+
|
4
|
+
<%= render 'headmin/forms/email', form: f, attribute: :email, required: true, label: :float %>
|
5
|
+
|
6
|
+
<%= f.submit t('.resend'), class: 'btn btn-lg btn-primary w-100' %>
|
7
|
+
|
8
|
+
<%= render "headmin/views/devise/shared/links" %>
|
9
|
+
|
10
|
+
<% end %>
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# Additional translations at https://github.com/heartcombo/devise/wiki/I18n
|
2
|
+
|
3
|
+
en:
|
4
|
+
devise:
|
5
|
+
confirmations:
|
6
|
+
confirmed: "Your email address has been successfully confirmed."
|
7
|
+
send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
|
8
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
|
9
|
+
failure:
|
10
|
+
already_authenticated: "You are already signed in."
|
11
|
+
inactive: "Your account is not activated yet."
|
12
|
+
invalid: "Invalid %{authentication_keys} or password."
|
13
|
+
locked: "Your account is locked."
|
14
|
+
last_attempt: "You have one more attempt before your account is locked."
|
15
|
+
not_found_in_database: "Invalid %{authentication_keys} or password."
|
16
|
+
timeout: "Your session expired. Please sign in again to continue."
|
17
|
+
unauthenticated: "You need to sign in or sign up before continuing."
|
18
|
+
unconfirmed: "You have to confirm your email address before continuing."
|
19
|
+
mailer:
|
20
|
+
confirmation_instructions:
|
21
|
+
subject: "Confirmation instructions"
|
22
|
+
reset_password_instructions:
|
23
|
+
subject: "Reset password instructions"
|
24
|
+
unlock_instructions:
|
25
|
+
subject: "Unlock instructions"
|
26
|
+
email_changed:
|
27
|
+
subject: "Email Changed"
|
28
|
+
password_change:
|
29
|
+
subject: "Password Changed"
|
30
|
+
omniauth_callbacks:
|
31
|
+
failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
|
32
|
+
success: "Successfully authenticated from %{kind} account."
|
33
|
+
passwords:
|
34
|
+
no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
|
35
|
+
send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
|
36
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
|
37
|
+
updated: "Your password has been changed successfully. You are now signed in."
|
38
|
+
updated_not_active: "Your password has been changed successfully."
|
39
|
+
registrations:
|
40
|
+
destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
|
41
|
+
signed_up: "Welcome! You have signed up successfully."
|
42
|
+
signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
|
43
|
+
signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
|
44
|
+
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
|
45
|
+
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirmation link to confirm your new email address."
|
46
|
+
updated: "Your account has been updated successfully."
|
47
|
+
updated_but_not_signed_in: "Your account has been updated successfully, but since your password was changed, you need to sign in again."
|
48
|
+
sessions:
|
49
|
+
signed_in: "Signed in successfully."
|
50
|
+
signed_out: "Signed out successfully."
|
51
|
+
already_signed_out: "Signed out successfully."
|
52
|
+
unlocks:
|
53
|
+
send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
|
54
|
+
send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
|
55
|
+
unlocked: "Your account has been unlocked successfully. Please sign in to continue."
|
56
|
+
errors:
|
57
|
+
messages:
|
58
|
+
already_confirmed: "was already confirmed, please try signing in"
|
59
|
+
confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
|
60
|
+
expired: "has expired, please request a new one"
|
61
|
+
not_found: "not found"
|
62
|
+
not_locked: "was not locked"
|
63
|
+
not_saved:
|
64
|
+
one: "1 error prohibited this %{resource} from being saved:"
|
65
|
+
other: "%{count} errors prohibited this %{resource} from being saved:"
|